gazebosim / gz-sensors

Provides numerous sensor models designed to generate realistic data from simulation environments.
https://gazebosim.org
Apache License 2.0
63 stars 58 forks source link

Clamping for gpu_lidar with noise is causing out of range data to show in ROS2 with ros_ign_bridge. #131

Closed patrick-neal closed 3 years ago

patrick-neal commented 3 years ago

I believe the clamping in #86 might be causing no return rays to display in Rviz2. Example of code: https://github.com/ignitionrobotics/ign-sensors/blob/bb16d12fde391e2e9655c7e74bff85193c00f119/src/Lidar.cc#L202-L220 Comment from existing code base: https://github.com/ignitionrobotics/ign-sensors/blob/bb16d12fde391e2e9655c7e74bff85193c00f119/src/GpuLidarSensor.cc#L186-L187 Visualization with noise gpu_lidar_with_noise Without noise. gpu_lidar_without_noise

peci1 commented 3 years ago

This has hit us hard in our SubT solution with MARV robot!

lidar_bad

STR:

  1. LANG=C ign gazebo -v4 sensors_demo.sdf
  2. Insert model https://app.ignitionrobotics.org/OpenRobotics/fuel/models/CTU_CRAS_NORLAB_MARV_SENSOR_CONFIG_1
  3. roscore
  4. rosrun ros_ign_bridge parameter_bridge /world/lidar_sensor/model/ctu_cras_norlab_marv_sensor_config_1/link/laser/sensor/laser/scan/points@sensor_msgs/PointCloud2[ignition.msgs.PointCloudPacked
  5. open rviz and display the pointcloud
peci1 commented 3 years ago

Fix in #132.