ROS teb_local_planner use

teb_ local_ The planner is the base of the 2D navigation stack_ local_ Planner plug-in. An online optimized local trajectory planner is implemented to navigate and control mobile robot as a plug-in of ROS navigation package. The initial trajectory generated by the global planner is optimized during runtime to minimize the trajectory execution time (time optimal target), separate from obstacles and comply with dynamic constraints, such as maximum speed and acceleration. The current implementation is consistent with the kinematics of nonholonomic robots (differential drive and car like robots). Since Kinetic, including support for complete robots.

I teb_local_planner configuration method
Installation steps

Source installation
TEB needs to be installed_ local_ Planner, go to teb_local_planner, switch the branch to melody devel, then download the source code locally, and unzip the source code package to ~ / catkin_ ws_ After NAV / SRC /, you can compile and install

#Installation dependency
source ~/catkin_ws_nav/devel/setup.bash 
rosdep install teb_local_planner

cd  ~/catkin_ws_nav/
catkin_make  -DCATKIN_WHITELIST_PACKAGES="teb_local_planner"

teb_ local_ The configuration files about the plugin in the planner source code have been written. It is very convenient to directly compile the source code to complete the registration and insertion of the plugin

The source code installation may lack dependencies:

  1. Check the dependencies. You can check the package in the source code through the following instructions XML and cmakelists Txt file, which is listed:
rosdep check teb_local_planner
  1. Open teminal and enter
    sudo apt-get install ros-melodic-teb-local-planner

  2. Verify that the installation was successful
  3. roscd teb_local_planner
  4. If you can enter TEB_ local_ The directory of the planner indicates that the installation is successful

  5. Original link:

II Use in simulation

1. New teb_local_planner profile teb_local_planner_params.yaml

You can download it directly from tutorials:

              git clone

Find the desired TEB in / cfg_ local_ planner_ params. yaml. Since the robot odom is in differential mode, diff is selected_ In drive.

The specific explanation of parameter configuration will not be expanded. Please directly refer to the official wiki tutorial:

TEB can be_ local_ planner_ params. Yaml and other configuration files in navigation (such as costmap_common_params.yaml, etc.) are put together for easy reference and call.

Then the global and local planners can be indicated in the launch file. It is best to write a navigation core control parameter configuration move_base_params.yaml file.


    <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen" clear_params="true">
        <param name="base_local_planner" value="teb_local_planner/TebLocalPlannerROS" />
        <param name="base_global_planner" value="global_planner/GlobalPlanner" />
        <rosparam file="$(find navigation)/param/costmap_common_params.yaml" command="load" ns="global_costmap" />
        <rosparam file="$(find navigation)/param/costmap_common_params.yaml" command="load" ns="local_costmap" />
        <rosparam file="$(find navigation)/param/local_costmap_params.yaml" command="load" />
        <rosparam file="$(find navigation)/param/global_costmap_params.yaml" command="load" />
        <rosparam file="$(find navigation)/param/teb_local_planner_params.yaml" command="load" />


Refer to the link for specific documents SLAM + Voice robot DIY series: (VI) SLAM mapping and autonomous obstacle avoidance navigation - 3 ROS navigation robot autonomous obstacle avoidance navigation - brother tiger loves learning - blog Park (

Then you can adjust the path in the simulation and see the TEB_ local_ The planner's trajectory.

Keywords: Ubuntu AI Autonomous vehicles

Added by cqinzx on Wed, 09 Mar 2022 06:47:21 +0200