MRC/Tutorials/Starting the simulator
During the course, we have many groups and only one robot, so test time on the robot is scarce. Fortunately, we have a virtual (software) representation of the robot that can be used to simulate the robot. At the moment it:
- Simulates the movement of the robot
- Simulates the laser data of the robot, created by the virtual environment
- Provides a simple visualisation
This should already be enough to get you started, and more will be added later (odometry, moving doors, better dynamics, etc).
Updating the simulator
Before you start working with the simulator, make sure you have our latest version by running
mrc-update
This will download the latest changes and compile the updated software (framework and simulator). We will notify you when we made changes to the software such that you can run the updater, but feel free to run the command whenever you want.
A word on ROS: As was already stated before, you will not be using ROS in this course, unless you really want to use it yourself. However, secretly the provided tools are build on top of that; the inter-process communication to be more specific. Don't worry about it too much.
Starting the simulator
Open a terminal and run
mrc-sim
That's it! The simulator has now been started, although we can't see it yet.
Visualization
To visualize the simulator and our robot just run
sim-rviz
This pops up a visualization window showing the robot in the virtual world. This shows how the world is (at least in simulation...), your robot will not always have access to this information. We can also see how the robot perceives the world through its sensors. You can see the LRF data projected in the world and you can probably guess what surface each points reflects. See how the laser data changes even if the robot is standing still: this is the simulated noise added to the data.
Stopping the simulator and visualization
You can stop the simulator and visualization by pressing (ctrl + C) in the terminal. (ctrl + C ) is how you stop most processes in a terminal, also your own code.