A compilation of concepts I want to remember...

Navigation
 » Home
 » About Me
 » Github

Turtlepi #4: Resolving the spinning Turtlebot in RViz when using the navigation stack

08 May 2017 » RViz, turtlebot

Turtlebot spins out of control

Not sure if others have had similar issues, but when trying to use the navigation stack I found that the turtlebot had the tendency to spin out of control when given a target that required rotation as a first move.

Solution

In order to resolve this issue, we need to first inspect the relevant configuration file for the DWS planner, dwa_local_planner_params.yaml found in the /opt/ros/kinetic/share/turtlebot_navigation/param directory. The parameters that need to be considered are specified as follows:

DWAPlannerROS:

# Robot Configuration Parameters - Kobuki
  max_vel_x: 0.5  # 0.55
  min_vel_x: 0.0

  max_vel_y: 0.0  # diff drive robot
  min_vel_y: 0.0  # diff drive robot

  max_trans_vel: 0.5  # choose slightly less than the base's capability
  min_trans_vel: 0.1  # this is the min trans velocity when there is negligible rotational velocity
  trans_stopped_vel: 0.1

  # Warning!
  #   do not set min_trans_vel to 0.0 otherwise dwa will always think
  #   translational velocities
  #   are non-negligible and small in place rotational velocities will be
  #   created.

  max_rot_vel: 5.0  # choose slightly less than the base's capability
  min_rot_vel: 0.4  # this is the min angular velocity when there is negligible translational velocity
  rot_stopped_vel: 0.4

  acc_lim_x: 1.0 # maximum is theoretically 2.0.
  acc_lim_theta: 2.0
  acc_lim_y: 0.0  # diff drive robot
…

The current solution offered is capping the maximum rotation velocity by setting the max_rot_vel parameter to a smaller value then the default specification of 5.0. Reducing this value to 1.0 resolved the issue. [1]

In order to this, we can either directly amend the dwa_local_planner_params.yaml file to set a new default or, we can redefine the parameter by using <param name="move_base/DWAPlannerROS/max_rot_vel" value="1.0"/> in the <include> tag that launches the{move.base.launch.xml file as mentioned here.[2]

Result

We can see that with the redefinition of max_rot_vel the spinning issue has been resolved.

References

  1. https://github.com/turtlebot/turtlebot_apps/pull/140
  2. http://answers.ros.org/question/239340/turtlebot-spinning/