Page 132 - The Ultimate Palm Robot
P. 132

Color profile: Generic CMYK printer profile
           Composite  Default screen
                                                          Bots /The Ultimate Palm Robot/ Mukhar & Johnson / 222880-6 / Chapter 5






                                                                 Chapter 5  Checking Out the Robot   115



                                      If there is a problem, you will see an error message.

                                    Launch a cup file
                                    After a cup file has been downloaded to the BrainsStem, you will send a
                                    launch command to start the program:

                                   launch module_id slot
                                      The first parameter in the command is the module number. Again, for the
                                    BrainStem GP 1.0, 2 is the default module number. The second parameter is
                                    the same slot number to which the program was loaded. The command to
                                    launch the program in slot 0 is shown here:

                                   launch 2 0

                                      And, the entire sequence of commands to compile, load, and launch the
                                    simple.tea program using slot 0 on the BrainStem module will look like this:
                                   steep "simple.tea"
                                   load "simple.cup" 2 0
                                   launch 2 0

                                      If everything works correctly, the program will start executing and the ro-
                                    bot may begin to spin its wheels. If you are using a PDA, simply place the ro-
                                    bot on the floor. If you are using a PC, detach the robot from the serial cable
                                    and place it on the floor. Try placing an obstacle in front of sensor 0 and see
                                    what the robot does.
                                    Examining a TEA File

                                    When we compiled, loaded, and launched the simple.tea program on the
                                    PPRK for the first time, it didn’t work the way we expected it to. The docu-
                                    mentation in the manual states

                                       Wait until the robot stops moving and then wave your hand in front of each
                                       ranger slowly. One of the rangers will initiate a simple movement program….

                                      We interpreted that to mean that if any sensor detected an object, the robot
                                    would perform the movement program. But when we launched the program,
                                    two of the three sensors did not appear to be detecting anything, because when
                                    those two sensors should have detected something, the robot did nothing.
                                      Next, we checked all the connections and used the GP and Config pro-
                                    grams to check the sensors. Everything seemed to be okay, so why didn’t it
                                    work the way we thought it should?






           P:\010Comp\Bots\880-6\ch05.vp
           Monday, May 12, 2003 4:06:14 PM
   127   128   129   130   131   132   133   134   135   136   137