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

Enable/disable obstacle avoidance during operation

asked 2020-09-10 10:52:44 -0500

tbondar gravatar image

Hi All,

Is there an easy way to enable and disable obstacle avoidance when the robot is in operation? I would like to do this without editing config files and restarting ROS. Restarting ROS would be acceptable if necessary (i.e. rebooting the computer).

For some background, I use LiDAR for obstacle detection and I want to be able to enable / disable obstacle avoidance when the robot moves to a different terrain. For example when the robot is surrounded with vegetation (grass) the LiDAR will see obstacles everywhere making navigation impossible even if the robot could move. On a clear area obstacle avoidance could be turned back on.

What would be an elegant way to achieve this? Thank you!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-09-21 03:29:35 -0500

Andy West gravatar image

Hi tbondar,

If you are using move_base with costmap_2d, the layers of the costmap can be enabled/disabled using the dynamic reconfigure server. If you have your system running, and use:

rosrun rqt_reconfigure rqt_reconfigure

You can manually enable/disable the obstacle layer and let move_base etc path plan using other layers. If you want to make your own node to do this on your behalf take a look at running a dynamic reconfigure client.

edit flag offensive delete link more

Question Tools



Asked: 2020-09-10 10:52:44 -0500

Seen: 423 times

Last updated: Sep 21 '20