wrong robot orientation at the goal
Hi all,
You must have seen lot of posts saying that robot keeps on rotating when it is near the goal but I have an opposite problem. In my case, when the robot reaches the goal within xy_goal_tolerance
, it turns slowly to correct its orientation but then it stops outside the yaw_goal_tolerance
at the goal. When I did rostopic echo /cmd_vel
, the angular velocity (angular.z
) is getting published (0.5 in my case) but the robot is not rotating. I am using wheel_encoders for odometry, amcl for localization and move_base for navigation with local planner as TrajectoryPlanner. I am not able to figure out what is causing such a behavior. Has anyone encountered such an issue before?
Update: When I did rostopic pub -1 /cmd_vel geometry_msgs/Twist -- '[0.0, 0.0, 0.0]' '[0.0, 0.0, 0.5]', robot did not rotate but when I changed 0.5 to 1, robot started to rotate. Then, I changed min_in_place_vel_theta = 1.0 in base_local_planner_params.yaml
but still angular.z
from rostopic echo/cmd_vel
is 0.5 and the robot is not able to rotate and ends up in a wrong orientation at the goal. Any idea why is this happening? Do I need to change any other parameter?
base_local_planner_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: 2.5
acc_lim_x: 2.0
acc_lim_y: 0
#Set the velocity limits of the robot
max_vel_x: 1.0
min_vel_x: 0.1
max_vel_theta: 1.0
min_vel_theta: -1.0
min_in_place_vel_theta: 0.5
#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.2
yaw_goal_tolerance: 0.2
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: 8
vtheta_samples: 20
#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
Thanks in advance.
Naman Kumar
If you run: rostopic pub -1 /cmd_vel geometry_msgs/Twist -- '[0.0, 0.0, 0.0]' '[0.0, 0.0, 0.5]' does your robot move? I had a robot that had a min_in_place_vel_theta of 0.6 before.
When I did that, robot did not able rotate but when I changed 0.5 to 1, robot rotated. Then, I changed min_in_place_vel_theta = 1.0, in this case also the robot did not rotate because angular.z in cmd_vel was still 0.5. Any idea why is this happening? Do I need to change some other parameter? Thanks
I would slowly increment the 0.5 on the rostopic pub command until the robot starts rotating. Maybe in 0.05 increments (ie. 0.5, 0.55, ...). Record that value and use it for the min_in_place_vel_theta. The max_vel_x = 1.0 is a high value. I would do a similar technic to determine the min_vel_x
and max_vel_x. If you publish all zero it will stop your robot.
Ok..Thanks! One thing: when I change
min_in_place_vel_theta
to 1.0, and the robot is at the goal and wants to turn in place, base_local_planner still sendsangular.z
which is less than 1.0 (0.4,0.6) and the robot fails to correct its orientation.. Do you know why is this happening? TIAI don't, your numbers look good.