ROS navigation stack - roto/translation problems
Hi,
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:
Baselocalplanner_parameters:
TrajectoryPlannerROS:
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:
inflater_layer:
inflation_radius: 0.65
cost_scaling_factor: 1.0
Local costmap has:
inflater_layer:
inflation_radius: 0.55
cost_scaling_factor: 1.0
Asked by aled96 on 2021-01-26 10:04:28 UTC
Comments
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?
Asked by Humpelstilzchen on 2021-01-27 02:57:24 UTC
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 ?
Asked by aled96 on 2021-01-27 03:12:51 UTC
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.
Asked by Humpelstilzchen on 2021-01-27 03:20:40 UTC
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
Asked by aled96 on 2021-01-27 03:48:51 UTC
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..
Asked by aled96 on 2021-01-27 03:55:37 UTC
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.
Asked by Humpelstilzchen on 2021-01-27 03:58:57 UTC
This question seems to be related: https://answers.ros.org/question/10718/dwa_planner-vs-base_local_planner/ The second answer also recommends the dwa planner instead.
Asked by Humpelstilzchen on 2021-01-27 03:59:50 UTC
Yes, now I am trying to use it. I will let you know, thanks !
Asked by aled96 on 2021-01-27 04:10:05 UTC