Gazebo does not provide distance sensors out of the box.
As a workaround, the simulated Dr. Drift is equipped with depth cameras. The depth camera sensor data is then converted into a distance by extracting the closest point inside the depth cameras point cloud.
This is done separately for each time of flight sensor through an instance of the SensorTofNode.
ROS node which receives a pointcloud and publishes the point with minimum norm of that pointcloud.
- class SensorTofNode[source]¶
ROS node which receives a pointcloud and publishes the point with minimum norm of that pointcloud. This is done to emulate a time of flight sensor.
Subscribes to depth camera sensor from gazebo
Publishes distance to object on tof topic
Turn off node.
Process new sensor information of depth camera.