Table of Contents

3D Simulation

Simulation is the imitation of a real-world process or system over time. Previously, we dealt with simple two-dimensional simulations. 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. There are different types of simulators for various purposes. The gazebo is a universal simulator for a wide variety of aims, from mobile robots to autonomous vehicles (AVs). However, AVs simulators need powerful graphical engines to create a virtual environment as close to the real one. This is beyond the gazebo power and you can find this feature in the new modern AV simulator such as SVL simulator or CARLA.

In the first step, we chose Gazebo as the simulator and in the following focused on the SVL simulator as the main AV 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 cameras and LiDARs. Gazebo simulator can be run from the command line (headless) or with a nice graphical user interface


Gazebo is already installed with the full ROS installation. But in case that you don't install ROS in the full mode you can use this automatic installation script for installing Gazebo:

$ curl -sSL|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. Basically we can define static tf and also joints inside the URDF file. They are also used by simulators. 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. Every elements on the robot is assigned to a specific link. relation between these links is defined under the joint tags.

Example URDF file:

 <? xml version = "1.0"?>
 <robot name = "myRobot">   
   <link name = "base_link">
         <cylinder length = "0.6" radius = "0.2" />
   <link name = "right_leg">
         <box size = "0.6 0.1 0.2" />
   <joint name = "base_to_right_leg" type = "fixed">
     <parent link = "base_link" />
     <child link = "right_leg" />
en/ros/simulations.txt · Last modified: 2021/04/12 09:52 by momala
CC Attribution-Share Alike 4.0 International Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0