This is an old revision of the document!
Simulation is the simulation of a real-world process or system over time. Previously, we dealt with simple two-dimensional simulation. Very sophisticated three-dimensional systems can also be simulated. Simulation is a very important part of the ROS and robot development process as it allows the robot to be programmed and experimented without having a physical robot. Robot simulation is an important tool for every robot builder. A well-developed simulator lets you quickly test algorithms, customize robots, and even train artificial intelligence. We chose Gazebo as the simulator. Gazebo offers the ability to accurately and efficiently simulate multiple robots in complex indoor and outdoor environments. The simulator has a full featured physics engine, high quality graphics and good ROS compatibility. It is possible to simulate different motors and joints and different sensors, such as camera and lidar. Gazebo simulator can be run from the command line (headless) or with a nice graphical user interface
There is an automatic installation script for installing Gazebo:
curl -sSL http://get.gazebosim.org|incl
The Unified Robot Description Format (URDF) is a robotic model in XML format. The model primarily contains the coordinates frames (/tf). These help us find out what the different parts of the robot depend on. For example, we find out where the robot is located on the camera. URDF files are also used by the simulator. According to this the simulator knows the shape of the parts of the robot and where the joints of the robot are. Making URDF files may seem difficult at first, but fortunately many popular robot models are freely available on the Internet.
In order to modify the robot model both in the simulation and in Rviz, the robot's URDF file must be changed. This is necessary if we want to change the configuration of the robot, for example by adding sensors to the robot.
Example URDF file:
<? xml version = "1.0"?> <robot name = "myRobot"> <link name = "base_link"> <visual> <geometry> <cylinder length = "0.6" radius = "0.2" /> </geometry> </visual> </link> <link name = "right_leg"> <visual> <geometry> <box size = "0.6 0.1 0.2" /> </geometry> </visual> </link> <joint name = "base_to_right_leg" type = "fixed"> <parent link = "base_link" /> <child link = "right_leg" /> </joint> </robot>