ros-simulation / gazebo_ros_pkgs

Wrappers, tools and additional API's for using ROS with Gazebo
http://wiki.ros.org/gazebo_ros_pkgs
761 stars 773 forks source link

gazebo_ros_gpu_laser and cpu laser only write out zero intensities. #313

Open skohlbr opened 9 years ago

skohlbr commented 9 years ago

The laser plugins (both gpu and normal versions) appear to always retrieve 0 intensities from their internally used sensors (see for instance here). This makes it basically impossible to use intensity filtering, as 0 intensity scan point are among those one will want to discard in many real-life settings. To minimize special treatment for simulation, the ability to set the plugin to fill in a default minimum intensity would be highly useful. There apparently already has been a old implementation of this by PAL Robotics. Or is there some other solution to achieve setting intensity?

hsu commented 9 years ago

You can set laser_retro for all the collision elements, or the gazebo_ros_block_laser has a similar (same) implementation as the PAL robotics plugin. But I agree having the same mechanism in gazebo_ros_laser or gazebo_ros_gpu_laser is nice.

skohlbr commented 9 years ago

As I didn't want to dive too deep into gazebo plugin land to have a workable solution, I made a lightweight node that takes LaserScan messages, modifies intensity, and republishes the scan: https://github.com/team-vigir/vigir_lidar_proc/blob/master/vigir_lidar_intensity_modifier/src/laser_intensity_modifier_node.cpp

Not really a solution, but a workaround if all one wants is non-zero intensity data.