Simple 2D Navigation Goal is making robot to drive circles endlessly
Hi
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
- gmapping.launch - starts SLAM gmapping
- 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.
Result
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
If you echo the velocity commands coming out of the navigation stack, do they seem reasonable?
David,
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.
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.
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.
P.S. David could you please share with us some tips and tricks how do you debug move_base navigation code?
Thanks in advance
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.