ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Simple 2D Navigation Goal is making robot to drive circles endlessly

asked 2015-01-08 17:40:20 -0600

Andriy gravatar image

updated 2015-01-13 15:05:53 -0600


I have created URDF for simple three-wheeled robot with differential drive with laser scanner on top of it.

All packages created for ROS Hydro can be found here

In package robone_description there is folder urdf with robot description. In folder launch there is file display.launch which starts RViz with robot model and robot state publisher node.

The package robone_2dnav contains two launch files

  1. gmapping.launch - starts SLAM gmapping
  2. move_base.launch - starts move base node

Configuration for those nodes can be found in the folder config for robone_2dnav package.

Also I have created package robone_gazebo to start simulation of the robot. Please ignore package robone_main. It does not have anything to do with the issue.

Previously I have some issues with SLAM gmapping but now map of the environment is good.

To reproduce issues I am doing following steps

  • roslaunch robone_gazebo robone.launch
  • roslaunch robone_description display.launch
  • roslaunch robone_2dnav gmapping.launch
  • roslaunch robone_2dnav move_base.launch
  • In Gazebo office wall will block all view. Please right click on the working area of the Gazebo and in context menu select View->Wireframe so you’ll be able to see robot in the building’s room.
  • In RViz select “2D Nav Goal” in the toolbar. Click on point approximately 1 meter in front of robot.


Robot will start making clockwise circles in the room indefinitely or until it collide with the wall.

Expected behavior

Go directly to the point which is 1m in from of robot. There is no obstacles to avoid on its path.

The question is what I am doing wrong in this simple setup of navigation stack?

If bag file is needed please provide names of the topics which need to be provided because for all topics such file is too big to send.

Link to cmd_vel.log file

edit retag flag offensive close merge delete


If you echo the velocity commands coming out of the navigation stack, do they seem reasonable?

David Lu gravatar image David Lu  ( 2015-01-11 16:58:34 -0600 )edit


Actually I have interesting data in cmd_vel At the beginning of the movement I have cmd_vel with angular.z > 0 the rest of the linear and angular components are zero. This is only for few commands.

Andriy gravatar image Andriy  ( 2015-01-13 14:59:47 -0600 )edit

After this linear.x became 0.5 and angular.z start decreasing towards zero. Other linear and angular components are zero.

So it seems that robot is turning at the beginning of movement however Navigation Goal is in from of it.

Andriy gravatar image Andriy  ( 2015-01-13 15:00:10 -0600 )edit

I have looked in RViz and it seems that my base_link is oriented in the following way green axis is pointing from center of robot to it's front red axis from center to right side. blue axis from center to the top.

Andriy gravatar image Andriy  ( 2015-01-13 15:00:31 -0600 )edit

P.S. David could you please share with us some tips and tricks how do you debug move_base navigation code?

Thanks in advance

Andriy gravatar image Andriy  ( 2015-01-13 15:02:48 -0600 )edit

Is navigation stack assuming that red axis should point from robots center to front? This is how I can explain this turn at the beginning of the movement to the Navigation Goal.

Andriy gravatar image Andriy  ( 2015-01-13 15:04:47 -0600 )edit

2 Answers

Sort by » oldest newest most voted

answered 2015-01-14 09:54:04 -0600

David Lu gravatar image

The frame conventions are here: X Y Z corresponds with Red Green Blue, so you should have the red axis pointing forward.

edit flag offensive delete link more

answered 2015-01-14 14:42:24 -0600

Andriy gravatar image


Thank you for your comments.

I have changed orientation of the base_link in the way that axis X (red one) is pointing forward and axis Y (green one) is pointing on the left hand side and my robot is reaching goal in front of it almost perfectly.

edit flag offensive delete link more


Great! Please hit accept on my answer above (and in the future don't answer your own question just to say that it worked).

David Lu gravatar image David Lu  ( 2015-01-14 15:44:14 -0600 )edit

ok, I will :) Thank you one more time

Andriy gravatar image Andriy  ( 2015-01-15 13:25:55 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-01-08 17:40:20 -0600

Seen: 1,845 times

Last updated: Jan 14 '15