Gazebo: the Power of Simulations
Updated: May 7, 2021
In many automation applications, specially in the case of autonomous vehicles,
like the AUV we develop, doing tests with the actual equipment is not always a viable option.
These endeavours usually take very long and often require a big team and a place with
adequate conditions, which might mean very high operational costs.
In spite of said problems, virtual simulation tools have become very capable and
useful when developing engineering projects nowadays. With that in mind, we’ll briefly
explore one of these tools: Gazebo.
Gazebo is a simulation program mostly employed in the robotics sector and its main
feature is being capable of calculating physics and graphics in real time while maintaining its
simplicity. Furthermore, its compatibility is one of its main selling points, specially in the
case of systems using ROS, which is known to be widely integrated with the Gazebo
ecosystem. This makes it so the environment as a whole is ideal for debugging algorithms of
Simulation in the Gazebo
In order to add to the realism of the simulations provided by Gazebo, it’s possible to
enlarge its feature set through the use of plugins. These plugins are often, but not restricted
to, used to mimic the behaviour of specific sensor. The simulated sensors then can be fine-
tuned so that their output is indistinguishable from the real world, and therefore enabling a
single to source code to power both the real machine and the simulated one, eliminating the
need of tweaking their inner-workings.
Regarding its use within UFRJ Nautilus, Gazebo is often used to try improvements to
the AUV’s state machine without the need to take the vehicle to an actual pool. This
enables software features to be worked on in an iterative manner, trying new algorithms in
a dynamic workflow.
Beyond this use, Gazebo is also employed in many machine learning applications,
being particularly useful in reinforcement learning tasks, that rely heavily on simulated
environments. This happens because this type of use often needs to assign scores,
incentives or punishes to an agent in a given task, which is made easier by Gazebo’s high
flexibility. This aspect, alongside its compatibility, make this tools potential virtually limitless
in this field.
The key point to all this flexibility is that Gazebo can communicate using network
ports, whether physical or virtual. In practice, this means that the program can work in
almost any application, regardless if it’s autonomous or manned, with one or many
machines, with or without using ROS. Gazebo also counts with a large and passionate
community behind it. There are countless tutorials, articles online and lots of open-source
code available. In the end its biggest asset are its accessibility and its flexibility, which
made it suitable for our application, and maybe it can also suit yours in the future.
Written by Lucas Ikuhara