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

Doing navigation, while avoiding some region

asked 2013-01-15 00:55:53 -0500

Hi All,

I am using navigation stack with PR2 and turtlebot in a simulated home environment. Is it possible to constrain the path of the robot so that it can avoid some region. For example, say floor of the room has white tiles with few red tiles at center, and I want the robot, not to run over the red tiles. Or say there is some marking or carpeting on the path (having different color), and I need the robot to do navigation only on that path.

Any suggestion or pointers on how I can achieve this will be greatly appreciated.

I needed this for executing action for a command like : "Move to the chair, avoiding the red region."

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-01-15 04:48:34 -0500

Karan gravatar image

You would have to write a custom Cost function depending on your particular need!! In your case when you said that you wanted to avoid red tiles you certainly would term them as obstacles in your code..and then run a suitable path planner..

edit flag offensive delete link more


Hi Karan, Thanks for the reply. Is there any tutorial etc., on writing the custom cost function. Or can you please point me to specific file where I need to make the changes in. In my case the cost function will change depending on the command (and that is exactly what I want to do.) Thanks

aknirala gravatar image aknirala  ( 2013-01-15 05:27:06 -0500 )edit

You would have to write a node yourself which would process the input image stream and mark the regions which turn out to be red. Then make a 2d grid of surrounding region which has those regions marked to be non traversable. Then run a suitable planner..

Karan gravatar image Karan  ( 2013-01-15 08:57:09 -0500 )edit

Question Tools


Asked: 2013-01-15 00:55:53 -0500

Seen: 207 times

Last updated: Jan 15 '13