ROS navigation stack - roto/translation problems

asked 2021-01-26 09:04:28 -0500

aled96 gravatar image

updated 2022-04-17 10:37:09 -0500

lucasw gravatar image


I am trying to use the ROS navigation stack to perform driving with obstacle avoidance. I have a robot with 4 wheels, and it can drive in every direction.

I have few problems:

  • The commands have velocities only along x and theta, never along y (I set holonomic to true)
  • The robot sometimes rotates before following the global path (even if there are no obstacle around it
  • When it has to rotate, it rotates counter-clockwise maybe for 300° instead of rotating on the other way for 60°

This are the parameters used:



max_vel_x: 0.25

min_vel_x: 0.08

max_vel_y: 0.25

min_vel_y: 0.08

max_rotational_vel: 0.25

max_vel_theta: 0.15

min_vel_theta: 0.05

min_in_place_rotational_vel: 0.3

min_in_place_vel_theta: 0.3

escape_vel: -0.1

acc_lim_theta: 0.15

acc_lim_x: 0.2

acc_lim_y: 0.2

holonomic_robot: true #Omni-directional 

sim_time: 3.5  # 3-4 for clear environments.   1 for crowded 

vx_sample: 20

vy_sample: 20

vth_sample: 40

xy_goal_tolerance: 0.15              #default is 10cm but I think AMCL makes it too giggly for this to be safe #0.2

yaw_goal_tolerance: 0.1             #default is 0.05 rad (~3 degrees) #0.1

meter_scoring: true #Otherwise in grid cells 

shutdown_costmaps: false

controller_frequency: 10.0

controller_patience: 3.0

planner_frequency: 10.0

planner_patience: 5.0

oscillation_timeout: 5.0

oscillation_distance: 0.2

Global costmap has:


inflation_radius: 0.65

cost_scaling_factor: 1.0

Local costmap has:


inflation_radius: 0.55

cost_scaling_factor: 1.0
edit retag flag offensive close merge delete


For the third point: Try setting min_vel_theta negative, so the robot can also rotate clockwise. The second point: Maybe try heading_scoring: true, hard to tell without more information. First point: The options max_vel_y and min_vel_y do not seem to exist? Instead there seems to be the option y_vels, maybe they do not match your acceleration limits?

Humpelstilzchen gravatar image Humpelstilzchen  ( 2021-01-27 01:57:24 -0500 )edit

The third point works, great !

I will try with heading scoring.

While for the first point, max_vel_y is in the "base_local_planner_params" the 3rd and 4th values. But I think it depends on the local planner used, now I am using the default one.. Probably I have to use another one to deal with omnidirectional robots ?

aled96 gravatar image aled96  ( 2021-01-27 02:12:51 -0500 )edit

You wrote TrajectoryPlannerROS which documentation is here, I do not see max_vel_y/min_vel_y there. Also the documentation says it supports holonomic robots, but I have no robot to test this with.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2021-01-27 02:20:40 -0500 )edit

Ah sorry, I misunderstood, I found max_vel_y in a file and I used it, assuming it was correct.

I tried but yaw and x are always the preferred way, no commands along y, even if if may be faster

aled96 gravatar image aled96  ( 2021-01-27 02:48:51 -0500 )edit

But the robot still continues to rotate instead of navigating to the goal sometimes... Even with heading_score:true

But not always, sometimes it works..

aled96 gravatar image aled96  ( 2021-01-27 02:55:37 -0500 )edit

I see two options: 1) Try with debug logging maybe it prints why it doesn't want to strafe 2) Try dwa_local_planner instead.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2021-01-27 02:58:57 -0500 )edit

This question seems to be related: The second answer also recommends the dwa planner instead.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2021-01-27 02:59:50 -0500 )edit

Yes, now I am trying to use it. I will let you know, thanks !

aled96 gravatar image aled96  ( 2021-01-27 03:10:05 -0500 )edit