urg_node icon indicating copy to clipboard operation
urg_node copied to clipboard

Added option to publish max range readings as inf

Open sachih opened this issue 11 years ago • 7 comments

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.

sachih avatar Aug 29 '14 23:08 sachih

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.

chadrockey avatar Aug 30 '14 05:08 chadrockey

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.

NikolausDemmel avatar Jan 26 '16 19:01 NikolausDemmel

+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.

procopiostein avatar Jul 05 '17 08:07 procopiostein

+1

jack-oquin avatar Jul 05 '17 17:07 jack-oquin

+1

paulbovbel avatar Nov 07 '17 23:11 paulbovbel

+1, my UTM30-LX with urg_node outputs currently the range 0.0010000000474974513 for inf readings

Tones29 avatar Feb 15 '18 16:02 Tones29

Ping maintainer @tonybaltovski, would you consider merging this PR?

paulbovbel avatar Sep 18 '19 21:09 paulbovbel