ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Virtual Corridor for Robot Navigation, Updating CostMap

asked 2014-08-04 12:29:32 -0600

ROSCMBOT gravatar image


I'm asking this question again, in case there were some new thoughts from the ROS community

I'm trying to add a "virtual" corridor along the waypoints generated by the global planner (waypoints are in the middle of the virtual corridor), so the robot never leaves this "virtual" corridor when it's moving between the waypoints using a local planner. For example, if during the robot's navigation within this corridor, an obstacle appears in front of the robot and covers the entire width of the corridor, the robot should stop (Although there might be free spaces outside this virtual corridor), and if the obstacle did not cover the entire corridor, the robot should replan and find an alternative path which is still within the virtual corridor.

Apparently, the default local planners (DWA, or Trajectory Rollout) in the ROS Navigation Stack do not support such a functionality.

is it possible to manually update the costmap (using the layered costmap?), so everything outside the certain distance of the global path (i.e. outside the virtual corridor) become obstacles, so that the robot never leaves the virtual corridor?

Or any other thoughts on how to implement this feature?


edit retag flag offensive close merge delete


2 Answers

Sort by ยป oldest newest most voted

answered 2014-08-05 11:40:35 -0600

paulbovbel gravatar image

To create boundaries during exploration, I drew a polygon on a costmap layer: . You could do something similar with your corridor, and include the layer in your local navigation costmaps.

However, if you're trying to prevent your robot from traveling a certain distance away from the global planner's waypoints, it looks like you should be making a change at the local planner level, instead of on the costmaps. The local planner is the only construct that has direct access to the global planner's waypoint path (take a look at how move_base works).

If you dig into DWA, maybe you could add a new restriction on the trajectory search, to disqualify trajectories that would leave this 'corridor'.

edit flag offensive delete link more


The issue is with the replanning mode. I'd like the robot stay within the 'original' virtual corridor, even when it is replanning in the environment. So the new computed global path (or waypoints) after replanning should still be within the original corridor built on the old global path (or waypoints)

ROSCMBOT gravatar image ROSCMBOT  ( 2014-08-06 14:45:34 -0600 )edit

Sounds like you have a cycle in your information flow, which wouldn't work out of the box with move base. You could probably rig it together with a service connection from a modified local planner to a custom costmap layer.

paulbovbel gravatar image paulbovbel  ( 2014-08-06 16:00:50 -0600 )edit

answered 2014-08-05 10:25:52 -0600

David Lu gravatar image

Have you tried the tutorial here:

What you're trying to do sounds possible, in general.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-08-04 12:29:32 -0600

Seen: 1,353 times

Last updated: Aug 05 '14