dwb_local_planner movements are not smooth

asked 2021-07-01 04:39:35 -0600

rappy gravatar image

I am using robot_navigation package on Ubuntu 18.04. I have successfully integrated the package however, robot movements are not smooth and it is doing sudden backward motions. I am not sure how to tune the parameters in order to make the robot move smoother and prevent such shaky behaviors. My parameter files as follows:

DWBLocalPlanner:
  max_vel_x:  0.8
  min_vel_x: -0.2

  max_vel_y: 0.0
  min_vel_y: 0.0

  max_speed_xy: 0.8
  min_speed_xy: 0.1

  max_vel_theta: 0.5
  min_speed_theta: 0.1

  acc_lim_x: 0.2
  acc_lim_y: 0.0
  acc_lim_theta: 0.2
  decel_lim_x: -0.4
  decel_lim_y: -0.0
  decel_lim_theta: -0.2


  yaw_goal_tolerance: 0.8
  xy_goal_tolerance: 0.4

  split_path: true

  trajectory_generator_name: dwb_plugins::StandardTrajectoryGenerator 
  sim_time: 2.0
  vx_samples: 15
  vy_samples: 1       
  vtheta_samples: 30
  discretize_by_time: false
  angular_granularity: 0.15
  linear_granularity: 0.3

  goal_checker_name: dwb_plugins::SimpleGoalChecker

  prune_plan: true
  prune_distance: 1.0   

  critics: [RotateToGoal, ObstacleFootprint, PathAlign, PathDist]
  RotateToGoal:
    scale: 16.0
  ObstacleFootprint:
    scale: 0.01
    max_scaling_factor: 0.2 
    scaling_speed: 0.25
    sum_scores: false
  PathAlign:
    scale: 16.0
    forward_point_distance: 0.525
  PathDist:
    scale: 32

  publish_cost_grid_pc: true
  debug_trajectory_details: false
  publish_evaluation: true
  publish_global_plan: true
  publish_input_params: true
  publish_local_plan: true
  publish_trajectories: true
  publish_transformed_plan: true
  marker_lifetime: 0.5
edit retag flag offensive close merge delete

Comments

Have you verified that the robot pose is being updated often? That the pose is correct? That the pose changes smoothly as the robot moves? If the pose is jumping around too much, none of the ros planners will work well.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-07-01 08:53:36 -0600 )edit

I have tried DWA and it works smooth enough actually. The robot pose seems smooth enough as well and seems to change regularly on Rviz. At least there are no noticeable jumps between poses.

rappy gravatar image rappy  ( 2021-07-01 13:22:32 -0600 )edit

Does this robot have a differential-drive or an omni-drive? What sensors are you using for localization?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-07-01 15:56:04 -0600 )edit

it is a differential-drive robot I am using encoders, LiDAR and IMU as sensors. Also AMCL and Robot localization packages for localization.

rappy gravatar image rappy  ( 2021-07-02 02:10:25 -0600 )edit

First, I would allow more deceleration. Then I would use an app like rqt_plot to simultaneously plot the linear.x velocity published on /cmd_vel, and reported on /odom.

  1. Does cmd_vel smoothly ramp up, then back down to 0 near the goal?

  2. Does the odom velocity closely track the cmd_vel if you send the robot to a goal that is straight ahead?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-07-02 06:53:22 -0600 )edit

I have tried with teleop and odometry goes close to the cmd_vel for published speeds. However, some small jumps happen on odom when move_base starts to publish the speeds. And also I wasn't able to drive the robot straight when DWB was in control since it starts to turn rather than going straight to the goal.

rappy gravatar image rappy  ( 2021-07-06 07:43:09 -0600 )edit

Small brief jumps in odometry velocity are usually ok.

Can you provide a link to the online documentation for this planner's parameters? I want to understand what the difference is between "vel" and "speed" for this planner.

also I wasn't able to drive the robot straight when DWB was in control since it starts to turn rather than going straight to the goal.

The robot can not move in a straight line unless you allow the theta velocity (yaw) to be 0.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-07-06 08:50:46 -0600 )edit

https://github.com/locusrobotics/robo... this is the original repo to DWB local planner but I couldn't see complete explanation of every parameter in here so found this on github and used it as template https://github.com/dfki-ric/mir_robot....

rappy gravatar image rappy  ( 2021-07-06 09:57:15 -0600 )edit