Ask Your Question

teb_local_planner planning low velocity trajectories

asked 2017-07-16 07:39:44 -0600

prince gravatar image

updated 2017-07-18 05:46:36 -0600

Procópio gravatar image

Hi, I am trying to use Teb local planner for my robot. But robot is moving very slow (0.1 to 0.23 m/sec) and with jerky movements. Although robot can easily go upto 1m/sec. I have tried changing value of weights but it had no impact. I have tried changing size (width and lenght) of local cost map from 8 to 20m, but it had no impact. I am using latest download for git for Kinetic version. I have also observed that sometime teb plans local trajectorise through obstacles in case of 20m x 20m size local map. image description

the configuration file for teb is as follows:

 teb_autosize: True
 dt_ref: 0.3
 dt_hysteresis: 0.1
 global_plan_overwrite_orientation: True
 allow_init_with_backwards_motion: False
 max_global_plan_lookahead_dist: 10.0 #increased lookahead from 20 to 30
 feasibility_check_no_poses: 10

 # Robot

 max_vel_x: 1.0
 max_vel_x_backwards: 0.12 #reduced from 0.2
 max_vel_y: 0.0
 max_vel_theta: 0.35
 acc_lim_x: 0.2
 acc_lim_theta: 0.20
 min_turning_radius: 0.0 # diff-drive robot (can turn on place!)

   type: "circular"
   radius: 0.35

 # GoalTolerance

 xy_goal_tolerance: 1
 yaw_goal_tolerance: 1.2
 free_goal_vel: true

 # Obstacles

 min_obstacle_dist: 0.1 # This value must also include our robot radius, if footprint_model is set to "point".
 include_costmap_obstacles: True
 costmap_obstacles_behind_robot_dist: 1.0
 obstacle_poses_affected: 10
 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 #5
 weight_max_vel_theta: 1
 weight_acc_lim_x: 1 #1
 weight_acc_lim_theta: 1
 weight_kinematics_nh: 100 #100
 weight_kinematics_forward_drive: 1 #1
 weight_kinematics_turning_radius: 1
 weight_optimaltime: 1
 weight_obstacle: 50
 weight_dynamic_obstacle: 10 # not in use yet
 weight_adapt_factor: 2


#---(in meters)---
robot_radius: 0.35
footprint_padding: 0.05
    transform_tolerance: 1.5
map_type: costmap
 enabled: true
# expected_update_rate: 0.05 #enough margin for 50Hz laser
 obstacle_range: 10.0
 raytrace_range: 10.0
 inflation_radius: 0.25
 track_unknown_space: false
 combination_method: 1
 inf_is_valid: true
 observation_sources: laser_scan_sensor
 laser_scan_sensor: {data_type: LaserScan, topic: scan, marking: true, clearing: true}

  enabled:              true
  cost_scaling_factor:  10.0  # exponential rate at which the obstacle cost drops off (default: 10)
  inflation_radius:     0.25  # max. distance from an obstacle at which costs are incurred for planning paths.
  enabled:              true
  map_topic:            "map"

Local costmap params:

  global_frame: map
  robot_base_frame: base_link
  update_frequency: 10.0
  publish_frequency: 1.0
  static_map: false
  rolling_window: true
  width: 8
  height: 8
  resolution: 0.05
  transform_tolerance: 0.5

#   - {name: static_layer,        type: "costmap_2d::StaticLayer"}
   - {name: obstacle_layer,      type: "costmap_2d::ObstacleLayer"}
   - {name: inflation_layer,         type: "costmap_2d::InflationLayer"}

global costmap params:


  global_frame: map
  robot_base_frame: base_link
  update_frequency: 0.25
  publish_frequency: 0.5
  static_map: true
  rolling_window: false
  height: 50
  width: 50
  transform_tolerance: 0.5
    - {name: static_layer,            type: "costmap_2d::StaticLayer"}
    - {name: obstacle_layer,          type: "costmap_2d::ObstacleLayer"}
    - {name: inflation_layer,         type: "costmap_2d::InflationLayer"}

movebase launch file

<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <remap from="cmd_vel" to="delta_robot/cmd_vel"/>
    <rosparam file="nav/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="nav/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="nav/local_costmap_params.yaml" command="load" />
    <rosparam file="nav/global_costmap_params.yaml" command="load" />

    <param name="base_global_planner" value="global_planner/GlobalPlanner" />
    <param name="planner_frequency" value="1.0" />
    <param name="planner_patience" value="5.0" />

    <rosparam file="nav/teb_local_planner_params.yaml ...
edit retag flag offensive close merge delete


can you please post an image with only the global planner stuff? like costmaps and plan...

Procópio gravatar imageProcópio ( 2017-07-18 05:44:34 -0600 )edit

2 Answers

Sort by » oldest newest most voted

answered 2017-07-18 05:45:41 -0600

Procópio gravatar image

I am mostly worried of your global planner planning through walls. Try changing its config to this:

  global_frame: map
  robot_base_frame: base_link
  update_frequency: 10
  publish_frequency: 0.5
  static_map: true

  transform_tolerance: 0.5
    - {name: static_layer,            type: "costmap_2d::StaticLayer"}
    - {name: obstacle_layer,       type: "costmap_2d::ObstacleLayer"}
    - {name: inflation_layer,        type: "costmap_2d::InflationLayer"}
edit flag offensive delete link more


I actually do not want global plan to change so frequently, as I do not have sufficient compute to support update at 10Hz. I wanted global plan to update at much slowers rate. This did not solve the problem.

prince gravatar imageprince ( 2017-08-01 06:25:42 -0600 )edit

answered 2018-04-30 22:34:36 -0600

This might be too late but try reducing the controller_frequency in move_base.launch file. I was facing the similar problem of jerky motion and reducing the controller frequency to 0.5 solved the issue. Although the robot plans slowly, it does not cause any jerks.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools



Asked: 2017-07-16 07:39:44 -0600

Seen: 908 times

Last updated: Jul 18 '17