ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Are you using the urg_node or the hokuyo_node? The lasers send error codes telling what types of erroneous readings they are getting. The urg_node turns all error readings into NaN, but the hokuyo_node turns errors that are reported as "outside of max distance" into INF. Check out this chunk of code from the hokuyo_node to see where they are setting INF values. Having INF values will allow you to specifically know that there are no objects in range, then you could use a LaserScanRangeFilter to move all INF values to a max_range+1 value. Then you can use ~maxRange and ~maxUrange params in gmapping to properly handle these readings.

In summary, I've had much better luck with hokuyo_node than urg_node for specifically the reason you are describing.