Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added option to publish max range readings as inf #8

Open
wants to merge 1 commit into
base: indigo-devel
Choose a base branch
from

Conversation

sachih
Copy link

@sachih sachih commented Aug 29, 2014

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.

@chadrockey
Copy link
Member

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.

@NikolausDemmel
Copy link

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.

@procopiostein
Copy link

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

@jack-oquin
Copy link
Member

+1

1 similar comment
@paulbovbel
Copy link
Member

+1

@Tones29
Copy link

Tones29 commented Feb 15, 2018

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

Karsten1987 pushed a commit to bosch-robotics-na/urg_node that referenced this pull request Jun 16, 2019
* updated readme and depo repo list

* clone ros2-devel branch for urg_node
@paulbovbel
Copy link
Member

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

@tonybaltovski tonybaltovski changed the base branch from hydro-devel to indigo-devel September 25, 2019 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants