ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

[navigation stack] strange angular velocity

asked 2016-12-18 20:45:29 -0500

NguyenPham gravatar image

updated 2016-12-21 01:08:54 -0500

Hi all

I follow the navigation tutorials to get the navigation stack with teb_local_planner running on my tricycle robot. The path in Rviz displayed as well. But the robot doesn't follow the path. The cmd_vel is so strange. The angular.z is too large. See the image below. Sorry for my bad english.

Thanks first.

image description

My teb_local_planner config:

TebLocalPlannerROS:

 odom_topic: odom
 map_frame: /map

 # Trajectory

 teb_autosize: True
 dt_ref: 0.3
 dt_hysteresis: 0.1
 global_plan_overwrite_orientation: True


 max_global_plan_lookahead_dist: 5.0

 feasibility_check_no_poses: 5

 # Robot
 cmd_angle_instead_rotvel: True
 max_vel_x: 0.3
 max_vel_x_backwards: 0.3
 max_vel_theta: 0.3

 acc_lim_x: 1.5
 acc_lim_theta: 1.1
 min_turning_radius: 2
 wheelbase: 0
 footprint_model: # types: "point", "circular", "two_circles", "line", "polygon"
   type: "line"
   line_start: [-1, 0.0] # for type "line"

   line_end: [1, 0.0] # for type "line"

 # GoalTolerance

 xy_goal_tolerance: 0.3
 yaw_goal_tolerance: 0.1
 free_goal_vel: False

 # Obstacles

 min_obstacle_dist: 0.30

 include_costmap_obstacles: True
 costmap_obstacles_behind_robot_dist: 1
 obstacle_poses_affected: 30
 costmap_converter_plugin: ""
 costmap_converter_spin_thread: True
 costmap_converter_rate: 5

 # Optimization

 no_inner_iterations: 5
 no_outer_iterations: 4

 optimization_activate: True
 optimization_verbose: False
 penalty_epsilon: 0.1
 weight_max_vel_x: 2
 weight_max_vel_theta: 1
 weight_acc_lim_x: 1
 weight_acc_lim_theta: 1
 weight_kinematics_nh: 1000
 weight_kinematics_forward_drive: 1
 weight_kinematics_turning_radius: 1
 weight_optimaltime: 1
 weight_obstacle: 50

 weight_dynamic_obstacle: 10 # not in use yet
 alternative_time_cost: False # not in use yet

 # Homotopy Class Planner

 enable_homotopy_class_planning: False
 enable_multithreading: False
 simple_exploration: False
 max_number_classes: 4

 roadmap_graph_no_samples: 15

 roadmap_graph_area_width: 5
 h_signature_prescaler: 0.5
 h_signature_threshold: 0.1
 obstacle_keypoint_offset: 0.1
 obstacle_heading_threshold: 0.45
 visualize_hc_graph: False

Edit: Many thanks to croesmann.

Oh it's my mistake, I was uploaded my old config file which cannot work. Here is my new one. Because my robot quite big so i set min_turning_radius to 2.5m. I use agular.z and linear.x to calculate tracking velocity and steering angle. I will try with cmd_angle_instead_rotvel set to False. Maybe it's can be solved.

# Robot
 cmd_angle_instead_rotvel: True
 max_vel_x: 0.2
 min_vel_x: 0.05

 max_vel_x_backwards: 0.2
 max_vel_theta: 0.3
# min_vel_theta: -0.3

 acc_lim_x: 0.5
 acc_lim_theta: 0.5
 min_turning_radius: 2.5
 wheelbase: 1.772
 footprint_model: # types: "point", "circular", "two_circles", "line", "polygon"
   type: "line"
   line_start: [-0.886, 0.0] # for type "line"
   line_end: [0.886, 0.0] # for type "line"

 # GoalTolerance

 xy_goal_tolerance: 0.3
 yaw_goal_tolerance: 0.2
 free_goal_vel: False

 # Obstacles

 min_obstacle_dist: 0.5
 include_costmap_obstacles: True
 costmap_obstacles_behind_robot_dist: 1
 obstacle_poses_affected: 30
 costmap_converter_plugin: ""
 costmap_converter_spin_thread: True
 costmap_converter_rate: 5

 # Optimization

 no_inner_iterations: 5
 no_outer_iterations: 4
 optimization_activate: True
 optimization_verbose: False
 penalty_epsilon: 0.1
 weight_max_vel_x: 1 #2
 weight_max_vel_theta: 0.5 #1
 weight_acc_lim_x: 0.0 #1
 weight_acc_lim_theta: 0.0 #1
 weight_kinematics_nh: 1000
 weight_kinematics_forward_drive: 1
 weight_kinematics_turning_radius: 1
 weight_optimaltime: 1
 weight_obstacle: 50
 weight_dynamic_obstacle: 10 # not in use yet
 selection_alternative_time_cost: False
# alternative_time_cost: False # not in use yet

 # Homotopy Class Planner

 enable_homotopy_class_planning: True #False
 enable_multithreading: True #False
 simple_exploration: False
 max_number_classes: 4

 roadmap_graph_no_samples: 15
 roadmap_graph_area_width: 5
 h_signature_prescaler: 0.5
 h_signature_threshold: 0.1
 obstacle_keypoint_offset: 0.1
 obstacle_heading_threshold: 0.45
 visualize_hc_graph: False

My robot description

image description

edit retag flag offensive close merge delete

Comments

@Nguyen: please don't post an answer to provide us with more / updated information. Instead, please edit your original question. Use the edit link/button for that. I've moved the content to your question, but please keep it in mind.

Thanks.

gvdhoorn gravatar image gvdhoorn  ( 2016-12-19 05:38:30 -0500 )edit

Thank you @gvdhoorn.

NguyenPham gravatar image NguyenPham  ( 2016-12-19 20:55:08 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-12-19 02:05:15 -0500

croesmann gravatar image

The issue might be related to your robot parameters.

cmd_angle_instead_rotvel: True indicates that your robot is commanded with a Twist Msg but the angular velocity is substituted by the steering angle. Is that what your robot base driver accepts as control input?

Since the previous parameter is set to true, the robot's wheelbase is required in order to convert the linear and angular velocity to the steering angle. But according to your parameter setting, it is wheelbase: 0which cannot work.

Another possible reason for oscillating behavior is the existence of large delays in the control architecture (due the time-optimal controller style the controller choses maximum velocities in order to correct even small errors). Also the planner expects high steering rates. Limiting steering rates as well is still experimental and is going to be added to the main branch as soon as it seems to be stable.

Note, some further comments on your parameter setting:

  • Your footprint model is defined as a line from (-1,0) to (1,0). Hence I guess you have placed the origin of your robot base_link frame in the center of mass. Actually, the unicycle model (and hence the planner) expects the origin to be located at the center of rotation, which is for a front-steered car-like robot at the center of the rear axle.

  • A minimum turning radius of 2m is quite large. Maybe the default parameter set (optimization weights, ...) are not perfect for that setting. You might investigate them.

edit flag offensive delete link more

Comments

Thank you so much! @croesmann. My robot works great now.

NguyenPham gravatar image NguyenPham  ( 2016-12-21 01:04:35 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2016-12-18 20:45:29 -0500

Seen: 1,087 times

Last updated: Dec 21 '16