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

Revision history [back]

click to hide/show revision 1
initial version

I can tell you how I have solved this:

When a bumper is activated

  • low level state machine immediately stops motion and begins a cycle of ignoring cmd_vel coming from ROS

  • bumper input is communicated to ROS and added to cost map via point cloud (as you are doing)

  • low level SW backs the robot up a certain distance

  • low level SW pauses for 1 second or so at end of move to allow move_base to replan for the new position and new obstacle on cost map

  • low_level state_machine goes back to normal operation reacting to ROS cmd_vel.

In this setup 'low level' means C code running on uC between ROS PC and robot HW. move_base does not seem to get frustrated at all by the apparent willfulness of the robot to simply stop listening for 4 seconds or so.

If you don't have a uC running interference you could implement similar code in the PC, but the more quickly you stop the motor drive, the less risk there is to odom related issues from wheels spinning against an obstacle.