How can I use sensors in a Gazebo simulation to get datasets like temperature, humidity, particles, and gas concentration?

Hello,
I am Aderemi.
It is my first time working on a robotic project, and it really gives me an opportunity to learn. Please how can I use sensors in robotic simulation with Gazebo to get datasets like temperature, humidity, particles, and gas concentration?
Thank you in anticipation of your response.
Best regards.
Aderemi

Hi @kingswhale ,

Welcome to this Community!

There are two ways to add a sensor in Gazebo [Classic and Modern] versions.

  1. Using the Sensor’s own Class explained in the documentation.
  2. Creating your own Sensor Class using Sensor Plugins Base Class.

Temperature, Humidity, Particles and Gas Concentration are usually classified as non-essential sensors on a robot - the reason being, those sensors are not crucial for robot.
Sensors like IMU, Laser Scanner / Proximity, Odometry, Camera are the most common types of sensors - being that they are not influenced by the environment.
Your examples are environment influenced sensor types.

Note that Gazebo Classic will reach End-of-Life soon and will be replaced with the new Modern Gazebo Sim.

You can find how to use Sensors for Gazebo Classic here:

  1. Gazebo : Tutorial : Gazebo plugins in ROS
  2. Gazebo: Sensors
  3. Gazebo : Tutorial : Plugins 101
    Note that the sensor types that you have mentioned are not readily available on Gazebo Classic, that means you need to design them yourself!

You can find how to use Sensors for Gazebo Sim here:

  1. Gazebo Sim: Using Sensor Plugins
  2. Gazebo Sim: gz::sim::systems Namespace Reference
    There are Thermal and ThermalSensor plugins that are readily available in Gazebo Sim. I have not tried them yet, so you need to explore it yourself.

You can try to create your own plugin in Gazebo Sim too. Refer this link: Gazebo Plugin: gz::plugin Namespace Reference
The only problem (as of now) is that the documentation is still incomplete on creating sensor plugins for Gazebo Sim.

So, in summary:
Are all sensors available on Gazebo: No.
Are any of your requested sensors available on Gazebo: Yes, Thermal Sensor in Gazebo Sim.
So, you have to create your own sensor plugin for your sensor types or find a git repository of someone who has already done it (and use it with permission from the plugin creator to use in your projects).

I hope I have answered you with required information.

Regards,
Girish

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.