issue with move_base for a robot with rotational center at the back
Hi all,
I have a robot with dimensions (LxWxH) in cm: 82x64x104 and the rotational center is 8 cm from the back of the robot.
I am using rotary encoders to get the odometry message. I am using amcl for localization and move_base for planning with TrajectoryPlannerROS
as the local planner and sbpl_lattice_planner
as global planner.
Case I) If I specify the robot_footprint
such that base_link
is at the rotational center of the robot, then robot does not behave good. It has lot of jerks and move_base
publishes erratic velocities on cmd_vel
topic. For example: if max_vel_x: 0.5
, then velocities published by move_base
keeps on switching between 0.5 and 0.35 for a straight line motion of the robot which results in a jerky motion of the robot. Similarly, if max_vel_x: 0.6
, same thing happens and velocities switches between 0.6 and 0.4. Also, there are lot of jerks in angular velocities also. The base_local_planner
is not able to send correct and smooth velocities. I have tried changing the base_local_planner_params.yaml
and it didn't help. :
#The footprint of the robot and associated padding
footprint: [[-0.08, -0.32], [-0.08, 0.32], [0.74, 0.32], [0.74, -0.32]]
footprint_padding: 0.01
Case II) But if I specify robot_footprint
such that base_link
is at the center of the robot (Geometric center), it behaves way better and there are no jerks in the robot and move_base
publishes smooth linear and angular velocities although it has minor problems while turning in place (It thinks its rotating around geometric center but actually it rotates around the actual center of rotation) :
#The footprint of the robot and associated padding
footprint: [[-0.41, -0.32], [-0.41, 0.32], [0.41, 0.32], [0.41, -0.32]]
footprint_padding: 0.01
I know base_link
and base_footprint
should be at the rotational center of the robot but when I do it (case I), it behaves bad as compared to case where base_link
and base_footprint
are at the geometric center of the robot (case II) (I know this is not the correct way).
I have attached two videos which shows move_base
(base_local_planner
) publishing erratic velocities on cmd_vel
topic in case I where base_link
is at the rotational center of the robot:
Video 1
Video 2
Now, I need some help in making sure move_base
publishes smooth velocities in Case I where base_link
is at the rotational center of the robot (8 cm from back of the robot) which is different from geometric center of the robot. What parameters should I change and are there any other changes which I should make for it?
I have attached base_local_planner_params.yaml
. I have tried changing the parameters in this file but it didn't help.
baselocalplanner_params.yaml
#For full documentation of the parameters in this file, and a list of all the
#parameters available for TrajectoryPlannerROS, please see
#http://www.ros.org/wiki/base_local_planner
TrajectoryPlannerROS:
#Set the acceleration limits of the robot
acc_lim_th: 1.5
acc_lim_x: 2.0
acc_lim_y: 0
#Set the velocity limits of the robot
max_vel_x: 0.50
min_vel_x: 0.20
max_vel_theta: 1.0
min_vel_theta: -1.0
max_rotational_vel: 1.0
min_in_place_rotational_vel: 0.8
min_in_place_vel_theta: 0.8
#The velocity the robot will command when trying to escape from a stuck situation
escape_vel: -0.2
#For this example, we'll use a holonomic robot
holonomic_robot: false
#Set the tolerance on achieving a goal
xy_goal_tolerance: 0.20
yaw_goal_tolerance: 0.15
latch_xy_goal_tolerance: false
#We'll configure how long and with what granularity we'll forward simulate trajectories
sim_time: 1.5
sim_granularity: 0.025
angular_sim_granularity: 0.025
vx_samples: 3
vtheta_samples: 20
controller_frequency: 10.0
#Parameters for scoring trajectories
goal_distance_bias: 0.8
path_distance_bias: 1.0
occdist_scale: 0.01
heading_lookahead: 0.325
#We'll use the Dynamic Window Approach to control instead of Trajectory Rollout for this example
dwa: false
#How far the robot must travel before oscillation flags are reset
oscillation_reset_dist: 0.05
#Eat up the plan as the robot moves along it
prune_plan: false
# Global Frame id
global_frame_id: odom_combined
There is a similar question but it is using a different local_planner
(dwa planner) and the parameter specified in it is not there for TrajectoryPlannerROS
.
Update : Changing sim_time
and increasing vx_samples
improved things a little bit but still there are lot of jerky motions because of the erratic velocities sent by the move_base
. Any suggestions will be appreciated.
The plot shows angular velocity (/cmd_vel/angular/z
) sent by move_base
and is very erratic :
Let me know if you need more information from me.
Thanks.
Naman Kumar
Asked by Naman on 2015-10-19 17:29:45 UTC
Comments
Hi, I'm facing the same problem ! did you found a solution ? if yes could you share it with us please ..
Asked by assil on 2015-12-15 12:27:39 UTC