robot starts rotating in place occasionally once it reaches the goal
Hi all,
I have a mobile base which is navigating around a room (already have a map of the room). I am using rotary encoders for odometry and I am feeding phidgets 3/3/3 IMU data along with rotary encoders data to the robot_pose_ekf. I am using amcl for localization and move_base for planning. Everything seems to be working fine but now and then, once the robot reaches the goal, it starts rotating in place continuously and does not come to halt. I am a little surprised because the local planner is not sending any velocities, rostopic echo /cmd_vel
does not show anything whereas rostopic echo /odom
obviously shows the robot pose and twist. One of the common causes of such a behavior is a very low yaw_goal_tolerance
but I increased it to 0.15 and having same problem.
base_local_planner_params.yaml
TrajectoryPlannerROS:
#Set the acceleration limits of the robot
acc_lim_th: 2.5
acc_lim_x: 2.0
acc_lim_y: 0
#Set the velocity limits of the robot
max_vel_x: 0.5
min_vel_x: 0.1
max_rotational_vel: 1.0
min_in_place_rotational_vel: 0.8
#The velocity the robot will command when trying to escape from a stuck situation
escape_vel: -0.1
#For this example, we'll use a holonomic robot
holonomic_robot: false
#Set the tolerance on achieving a goal
xy_goal_tolerance: 0.15
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
gdist_scale: 0.8
pdist_scale: 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
Here is the link to the video which will show clearly the problem I am having (just see the last 2 mins of the video where the robot keeps on rotating in place): https://www.youtube.com/watch?v=YBUow...
Ok..Here is the update from the comments and answer: @yohtm and @Procopio. Indeed the robot reaches the goal and prints "goal reached" and cmd_vel stops publishing any velocities and after that, the robot starts rotating. Here is the image which hopefully will give you a better idea:
Also, in the above image when "Goal Reached Yipeee..." is typed, cmd_vel publishes 0 velocity twice and then the publisher stops:
This looks really weird and I feel the motor controller is behaving in a strange manner.
Please let me know if you need more information from me. Does anyone have any idea what is causing such a behavior and how to solve this? Any help will be appreciated.
Thanks.
Naman Kumar
when you say " rostopic echo /cmd_vel does not show anything" , you mean the /cmd_vel topic is all 0s or it does not exist at all?? EDIT: ok, I just saw the video and understand the problem now.