Sun SPOT Robot Simulation
By roger on Apr 20, 2009
The upcoming release of Sun SPOT software (Red v5.0) will feature a new robotics simulator built into to Solarium. It allows you to use virtual Sun SPOTs to program virtual robots using the Sun SPOT Java Development Kit. The great thing about it is you can download it and use it for free right now! Even if you don't have Sun SPOTs.
The simulation roughly mimics the environment that is used in a competition held in San Diego each year called IARoc sponsored by Wintriss School. In this competition students use Sun SPOTs to control and iRobot Create to navigate a maze. The Create is very much like its more popular sibling, the Roomba except it doesn't suck... by which I mean it has no vacuum... (Roombas are great, BTW) The combination of a Create and a Sun SPOT is fantastic for learning the basics of robot motion and navigation. In the simulation you write software for a Sun SPOT, and then in Solarium, create a new Robot View and Add a Robot. This will create a Robot/VIrtual Sun SPOT combination. Back on the Grid View, you will now see a Virtual SPOT. You deploy and run your software on this Virtual SPOT and it will control your simulated robot. You have your choice of three different environments to run in; an empty room, a maze, or an obstacle course. Each view includes an 'X' as a starting point and a 'O' as an ending point. Your robot includes sensors that allow you to sense when your robot is over one of these marks. We also provide a sample application that can find the center of the room, or if you poke around in the code a little, you'll see a simple wall follower. Its just enough to get you started.
Its great fun! ...and you can get as fancy as you like. For instance, you can create multiple robots that will interact in a single view. These robots can interact with each other. They can run the same code or different code... whatever you like. Of course, they can also use the the Sun SPOT radio communication library to communicate with each other. This way your robots can cooperate to carry out a task.
And of course, if it doesn't do what you like, remember you have all the source code to the entire system, so you can make it do exactly what you would like. Give it a try!
To use the simulator follow the instructions here.