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

Navigation stack 2D

asked 2013-04-19 04:24:22 -0600

acp gravatar image

updated 2013-04-19 16:38:05 -0600

Hi

I have a patrolbot which the navigation under ROS is implemented. And well, it seems to be as if the navigation is working properly. Just one issue 1.-when I set the '2d pose estimate' under rviz and then '2d nav goal' the robot goes from the actual pose to the goal with a lot of rotations.

The question is if there is any way to make the robot goes a straight line, e.g. I will probably need to tune some parameters. Do you know which ones,

Any help will be great

edit retag flag offensive close merge delete

Comments

I would take a look at move_base. It has multiple parameters

Ivan Dryanovski gravatar image Ivan Dryanovski  ( 2013-04-19 16:37:28 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2013-04-20 15:14:19 -0600

Gav gravatar image

A couple of things you can try. The Navigation Tuning Guide is extremely helpful as well: http://www.ros.org/wiki/navigation/Tutorials/Navigation%20Tuning%20Guide

Visualise the costmap using RVIZ as the robot navigates around. The navigation stack inflates obstacles out to a certain size to ensure the centre of the robot can pass through the space. If the move_base parameters aren't set correctly the robot may be trying to over-optimistically get through narrow spaces with the global planner, and when it gets nearby realises that it's tricker, so it gets stuck and has to replan.

Visualise the path generated from the planner in RVIZ as well, that way you can see if the robot is following the path correctly, or if it gets stuck in local situations and has to replan.

When you give a target position from RVIZ, it has an orientation included in that as well. Is the rotation behaviour you're talking about the final rotation when the robot has reached its goal?

Rotating on the spot can also be caused by the robot performing 'recovery behaviours'. The robot maintains costmaps of both local and global obstacles, and whenever it sees sensor data marks it on the map as impassible. However most robots can't see in every direction, so some of the obstacle data might be out of date. E.g. Take an extreme example: if the robot moves towards me it sees me as an obstacle and turns left to go around. If I then step in front of it again it thinks there's another obstacle there too. It can't see my original position now, but it remembers that there was also an obstacle there. This can lead to situations where the robot thinks it is totally surrounded, and hence stuck, even though it the people is gone and there's only a single wall in front.

The way it recovers is by slowly rotating on the spot and 'clearing out' obstacles if sensors tell it there are none near by. Check the move_base parameters, if your robot has multiple sensors it's common to allow one set only for marking obstacles as there, but not trusting them enough to clear out space as safe, or vise versa.

The diagram here: http://www.ros.org/wiki/navigation/Tutorials/RobotSetup

Is extremely useful to understand what the navigation stack is doing 'under the hood'. I'd reccomend visualising whatever you can in RVIZ and running some more experiments to see how in particular your setup is failing.

Cheers, Gav

edit flag offensive delete link more

Comments

Thank you a lot for your long answer, The robot is working properly with the navigation_stack. I now want to move further. I want to use actionlib to pass 2D Pose estimate and 2D Nav goal. Do you know how to do that?

acp gravatar image acp  ( 2013-05-24 01:36:50 -0600 )edit

@acp do you know how to make the robot move slower? and also where you able to use actionlib? thanks

ctguell gravatar image ctguell  ( 2013-10-15 07:50:06 -0600 )edit

@ctguell See this for setting parameters of robot movement: http://wiki.ros.org/base_local_planner#Parameters. Btw, it would be better to ask new question.

ZdenekM gravatar image ZdenekM  ( 2013-10-15 20:08:01 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-04-19 04:24:22 -0600

Seen: 1,610 times

Last updated: Apr 20 '13