SimpleRemoteControlledRobot.xml
)
simbob.exe
SimpleRemoteControlledRobot.xml
simplerc.exe
simplerobotcontrol.exe
simbob.exe
The reason for writing this simulation and the applications was to test and demonstrate the use of the simulator as an optional replacement for a real robot. The real robot is driven by two parallel wheels mounted on dc motors. These are controlled thorugh pwm modulation by an ATMega8 microcontroller and the microcontroller recieves commands through the RS232 port of a PC on which a remote control program with GUI (simplerc.exe
) is running.
To take real advantage of having a simulator you should be able to use the same source code for both, the real robot and the simulated one. Thus I wrote the program of the microcontroller that way that it would also run on a PC. Of course there are differences, e.g. on the microcontroller you control the drives by setting specific registers while the PC version has to send commands via local socket communication to the simulated robot (more precisely to a controller component of type RCSimpleRobotComControl
). These differences are handled by macros or different implementation of functions declared in a common header so that the main functionality is the same form both: it receives the commands from the remote control (via RS232 on the real robot, via local sockets on the simulated on) and sets the voltage of the drives accordingly.