Well, on this page, I will try to resume and sum up how to use the Host simulator and main concept behind

First you should know that this simulator is use to perform setup of AI for the French robotic cup "Mission to March". For the next challenge. This simulator will probably be improve.

The robot is composed by 2 microcontrolors AVR. They are the brain of the robot. We will execute the 2 programs on an host system (my Ubuntu Computer) and provide a communication system between the 2 AVR and the display application. Executing avr program on host system means that we re-use avr C-code but some wrapper have been added to handle the fact that avr-hardware is not present on host system.

So we will have to launch 3 concurrents process. They will communicate by them self by using Unix Socket.

For this description i use : * Apbteam repository revision [d8d05fbbbd92] * A laptop powerd by a centrino processor * A Ubuntu 8.04 Distro that i customize by adding several package : gcc-avr, avr-libc, yapps2 and graphviz (To convert fsm into png picture)

Ok, now obscure things:

  1. Do something with dfagen
  2. cd trunk/tools/dfagen/dfagen/ && yapps parser.
  3. dfagen is a tool to create template of fsm.
  4. Launch Tk application
  5. cd trunk/host/inter && python inter_node.py
  6. this display the simulator interface. But touch to nothing for the momment.
  7. Compile asserv program, this one will drive motor asservissement
  8. open a new terminal
  9. cd trunk/digital/asserv/src/asserv && make
  10. This command will build an hex file that you can use to program flash avr and an executable of host system
  11. Launch program with this command : cat init move_bot_blue - | ./asserv.host -m giboulee
  12. If you are not familiar with unix culture, this previews command will replace an user that would type on this keyboard the content of file init and move_bot_blue when program asserv.host is executed.
  13. Compile IO program, this one control all sensors
  14. open a new terminal
  15. cd trunk/digital/io/src && make CB=touch
  16. This command will build an hex that you can use to program flash avr and an executable of host system
  17. Launch program with this command : cat init - | ./io.host
  18. At this momment the terminal should display a message that mean the robot is waiting an action on jack switch to start : top IDLE =start=> WAIT_JACK_IN
  19. Ready to launch the simulation
  20. return to the Tk windows
  21. click on "play" then "jack" 2 times
  22. Rock & roll it move !!!! see in terminal there is some message

graphic interface in action

This simulator system work pretty well. You should know that in matter of simulator there is several kind of level. We can consider that this one target "system" simulation. This purpose is to check and help to setup a complex system compose by several calculi unit design by several person of the team.

Tanks to whom will corrected and complete this little documentation. :)