The Subsea Pressure Sensor Plugin is a simulation plugin designed to simulate the behavior of a subsea pressure sensor within a Gazebo simulation environment. The plugin integrates with Gazebo, using the Gazebo and ROS 2 interfaces to publish simulated sensor data. This documentation outlines the purpose of the plugin, its parameters, and its operational workflow.
Parameters that we can define in out sdf/world files -
Parameters | Default Values | Preferred range | Notes |
---|---|---|---|
Saturation |
3000 | The maximum value for output pressure in Pascals. This parameter sets an upper limit on the pressure readings produced by the sensor. | |
estimate_depth_on |
false | A boolean flag indicating whether to estimate depth based on the pressure measurement. If set to true, the plugin calculates the depth of the sensor based on the pressure readings. | |
standard_pressure |
101.325 | The standard atmospheric pressure at the surface in Pascals. This parameter is used as a reference point for calculating depth. | |
kPa_per_meter |
9.80638 | The conversion factor from depth (in meters) to pressure (in kilopascals). This parameter defines how pressure changes with depth in the simulated environment. | |
noiseSigma |
0.01 | The standard deviation of the Gaussian noise added to the pressure readings. |
First you would need to add the following lines to your sdf file-
<!-- Sea Pressure Sensor Plugin -->
<plugin
filename="sea_pressure_sensor"
name=" dave_gz_sensor_plugins::SubseaPressureSensorPlugin">
<namespace>rexrov</namespace>
<topic>sea_pressure</topic>
<update_rate>10</update_rate>
<noise_sigma>3.0</noise_sigma>
<estimate_depth_on>false</estimate_depth_on>
<standard_pressure>101.325</standard_pressure>
<kPa_per_meter>9.80638</kPa_per_meter>
</plugin>
kindly don’t forget to replace the namespace
tag with your model name.
Then Run -
ros2 launch dave_robot_launch robot_in_world.launch.py z:=-5 namespace:=rexrov world_name:=dave_ocean_waves paused:=false