Ask Your Question

obstacle_range & raytrace_range - precise explanation?

asked 2013-08-12 03:03:40 -0500

Hendrik Wiese gravatar image

Hey folks,

could somebody please explain how exactly obstacle_range and raytrace_range work? Assuming I have an IR sensor which publishes a point cloud with one point. That IR sensor can measure obstacles from 40 to 800mm. If it doesn't measure anything (there's nothing within its range) its values will exceed this range and heavily jump around (never accidentily jumping into its valid range however) and can be considered infinite/free.

How would I have to correctly configure the mentioned parameters? From the documentation I don't really understand what the parameters do. A precise explanation would be greatly appreciated.


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-08-12 05:07:13 -0500

David Lu gravatar image

Short answer: I think setting both parameters to .8 would work for you.

Long answer:

For each sensor, you specify a sensor_frame and the distance from that frame to each observation is measured.

If the observation source is set to 'marking', then it will place a lethal obstacle on the costmap if that distance is less than obstacle range. Similarly, if the source is set to 'clearing' then it will mark all of the space between the sensor frame and the observation as free space if the distance is less than the raytrace range. Otherwise, it will only clear the line that is raytrace_range long (closest to the sensor).

In your particular case, you MIGHT want different values for these two parameters if for instance, you only want to mark with certainty points <800mm, but want to clear up to 1200mm (for example).

edit flag offensive delete link more


Perfect answer! Thanks a lot.

Hendrik Wiese gravatar image Hendrik Wiese  ( 2013-08-12 05:32:29 -0500 )edit

@David Lu, Is there a relationship between raytrace_range and obstacle_range? Should it be greater than the obstacle_range? Thanks

pk99 gravatar image pk99  ( 2021-04-24 13:29:26 -0500 )edit

They are not technically related. obstacle range is often less but does not have to be. If you have further questions please open your own question.

David Lu gravatar image David Lu  ( 2021-05-13 11:59:09 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2013-08-12 03:03:40 -0500

Seen: 5,538 times

Last updated: Aug 12 '13