problem of v_x and v_th in move_base

asked 2017-06-15 01:05:41 -0500

marine0131 gravatar image

updated 2017-06-15 20:03:28 -0500

i use move_base in my robot for navigation,

situation 1: the robot can get the goal but it almost move very very slow, even if there is no obstacles nearby.

situation 2: robot rotate frequently even there is no obstacles around.

i try: echo the cmd_vel msg i found the v_x stays around the min_vel_x 0.1 m/s and there are unexpected points the speed approach max_vel_x 0.5m/s, that is so strange. (the control frequency is set 15Hz)

see the figure below: the blue line is cmd_vel_x, and red line is cmd_vel_theta image description

Q1: why not the velocity changed smoothly? Q2:why the velocity always stay around 0.1 m/s,(0.1m/s is the min_vel_x setting in base_local_planner_params.yaml)

update 1: the base_local_planner_params.yaml

base_global_planner: navfn/NavfnROS

controller_frequency: 15
recovery_behavior_enabled: true
clearing_rotation_allowed: true
TrajectoryPlannerROS:
acc_lim_x: 1.0
acc_lim_y: 0.0 # zero for a differential drive robot
acc_lim_theta: 1.6
max_vel_x: 0.6  #0.2
min_vel_x: 0.2  #0.1 
max_vel_y: 0.0  # zero for a differential drive robot
min_vel_y: 0.0
max_vel_theta: 1.0 #0.3
min_vel_theta: -1.0  #0.15
min_in_place_vel_theta: 0.4
escape_vel: -0.1
holonomic_robot: false

yaw_goal_tolerance: 0.2 # about 11 degrees
xy_goal_tolerance: 0.3  # 20 cm
latch_xy_goal_tolerance: true  #false

sim_time: 1.5  # 2  
sim_granularity: 0.05  #It basically means how frequent should the points on this trajectory be examined;
angular_sim_granularity: 0.025
vx_samples: 10
vy_samples: 0 # zero for a differential drive robot
vtheta_samples: 20 #
controller_frequency: 15

meter_scoring: true
pdist_scale: 0.8  #0.8
gdist_scale: 0.4  #0.4
occdist_scale: 0.01   #0.1  
oscillation_reset_dist: 0.2   #0.05    
heading_scoring: false
heading_lookahead: 0.1 #how far look ahead in meters in-place-rotation
heading_scoring_timestep: 0.8
dwa: true   
publish_cost_grid_pc: false
global_frame_id: odom
simple_attractor: false

reset_distance: 4

prune_plan: true

NavfnROS:
allow_unknown: true
recovery_behavior_enabled: true
visualize_potential: true
cost_factor: 0.55
neutral_cost: 66
lethal_cost: 253
edit retag flag offensive close merge delete

Comments

I have the exact same issue. Either the robot moves straight, but very slow, or moves at decent speed but is always rotating. I have found that changing my sim_time from 2 (for fast but rotating) to 5 (slow but straight) affects it. Not able to look into it further at this stage, but interested.

ufr3c_tjc gravatar image ufr3c_tjc  ( 2017-06-15 01:23:10 -0500 )edit

please add information on what planners you are using and what is your ROS version.

Procópio gravatar image Procópio  ( 2017-06-15 01:51:37 -0500 )edit

@Procópio i think i use the dwa local planner which enable the dwa in base_local_planner_params.yaml, and i use indigo, i have paste the base_local_planner_params.yaml

marine0131 gravatar image marine0131  ( 2017-06-15 19:52:41 -0500 )edit

@ufr3c_tjc i think increasesim_time, robot look long distance ahead, he think it's fine to move fast, but when you decrease the sim_time,robot look short distance ahead, he think it's not ok move too fast because he dont know the situation. i adjust the sim_time but has little help, and rotation

marine0131 gravatar image marine0131  ( 2017-06-15 20:14:17 -0500 )edit

@marine0131 No, my behavior is opposite. A larger sim_time means a slower speed. I think it has to do with the parameterization and v_x samples, and the acceleration limits. But don't have the time at the moment to look into it in depth.

ufr3c_tjc gravatar image ufr3c_tjc  ( 2017-06-15 20:22:12 -0500 )edit

So today I tried the TEB Local Planner, and it works much better! Out robot is diff-drive and TEB is specifically built for this. The others are more for holonomic robots like the PR2. Very easy to install and probably worth your time to try it out. Links in next comment.

ufr3c_tjc gravatar image ufr3c_tjc  ( 2017-06-16 01:20:50 -0500 )edit

Package here and a tutorial is here. We used almost all the default values, just changed the footprint. Hope it helps!

ufr3c_tjc gravatar image ufr3c_tjc  ( 2017-06-16 01:21:27 -0500 )edit

I'ld recommend to compare the odometry output to the cmd_vel input and try to increase the acc limits.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2017-06-16 02:51:05 -0500 )edit