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

Voxel maps not working with Turtlebot2 bumpers (Updated)

asked 2013-12-09 08:44:19 -0500

BlitherPants gravatar image

updated 2013-12-20 07:54:25 -0500


I have a Turtlebot 2 (Kobuki + Kinect) that I'm working on a navigation system for.

I am currently having a problem with getting move_base to behave safely in the event of a collision.

For obstacles that the Kinect can see, this is not a problem, but there are many things (the bases on office chairs, glass doors, short items, the list goes on...) that the Kinect can not account for.

To solve this problem, I have changed the gmapping local costmap to a voxel map, so I have an obstacle layer for the Kinect and a separate obstacle layer for the bumpers. However, this solves very little. If the robot is moving and hits something that causes the bumper to depress, it acts as though nothing happened and keeps trying to go forward.

In an attempt to narrow the cause of this problem down, I have verified the following:

  • I can use rostopic echo mobile_base/events/bumper to see that the bumpers respond to being pressed.

  • In rviz, I can see that when the robot is sitting still, I can press the bumpers and the local costmap will be updated to show an obstacle in front of the robot. Letting go of the bumper will not clear the obstacle, and if I send the robot a goal, it will try to navigate around the "obstacle" created by pressing the bumper.

  • Also in rviz, if I send the robot a goal to move forward, and I jump in its path so that the Kinect can see me, the robot will steer around me.

However, if I get in the robot's way by depressing the bumper but staying out of the sight of the Kinect, the robot will simply try to aggressively push through my hand.

After having played with this configuration for a while, I have noticed that the bumpers are inserting obstacles into the costmap, but it looks like it's not doing it fast enough for the robot to change its behavior. In other words, by the time the obstacle shows up in rviz, it is either directly underneath the robot, or behind it. My guess is that is why the robot doesn't reroute -- because it doesn't think the obstacle is in its path.

Does anyone have any comment on this? Am I right in my hypothesis for why this happens? If so, how would I go about remedying this? Perhaps writing code in my application to raise an interrupt on bumper pressing, sending a cancel to move_base, making the robot back up a few inches, and resending the goal?

Or am I missing something else that would cause the bumpers to work properly without the need for making drastic changes?

I have taken a video capture of the above happening in rviz. If that would be helpful, I will try to upload it to YouTube or something.

The steps I take to get this problem are as follows:

roslaunch turtlebot_bringup minimal.launch
roslaunch ...
edit retag flag offensive close merge delete



The local costmap update frequency can be configured in local_cost_map_params. Try to configure update_frequecny in local_costmap_params.yaml. Reference : If it does not work, could you share the video? I am just curious how it behaves..

jihoonl gravatar image jihoonl  ( 2013-12-16 16:00:39 -0500 )edit

Thanks for the response! I've already made a modified version of kobuki_safety_controller that seems to work, but I'm still looking into it. I may try your suggestion, though I'm wary of bogging down the computer (gmapping seems to crash a lot running multiple processes). I'll update when possible.

BlitherPants gravatar image BlitherPants  ( 2013-12-20 04:23:08 -0500 )edit

Only once I increased the frequency to 20Hz (high!) did it work with the default safety controller. Gmapping froze once so it may be too much for my CPU. Still, this is a good answer. In the future, I'll test this against what I did (changing safety_controller) to see which works better. Thanks!

BlitherPants gravatar image BlitherPants  ( 2013-12-20 07:18:37 -0500 )edit

I attached the video for you. At least, I think I did, but I can't seem to find where it shows.

BlitherPants gravatar image BlitherPants  ( 2013-12-20 07:55:35 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-03-12 04:16:00 -0500

BlitherPants gravatar image

I fixed this problem by modifying kobuki_safety_controller so that it pauses long enough to register the obstacle before backing up. I also increased the update_frequency as @jihoonl suggested.

edit flag offensive delete link more

Question Tools



Asked: 2013-12-09 08:44:19 -0500

Seen: 797 times

Last updated: Mar 12 '14