Robot starts rotating instead of following path to 2D Nav Goal

asked 2017-04-27 12:15:23 -0600

nico_b gravatar image

Hi,

Following all the steps described in the Navigation tutorials has led me to the point of finally being able to set a 2D Nav Goal. Unfortunately, whenever I do this, my robot keeps rotating and rotating, every now and then there are tiny accelerations in the x-direction, but so small, that there is no movement at all (except for the rotation)...

Prior to that I set the 2D Pose Estimate and do drive around with the joystick, but none of them does solve my problem.

I run ROS Kinetic in Ubuntu 16.04.2 LTS on a Raspberry Pi 3. Odom gets published via laser_scan_matcher. Here is the rqt_graph (imgur-link). Since the radius of the particles is at least approximately 0.5m I assume that this might be the problem, but I'm not sure about that. Whenever the robot rotates, there is a shrinkage and growth of the radius, but it seems like the robot can't localize itself well enough.

Has anyone of you ever experienced a similar behaviour?

Following is the output I get after setting the 2D Nav Goal.

 [ WARN] [1493310857.355308516]: Costmap2DROS transform timeout. Current time: 1493310857.3550, global_pose stamp: 1493310857.0481, tolerance: 0.3000
[ WARN] [1493310857.359349766]: Could not get robot pose, cancelling reconfiguration
[ WARN] [1493310857.799819775]: Unable to get starting pose of robot, unable to create global plan
[ WARN] [1493310857.855589411]: Unable to get starting pose of robot, unable to create global plan
[ WARN] [1493310858.948979328]: Costmap2DROS transform timeout. Current time: 1493310858.9487, global_pose stamp: 1493310858.6479, tolerance: 0.3000
[ WARN] [1493310858.949254432]: Unable to get starting pose of robot, unable to create global plan
[ WARN] [1493310860.662200924]: Costmap2DROS transform timeout. Current time: 1493310860.6620, global_pose stamp: 1493310860.3455, tolerance: 0.3000
[ WARN] [1493310860.662507955]: Could not get robot pose, cancelling reconfiguration

Obviously the robot can't be localized well enough. But how do I achieve that? Are there any params that need to be set? Or is it rather a problem in my navigation stack?

As always, every helping hand is appreciated. Thanks in advance.


base_local_planner_params.yaml

TrajectoryPlannerROS:
  max_vel_x: 0.19
  min_vel_x: -0.19
  max_vel_theta: 0.30
  min_vel_theta: -0.30
  max_in_place_vel_theta: 0.34
  min_in_place_vel_theta: -0.34

  acc_lim_theta: 0.19
  acc_lim_x: 0.05
  acc_lim_y: 0.05

  holonomic_robot: true

  meter_scoring: true
  controller_frequency: 3.0

  dwa: true

costmap_common_params.yaml

plugins:
  - {name: static_map,      type: "costmap_2d::StaticLayer"}
  - {name: obstacles,       type: "costmap_2d::VoxelLayer"}
  - {name: inflation_layer, type: "costmap_2d::InflationLayer"}

obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[0.05, 0.05], [0.05, -0.05],[0, -0.10]]
#robot_radius: 0.20
inflation_radius: 0.55

obstacles:
  observation_sources: laser_scan_sensor
  laser_scan_sensor: {sensor_frame: laser, data_type: LaserScan, topic: scan, marking: true, clearing: true}

global_costmap_params.yaml

global_costmap:
  global_frame: /map
  robot_base_frame: base
  update_frequency: 0.8
  static_map: true
  width: 5
  height: 2
planner_frequency: 0.3

local_costmap_params.yaml

local_costmap:
  global_frame: odom
  robot_base_frame: base
  update_frequency: 1.0
  publish_frequency: 2.0
  static_map: false
  rolling_window: true
  width: 3.0
  height: 3.0
  resolution: 0.05
controller_frequency: 2.0
edit retag flag offensive close merge delete

Comments

Sounds like your robot is going straight into a rotate recovery sequence. Check to make sure your global map is being loaded (view it in RViz) and that your nav goal is on the global map also view in rviz). If both those check out let me know.

shoemakerlevy9 gravatar image shoemakerlevy9  ( 2017-04-27 12:22:16 -0600 )edit

Thanks for your suggestion. Global map and nav goal are loaded and I'm able to see them in rviz. The planned path is visible, too, and it's not blocked or unknown.

nico_b gravatar image nico_b  ( 2017-04-28 02:36:32 -0600 )edit

Your acc limits look pretty low along with the mentioned "tiny accelerations in the x-direction" I would try to increase all limits.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2017-04-28 05:06:38 -0600 )edit

Thanks a lot, Humpelstilzchen, that solved my problem at least partially! Now, the robot does at least some linear movements. Nevertheless I get problems with the robot pose and there are a lot of direction changes... Is this an amcl problem? Thanks again!

nico_b gravatar image nico_b  ( 2017-04-28 06:34:35 -0600 )edit

Check first if your odometry works correctly, next check if reported real movement and odometry matches the cmd_vel input.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2017-04-28 12:44:09 -0600 )edit

@nico_b Did the answers above resolve your issues? I had a similar issue where setting the nav_2d pose target behind the turtlebot to spin out of control.

This thread helped to resolve: http://answers.ros.org/question/38507...

surfertas gravatar image surfertas  ( 2017-05-11 00:34:45 -0600 )edit