Talking to the Simulator
- In your project directory, type "./tekkotsu-ERS7" and hit return.
- The simulator will print out a bunch of start-up information.
When this ends. hit return again and you'll see the simulator command
prompt, "HAL:ERS7>". (HAL stands for Hardware Abstraction Layer.)
You don't need to know any simulator 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 the name or
IP address of the computer on which you're running the simulator. On
some systems you can use the name "localhost" to refer to your own
computer without knowing its specific name.
- In the ControllerGUI, go to Root Control > Mode Switch, and
start the Hello World behavior. You will see a bunch of lines print
out in the simulator window, 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 AIBO. For
example, you can go to Root Control > Status Reports > Battery
Check, and a battery status report will be printed in the simulator
window, but all the values will be zero. The simulator doesn't bother
simulating the AIBO's power limitations.
- The cleanest way to exit the simulator is to type ^D (control-D)
or "quit" or "exit". There are other ways to exit, such as by typing
^C (control-C), but these force an abort, which causes a lot of error
messages to be displayed.
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-ERS7" to kill any lingering ones.
|