The objective of this project is to explore different modes of controlling mobile robots, using a Raspberry Pi. The BOE Activity Robotic Platform was selected for this project. The propeller based robot control language was programmed in Tachyon Forth. An XBee is used for wireless communication and a Servo/Ping added to the BOT. An image of the BOT and the Tachyon program listing (TBNOEP.txt) are attached.
Figure 2 shows the Pi serving as a portable serial terminal. The display is controlled by an Adafruit software package. Minicom, a wireless keyboard, rechargeable battery and a XBee complete the system. A major advantage of a forth-based rcl is that it makes the robot programmable. We can make changes in parameters, add new commands to the rcl vocabulary, as well as send commands to the robot.
A major reason for acquiring a Pi is that you get access to Mathematica. IMHOP, the Wolfram Language is the
premier programming environment on the Pi. It gives the programmer the ability to do "things" that are not easily done, if at all, using other available languages, e.g., python, et al. For example, we can use dynamic programming to construct a control panel specific for our application as shown in Figure 3. Rather than typing commands, we can use mouse clicks to accomplish our objective. The Mathematica program (BOEBRAIN) is attached as a pdf file.
The control panel gives the operator access to all the rcl commands, **** well as rtequired variables. Commands are organized into 3 groups.
-- Setting speeds, directions and exercising single motors.
-- Indefinite motions which are controlled by the operator in "drone" mode. Motions are terminated by
executing STOP (sets speed to 0) or HALT (sets direction to 0),
-- Defined motions which are restricted by execution time, inches travelled or degrees turned. The STEP
command emulates a stepper motor, allowing exact positioning of the robot.
-- Maneuvers (MAN1, etc.) which are predefined sequences of motions. MAN1 exercises the robot and
MAN2 implements an avoidance maneuver.
If you prefer to press a "real" button, the last command activates a gamepad, if connected to the pi. Mathematica can be programmed to use devices such as gamepads and joy sticks.