urg_node
                                
                                 urg_node copied to clipboard
                                
                                    urg_node copied to clipboard
                            
                            
                            
                        Added option to publish max range readings as inf
In the costmap layers there is an option to use max range observations to clear the costmap (using raytracing) - by setting inf_is_valid to true.
However, this driver publishes max range readings as nan - which makes it impossible to use this driver and clear the costmaps with max range readings.
Added param to send max range readings as inf.
Set flag no_range_as_inf to true.
Thanks for catching this not being implemented.
I remember now the reason why it was not, is that I never found the error code page. Some errors cannot be turned into Infinity (see the driver for SCIP 2.0):
https://github.com/ros-drivers/hokuyo_node/blob/indigo-devel/src/hokuyo.cpp#L542
Can you find a similar table for SCIP 2.2?
Also, this should go somewhere around here inside of urg_c, not urg_node: https://github.com/ros-drivers/urg_c/blob/master/current/src/urg_sensor.c#L567
I'm also OK with this NOT being a parameter. NaNs and Infs should be fully expected according to REP 117.
I'm also OK with this NOT being a parameter. NaNs and Infs should be fully expected according to REP 117.
+1
This just bit me after switching from hokuyo_node due to the recommendation on the wiki http://wiki.ros.org/hokuyo_node. I'm surprised of this short coming for a driver that is recommended to replace an older one that works properly in that case.
I remember now the reason why it was not, is that I never found the error code page. Some errors cannot be turned into Infinity (see the driver for SCIP 2.0):
In fact at least for my Hokuyo UTM30LX I get a value very close to 1.0 for the ranges that should be inf. I.e. this patch would not catch that case for my sensor.
Maybe the same error code tables as in the 2.0 spec should be used? Not sure what to do with models that are not listed in that spec.
+1
I am also affected by the problem of not clearing costmaps due to the nan readings. I understand that they may refer to different error codes, but at least we could have an option to force an inf if we want to.
+1
+1
+1, my UTM30-LX with urg_node outputs currently the range 0.0010000000474974513 for inf readings
Ping maintainer @tonybaltovski, would you consider merging this PR?