Ask Your Question
0

wrong robot orientation at the goal

asked 2015-05-06 12:15:31 -0600

Naman gravatar image

updated 2015-05-18 12:50:47 -0600

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

edit retag flag offensive close merge delete

Comments

1

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.

jseal gravatar imagejseal ( 2015-05-06 20:12:43 -0600 )edit

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

Naman gravatar imageNaman ( 2015-05-12 09:21:33 -0600 )edit

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

jseal gravatar imagejseal ( 2015-05-12 16:07:29 -0600 )edit

and max_vel_x. If you publish all zero it will stop your robot.

jseal gravatar imagejseal ( 2015-05-12 16:20:33 -0600 )edit

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 sends angular.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? TIA

Naman gravatar imageNaman ( 2015-05-15 08:48:16 -0600 )edit

I don't, your numbers look good.

jseal gravatar imagejseal ( 2015-05-19 21:15:00 -0600 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2015-05-06 16:24:35 -0600

Please, try to increase the xy_goal_tolerance & yaw_goal_tolerance and start testing again.

Best regards, Wagan Sarukhanov

edit flag offensive delete link more

Comments

I think 0.2 (20 cm and ~ 11 degrees) for each of them should be good

Naman gravatar imageNaman ( 2015-05-12 09:36:04 -0600 )edit
2

answered 2015-05-13 02:12:57 -0600

Procópio gravatar image

Maybe your robot is not performinng an "in place rotation"? Try to also change min_vel_theta.

edit flag offensive delete link more

Comments

Thanks I will try it! 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 sends angular.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? TIA

Naman gravatar imageNaman ( 2015-05-15 08:52:01 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-05-06 12:15:31 -0600

Seen: 893 times

Last updated: May 18 '15