Talking to the Simulator
- In your project directory, type "./tekkotsu-CREATE" (or
"./tekkotsu-CHIARA" or whatever corresponds to the type of robot you
are using) and hit return.
- Tekkotsu will print out a bunch of start-up information. When
this ends. hit return again and you'll see the Tekkotsu command
prompt, "HAL:Create>". (HAL stands for Hardware Abstraction
Layer.) You don't need to know any commands to make basic use of the
simulator, so we won't go into these commands now.
- Start up the ControllerGUI. For a hostname, give it "localhost",
or the name or IP address of the computer on which you're running the
simulator.
- In the ControllerGUI, go to Root Control > Mode Switch, and
start the Hello World behavior. You will see a bunch of lines print
out on the Tekkotsu console, showing output that was sent to cout,
serr, and several other streams. On the AIBO you would have to telnet
to port 59000 to see these messages, but with the simulator this is
not necessary.
- The full Tekkotsu functionality is available to you through the
ControllerGUI, but not everything works the same as on the robot. For
example, you can go to Root Control > Status Reports > Battery
Check, and a battery status report will be printed in the Tekkotsu
console window, but all the values will be zero. The simulator
doesn't bother simulating the robot's power limitations.
- The cleanest way to exit Tekkotsu is to type ^C (control-C).
There are other ways to exit, such as by typing "quit" or "exit". or
^D (control-D), but depending on what Tekkotsu is doing at the time,
these can cause a lot of error messages to be displayed.
- If the simulator freezes or has a messy crash, and you can't use
^D or ^C to exit, type the suspend character, ^Z, and then type "kill
-9 %" to kill the job.
Note: sometimes when the simulator exits abnormally, some of its
processes are left lying around. If that happens, the next time you
run the simulator you may experience interference from these old
processes, e.g., ControllerGUI may be unable to connect. Use the
command "ps -a" to check which processes are running, and do "killall
-9 tekkotsu-CREATE" to kill any lingering ones.
|