ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to set min and max angular values in DWAPlannerROS?

asked 2019-01-16 06:22:51 -0600

EdwardNur gravatar image

I want to set min and max values that DWAPlannerROS can send to cmd_vel as these values were empirically measured for my robot.

This is how I stated my yaml file:

recovery_behavior_enabled: true
clearing_rotation_allowed: true

  acc_lim_x: 1
  acc_lim_y: 0 
  acc_lim_theta: 1.6
  max_vel_trans: 1.6
  min_vel_trans: 0.8
  max_vel_x: 1.6 
  min_vel_x: 0.8
  max_vel_y: 0.0  
  min_vel_y: 0.0
  min_vel_theta: 10
  max_vel_theta: 11

  holonomic_robot: false

  xy_goal_tolerance: 0.3 
  yaw_goal_tolerance: 0.20 
  latch_xy_goal_tolerance: true 

  sim_time: 4 
  sim_granularity: 0.05
  vx_samples: 5
  vy_samples: 0 
  vth_samples: 5
  controller_frequency: 15

  occdist_scale: 0.01
  oscillation_reset_dist: 0.2

  publish_cost_grid: false
  global_frame_id: odom
  simple_attractor: false

  reset_distance: 4

  prune_plan: true

However, I echoed the /cmd_vel topic and I can see that move_base still sends the values below 10 for angular.z:

  x: 0.0
  y: 0.0
  z: 0.0
  x: 0.0
  y: 0.0
  z: 1.0

Why is it sending these values?

edit retag flag offensive close merge delete


Which distro are you using?

David Lu gravatar image David Lu  ( 2019-01-16 09:14:58 -0600 )edit

@David Lu I am using Melodic

EdwardNur gravatar image EdwardNur  ( 2019-01-17 01:56:00 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-02-11 12:25:08 -0600

David Lu gravatar image

I'm not sure this is desirable behavior, but the way that DWA works is that it assumes that you can rotate in either direction at a given max speed. Thus, it will explore trajectories from [-max_vel_theta, max_vel_theta]. For you, 1.0 falls in the range [-11, 11].

Okay, so what does min_vel_theta do? It makes sure your robot is moving in some direction.

However, the above command should fail the check given, so I'm unclear what the problem is.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2019-01-16 06:21:08 -0600

Seen: 338 times

Last updated: Feb 11 '19