Rosanswers logo

I want to make the robot navigate an environment with a maximum possible offset with respect to a user specified path. In order to accomplish this, I had thought of creating a virtual "tunnel" around the path so that the robot may be able to navigate around small obstacles but never wander too far from the path.

The original idea was to implement this as a costmap2D layer in the local costmap, but to try it out quickly, I simply modified the global costmap by hand.

When testing my robot in simulation, the global planner performed as was expected, but when navigating, the robot steered clear of an obstacle and traversed lethal terrain.

This leaves me wondering if the local planner ignores the static map and global costmap, which seems to be a dangerous behaviour, what if, for example, there's a glass wall included in the static map that's not detectable by the range finder and thus is not included in the local costmap?

I've attached an image of the simulation in rviz. In it you will be able to observe the robot path though the odometry readings and how the robot went though the walls of the virtual tunnel.

Thank you for your time.

IMAGE: https://imgur.com/a/y4mlzem

Originally posted by SleepyTurtle on ROS Answers with karma: 30 on 2019-02-06

Post score: 0


1 Answer 1


Rosanswers logo

(I post this as a an answer, as your question is basically: "does the local planner ignore the static map / global costmap", and not what to do about it)

Your observation is correct. I'd say this is intended behavior, depending on your configuration of the local costmap.

Even though I understand your use case and why you DON'T want this to happen, think of another use case:

You created a map of your environment, with a door being closed and thus marked as an obstacle. But you might want to move into the room nonetheless, if the door is open. Thus, the behavior you experience is what you actually want.

AFAIR, you need to have a static_map_layer in your local costamp to achieve what you want. Though it might be also required to tweak your obstacle_layer settings as well. If you share your costmap configuration, we could help further.

Originally posted by mgruhler with karma: 12390 on 2019-02-06

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by SleepyTurtle on 2019-02-06:
Thank you for your answer. This does not affect me directly, as I was already planning on adding the layer to the local costmap, but I asked anyway because it conflicted with my understanding of how the navigation stack worked.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.