0
$\begingroup$

Rosanswers logo

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


Originally posted by acp on ROS Answers with karma: 556 on 2013-04-19

Post score: 1


Original comments

Comment by Ivan Dryanovski on 2013-04-19:
I would take a look at move_base. It has multiple parameters

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by Gav with karma: 478 on 2013-04-20

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by acp on 2013-05-24:
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?

Comment by ctguell on 2013-10-15:
@acp do you know how to make the robot move slower? and also where you able to use actionlib? thanks

Comment by ZdenekM on 2013-10-15:
@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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.