  * ![Liz Miller](https://secure.gravatar.com/avatar/c55e4e26e63766c66bcd3dfdf70e612a?s=96&d=robohash&r=g) Liz Miller
  * __ Updated Jan 28, 2020


###  [ The Best FPV Drones: 2024 Buyer’s Guide
](https://www.learnrobotics.org/blog/best-fpv-drones/)


//Arduino PWM Speed Control：


[ ](javascript:void\(0\))


[ ![](https://techexplorations.com/wp-content/uploads/2019/06/BLACK-TECH-
EXPLORATIONS-LOGO-TRANS-280x80.png) ](https://techexplorations.com)


It was for a demo project for my students and I was hurry so it's not finished at all and needs improvement but it works well (sorry I have no photos right now).


You will need the following components for this circuit:


[ 03/13/2024 at 12:22 PM  ](https://www.learnrobotics.org/blog/motor-
controller-raspberry-pi-arduino-configurations/#comment-864696)


##  Apply for Our April Session, Today!


Fill out the form to start the application process. Your advisor will contact
you to set up your interview time.


  * [ KiCad Like a Pro 3e  ](https://techexplorations.com/so/kicad-like-a-pro-3rd-edition)
  * [ KiCad Like a Pro 3e: Errata, resources  ](https://techexplorations.com/st/kicad-like-a-pro-3e-errata-resources)
  * [ Raspberry Pi Full Stack: Errata, resources  ](https://techexplorations.com/st/raspberry-pi-full-stack-2e-book-support-page/)
  * [ Node-RED & RPi Pico W book errata  ](https://techexplorations.com/node-red-raspberry-pi-pico-errata/)
  * [ Arduino Bootcamp  ](https://techexplorations.com/st/teachers/)
  * [ Maker Education Revolution  ](https://techexplorations.com/st/maker-education-revolution)
  * [ Beginning Arduino  ](https://techexplorations.com/guides/arduino/begin/lss1/)
  * [ Arduino Sensors  ](https://techexplorations.com/guides/arduino/sensors/introduction/)
  * [ KiCad Projects Showcase  ](https://techexplorations.com/st/kicad-like-a-pro-project-showcase/)
  * [ Looking for lower prices?  ](https://techexplorations.com/st/discount-application-form/)
  * [ Partner offers  ](https://techexplorations.com/partner-offers)


[ ![ros.org](/custom/images/ros_org.png) ](/) |  [ About
](http://www.ros.org/about-ros) | [ Support ](/Support) | [ Discussion Forum
](http://discourse.ros.org/) | [ Index ](http://index.ros.org/) | [ Service
Status ](http://status.ros.org/) | [ ros @ Robotics Stack Exchange
](https://robotics.stackexchange.com/questions/tagged/ros)
---|---
![](/custom/images/menu_left.png) [
![Documentation](/custom/images/menu_documentation.png) ](/)
![](/custom/images/menu_spacer.png) [ ![Browse
Software](/custom/images/menu_browse_software.png)
](https://index.ros.org/packages) ![](/custom/images/menu_spacer.png) [
![News](/custom/images/menu_news.png) ](https://discourse.ros.org/c/general)
![](/custom/images/menu_spacer.png) [
![Download](/custom/images/menu_download.png) ](/ROS/Installation)
![](/custom/images/menu_right.png)

  * [ rosserial ](/rosserial)
####  ROS 2 Documentation
The ROS Wiki is for ROS 1. Are you using ROS 2 ( [ Humble
](http://docs.ros.org/en/humble/) , [ Iron ](http://docs.ros.org/en/iron/) ,
or [ Rolling ](http://docs.ros.org/en/rolling/) )?
[ Check out the ROS 2 Project Documentation ](http://docs.ros.org)
Package specific documentation can be found on [ index.ros.org
](https://index.ros.org)
#  Wiki
  * [ Distributions ](/Distributions)
  * [ ROS/Installation ](/ROS/Installation)
  * [ ROS/Tutorials ](/ROS/Tutorials)
  * [ RecentChanges ](/RecentChanges)
  * [ rosserial ](/rosserial)
#  Page
  * Immutable Page
  * Comments
  * [ Info ](/action/info/rosserial?action=info)
  * [ Attachments ](/action/AttachFile/rosserial?action=AttachFile)
  * More Actions:  Raw Text  Print View  Render as Docbook  Delete Cache  \------------------------  Check Spelling  Like Pages  Local Site Map  \------------------------  Rename Page  Copy Page  Delete Page  \------------------------  My Pages  Subscribe User  \------------------------  Remove Spam  Revert to this revision  Package Pages  Sync Pages  \------------------------  CreatePdfDocument  Load  RawFile  Save  SlideShow
#  User
  * [ Login ](/action/login/rosserial?action=login)
melodic  noetic  _Show EOL distros:_
_EOL distros:_ electric  fuerte  groovy  hydro  indigo  jade  kinetic  lunar


###  Client Libraries
Client libraries allow users to easily get ROS nodes up and running on various
systems. These clients are ports of the general ANSI C++ [ rosserial_client
](/rosserial_client) library. Currently, these packages include:
[ rosserial_arduino ](/rosserial_arduino)
|
support for Arduino compatible boards including UNO, Leonardo, MEGA, DUE,
Teensy 3.x and LC, Spark, [ STM32F1
](https://github.com/rogerclarkmelbourne/Arduino_STM32) , [ STM32Duino
](https://github.com/stm32duino/Arduino_Core_STM32) , [ ESP8266
](https://github.com/esp8266/Arduino) and ESP32

---|---

[ rosserial_embeddedlinux ](/rosserial_embeddedlinux)
|
support for Embedded Linux (eg, routers)

[ rosserial_windows ](/rosserial_windows)
|
support for communicating with Windows applications

[ rosserial_mbed ](/rosserial_mbed)
|
support for mbed platforms

[ rosserial_tivac ](/rosserial_tivac)
|
support for TI's Launchpad boards, TM4C123GXL and TM4C1294XL

rosserial_vex_v5
|
support for VEX V5 Robot Brain

rosserial_vex_cortex
|
support for VEX Cortex board

[ rosserial_stm32 ](https://github.com/yoneken/rosserial_stm32)
|


Glad you found it helpful, Philip!


NETWORK SITES:
All About Circuits


In the **setup()** function we set the mode for pins M1 and M2 to be output
(so we can control the direction of the spin).


WillWelker
Jan 2019
I found this I2C motor driver that I might try out:
Grove-I2C-Motor-Driver-p-907 51
The Arduino library it uses gives some hints on what messages to send it with an I2C node in Node Red.
Grove_I2C_Motor_Driver.h 13
I will have to buy a couple of them and see how well they work. It should be easy to daisy chain as many as you want.


Here’s the L293D Wiring Diagram for Arduino Uno. The signal pins are connected
as follows:


###  [ The Best Arduino Robot Kits Worth Buying
](https://www.learnrobotics.org/blog/best-arduino-robot-kits/)


####  Package Summary


    <export>
      <build_type>ament_cmake</build_type>
      <nav2_core plugin="${prefix}/pure_pursuit_controller_plugin.xml" />
    </export>


_No launch files found_


And truly fantastic behavior, I thinks this has. I encourage everyone to try
it out and tell me what you think. I painstakingly tuned the system to provide
really good out of the box behavior without you having to touch any of the
dials for most situations (and where required, it is noted with guides in the
readme).


##  Properties


Open Mobile Search


* ` class  name  ` : Name of the class.


No version for distro **lunar** . Known supported distros are highlighted in
the buttons above.


` controller = controllerTEB(refpath,map)  `


[ API Docs ](http://docs.ros.org/en/galactic/p/nav2_controller "View API
documentation on docs.ros.org") [ Browse Code ](https://github.com/ros-
planning/navigation2/tree/galactic/nav2_controller "View source code on
repository")


Name  |  Repo  |  Deps  |  [ navigation2 ](/p/navigation2/github-ros-planning-
navigation2#foxy) |  [ github-ros-planning-navigation2
](/r/navigation2/github-ros-planning-navigation2) |  [
](/p/navigation2/github-ros-planning-navigation2#foxy-deps)
---|---|---

###  Launch files


[ Open Live Script
](matlab:openExample\('nav/ComputeVelocityCmdsAndOptimalTrajUsingTEBAlgorithmExample'\))


  * [ Products ](https://www.mathworks.com/products.html?s_tid=gn_ps)
  * [ Solutions ](https://www.mathworks.com/solutions.html?s_tid=gn_sol)
  * [ Academia ](https://www.mathworks.com/academia.html?s_tid=gn_acad)
  * [ Support ](https://www.mathworks.com/help/?s_tid=gn_supp)
  * [ Community ](https://www.mathworks.com/matlabcentral/?s_tid=gn_mlc)
  * [ Events ](https://www.mathworks.com/company/events.html?s_tid=gn_ev)
  * [ Get MATLAB ](https://login.mathworks.com/embedded-login/landing.html?cid=getmatlab&s_tid=gn_getml)


  * Overview
  * 1  Assets
  * 14  Dependencies
  * 0  Tutorials
  * 0  Q & A


###  Description


Create a local ` occupancyMap ` object with a width and height of 15 meters
and the same resolution as the global map.


    rng(42,"twister") % Set random number generator seed for repeatable result.
    route = plan(rrtstar,start,goal);
    refpath = route.States;


This controller is a predictive controller, a variant of MPC which is quite
special in my opinion. While I won’t go into the nitty-gritty details of MPPI
(there are papers for that), a notable element of this approach is that it
enables the use of non-convex and non-differentiable objective functions to
create optimal trajectories. This is quite important for realistic robotic
applications where we want to do a bit more than just follow a carrot and
minimize cross-track error. That opens the door to a whole new set of object
functions in the MPC world (which we developed for this work) which can create
truly fantastic behavior.


Set the start and goal states.


CHANGELOG


###  Recent questions tagged ` nav2_controller ` at **[ Robotics Stack
Exchange ](https://robotics.stackexchange.com/) **


I completely understand,


Method is called when a new velocity command is demanded by the controller
server in-order for the robot to follow the global path. This method returns a
geometry_msgs::msg::TwistStamped  which represents the velocity command for
the robot to drive. This method passes 2 parameters: reference to the current
robot pose and its current velocity.


##  Creation


####  Authors


` ` controller ` = controllerTEB( ` refpath ` , ` map ` ) ` attempts to avoid
obstacles in the specified occupancy map ` map ` . The controller assumes the
space outside the map boundary is free. The ` map ` input sets the value of
the [ Map  ](controllerteb.html#mw_956aed3a-dd9c-40a4-9d88-09ef3711687f)
property.


Align the orientation to the path, except for at the start and goal states.


---|---

github-ros-planning-navigation2


* [ nav2_core ](https://github.com/ros-planning/navigation2/tree/foxy-devel/nav2_controller//plugins.xml)


###  Source Tutorials


###  ` MaxVelocity ` —  Maximum limits of linear and angular velocity
` [0.8 1.6] ` (default) |  two-element positive vector


_No CHANGELOG found._


Shape of the robot, specified as ` "Rectangle" ` or ` "Point" ` .

  * If you set ` Shape ` as ` "Point" ` , the ` Dimension ` field is set to ` [0 0] ` .


_See[ ROS Wiki Tutorials ](http://wiki.ros.org/nav2_controller/Tutorials) for
more details. _


Deps  |  |  Name  |  [ ](/p/nav2_common#eloquent-deps) |  [ 1
](/packages/nav2_common) |  [ nav2_common ](/p/nav2_common#eloquent)
---|---|---
[ ](/p/ament_cmake#eloquent-deps) |  [ 1 ](/packages/ament_cmake) |  [
ament_cmake ](/p/ament_cmake#eloquent)
[ ](/p/ament_lint_common#eloquent-deps) |  [ 1 ](/packages/ament_lint_common)
|  [ ament_lint_common ](/p/ament_lint_common#eloquent)
[ ](/p/ament_lint_auto#eloquent-deps) |  [ 1 ](/packages/ament_lint_auto) |  [
ament_lint_auto ](/p/ament_lint_auto#eloquent)
[ ](/p/rclcpp#eloquent-deps) |  [ 1 ](/packages/rclcpp) |  [ rclcpp
](/p/rclcpp#eloquent)
[ ](/p/rclcpp_action#eloquent-deps) |  [ 1 ](/packages/rclcpp_action) |  [
rclcpp_action ](/p/rclcpp_action#eloquent)
[ ](/p/std_msgs#eloquent-deps) |  [ 2 ](/packages/std_msgs) |  [ std_msgs
](/p/std_msgs#eloquent)
[ ](/p/nav2_util#eloquent-deps) |  [ 1 ](/packages/nav2_util) |  [ nav2_util
](/p/nav2_util#eloquent)
[ ](/p/nav2_msgs#eloquent-deps) |  [ 1 ](/packages/nav2_msgs) |  [ nav2_msgs
](/p/nav2_msgs#eloquent)
[ ](/p/nav_2d_utils#eloquent-deps) |  [ 2 ](/packages/nav_2d_utils) |  [
nav_2d_utils ](/p/nav_2d_utils#eloquent)
[ ](/p/nav_2d_msgs#eloquent-deps) |  [ 2 ](/packages/nav_2d_msgs) |  [
nav_2d_msgs ](/p/nav_2d_msgs#eloquent)
[ ](/p/nav2_core#eloquent-deps) |  [ 1 ](/packages/nav2_core) |  [ nav2_core
](/p/nav2_core#eloquent)
[ ](/p/pluginlib#eloquent-deps) |  [ 1 ](/packages/pluginlib) |  [ pluginlib
](/p/pluginlib#eloquent)

###  System Dependencies


**Checkout URI** |  [ https://github.com/ros-planning/navigation2.git
](https://github.com/ros-planning/navigation2.git)
---|---
**VCS Type** |  git
**VCS Version** |  foxy-devel
**Last Updated**

2022-08-31  |  **Dev Status** |  DEVELOPED
**CI status** |  No Continuous Integration
**Released** |  RELEASED
**Tags** |  _No category tags._
**Contributing** |  [ Help Wanted (  0  ) ](/r/navigation2/#foxy-contribute-
lists-help-wanted)
[ Good First Issues (  0  ) ](/r/navigation2/#foxy-contribute-lists-good-
first-issue)
[ Pull Requests to Review (  0  ) ](/r/navigation2/#foxy-contribute-lists-
pull-requests)

###  Package Description


    teb.LookAheadTime = 10;         % sec
    teb.ObstacleSafetyMargin = 0.4; % meters

    % To generate time-optimal trajectories, specify a larger weight value,
    % like 100, for the cost function, Time. To follow the reference path
    % closely, keep the weight to a smaller value like 1e-3.
    teb.CostWeights.Time = 100;


**Data Types:** ` single ` | ` double `


Maximum velocity of the vehicle while moving in reverse direction, specified
as a positive scalar. The default value is ` NaN ` . When the property is set
to ` NaN ` , the value of maximum reverse velocity is same as that of the
maximum linear velocity.


Run the command by entering it in the MATLAB Command Window. Web browsers do
not support MATLAB commands.


No version for distro **kinetic** . Known supported distros are highlighted in
the buttons above.


  * Overview
  * 1  Assets
  * 16  Dependencies
  * 0  Tutorials
  * 0  Q & A


#  Nav2 Controller


Search MathWorks.com


_Since R2023b_


* The limit for determining whether the robot has reached the goal pose by using the ` GoalTolerance ` property.


The output argument ` extraInfo ` now returns an addition field ` ExitFlag `
that specifies more information about the velocity commands, timestamps, and
path returned by the ` step ` function.


Method is called when the controller server receives a cancel request. If this
method is unimplemented, the controller will immediately stop when receiving a
cancel request. If this method is implemented, the controller can perform a
more graceful stop and signal the controller server when it is done.


[ tnajjar  ](https://discourse.ros.org/u/tnajjar) March 2, 2023, 10:44am  5


###  ` ObstacleSafetyMargin ` —  Safe distance between robot and obstacles
` 0.5 ` (default) |  positive scalar


Cost of optimized trajectory for cost functions in the Timed Elastic Band
algorithm.

` ExitFlag ` |


ROS Resources: [ ROS Homepage ](http://ros.org/) | [ Media and Trademarks
](https://www.ros.org/blog/media/) | [ Documentation ](http://docs.ros.org/) |
[ ROS Index ](https://index.ros.org/) | [ How to Get Help
](http://wiki.ros.org/Support) | [ Q&A Help Site
](https://robotics.stackexchange.com/) | [ Discussion Forum
](http://discourse.ros.org/) | [ Service Status ](http://status.ros.org/)
---

[ ROS Discourse ](/)


##  Version History


teb2 = clone(teb);


[ ros2 ](https://discourse.ros.org/tag/ros2)


      * [ DWB Forward vs Reverse Pruning ](../../migration/Humble.html#dwb-forward-vs-reverse-pruning)
      * [ More stable regulation on curves for long lookahead distances ](../../migration/Humble.html#more-stable-regulation-on-curves-for-long-lookahead-distances)
      * [ Publish Collision Monitor State ](../../migration/Humble.html#publish-collision-monitor-state)
      * [ Renamed ROS-parameter in Collision Monitor ](../../migration/Humble.html#renamed-ros-parameter-in-collision-monitor)
      * [ New safety behavior model “limit” in Collision Monitor ](../../migration/Humble.html#new-safety-behavior-model-limit-in-collision-monitor)
      * [ Velocity smoother applies deceleration when timeout ](../../migration/Humble.html#velocity-smoother-applies-deceleration-when-timeout)
      * [ PoseProgressChecker plugin ](../../migration/Humble.html#poseprogresschecker-plugin)
      * [ Allow multiple goal checkers and change parameter progress_checker_plugin(s) name and type ](../../migration/Humble.html#allow-multiple-goal-checkers-and-change-parameter-progress-checker-plugin-s-name-and-type)
      * [ IsBatteryChargingCondition BT Node ](../../migration/Humble.html#isbatterychargingcondition-bt-node)
      * [ Behavior Server Error Codes ](../../migration/Humble.html#behavior-server-error-codes)
      * [ New Denoise Costmap Layer Plugin ](../../migration/Humble.html#new-denoise-costmap-layer-plugin)
      * [ SmacPlannerHybrid viz_expansions parameter ](../../migration/Humble.html#smacplannerhybrid-viz-expansions-parameter)
    * [ Iron to Jazzy ](../../migration/Iron.html)
      * [ Added TwistStamped Option for Commands ](../../migration/Iron.html#added-twiststamped-option-for-commands)
      * [ Add VelocityPolygon in Collision Monitor ](../../migration/Iron.html#add-velocitypolygon-in-collision-monitor)
      * [ Change polygon points parameter format in Collision Monitor ](../../migration/Iron.html#change-polygon-points-parameter-format-in-collision-monitor)
      * [ Introduction of Soft-Real Time Action Servers ](../../migration/Iron.html#introduction-of-soft-real-time-action-servers)
      * [ ` opennav_coverage  ` Project ](../../migration/Iron.html#opennav-coverage-project)
      * [ Introduce a new Multi-Robot Bringup Launch ](../../migration/Iron.html#introduce-a-new-multi-robot-bringup-launch)
      * [ New option for the Voxel and Obstacle Layers ](../../migration/Iron.html#new-option-for-the-voxel-and-obstacle-layers)
      * [ use_interpolation RPP Parameter Depreciated ](../../migration/Iron.html#use-interpolation-rpp-parameter-depreciated)
      * [ Changes to MPPI Goal Critic ](../../migration/Iron.html#changes-to-mppi-goal-critic)
      * [ Changes to MPPI Path Angle Critic ](../../migration/Iron.html#changes-to-mppi-path-angle-critic)
      * [ Changes to MPPI Path Handling For Directionality ](../../migration/Iron.html#changes-to-mppi-path-handling-for-directionality)
      * [ Addition of new MPPI Cost Critic ](../../migration/Iron.html#addition-of-new-mppi-cost-critic)
      * [ MPPI Acceleration ](../../migration/Iron.html#mppi-acceleration)
      * [ Move Error Code Enumerations ](../../migration/Iron.html#move-error-code-enumerations)
      * [ Substitution in parameter file ](../../migration/Iron.html#substitution-in-parameter-file)
      * [ Allow Behavior Server Plugins to Access The Action Result ](../../migration/Iron.html#allow-behavior-server-plugins-to-access-the-action-result)
      * [ Smac Planner Debug Param Name Change ](../../migration/Iron.html#smac-planner-debug-param-name-change)
      * [ Smac Planner On Approach to Goal Shortcutting Solutions ](../../migration/Iron.html#smac-planner-on-approach-to-goal-shortcutting-solutions)
      * [ Added GPS Waypoint Follower Server ](../../migration/Iron.html#added-gps-waypoint-follower-server)
      * [ Smac Planner Hybrid-A* New Features ](../../migration/Iron.html#smac-planner-hybrid-a-new-features)
      * [ New node in nav2_collision_monitor: Collision Detector ](../../migration/Iron.html#new-node-in-nav2-collision-monitor-collision-detector)
      * [ Dynamic enabling/disabling of sources/polygons in Collision Monitor/Detector ](../../migration/Iron.html#dynamic-enabling-disabling-of-sources-polygons-in-collision-monitor-detector)
      * [ Expose action server’s result timeout ](../../migration/Iron.html#expose-action-server-s-result-timeout)
      * [ RewrittenYaml could add new parameters to YAMLs ](../../migration/Iron.html#rewrittenyaml-could-add-new-parameters-to-yamls)
      * [ Simple Commander API Allows Multi-Robot Namespacing ](../../migration/Iron.html#simple-commander-api-allows-multi-robot-namespacing)
      * [ Change duration type in wait_action node ](../../migration/Iron.html#change-duration-type-in-wait-action-node)
      * [ The costmap activation fails when required transforms are not available ](../../migration/Iron.html#the-costmap-activation-fails-when-required-transforms-are-not-available)


    load parkingMap.mat;
    resolution = 3;
    map = occupancyMap(map,resolution);


Happy predictive controlling,


_Not currently indexed._


  * [ Netherlands ](https://nl.mathworks.com) (English)
  * [ Norway ](https://se.mathworks.com) (English)
  * [ Österreich ](https://de.mathworks.com) (Deutsch)
  * [ Portugal ](https://www.mathworks.com) (English)
  * [ Sweden ](https://se.mathworks.com) (English)
  * Switzerland
    * [ Deutsch ](https://ch.mathworks.com)
    * [ English ](https://ch.mathworks.com)
    * [ Français ](https://ch.mathworks.com)
  * [ United Kingdom ](https://uk.mathworks.com) (English)


Visualize the path.


        * [ 1- Setup Rviz clicked point ](../../tutorials/docs/navigation2_dynamic_point_following.html#setup-rviz-clicked-point)
        * [ 2- Run Dynamic Object Following in Nav2 Simulation ](../../tutorials/docs/navigation2_dynamic_point_following.html#run-dynamic-object-following-in-nav2-simulation)
    * [ Navigating with Keepout Zones ](../../tutorials/docs/navigation2_with_keepout_filter.html)
      * [ Overview ](../../tutorials/docs/navigation2_with_keepout_filter.html#overview)
      * [ Requirements ](../../tutorials/docs/navigation2_with_keepout_filter.html#requirements)
      * [ Tutorial Steps ](../../tutorials/docs/navigation2_with_keepout_filter.html#tutorial-steps)
        * [ 1\. Prepare filter mask ](../../tutorials/docs/navigation2_with_keepout_filter.html#prepare-filter-mask)
        * [ 2\. Configure Costmap Filter Info Publisher Server ](../../tutorials/docs/navigation2_with_keepout_filter.html#configure-costmap-filter-info-publisher-server)
        * [ 3\. Enable Keepout Filter ](../../tutorials/docs/navigation2_with_keepout_filter.html#enable-keepout-filter)
        * [ 4\. Run Nav2 stack ](../../tutorials/docs/navigation2_with_keepout_filter.html#run-nav2-stack)
    * [ Navigating with Speed Limits ](../../tutorials/docs/navigation2_with_speed_filter.html)
      * [ Overview ](../../tutorials/docs/navigation2_with_speed_filter.html#overview)
      * [ Requirements ](../../tutorials/docs/navigation2_with_speed_filter.html#requirements)
      * [ Tutorial Steps ](../../tutorials/docs/navigation2_with_speed_filter.html#tutorial-steps)
        * [ 1\. Prepare filter mask ](../../tutorials/docs/navigation2_with_speed_filter.html#prepare-filter-mask)
        * [ 2\. Configure Costmap Filter Info Publisher Server ](../../tutorials/docs/navigation2_with_speed_filter.html#configure-costmap-filter-info-publisher-server)
        * [ 3\. Enable Speed Filter ](../../tutorials/docs/navigation2_with_speed_filter.html#enable-speed-filter)
        * [ 4\. Run Nav2 stack ](../../tutorials/docs/navigation2_with_speed_filter.html#run-nav2-stack)
    * [ Using Rotation Shim Controller ](../../tutorials/docs/using_shim_controller.html)
      * [ Overview ](../../tutorials/docs/using_shim_controller.html#overview)
      * [ What is the Rotation Shim Controller? ](../../tutorials/docs/using_shim_controller.html#what-is-the-rotation-shim-controller)
      * [ Configuring Rotation Shim Controller ](../../tutorials/docs/using_shim_controller.html#configuring-rotation-shim-controller)
      * [ Configuring Primary Controller ](../../tutorials/docs/using_shim_controller.html#configuring-primary-controller)
      * [ Demo Execution ](../../tutorials/docs/using_shim_controller.html#demo-execution)
    * [ Adding a Smoother to a BT ](../../tutorials/docs/adding_smoother.html)
      * [ Overview ](../../tutorials/docs/adding_smoother.html#overview)
      * [ Requirements ](../../tutorials/docs/adding_smoother.html#requirements)
      * [ Tutorial Steps ](../../tutorials/docs/adding_smoother.html#tutorial-steps)
        * [ 0- Familiarization with the Smoother BT Node ](../../tutorials/docs/adding_smoother.html#familiarization-with-the-smoother-bt-node)
        * [ 1- Specifying a Smoother Plugin ](../../tutorials/docs/adding_smoother.html#specifying-a-smoother-plugin)
        * [ 2- Modifying your BT XML ](../../tutorials/docs/adding_smoother.html#modifying-your-bt-xml)
    * [ Using Collision Monitor ](../../tutorials/docs/using_collision_monitor.html)
      * [ Overview ](../../tutorials/docs/using_collision_monitor.html#overview)
      * [ Requirements ](../../tutorials/docs/using_collision_monitor.html#requirements)
      * [ Configuring Collision Monitor ](../../tutorials/docs/using_collision_monitor.html#configuring-collision-monitor)
      * [ Configuring Collision Monitor with VelocityPolygon ](../../tutorials/docs/using_collision_monitor.html#configuring-collision-monitor-with-velocitypolygon)
      * [ Preparing Nav2 stack ](../../tutorials/docs/using_collision_monitor.html#preparing-nav2-stack)
      * [ Demo Execution ](../../tutorials/docs/using_collision_monitor.html#demo-execution)
    * [ Adding a New Nav2 Task Server ](../../tutorials/docs/adding_a_nav2_task_server.html)
      * [ Lifecycle Nodes ](../../tutorials/docs/adding_a_nav2_task_server.html#lifecycle-nodes)


The Nav2 Controller is an [ Execution Module ](https://github.com/ros-
planning/navigation2/tree/foxy-
devel/nav2_controller/../doc/requirements/requirements.md) that implements the
` nav2_msgs::action::FollowPath ` action server.


An execution module implementing the ` nav2_msgs::action::FollowPath ` action
server is responsible for generating command velocities for the robot, given
the computed path from the planner module in ` nav2_planner ` . The
nav2_controller package is designed to be loaded with multiple plugins for
path execution. The plugins need to implement functions in the virtual base
class defined in the ` controller ` header file in ` nav2_core ` package. It
also contains progress checkers and goal checker plugins to abstract out that
logic from specific controller implementations.


localmap = occupancyMap(15,15,map.Resolution);


* [ github-ros-planning-navigation2 ](/p/nav2_controller/github-ros-planning-navigation2)


Close


###  Wiki Tutorials


Failed to get question list, you can ticket an issue [ here
](https://github.com/ros-infrastructure/rosindex/issues/new)


###  Source Tutorials


[ Navigation Stack  ](/c/navigation/44)


* [ Get MATLAB ](https://login.mathworks.com/embedded-login/landing.html?cid=getmatlab&s_tid=gn_getml)


Choose a web site to get translated content where available and see local
events and offers. Based on your location, we recommend that you select: ****
.


Number of iterations to optimize the trajectory, specified as a positive
integer. This value is the number of times interpolation occurs and the
controller calls the solver for trajectory optimization.


Deps  |  |  Name  |  [ ](/p/nav2_common#foxy-deps) |  [ 1
](/packages/nav2_common) |  [ nav2_common ](/p/nav2_common#foxy)
---|---|---
[ ](/p/ament_cmake#foxy-deps) |  [ 1 ](/packages/ament_cmake) |  [ ament_cmake
](/p/ament_cmake#foxy)
[ ](/p/ament_lint_common#foxy-deps) |  [ 1 ](/packages/ament_lint_common) |  [
ament_lint_common ](/p/ament_lint_common#foxy)
[ ](/p/ament_lint_auto#foxy-deps) |  [ 1 ](/packages/ament_lint_auto) |  [
ament_lint_auto ](/p/ament_lint_auto#foxy)
[ ](/p/angles#foxy-deps) |  [ 1 ](/packages/angles) |  [ angles
](/p/angles#foxy)
[ ](/p/rclcpp#foxy-deps) |  [ 1 ](/packages/rclcpp) |  [ rclcpp
](/p/rclcpp#foxy)
[ ](/p/rclcpp_action#foxy-deps) |  [ 1 ](/packages/rclcpp_action) |  [
rclcpp_action ](/p/rclcpp_action#foxy)
[ ](/p/std_msgs#foxy-deps) |  [ 2 ](/packages/std_msgs) |  [ std_msgs
](/p/std_msgs#foxy)
[ ](/p/nav2_util#foxy-deps) |  [ 1 ](/packages/nav2_util) |  [ nav2_util
](/p/nav2_util#foxy)
[ ](/p/nav2_msgs#foxy-deps) |  [ 1 ](/packages/nav2_msgs) |  [ nav2_msgs
](/p/nav2_msgs#foxy)
[ ](/p/nav_2d_utils#foxy-deps) |  [ 2 ](/packages/nav_2d_utils) |  [
nav_2d_utils ](/p/nav_2d_utils#foxy)
[ ](/p/nav_2d_msgs#foxy-deps) |  [ 2 ](/packages/nav_2d_msgs) |  [ nav_2d_msgs
](/p/nav_2d_msgs#foxy)
[ ](/p/nav2_core#foxy-deps) |  [ 1 ](/packages/nav2_core) |  [ nav2_core
](/p/nav2_core#foxy)
[ ](/p/pluginlib#foxy-deps) |  [ 1 ](/packages/pluginlib) |  [ pluginlib
](/p/pluginlib#foxy)

###  System Dependencies


Method is called when controller server enters on_activate state. Ideally this
method should implement operations which are neccessary before controller goes
to an active state.


  * [ América Latina ](https://la.mathworks.com) (Español)
  * [ Canada ](https://www.mathworks.com) (English)
  * [ United States ](https://www.mathworks.com) (English)


Yes

cleanup()


  * [ Australia ](https://au.mathworks.com) (English)
  * [ India ](https://in.mathworks.com) (English)
  * [ New Zealand ](https://au.mathworks.com) (English)
  * 中国
    * [ 简体中文 ](https://ww2.mathworks.cn)
    * [ English ](https://ww2.mathworks.cn)
  * [ 日本 ](https://jp.mathworks.com) (日本語)
  * [ 한국 ](https://kr.mathworks.com) (한국어)


Name  |  Repo  |  Deps  |  [ nav2_rotation_shim_controller
](/p/nav2_rotation_shim_controller/github-ros-planning-navigation2#iron) |  [
github-ros-planning-navigation2 ](/r/navigation2/github-ros-planning-
navigation2) |  [ ](/p/nav2_rotation_shim_controller/github-ros-planning-
navigation2#iron-deps)
---|---|---
[ navigation2 ](/p/navigation2/github-ros-planning-navigation2#iron) |  [
github-ros-planning-navigation2 ](/r/navigation2/github-ros-planning-
navigation2) |  [ ](/p/navigation2/github-ros-planning-navigation2#iron-deps)

###  Launch files


###  Package Dependencies


        * [ Path Follow Critic ](../../configuration/packages/configuring-mppic.html#path-follow-critic)
        * [ Prefer Forward Critic ](../../configuration/packages/configuring-mppic.html#prefer-forward-critic)
        * [ Twirling Critic ](../../configuration/packages/configuring-mppic.html#twirling-critic)
        * [ Velocity Deadband Critic ](../../configuration/packages/configuring-mppic.html#velocity-deadband-critic)
      * [ Example ](../../configuration/packages/configuring-mppic.html#example)
      * [ Notes to Users ](../../configuration/packages/configuring-mppic.html#notes-to-users)
        * [ General Words of Wisdom ](../../configuration/packages/configuring-mppic.html#general-words-of-wisdom)
        * [ Prediction Horizon, Costmap Sizing, and Offsets ](../../configuration/packages/configuring-mppic.html#prediction-horizon-costmap-sizing-and-offsets)
        * [ Obstacle, Inflation Layer, and Path Following ](../../configuration/packages/configuring-mppic.html#obstacle-inflation-layer-and-path-following)
    * [ Rotation Shim Controller ](../../configuration/packages/configuring-rotation-shim-controller.html)
      * [ Rotation Shim Controller Parameters ](../../configuration/packages/configuring-rotation-shim-controller.html#rotation-shim-controller-parameters)
      * [ Example ](../../configuration/packages/configuring-rotation-shim-controller.html#example)
    * [ Graceful Controller ](../../configuration/packages/configuring-graceful-motion-controller.html)
      * [ Graceful Controller Parameters ](../../configuration/packages/configuring-graceful-motion-controller.html#graceful-controller-parameters)
      * [ Example ](../../configuration/packages/configuring-graceful-motion-controller.html#example)
    * [ Map Server / Saver ](../../configuration/packages/configuring-map-server.html)
      * [ Map Saver Parameters ](../../configuration/packages/configuring-map-server.html#map-saver-parameters)
      * [ Map Server Parameters ](../../configuration/packages/configuring-map-server.html#map-server-parameters)
      * [ Costmap Filter Info Server Parameters ](../../configuration/packages/configuring-map-server.html#costmap-filter-info-server-parameters)
      * [ Example ](../../configuration/packages/configuring-map-server.html#example)
    * [ AMCL ](../../configuration/packages/configuring-amcl.html)
      * [ Parameters ](../../configuration/packages/configuring-amcl.html#parameters)
      * [ Example ](../../configuration/packages/configuring-amcl.html#example)
    * [ Behavior Server ](../../configuration/packages/configuring-behavior-server.html)
      * [ Behavior Server Parameters ](../../configuration/packages/configuring-behavior-server.html#behavior-server-parameters)
      * [ Default Plugins ](../../configuration/packages/configuring-behavior-server.html#default-plugins)
      * [ Spin Behavior Parameters ](../../configuration/packages/configuring-behavior-server.html#spin-behavior-parameters)
      * [ BackUp Behavior Parameters ](../../configuration/packages/configuring-behavior-server.html#backup-behavior-parameters)
      * [ DriveOnHeading Behavior Parameters ](../../configuration/packages/configuring-behavior-server.html#driveonheading-behavior-parameters)
      * [ AssistedTeleop Behavior Parameters ](../../configuration/packages/configuring-behavior-server.html#assistedteleop-behavior-parameters)
      * [ Example ](../../configuration/packages/configuring-behavior-server.html#example)
    * [ Smoother Server ](../../configuration/packages/configuring-smoother-server.html)
      * [ Smoother Server Parameters ](../../configuration/packages/configuring-smoother-server.html#smoother-server-parameters)
      * [ Example ](../../configuration/packages/configuring-smoother-server.html#example)
    * [ Simple Smoother ](../../configuration/packages/configuring-simple-smoother.html)
      * [ Simple Smoother Parameters ](../../configuration/packages/configuring-simple-smoother.html#simple-smoother-parameters)
      * [ Example ](../../configuration/packages/configuring-simple-smoother.html#example)
    * [ Savitzky-Golay Smoother ](../../configuration/packages/configuring-savitzky-golay-smoother.html)
      * [ Savitzky-Golay Smoother Parameters ](../../configuration/packages/configuring-savitzky-golay-smoother.html#savitzky-golay-smoother-parameters)
      * [ Example ](../../configuration/packages/configuring-savitzky-golay-smoother.html#example)


|  0  |  3109  |  June 11, 2023
[ [Nav2] V1.0.0 Released with ROS2 Galactic
](https://discourse.ros.org/t/nav2-v1-0-0-released-with-ros2-galactic/20520)


_No service files found_


_No message files found._


[ ros2 ](https://discourse.ros.org/tag/ros2)


Hi all,


    * [ Constrained smoother ](../../configuration/packages/configuring-constrained-smoother.html)
      * [ Smoother Server Parameters ](../../configuration/packages/configuring-constrained-smoother.html#smoother-server-parameters)
      * [ Example ](../../configuration/packages/configuring-constrained-smoother.html#example)
    * [ Velocity Smoother ](../../configuration/packages/configuring-velocity-smoother.html)
      * [ Velocity Smoother Parameters ](../../configuration/packages/configuring-velocity-smoother.html#velocity-smoother-parameters)
      * [ Example ](../../configuration/packages/configuring-velocity-smoother.html#example)
    * [ Collision Monitor ](../../configuration/packages/configuring-collision-monitor.html)
      * [ Provided Nodes ](../../configuration/packages/configuring-collision-monitor.html#provided-nodes)
        * [ Collision Monitor Node ](../../configuration/packages/collision_monitor/configuring-collision-monitor-node.html)
        * [ Collision Detector Node ](../../configuration/packages/collision_monitor/configuring-collision-detector-node.html)
    * [ Waypoint Follower ](../../configuration/packages/configuring-waypoint-follower.html)
      * [ Parameters ](../../configuration/packages/configuring-waypoint-follower.html#parameters)
      * [ Provided Plugins ](../../configuration/packages/configuring-waypoint-follower.html#provided-plugins)
        * [ WaitAtWaypoint ](../../configuration/packages/nav2_waypoint_follower-plugins/wait_at_waypoint.html)
        * [ PhotoAtWaypoint ](../../configuration/packages/nav2_waypoint_follower-plugins/photo_at_waypoint.html)
        * [ InputAtWaypoint ](../../configuration/packages/nav2_waypoint_follower-plugins/input_at_waypoint.html)
      * [ Default Plugin ](../../configuration/packages/configuring-waypoint-follower.html#default-plugin)
      * [ Example ](../../configuration/packages/configuring-waypoint-follower.html#example)
  * [ Tuning Guide ](../../tuning/index.html)
    * [ Inflation Potential Fields ](../../tuning/index.html#inflation-potential-fields)
    * [ Robot Footprint vs Radius ](../../tuning/index.html#robot-footprint-vs-radius)
    * [ Rotate in Place Behavior ](../../tuning/index.html#rotate-in-place-behavior)
    * [ Planner Plugin Selection ](../../tuning/index.html#planner-plugin-selection)
    * [ Controller Plugin Selection ](../../tuning/index.html#controller-plugin-selection)
    * [ Caching Obstacle Heuristic in Smac Planners ](../../tuning/index.html#caching-obstacle-heuristic-in-smac-planners)
    * [ Costmap2D Plugins ](../../tuning/index.html#costmap2d-plugins)
    * [ Nav2 Launch Options ](../../tuning/index.html#nav2-launch-options)
    * [ Other Pages We’d Love To Offer ](../../tuning/index.html#other-pages-we-d-love-to-offer)
  * [ Nav2 Behavior Trees ](../../behavior_trees/index.html)
    * [ Introduction To Nav2 Specific Nodes ](../../behavior_trees/overview/nav2_specific_nodes.html)
      * [ Action Nodes ](../../behavior_trees/overview/nav2_specific_nodes.html#action-nodes)
      * [ Condition Nodes ](../../behavior_trees/overview/nav2_specific_nodes.html#condition-nodes)
      * [ Decorator Nodes ](../../behavior_trees/overview/nav2_specific_nodes.html#decorator-nodes)
      * [ Control: PipelineSequence ](../../behavior_trees/overview/nav2_specific_nodes.html#control-pipelinesequence)
      * [ Control: Recovery ](../../behavior_trees/overview/nav2_specific_nodes.html#control-recovery)
      * [ Control: RoundRobin ](../../behavior_trees/overview/nav2_specific_nodes.html#control-roundrobin)
    * [ Detailed Behavior Tree Walkthrough ](../../behavior_trees/overview/detailed_behavior_tree_walkthrough.html)
      * [ Overview ](../../behavior_trees/overview/detailed_behavior_tree_walkthrough.html#overview)
      * [ Prerequisites ](../../behavior_trees/overview/detailed_behavior_tree_walkthrough.html#prerequisites)
      * [ Navigate To Pose With Replanning and Recovery ](../../behavior_trees/overview/detailed_behavior_tree_walkthrough.html#navigate-to-pose-with-replanning-and-recovery)


![](/assets/package.png) |


Main Content


###  Wiki Tutorials


##  How to Get Best Site Performance


|  6  |  3802  |  September 4, 2023

  * [ Home ](/)
  * [ Categories ](/categories)
  * [ FAQ/Guidelines ](/guidelines)
  * [ Terms of Service ](/tos)
  * [ Privacy Policy ](/privacy)


  * [ About ](/about)
  * Index
    * [ Package List ](/packages/page/1/time/)
    * [ Repository List ](/repos/page/1/time/)
    *     * [ Nodes ](/srvs/)
    * [ Messages ](/msgs/)
    * [ Services ](/srvs/)
    * [ Plugins ](/srvs/)
    *     * [ System Dependencies ](/deps/)
  * [ Contribute ](/contribute)
  * [ Stats ](/stats)


_See[ ROS Wiki Tutorials ](http://wiki.ros.org/nav2_controller/Tutorials) for
more details. _


Open Mobile Search


**Checkout URI** |  [ https://github.com/ros-planning/navigation2.git
](https://github.com/ros-planning/navigation2.git)
---|---
**VCS Type** |  git
**VCS Version** |  eloquent-devel
**Last Updated**

2021-01-04  |  **Dev Status** |  DEVELOPED
**CI status** |  No Continuous Integration
**Released** |  RELEASED
**Tags** |  _No category tags._
**Contributing** |  [ Help Wanted (  0  ) ](/r/navigation2/#eloquent-
contribute-lists-help-wanted)
[ Good First Issues (  0  ) ](/r/navigation2/#eloquent-contribute-lists-good-
first-issue)
[ Pull Requests to Review (  0  ) ](/r/navigation2/#eloquent-contribute-lists-
pull-requests)

###  Package Description


* United States


###  Asia Pacific


[ expand all ](javascript:void\(0\);)


  * Documentation
  * [ Examples ](../examples.html?category=motion-planning&s_tid=CRUX_topnav)
  * [ Functions ](../referencelist.html?type=function&category=motion-planning&s_tid=CRUX_topnav)
  * [ Blocks ](../referencelist.html?type=block&category=motion-planning&s_tid=CRUX_topnav)
  * [ Apps ](../referencelist.html?type=app&category=motion-planning&s_tid=CRUX_topnav)
  * [ Videos ](/support/search.html?fq\[\]=asset_type_name:video%20category:nav/motion-planning&s_tid=CRUX_topnav)
  * [ Answers ](/support/search.html?fq\[\]=asset_type_name:answer%20category:nav/motion-planning&s_tid=CRUX_topnav)


Cost function weight for smooth motion, specified as a positive scalar. To
obtain a smoother path, increase this weight value.

` Obstacles ` |


![](https://sea2.discourse-
cdn.com/business7/user_avatar/discourse.ros.org/smac/48/6763_2.png) smac:


Toggle Main Navigation


[ ![Animated gif of pure pursuit controller
demo](../../_images/nav2_pure_pursuit_gif.gif)
](../../_images/nav2_pure_pursuit_gif.gif)


###  Messages


Visualize the map. The map contains the floor plan of a parking lot with some
parking slots already occupied.


Decrease this value to allow sharp turns and in place rotations. Increase this
value to limit sharp turns. When you increase the value, the vehicle will make
more forward and reverse motions to turn in a restricted space.


[ nav2_amcl ](/p/nav2_amcl/github-ros-planning-navigation2) [
nav2_behavior_tree ](/p/nav2_behavior_tree/github-ros-planning-navigation2) [
nav2_behaviors ](/p/nav2_behaviors/github-ros-planning-navigation2) [
nav2_bringup ](/p/nav2_bringup/github-ros-planning-navigation2) [
nav2_bt_navigator ](/p/nav2_bt_navigator/github-ros-planning-navigation2) [
nav2_collision_monitor ](/p/nav2_collision_monitor/github-ros-planning-
navigation2) [ nav2_common ](/p/nav2_common/github-ros-planning-navigation2) [
nav2_constrained_smoother ](/p/nav2_constrained_smoother/github-ros-planning-
navigation2) nav2_controller  [ nav2_core ](/p/nav2_core/github-ros-planning-
navigation2) [ nav2_costmap_2d ](/p/nav2_costmap_2d/github-ros-planning-
navigation2) [ costmap_queue ](/p/costmap_queue/github-ros-planning-
navigation2) [ dwb_core ](/p/dwb_core/github-ros-planning-navigation2) [
dwb_critics ](/p/dwb_critics/github-ros-planning-navigation2) [ dwb_msgs
](/p/dwb_msgs/github-ros-planning-navigation2) [ dwb_plugins
](/p/dwb_plugins/github-ros-planning-navigation2) [ nav2_dwb_controller
](/p/nav2_dwb_controller/github-ros-planning-navigation2) [ nav_2d_msgs
](/p/nav_2d_msgs/github-ros-planning-navigation2) [ nav_2d_utils
](/p/nav_2d_utils/github-ros-planning-navigation2) [ nav2_lifecycle_manager
](/p/nav2_lifecycle_manager/github-ros-planning-navigation2) [ nav2_map_server
](/p/nav2_map_server/github-ros-planning-navigation2) [ nav2_mppi_controller
](/p/nav2_mppi_controller/github-ros-planning-navigation2) [ nav2_msgs
](/p/nav2_msgs/github-ros-planning-navigation2) [ nav2_navfn_planner
](/p/nav2_navfn_planner/github-ros-planning-navigation2) [ nav2_planner
](/p/nav2_planner/github-ros-planning-navigation2) [
nav2_regulated_pure_pursuit_controller
](/p/nav2_regulated_pure_pursuit_controller/github-ros-planning-navigation2) [
nav2_rotation_shim_controller ](/p/nav2_rotation_shim_controller/github-ros-
planning-navigation2) [ nav2_rviz_plugins ](/p/nav2_rviz_plugins/github-ros-
planning-navigation2) [ nav2_simple_commander
](/p/nav2_simple_commander/github-ros-planning-navigation2) [
nav2_smac_planner ](/p/nav2_smac_planner/github-ros-planning-navigation2) [
nav2_smoother ](/p/nav2_smoother/github-ros-planning-navigation2) [
nav2_system_tests ](/p/nav2_system_tests/github-ros-planning-navigation2) [
nav2_theta_star_planner ](/p/nav2_theta_star_planner/github-ros-planning-
navigation2) [ nav2_util ](/p/nav2_util/github-ros-planning-navigation2) [
nav2_velocity_smoother ](/p/nav2_velocity_smoother/github-ros-planning-
navigation2) [ nav2_voxel_grid ](/p/nav2_voxel_grid/github-ros-planning-
navigation2) [ nav2_waypoint_follower ](/p/nav2_waypoint_follower/github-ros-
planning-navigation2) [ navigation2 ](/p/navigation2/github-ros-planning-
navigation2)


Failed to get question list, you can ticket an issue [ here
](https://github.com/ros-infrastructure/rosindex/issues/new)


_No additional authors._


|  0  |  1775  |  May 20, 2021
[ [Nav2 WG] December 7, 2023 ](https://discourse.ros.org/t/nav2-wg-
december-7-2023/35001)


  * [ Getting Started ](../../getting_started/index.html)
    * [ Installation ](../../getting_started/index.html#installation)
    * [ Running the Example ](../../getting_started/index.html#running-the-example)
    * [ Navigating ](../../getting_started/index.html#navigating)
  * [ Development Guides ](../../development_guides/index.html)
    * [ Build and Install ](../../development_guides/build_docs/index.html)
      * [ Install ](../../development_guides/build_docs/index.html#install)
      * [ Build ](../../development_guides/build_docs/index.html#build)
        * [ Released Distribution Binaries ](../../development_guides/build_docs/index.html#released-distribution-binaries)
        * [ Rolling Development Source ](../../development_guides/build_docs/index.html#rolling-development-source)
        * [ Docker Container Images ](../../development_guides/build_docs/index.html#docker-container-images)
      * [ Generate Doxygen ](../../development_guides/build_docs/index.html#generate-doxygen)
      * [ Help ](../../development_guides/build_docs/index.html#help)
        * [ Build Troubleshooting Guide ](../../development_guides/build_docs/build_troubleshooting_guide.html)
    * [ Dev Containers ](../../development_guides/devcontainer_docs/index.html)
      * [ Dev Container Guide ](../../development_guides/devcontainer_docs/devcontainer_guide.html)
        * [ Creating Dev Containers ](../../development_guides/devcontainer_docs/devcontainer_guide.html#creating-dev-containers)
        * [ Using Dev Containers ](../../development_guides/devcontainer_docs/devcontainer_guide.html#using-dev-containers)
      * [ What, Why, How? ](../../development_guides/devcontainer_docs/index.html#what-why-how)
        * [ What is a Dev Container? ](../../development_guides/devcontainer_docs/index.html#what-is-a-dev-container)
        * [ Why use a Dev Container? ](../../development_guides/devcontainer_docs/index.html#why-use-a-dev-container)
        * [ How do Dev Containers work? ](../../development_guides/devcontainer_docs/index.html#how-do-dev-containers-work)
      * [ Prerequisites ](../../development_guides/devcontainer_docs/index.html#prerequisites)
      * [ Getting started ](../../development_guides/devcontainer_docs/index.html#getting-started)
      * [ Security ](../../development_guides/devcontainer_docs/index.html#security)
    * [ Getting Involved ](../../development_guides/involvement_docs/index.html)
      * [ Getting Involved ](../../development_guides/involvement_docs/index.html#id1)
      * [ Process ](../../development_guides/involvement_docs/index.html#process)
      * [ Licensing ](../../development_guides/involvement_docs/index.html#licensing)
      * [ Developer Certification of Origin (DCO) ](../../development_guides/involvement_docs/index.html#developer-certification-of-origin-dco)
  * [ Navigation Concepts ](../../concepts/index.html)
    * [ ROS 2 ](../../concepts/index.html#ros-2)
      * [ Action Server ](../../concepts/index.html#action-server)
      * [ Lifecycle Nodes and Bond ](../../concepts/index.html#lifecycle-nodes-and-bond)
    * [ Behavior Trees ](../../concepts/index.html#behavior-trees)
    * [ Navigation Servers ](../../concepts/index.html#navigation-servers)
      * [ Planner, Controller, Smoother and Recovery Servers ](../../concepts/index.html#planner-controller-smoother-and-recovery-servers)
      * [ Planners ](../../concepts/index.html#planners)
      * [ Controllers ](../../concepts/index.html#controllers)
      * [ Behaviors ](../../concepts/index.html#behaviors)


###  Dependant Packages


Help Center


To enable the plugin, we need to modify the ` nav2_params.yaml  ` file as
below


Close Mobile Search


####  Maintainers


[ nav2_amcl ](/p/nav2_amcl/github-ros-planning-navigation2) [
nav2_behavior_tree ](/p/nav2_behavior_tree/github-ros-planning-navigation2) [
nav2_bringup ](/p/nav2_bringup/github-ros-planning-navigation2) [
nav2_gazebo_spawner ](/p/nav2_gazebo_spawner/github-ros-planning-navigation2)
[ nav2_bt_navigator ](/p/nav2_bt_navigator/github-ros-planning-navigation2) [
nav2_common ](/p/nav2_common/github-ros-planning-navigation2) nav2_controller
[ nav2_core ](/p/nav2_core/github-ros-planning-navigation2) [ nav2_costmap_2d
](/p/nav2_costmap_2d/github-ros-planning-navigation2) [ costmap_queue
](/p/costmap_queue/github-ros-planning-navigation2) [ dwb_core
](/p/dwb_core/github-ros-planning-navigation2) [ dwb_critics
](/p/dwb_critics/github-ros-planning-navigation2) [ dwb_msgs
](/p/dwb_msgs/github-ros-planning-navigation2) [ dwb_plugins
](/p/dwb_plugins/github-ros-planning-navigation2) [ nav2_dwb_controller
](/p/nav2_dwb_controller/github-ros-planning-navigation2) [ nav_2d_msgs
](/p/nav_2d_msgs/github-ros-planning-navigation2) [ nav_2d_utils
](/p/nav_2d_utils/github-ros-planning-navigation2) [ nav2_lifecycle_manager
](/p/nav2_lifecycle_manager/github-ros-planning-navigation2) [ nav2_map_server
](/p/nav2_map_server/github-ros-planning-navigation2) [ nav2_msgs
](/p/nav2_msgs/github-ros-planning-navigation2) [ nav2_navfn_planner
](/p/nav2_navfn_planner/github-ros-planning-navigation2) [ nav2_planner
](/p/nav2_planner/github-ros-planning-navigation2) [ nav2_recoveries
](/p/nav2_recoveries/github-ros-planning-navigation2) [
nav2_regulated_pure_pursuit_controller
](/p/nav2_regulated_pure_pursuit_controller/github-ros-planning-navigation2) [
nav2_rotation_shim_controller ](/p/nav2_rotation_shim_controller/github-ros-
planning-navigation2) [ nav2_rviz_plugins ](/p/nav2_rviz_plugins/github-ros-
planning-navigation2) [ nav2_simple_commander
](/p/nav2_simple_commander/github-ros-planning-navigation2) [
nav2_smac_planner ](/p/nav2_smac_planner/github-ros-planning-navigation2) [
nav2_system_tests ](/p/nav2_system_tests/github-ros-planning-navigation2) [
nav2_theta_star_planner ](/p/nav2_theta_star_planner/github-ros-planning-
navigation2) [ nav2_util ](/p/nav2_util/github-ros-planning-navigation2) [
nav2_voxel_grid ](/p/nav2_voxel_grid/github-ros-planning-navigation2) [
nav2_waypoint_follower ](/p/nav2_waypoint_follower/github-ros-planning-
navigation2) [ navigation2 ](/p/navigation2/github-ros-planning-navigation2)
---|---

github-ros-planning-navigation2


humble  iron  rolling  noetic


[ example ](controllerteb.html#mw_68f4ff2d-e010-4b85-9c5f-a1e7c11b40c8)


####  Authors


Note: This tutorial is based on a previously existing simplified version of
the Regulated Pure Pursuit controller now in the Nav2 stack. You can find the
source code matching this tutorial [ here ](https://github.com/ros-
planning/navigation2_tutorials/tree/126902457c5c646b136569886d6325f070c1073d/nav2_pure_pursuit_controller)
.


Deps  |  |  Name  |  [ ](/p/nav2_common#humble-deps) |  [ 1
](/packages/nav2_common) |  [ nav2_common ](/p/nav2_common#humble)
---|---|---
[ ](/p/ament_cmake#humble-deps) |  [ 1 ](/packages/ament_cmake) |  [
ament_cmake ](/p/ament_cmake#humble)
[ ](/p/ament_lint_common#humble-deps) |  [ 1 ](/packages/ament_lint_common) |
[ ament_lint_common ](/p/ament_lint_common#humble)
[ ](/p/ament_lint_auto#humble-deps) |  [ 1 ](/packages/ament_lint_auto) |  [
ament_lint_auto ](/p/ament_lint_auto#humble)
[ ](/p/ament_cmake_gtest#humble-deps) |  [ 1 ](/packages/ament_cmake_gtest) |
[ ament_cmake_gtest ](/p/ament_cmake_gtest#humble)
[ ](/p/ament_cmake_pytest#humble-deps) |  [ 1 ](/packages/ament_cmake_pytest)
|  [ ament_cmake_pytest ](/p/ament_cmake_pytest#humble)
[ ](/p/angles#humble-deps) |  [ 1 ](/packages/angles) |  [ angles
](/p/angles#humble)
[ ](/p/rclcpp#humble-deps) |  [ 1 ](/packages/rclcpp) |  [ rclcpp
](/p/rclcpp#humble)
[ ](/p/rclcpp_action#humble-deps) |  [ 1 ](/packages/rclcpp_action) |  [
rclcpp_action ](/p/rclcpp_action#humble)
[ ](/p/std_msgs#humble-deps) |  [ 2 ](/packages/std_msgs) |  [ std_msgs
](/p/std_msgs#humble)
[ ](/p/nav2_util#humble-deps) |  [ 1 ](/packages/nav2_util) |  [ nav2_util
](/p/nav2_util#humble)
[ ](/p/nav2_msgs#humble-deps) |  [ 1 ](/packages/nav2_msgs) |  [ nav2_msgs
](/p/nav2_msgs#humble)
[ ](/p/nav_2d_utils#humble-deps) |  [ 2 ](/packages/nav_2d_utils) |  [
nav_2d_utils ](/p/nav_2d_utils#humble)
[ ](/p/nav_2d_msgs#humble-deps) |  [ 2 ](/packages/nav_2d_msgs) |  [
nav_2d_msgs ](/p/nav_2d_msgs#humble)
[ ](/p/nav2_core#humble-deps) |  [ 1 ](/packages/nav2_core) |  [ nav2_core
](/p/nav2_core#humble)
[ ](/p/pluginlib#humble-deps) |  [ 1 ](/packages/pluginlib) |  [ pluginlib
](/p/pluginlib#humble)

###  System Dependencies


* [ github-ros-planning-navigation2 ](/p/nav2_controller/github-ros-planning-navigation2)


Index specifying an element in the optimized path and timestamp outputs until
which the trajectory is feasible. Beyond this index, the value of ` ExitFlag `
will be greater than zero. This implies one or more scenarios corresponding to
` ExitFlag ` > 0 has occurred.

` DistanceFromStartPose ` |


###  ` ReferenceDeltaTime ` —  Reference travel time between consecutive poses
` 0.3 ` (default) |  positive scalar


###  ` MinTurningRadius ` —  Minimum turning radius for vehicle on optimized
path
0  (default) |  nonnegative scalar


**Set Up and Run Local Planner**


See the [ Navigation Plugin list
](https://navigation.ros.org/plugins/index.html) for a list of the currently
known and available controller plugins.


Create an RRT* path planner. Increase the maximum connection distance.


#  controllerTEB


The Nav2 Controller is a Task Server in Nav2 that implements the `
nav2_msgs::action::FollowPath ` action server.


###  ` MaxAcceleration ` —  Maximum limits of linear and angular acceleration
` [2.4 4.8] ` (default) |  two-element positive vector


Compute velocity commands and optimal trajectory.


* [ Documentation Home  ](../../index.html?s_tid=CRUX_lftnav)


**Tags** |  _No category tags._
---|---
**Version** |  1.2.7
**License** |  Apache-2.0
**Build type** |  AMENT_CMAKE
**Use** |  RECOMMENDED

###  Repository Summary


[ API Docs ](http://docs.ros.org/en/eloquent/p/nav2_controller "View API
documentation on docs.ros.org") [ Browse Code ](https://github.com/ros-
planning/navigation2/tree/eloquent-devel/nav2_controller "View source code on
repository")


* Carl Delsey


[ General  ](/c/general/8)


Optimized path, returned as an _N_ -by-3 matrix. Each row is of the form [ _x_
_y_ _theta_ ], which defines the _xy_ -position and orientation angle _theta_
at a point in the path.


**Data Types:** ` single ` | ` double ` | ` int8 ` | ` int16 ` | ` int32 ` | `
int64 ` | ` uint8 ` | ` uint16 ` | ` uint32 ` | ` uint64 `


##  See Also


###  [ nav2_controller ](/p/nav2_controller) package from [ navigation2
](/r/navigation2/github-ros-planning-navigation2) repo


    rrtstar = plannerRRTStar(validator.StateSpace,validator);
    rrtstar.MaxConnectionDistance = 0.2;


###  Plugins


* [ nav2_core ](https://github.com/ros-planning/navigation2/tree/iron/nav2_controller//plugins.xml)


[ shelddin  ](https://discourse.ros.org/u/shelddin) March 2, 2023, 10:13am  4


* 4 — Indicates that one or more time stamps returned by the ` step ` function are older than the previous time stamp.


  * [ 中国 (简体中文) ](https://ww2.mathworks.cn)
  * [ 中国 (English) ](https://ww2.mathworks.cn)


###  Messages


* If you set ` Shape ` as ` "Rectangle" ` , the function considers the center of the robot's rear edge as the robot's origin.


An execution module implementing the ` nav2_msgs::action::FollowPath ` action
server is responsible for generating command velocities for the robot, given
the computed path from the planner module in ` nav2_planner ` . The
nav2_controller package is designed to be loaded with plugins for path
execution. The plugins need to implement functions in the virtual base class
defined in the ` controller ` header file in ` nav2_core ` package.


Our example plugin class ` nav2_pure_pursuit_controller::PurePursuitController
` inherits from the base class ` nav2_core::Controller  ` . The base class
provides a set of virtual methods to implement a controller plugin. These
methods are called at runtime by the controller server to compute velocity
commands. The list of methods, their descriptions, and necessity are presented
in the table below:


No version for distro **dashing** . Known supported distros are highlighted in
the buttons above.


Plan a path with default settings.


In this tutorial, we will be implementing the pure pursuit path tracking
algorithm based on this [ paper
](https://www.ri.cmu.edu/pub_files/pub3/coulter_r_craig_1992_1/coulter_r_craig_1992_1.pdf)
. It is recommended you go through it.


Skip to content


Field  |  Description
---|---
` Time ` |


##  MATLAB Command


* Gazebo


###  Americas


###  Recent questions tagged ` nav2_controller ` at **[ Robotics Stack
Exchange ](https://robotics.stackexchange.com/) **


        * [ SimpleGoalChecker ](../../configuration/packages/nav2_controller-plugins/simple_goal_checker.html)
        * [ StoppedGoalChecker ](../../configuration/packages/nav2_controller-plugins/stopped_goal_checker.html)
      * [ Default Plugins ](../../configuration/packages/configuring-controller-server.html#default-plugins)
      * [ Example ](../../configuration/packages/configuring-controller-server.html#example)
    * [ DWB Controller ](../../configuration/packages/configuring-dwb-controller.html)
      * [ Controller ](../../configuration/packages/configuring-dwb-controller.html#controller)
        * [ DWB Controller ](../../configuration/packages/dwb-params/controller.html)
        * [ XYTheta Iterator ](../../configuration/packages/dwb-params/iterator.html)
        * [ Kinematic Parameters ](../../configuration/packages/dwb-params/kinematic.html)
        * [ Publisher ](../../configuration/packages/dwb-params/visualization.html)
      * [ Plugins ](../../configuration/packages/configuring-dwb-controller.html#plugins)
        * [ LimitedAccelGenerator ](../../configuration/packages/dwb-plugins/limited_accel_generator.html)
        * [ StandardTrajectoryGenerator ](../../configuration/packages/dwb-plugins/standard_traj_generator.html)
      * [ Trajectory Critics ](../../configuration/packages/configuring-dwb-controller.html#trajectory-critics)
        * [ BaseObstacleCritic ](../../configuration/packages/trajectory_critics/base_obstacle.html)
        * [ GoalAlignCritic ](../../configuration/packages/trajectory_critics/goal_align.html)
        * [ GoalDistCritic ](../../configuration/packages/trajectory_critics/goal_dist.html)
        * [ ObstacleFootprintCritic ](../../configuration/packages/trajectory_critics/obstacle_footprint.html)
        * [ OscillationCritic ](../../configuration/packages/trajectory_critics/oscillation.html)
        * [ PathAlignCritic ](../../configuration/packages/trajectory_critics/path_align.html)
        * [ PathDistCritic ](../../configuration/packages/trajectory_critics/path_dist.html)
        * [ PreferForwardCritic ](../../configuration/packages/trajectory_critics/prefer_forward.html)
        * [ RotateToGoalCritic ](../../configuration/packages/trajectory_critics/rotate_to_goal.html)
        * [ TwirlingCritic ](../../configuration/packages/trajectory_critics/twirling.html)
      * [ Example ](../../configuration/packages/configuring-dwb-controller.html#example)
    * [ Regulated Pure Pursuit ](../../configuration/packages/configuring-regulated-pp.html)
      * [ Regulated Pure Pursuit Parameters ](../../configuration/packages/configuring-regulated-pp.html#regulated-pure-pursuit-parameters)
      * [ Example ](../../configuration/packages/configuring-regulated-pp.html#example)
    * [ Model Predictive Path Integral Controller ](../../configuration/packages/configuring-mppic.html)
      * [ MPPI Parameters ](../../configuration/packages/configuring-mppic.html#mppi-parameters)
        * [ Trajectory Visualization ](../../configuration/packages/configuring-mppic.html#trajectory-visualization)
        * [ Path Handler ](../../configuration/packages/configuring-mppic.html#path-handler)
        * [ Ackermann Motion Model ](../../configuration/packages/configuring-mppic.html#ackermann-motion-model)
        * [ Constraint Critic ](../../configuration/packages/configuring-mppic.html#constraint-critic)
        * [ Goal Angle Critic ](../../configuration/packages/configuring-mppic.html#goal-angle-critic)
        * [ Goal Critic ](../../configuration/packages/configuring-mppic.html#goal-critic)
        * [ Obstacles Critic ](../../configuration/packages/configuring-mppic.html#obstacles-critic)
        * [ Cost Critic ](../../configuration/packages/configuring-mppic.html#cost-critic)
        * [ Path Align Critic ](../../configuration/packages/configuring-mppic.html#path-align-critic)
        * [ Path Angle Critic ](../../configuration/packages/configuring-mppic.html#path-angle-critic)


This project is the brainchild of [ Aleksei Budyakov
](https://www.linkedin.com/in/aleksei-budyakov-334889224/) (
@artofnothingness  ) developed as a prototype at FastSense. I was so impressed
by what I was seeing I dedicated my major development effort of 2022 to
refining it, adding new critics, pluginizing the critics, tuning (and retuning
[and retuning]), designing new behaviors I think are optimal for realistic
robotic systems from my experience, battling the limitations of compute on
your behalf to make it real-time, and more. All that said, Aleksei deserves a
great deal of the credit and this project wouldn’t have been possible without
his initial development and on-going support for my efforts to harden and
expand it for use in the Nav2 system.


* ` library  path  ` : Plugin’s library name and its location.


` [  ___  ,extraInfo] = step(  ___  )  `


                   Color="#0072BD",DisplayName="Start Pose")
        end

        simtime = simtime+timestep;
        % Compute the instantaneous velocity to be sent to the robot from the
        % series of timestamped commands generated by controllerTEB
        velcmd = velocityCommand(velcmds,timestamps,simtime);
        % Very basic robot model, should be replaced by simulator.
        statedot = [velcmd(1)*cos(curpose(3)) ...
                    velcmd(1)*sin(curpose(3)) ...
                    velcmd(2)];
        curpose = curpose + statedot*timestep;

        if exist("hndl","var")
            delete(hndl)
        end
        hndl = quiver(curpose(:,1),curpose(:,2), ...
                      cos(curpose(:,3)),sin(curpose(:,3)), ...
                      0.5,"o",MarkerSize=20,ShowArrowHead="off", ...
                      Color="#D95319",DisplayName="Current Robot Pose");
        itr = itr + 1;
        drawnow
    end
    legend


Select a Web Site


##  Output Arguments


**Method description**


2. The next step would be to create the plugin’s description file in the root directory of the package. For example, ` pure_pursuit_controller_plugin.xml  ` file in our tutorial package. This file contains the following information


* [ Robotics and Autonomous Systems  ](../../overview/robotics-and-autonomous-systems.html?s_tid=hc_product_group_bc)


Maximum limits of linear and angular acceleration for velocity commands,
specified as a two-element positive vector. The first element is the linear
acceleration limit, in meters per second squared, and the second element is
the angular acceleration limit, in radians per second squared.


####  Additional Links


_No additional authors._


##  Examples


RRT* uses a random orientation, which can cause unnecessary turns.


###  Wiki Tutorials


_Since R2023a_


    start = [2 9 0];
    goal = [27 18 -pi/2];


* United States


    controller_server:
      ros__parameters:
        controller_plugins: ["FollowPath"]

        FollowPath:
          plugin: "nav2_pure_pursuit_controller::PurePursuitController" # In Iron and older versions, "/" was used instead of "::"
          debug_trajectory_details: True
          desired_linear_vel: 0.2
          lookahead_dist: 0.4
          max_angular_vel: 1.0
          transform_tolerance: 1.0


You can also select a web site from the following list:


**Data Types:** ` struct `


teb2 = clone(teb);


      * [ BackUp BT-node Interface Changes ](../../migration/Foxy.html#backup-bt-node-interface-changes)
      * [ BackUp Recovery Interface Changes ](../../migration/Foxy.html#backup-recovery-interface-changes)
      * [ Nav2 Controllers and Goal Checker Plugin Interface Changes ](../../migration/Foxy.html#nav2-controllers-and-goal-checker-plugin-interface-changes)
      * [ FollowPath goal_checker_id attribute ](../../migration/Foxy.html#followpath-goal-checker-id-attribute)
      * [ Groot Support ](../../migration/Foxy.html#groot-support)
      * [ New Plugins ](../../migration/Foxy.html#new-plugins)
      * [ Costmap Filters ](../../migration/Foxy.html#costmap-filters)
      * [ SmacPlanner ](../../migration/Foxy.html#smacplanner)
      * [ ThetaStarPlanner ](../../migration/Foxy.html#thetastarplanner)
      * [ RegulatedPurePursuitController ](../../migration/Foxy.html#regulatedpurepursuitcontroller)
      * [ Costmap2D ` current_  ` Usage ](../../migration/Foxy.html#costmap2d-current-usage)
      * [ Standard time units in parameters ](../../migration/Foxy.html#standard-time-units-in-parameters)
      * [ Ray Tracing Parameters ](../../migration/Foxy.html#ray-tracing-parameters)
      * [ Obstacle Marking Parameters ](../../migration/Foxy.html#obstacle-marking-parameters)
      * [ Recovery Action Changes ](../../migration/Foxy.html#recovery-action-changes)
      * [ Default Behavior Tree Changes ](../../migration/Foxy.html#default-behavior-tree-changes)
      * [ NavFn Planner Parameters ](../../migration/Foxy.html#navfn-planner-parameters)
      * [ New ClearCostmapExceptRegion and ClearCostmapAroundRobot BT-nodes ](../../migration/Foxy.html#new-clearcostmapexceptregion-and-clearcostmaparoundrobot-bt-nodes)
      * [ New Behavior Tree Nodes ](../../migration/Foxy.html#new-behavior-tree-nodes)
      * [ sensor_msgs/PointCloud to sensor_msgs/PointCloud2 Change ](../../migration/Foxy.html#sensor-msgs-pointcloud-to-sensor-msgs-pointcloud2-change)
      * [ ControllerServer New Parameter failure_tolerance ](../../migration/Foxy.html#controllerserver-new-parameter-failure-tolerance)
      * [ Removed BT XML Launch Configurations ](../../migration/Foxy.html#removed-bt-xml-launch-configurations)
      * [ Nav2 RViz Panel Action Feedback Information ](../../migration/Foxy.html#nav2-rviz-panel-action-feedback-information)
    * [ Galactic to Humble ](../../migration/Galactic.html)
      * [ Major improvements to Smac Planners ](../../migration/Galactic.html#major-improvements-to-smac-planners)
      * [ Simple (Python) Commander ](../../migration/Galactic.html#simple-python-commander)
      * [ Reduce Nodes and Executors ](../../migration/Galactic.html#reduce-nodes-and-executors)
      * [ API Change for nav2_core ](../../migration/Galactic.html#api-change-for-nav2-core)
      * [ Extending the BtServiceNode to process Service-Results ](../../migration/Galactic.html#extending-the-btservicenode-to-process-service-results)
      * [ Including new Rotation Shim Controller Plugin ](../../migration/Galactic.html#including-new-rotation-shim-controller-plugin)
      * [ Spawning the robot in Gazebo ](../../migration/Galactic.html#spawning-the-robot-in-gazebo)
      * [ Recovery Behavior Timeout ](../../migration/Galactic.html#recovery-behavior-timeout)
      * [ New parameter ` use_final_approach_orientation  ` for the 3 2D planners ](../../migration/Galactic.html#new-parameter-use-final-approach-orientation-for-the-3-2d-planners)
      * [ SmacPlanner2D and Theta*: fix goal orientation being ignored ](../../migration/Galactic.html#smacplanner2d-and-theta-fix-goal-orientation-being-ignored)
      * [ SmacPlanner2D, NavFn and Theta*: fix small path corner cases ](../../migration/Galactic.html#smacplanner2d-navfn-and-theta-fix-small-path-corner-cases)
      * [ Change and fix behavior of dynamic parameter change detection ](../../migration/Galactic.html#change-and-fix-behavior-of-dynamic-parameter-change-detection)
      * [ Dynamic Parameters ](../../migration/Galactic.html#dynamic-parameters)
      * [ BT Action Nodes Exception Changes ](../../migration/Galactic.html#bt-action-nodes-exception-changes)
      * [ BT Navigator Groot Multiple Navigators ](../../migration/Galactic.html#bt-navigator-groot-multiple-navigators)
      * [ Removed Kinematic Limiting in RPP ](../../migration/Galactic.html#removed-kinematic-limiting-in-rpp)


****Set Up Parking Lot Environment** **


  * Help Center
  * MathWorks


Calling all navigator extraordinaires!


**Data Types:** ` single ` | ` double `


* 0 — Indicates that the ` step ` function returned feasible velocity commands and trajectory.


Now that we have created our custom controller, we need to export our
controller plugin so that it will be visible to the controller server. Plugins
are loaded at runtime, and if they are not visible, then our controller server
won’t be able to load them. In ROS 2, exporting and loading plugins is handled
by ` pluginlib  ` .


Create a [ ` validatorOccupancyMap ` ](validatoroccupancymap.html) state
validator using the [ ` stateSpaceSE2 ` ](statespacese2.html) definition.
Specify the map and the distance for interpolating and validating path
segments.


  * ardent
  * bouncy
  * crystal
  * eloquent
  * dashing
  * galactic
  * foxy
  * lunar
  * jade
  * indigo
  * hydro
  * kinetic
  * melodic


> (image larger than 4.95 MB)


---

[
API Docs ](http://docs.ros.org/en/eloquent/p/nav2_controller "View API
documentation on docs.ros.org") [
Browse Code ](https://github.com/ros-planning/navigation2/tree/eloquent-
devel/nav2_controller "View source code on repository")


[ nightphoenix  ](https://discourse.ros.org/u/nightphoenix) March 2, 2023,
6:03am  2


_No plugins found._


_No CHANGELOG found._


![](https://sea2.discourse-
cdn.com/business7/user_avatar/discourse.ros.org/smac/48/6763_2.png) smac:


_No direct system dependencies._


  * [ 中国 (简体中文) ](https://ww2.mathworks.cn)
  * [ 中国 (English) ](https://ww2.mathworks.cn)


Currently available controller plugins are: DWB, and [ TEB (dashing release)
](https://github.com/rst-tu-dortmund/teb_local_planner/tree/dashing-devel) .


© 1994-2024 The MathWorks, Inc.


[ ros2 ](https://discourse.ros.org/tag/ros2)


**Checkout URI** |  [ https://github.com/ros-planning/navigation2.git
](https://github.com/ros-planning/navigation2.git)
---|---
**VCS Type** |  git
**VCS Version** |  humble
**Last Updated**

2024-04-04  |  **Dev Status** |  DEVELOPED
**CI status** |  No Continuous Integration
**Released** |  RELEASED
**Tags** |  _No category tags._
**Contributing** |  [ Help Wanted (  0  ) ](/r/navigation2/#humble-contribute-
lists-help-wanted)
[ Good First Issues (  0  ) ](/r/navigation2/#humble-contribute-lists-good-
first-issue)
[ Pull Requests to Review (  0  ) ](/r/navigation2/#humble-contribute-lists-
pull-requests)

###  Package Description


and I am putting this in my bank of future possible feature contributions list
as well ![:upside_down_face:](https://emoji.discourse-
cdn.com/twitter/upside_down_face.png?v=12)


###  Package Dependencies


_Not currently indexed._


####  Maintainers


**Tags** |  _No category tags._
---|---
**Version** |  0.3.5
**License** |  Apache-2.0
**Build type** |  AMENT_CMAKE
**Use** |  RECOMMENDED

###  Repository Summary


Skip to content


Maximum limits of linear and angular velocity for velocity commands, specified
as a two-element positive vector. The first element is the linear velocity
limit, in meters per second, and the second element is the angular velocity
limit, in radians per second.


    curpose = refpath(1,:);
    curvel = [0 0];
    simtime = 0;
    % Reducing timestep can lead to more accurate path tracking.
    timestep = 0.1;
    itr = 0;
    goalReached = false;


      * [ Default Plugins ](../../configuration/packages/configuring-costmaps.html#default-plugins)
      * [ Plugin Parameters ](../../configuration/packages/configuring-costmaps.html#plugin-parameters)
        * [ Static Layer Parameters ](../../configuration/packages/costmap-plugins/static.html)
        * [ Inflation Layer Parameters ](../../configuration/packages/costmap-plugins/inflation.html)
        * [ Obstacle Layer Parameters ](../../configuration/packages/costmap-plugins/obstacle.html)
        * [ Voxel Layer Parameters ](../../configuration/packages/costmap-plugins/voxel.html)
        * [ Range Sensor Parameters ](../../configuration/packages/costmap-plugins/range.html)
        * [ Denoise Layer Parameters ](../../configuration/packages/costmap-plugins/denoise.html)
      * [ Costmap Filters Parameters ](../../configuration/packages/configuring-costmaps.html#costmap-filters-parameters)
        * [ Keepout Filter Parameters ](../../configuration/packages/costmap-plugins/keepout_filter.html)
        * [ Speed Filter Parameters ](../../configuration/packages/costmap-plugins/speed_filter.html)
        * [ Binary Filter Parameters ](../../configuration/packages/costmap-plugins/binary_filter.html)
      * [ Example ](../../configuration/packages/configuring-costmaps.html#example)
    * [ Lifecycle Manager ](../../configuration/packages/configuring-lifecycle.html)
      * [ Parameters ](../../configuration/packages/configuring-lifecycle.html#parameters)
      * [ Example ](../../configuration/packages/configuring-lifecycle.html#example)
    * [ Planner Server ](../../configuration/packages/configuring-planner-server.html)
      * [ Parameters ](../../configuration/packages/configuring-planner-server.html#parameters)
      * [ Default Plugins ](../../configuration/packages/configuring-planner-server.html#default-plugins)
      * [ Example ](../../configuration/packages/configuring-planner-server.html#example)
    * [ Coverage Server ](../../configuration/packages/configuring-coverage-server.html)
      * [ Parameters ](../../configuration/packages/configuring-coverage-server.html#parameters)
      * [ Example ](../../configuration/packages/configuring-coverage-server.html#example)
    * [ NavFn Planner ](../../configuration/packages/configuring-navfn.html)
      * [ Parameters ](../../configuration/packages/configuring-navfn.html#parameters)
      * [ Example ](../../configuration/packages/configuring-navfn.html#example)
    * [ Smac Planner ](../../configuration/packages/configuring-smac-planner.html)
      * [ Provided Plugins ](../../configuration/packages/configuring-smac-planner.html#provided-plugins)
        * [ Smac 2D Planner ](../../configuration/packages/smac/configuring-smac-2d.html)
        * [ Smac Hybrid-A* Planner ](../../configuration/packages/smac/configuring-smac-hybrid.html)
        * [ Smac State Lattice Planner ](../../configuration/packages/smac/configuring-smac-lattice.html)
      * [ Description ](../../configuration/packages/configuring-smac-planner.html#description)
    * [ Theta Star Planner ](../../configuration/packages/configuring-thetastar.html)
      * [ Parameters ](../../configuration/packages/configuring-thetastar.html#parameters)
      * [ Example ](../../configuration/packages/configuring-thetastar.html#example)
    * [ Controller Server ](../../configuration/packages/configuring-controller-server.html)
      * [ Parameters ](../../configuration/packages/configuring-controller-server.html#parameters)
      * [ Provided Plugins ](../../configuration/packages/configuring-controller-server.html#provided-plugins)
        * [ SimpleProgressChecker ](../../configuration/packages/nav2_controller-plugins/simple_progress_checker.html)
        * [ PoseProgressChecker ](../../configuration/packages/nav2_controller-plugins/pose_progress_checker.html)


* ` class  type  ` : Type of class.


Deps  |  |  Name  |  [ ](/p/nav2_common#iron-deps) |  [ 1
](/packages/nav2_common) |  [ nav2_common ](/p/nav2_common#iron)
---|---|---
[ ](/p/ament_cmake#iron-deps) |  [ 1 ](/packages/ament_cmake) |  [ ament_cmake
](/p/ament_cmake#iron)
[ ](/p/ament_lint_common#iron-deps) |  [ 1 ](/packages/ament_lint_common) |  [
ament_lint_common ](/p/ament_lint_common#iron)
[ ](/p/ament_lint_auto#iron-deps) |  [ 1 ](/packages/ament_lint_auto) |  [
ament_lint_auto ](/p/ament_lint_auto#iron)
[ ](/p/ament_cmake_gtest#iron-deps) |  [ 1 ](/packages/ament_cmake_gtest) |  [
ament_cmake_gtest ](/p/ament_cmake_gtest#iron)
[ ](/p/ament_cmake_pytest#iron-deps) |  [ 1 ](/packages/ament_cmake_pytest) |
[ ament_cmake_pytest ](/p/ament_cmake_pytest#iron)
[ ](/p/angles#iron-deps) |  [ 1 ](/packages/angles) |  [ angles
](/p/angles#iron)
[ ](/p/rclcpp#iron-deps) |  [ 1 ](/packages/rclcpp) |  [ rclcpp
](/p/rclcpp#iron)
[ ](/p/rclcpp_action#iron-deps) |  [ 1 ](/packages/rclcpp_action) |  [
rclcpp_action ](/p/rclcpp_action#iron)
[ ](/p/std_msgs#iron-deps) |  [ 2 ](/packages/std_msgs) |  [ std_msgs
](/p/std_msgs#iron)
[ ](/p/nav2_util#iron-deps) |  [ 1 ](/packages/nav2_util) |  [ nav2_util
](/p/nav2_util#iron)
[ ](/p/nav2_msgs#iron-deps) |  [ 1 ](/packages/nav2_msgs) |  [ nav2_msgs
](/p/nav2_msgs#iron)
[ ](/p/nav_2d_utils#iron-deps) |  [ 2 ](/packages/nav_2d_utils) |  [
nav_2d_utils ](/p/nav_2d_utils#iron)
[ ](/p/nav_2d_msgs#iron-deps) |  [ 2 ](/packages/nav_2d_msgs) |  [ nav_2d_msgs
](/p/nav_2d_msgs#iron)
[ ](/p/nav2_core#iron-deps) |  [ 1 ](/packages/nav2_core) |  [ nav2_core
](/p/nav2_core#iron)
[ ](/p/pluginlib#iron-deps) |  [ 1 ](/packages/pluginlib) |  [ pluginlib
](/p/pluginlib#iron)

###  System Dependencies


**Data Types:** ` single ` | ` double `


_No additional authors._


Contact your local office


####  Package Summary


Off-Canvas Navigation Menu Toggle


    rng(42,"twister") % Set random number generator seed for repeatable result.
    route = plan(rrtstar,start,goal);
    refpath = route.States;


Controller action interface


###  Objects


Tolerance around the goal pose, specified as a three-element vector of the
form [ _x_ _y_ _θ_ ]. _x_ and _y_ denote the position of the robot in _x_ and
_y_ directions, respectively. Units are in meters. _θ_ is the heading angle of
the robot in radians. This goal tolerance value specifies the limit for
determining whether the robot has reached the goal pose.


  * Overview
  * 1  Assets
  * 16  Dependencies
  * 0  Tutorials
  * 0  Q & A


Current pose of the robot, specified as a three-element vector of the form [
_x_ _y_ _theta_ ]. _x_ and _y_ specify the robot position in meters. _theta_
specifies the robot orientation in radians.


Yes

deactivate()


###  ` Map ` —  Occupancy map representing environment
` binaryOccupancyMap() ` (default) |  ` binaryOccupancyMap ` object  |  `
occupancyMap ` object


4. The plugin description file should also be added to ` package.xml  `


**Data Types:** ` double `


      * [ Sensor Introduction ](../../setup_guides/sensors/setup_sensors.html#sensor-introduction)
        * [ Common Sensor Messages ](../../setup_guides/sensors/setup_sensors.html#common-sensor-messages)
      * [ Simulating Sensors using Gazebo ](../../setup_guides/sensors/setup_sensors.html#simulating-sensors-using-gazebo)
        * [ Adding Gazebo Plugins to a URDF ](../../setup_guides/sensors/setup_sensors.html#adding-gazebo-plugins-to-a-urdf)
        * [ Launch and Build Files ](../../setup_guides/sensors/setup_sensors.html#launch-and-build-files)
        * [ Build, Run and Verification ](../../setup_guides/sensors/setup_sensors.html#build-run-and-verification)
      * [ Mapping and Localization ](../../setup_guides/sensors/setup_sensors.html#mapping-and-localization)
      * [ Costmap 2D ](../../setup_guides/sensors/setup_sensors.html#costmap-2d)
        * [ Configuring nav2_costmap_2d ](../../setup_guides/sensors/setup_sensors.html#configuring-nav2-costmap-2d)
        * [ Build, Run and Verification ](../../setup_guides/sensors/setup_sensors.html#id2)
      * [ Conclusion ](../../setup_guides/sensors/setup_sensors.html#conclusion)
    * [ Setting Up the Robot’s Footprint ](../../setup_guides/footprint/setup_footprint.html)
      * [ Footprint Introduction ](../../setup_guides/footprint/setup_footprint.html#footprint-introduction)
      * [ Configuring the Robot’s Footprint ](../../setup_guides/footprint/setup_footprint.html#configuring-the-robot-s-footprint)
      * [ Build, Run and Verification ](../../setup_guides/footprint/setup_footprint.html#build-run-and-verification)
      * [ Visualizing Footprint in RViz ](../../setup_guides/footprint/setup_footprint.html#visualizing-footprint-in-rviz)
      * [ Conclusion ](../../setup_guides/footprint/setup_footprint.html#conclusion)
    * [ Setting Up Navigation Plugins ](../../setup_guides/algorithm/select_algorithm.html)
      * [ Planner and Controller Servers ](../../setup_guides/algorithm/select_algorithm.html#planner-and-controller-servers)
      * [ Selecting the Algorithm Plugins ](../../setup_guides/algorithm/select_algorithm.html#selecting-the-algorithm-plugins)
        * [ Planner Server ](../../setup_guides/algorithm/select_algorithm.html#planner-server)
        * [ Controller Server ](../../setup_guides/algorithm/select_algorithm.html#controller-server)
      * [ Conclusion ](../../setup_guides/algorithm/select_algorithm.html#conclusion)
  * [ Robots Using ](../../about/robots.html)
  * [ General Tutorials ](../../tutorials/index.html)
    * [ Navigating with a Physical Turtlebot 3 ](../../tutorials/docs/navigation2_on_real_turtlebot3.html)
      * [ Overview ](../../tutorials/docs/navigation2_on_real_turtlebot3.html#overview)
      * [ Requirements ](../../tutorials/docs/navigation2_on_real_turtlebot3.html#requirements)
      * [ Tutorial Steps ](../../tutorials/docs/navigation2_on_real_turtlebot3.html#tutorial-steps)
        * [ 0- Setup Your Enviroment Variables ](../../tutorials/docs/navigation2_on_real_turtlebot3.html#setup-your-enviroment-variables)
        * [ 1- Launch Turtlebot 3 ](../../tutorials/docs/navigation2_on_real_turtlebot3.html#launch-turtlebot-3)
        * [ 2- Launch Nav2 ](../../tutorials/docs/navigation2_on_real_turtlebot3.html#launch-nav2)
        * [ 3- Launch RVIZ ](../../tutorials/docs/navigation2_on_real_turtlebot3.html#launch-rviz)
        * [ 4- Initialize the Location of Turtlebot 3 ](../../tutorials/docs/navigation2_on_real_turtlebot3.html#initialize-the-location-of-turtlebot-3)
        * [ 5- Send a Goal Pose ](../../tutorials/docs/navigation2_on_real_turtlebot3.html#send-a-goal-pose)
    * [ (SLAM) Navigating While Mapping ](../../tutorials/docs/navigation2_with_slam.html)
      * [ Overview ](../../tutorials/docs/navigation2_with_slam.html#overview)
      * [ Requirements ](../../tutorials/docs/navigation2_with_slam.html#requirements)
      * [ Tutorial Steps ](../../tutorials/docs/navigation2_with_slam.html#tutorial-steps)
        * [ 0- Launch Robot Interfaces ](../../tutorials/docs/navigation2_with_slam.html#launch-robot-interfaces)


Great work ,
I cant wait to test this out .


Your Friendly Neighborhood Navigator


    while ~goalReached && simtime < 200
        % Update map to keep robot in the center of the map. Also update the
        % map with new information from the global map or sensor measurements.
        moveMapBy = curpose(1:2) - localmap.XLocalLimits(end)/2;
        localmap.move(moveMapBy,FillValue=0.5)
        syncWith(localmap,map)

        if mod(itr,10) == 0 % every 1 sec
            % Generate new vel commands with teb
            [velcmds,tstamps,curpath,info] = step(teb,curpose,curvel);
            goalReached = info.HasReachedGoal;
            feasibleDriveDuration = tstamps(info.LastFeasibleIdx);
            % If robot is far from goal and only less than third of trajectory
            % is feasible, then an option is to re-plan the path to follow to
            % reach the goal.
            if info.ExitFlag == 1 && ...
                    feasibleDriveDuration < (teb.LookAheadTime/3)
                route = plan(rrtstar,curpose,[27 18 -pi/2]);
                refpath = route.States;
                headingToNextPose = headingFromXY(refpath(:,1:2));
                refpath(2:end-1,3) = headingToNextPose(2:end-1);
                teb.ReferencePath = refpath;
            end
            timestamps = tstamps + simtime;

            % Show the updated information input to or output
            % from controllerTEB
            clf
            show(localmap)
            hold on
            plot(refpath(:,1),refpath(:,2),".-",Color="#EDB120", ...
                 DisplayName="Reference Path")
            quiver(curpath(:,1),curpath(:,2), ...
                   cos(curpath(:,3)),sin(curpath(:,3)), ...
                   0.2,Color="#A2142F",DisplayName="Current Path")
            quiver(curpose(:,1),curpose(:,2), ...
                   cos(curpose(:,3)),sin(curpose(:,3)), ...
                   0.5,"o",MarkerSize=20,ShowArrowHead="off", ...


_No CHANGELOG found._


One way that comes to mind is to setup Nav2 in ROS2 and use ros1_bridge to
communicate ROS2 and ROS1. Will attempt this weekend maybe


|  0  |  2291  |  December 7, 2023
[ From the Desks of ROS Maintainers: A Survey of Modern & Capable Mobile
Robotics Algorithms in the ROS 2 ](https://discourse.ros.org/t/from-the-desks-
of-ros-maintainers-a-survey-of-modern-capable-mobile-robotics-algorithms-in-
the-ros-2/32643)


##  Tutorial Steps  ¶


##  Extended Capabilities


[ Orhan  ](https://discourse.ros.org/u/Orhan) March 8, 2023, 12:47pm  11


The bridge can help, but I’m not sure it’ll be as straight forward as you
think.


headingToNextPose = headingFromXY(refpath(:,1:2));


**Data Types:** ` single ` | ` double `


See its [ Configuration Guide Page
](https://navigation.ros.org/configuration/packages/configuring-controller-
server.html) for additional parameter descriptions and a [ tutorial about
writing controller plugins
](https://navigation.ros.org/plugin_tutorials/docs/writing_new_nav2controller_plugin.html)
.


[ nav2_amcl ](/p/nav2_amcl/github-ros-planning-navigation2) [
nav2_behavior_tree ](/p/nav2_behavior_tree/github-ros-planning-navigation2) [
nav2_bringup ](/p/nav2_bringup/github-ros-planning-navigation2) [
nav2_gazebo_spawner ](/p/nav2_gazebo_spawner/github-ros-planning-navigation2)
[ nav2_bt_navigator ](/p/nav2_bt_navigator/github-ros-planning-navigation2) [
nav2_common ](/p/nav2_common/github-ros-planning-navigation2) nav2_controller
[ nav2_core ](/p/nav2_core/github-ros-planning-navigation2) [ nav2_costmap_2d
](/p/nav2_costmap_2d/github-ros-planning-navigation2) [ costmap_queue
](/p/costmap_queue/github-ros-planning-navigation2) [ dwb_core
](/p/dwb_core/github-ros-planning-navigation2) [ dwb_critics
](/p/dwb_critics/github-ros-planning-navigation2) [ dwb_msgs
](/p/dwb_msgs/github-ros-planning-navigation2) [ dwb_plugins
](/p/dwb_plugins/github-ros-planning-navigation2) [ nav2_dwb_controller
](/p/nav2_dwb_controller/github-ros-planning-navigation2) [ nav_2d_msgs
](/p/nav_2d_msgs/github-ros-planning-navigation2) [ nav_2d_utils
](/p/nav_2d_utils/github-ros-planning-navigation2) [ nav2_lifecycle_manager
](/p/nav2_lifecycle_manager/github-ros-planning-navigation2) [ nav2_map_server
](/p/nav2_map_server/github-ros-planning-navigation2) [ nav2_msgs
](/p/nav2_msgs/github-ros-planning-navigation2) [ nav2_navfn_planner
](/p/nav2_navfn_planner/github-ros-planning-navigation2) [ nav2_planner
](/p/nav2_planner/github-ros-planning-navigation2) [ nav2_recoveries
](/p/nav2_recoveries/github-ros-planning-navigation2) [
nav2_regulated_pure_pursuit_controller
](/p/nav2_regulated_pure_pursuit_controller/github-ros-planning-navigation2) [
nav2_rviz_plugins ](/p/nav2_rviz_plugins/github-ros-planning-navigation2) [
nav2_system_tests ](/p/nav2_system_tests/github-ros-planning-navigation2) [
nav2_util ](/p/nav2_util/github-ros-planning-navigation2) [ nav2_voxel_grid
](/p/nav2_voxel_grid/github-ros-planning-navigation2) [ nav2_waypoint_follower
](/p/nav2_waypoint_follower/github-ros-planning-navigation2) [ navigation2
](/p/navigation2/github-ros-planning-navigation2) [ smac_planner
](/p/smac_planner/github-ros-planning-navigation2)
---|---

github-ros-planning-navigation2


[ release ](https://discourse.ros.org/tag/release) , [ ros2
](https://discourse.ros.org/tag/ros2)


Controller action interface


* [ github-ros-planning-navigation2 ](/p/nav2_controller/github-ros-planning-navigation2)


_See[ ROS Wiki Tutorials ](http://wiki.ros.org/nav2_controller/Tutorials) for
more details. _


_No launch files found_


` [velcmds,timestamps,optPath] = step(controller,curState,curVel)  `


I would be inundated with messages regarding TEB if I did not address it here.
While TEB is quite a fantastic piece of software, the maintainer has since
moved on from his academic career into a position where it is not possible to
maintain it into the future. As such, its largely unmaintained and represents
techniques which are bordering on a decade old. This work is very modern and
state of the art in the same vertical of techniques as TEB (MPC) so it meets
the same need that TEB serves. With MPPI’s modern methodology, performance,
active maintenance, and documentation, I hope you all will agree with me over
time that this is an improvement. There are certain characteristics of the
Elastic Band approaches that I did not like in a production setting that are
not present in this work.


  * [ América Latina ](https://la.mathworks.com) (Español)
  * [ Canada ](https://www.mathworks.com) (English)
  * [ United States ](https://www.mathworks.com) (English)


###  Services


    show(map)
    title("Parking Lot Map")
    hold on


Coming back to our tutorial, class `
nav2_pure_pursuit_controller::PurePursuitController  ` is loaded dynamically
as ` nav2_core::Controller  ` which is our base class.


  * [ Netherlands ](https://nl.mathworks.com) (English)
  * [ Norway ](https://se.mathworks.com) (English)
  * [ Österreich ](https://de.mathworks.com) (Deutsch)
  * [ Portugal ](https://www.mathworks.com) (English)
  * [ Sweden ](https://se.mathworks.com) (English)
  * Switzerland
    * [ Deutsch ](https://ch.mathworks.com)
    * [ English ](https://ch.mathworks.com)
    * [ Français ](https://ch.mathworks.com)
  * [ United Kingdom ](https://uk.mathworks.com) (English)


![](/assets/package.png) |


_Since R2023b_


* Turtlebot3


[ collapse all ](javascript:void\(0\);)


[ Orhan  ](https://discourse.ros.org/u/Orhan) March 7, 2023, 2:23pm  9


###  Messages


###  [ nav2_controller ](/p/nav2_controller) package from [ navigation2
](/r/navigation2/github-ros-planning-navigation2) repo


[ smac  ](https://discourse.ros.org/u/smac) March 2, 2023, 6:14am  3


refpath(2:end-1,3) = headingToNextPose(2:end-1);


###  Compute Velocity Commands and Optimal Trajectory for Differential-Drive
Robot Using Timed Elastic Band Algorithm


###  Recent questions tagged ` nav2_controller ` at **[ Robotics Stack
Exchange ](https://robotics.stackexchange.com/) **


[ collapse all in page ](javascript:void\(0\);)


Failed to get question list, you can ticket an issue [ here
](https://github.com/ros-infrastructure/rosindex/issues/new)


  * [ ](../../index.html)
  * [ Plugin Tutorials ](../index.html)
  * Writing a New Controller Plugin
  *


Deps  |  |  Name  |  [ ](/p/nav2_common#galactic-deps) |  [ 1
](/packages/nav2_common) |  [ nav2_common ](/p/nav2_common#galactic)
---|---|---
[ ](/p/ament_cmake#galactic-deps) |  [ 1 ](/packages/ament_cmake) |  [
ament_cmake ](/p/ament_cmake#galactic)
[ ](/p/ament_lint_common#galactic-deps) |  [ 1 ](/packages/ament_lint_common)
|  [ ament_lint_common ](/p/ament_lint_common#galactic)
[ ](/p/ament_lint_auto#galactic-deps) |  [ 1 ](/packages/ament_lint_auto) |  [
ament_lint_auto ](/p/ament_lint_auto#galactic)
[ ](/p/ament_cmake_gtest#galactic-deps) |  [ 1 ](/packages/ament_cmake_gtest)
|  [ ament_cmake_gtest ](/p/ament_cmake_gtest#galactic)
[ ](/p/ament_cmake_pytest#galactic-deps) |  [ 1
](/packages/ament_cmake_pytest) |  [ ament_cmake_pytest
](/p/ament_cmake_pytest#galactic)
[ ](/p/angles#galactic-deps) |  [ 1 ](/packages/angles) |  [ angles
](/p/angles#galactic)
[ ](/p/rclcpp#galactic-deps) |  [ 1 ](/packages/rclcpp) |  [ rclcpp
](/p/rclcpp#galactic)
[ ](/p/rclcpp_action#galactic-deps) |  [ 1 ](/packages/rclcpp_action) |  [
rclcpp_action ](/p/rclcpp_action#galactic)
[ ](/p/std_msgs#galactic-deps) |  [ 2 ](/packages/std_msgs) |  [ std_msgs
](/p/std_msgs#galactic)
[ ](/p/nav2_util#galactic-deps) |  [ 1 ](/packages/nav2_util) |  [ nav2_util
](/p/nav2_util#galactic)
[ ](/p/nav2_msgs#galactic-deps) |  [ 1 ](/packages/nav2_msgs) |  [ nav2_msgs
](/p/nav2_msgs#galactic)
[ ](/p/nav_2d_utils#galactic-deps) |  [ 2 ](/packages/nav_2d_utils) |  [
nav_2d_utils ](/p/nav_2d_utils#galactic)
[ ](/p/nav_2d_msgs#galactic-deps) |  [ 2 ](/packages/nav_2d_msgs) |  [
nav_2d_msgs ](/p/nav_2d_msgs#galactic)
[ ](/p/nav2_core#galactic-deps) |  [ 1 ](/packages/nav2_core) |  [ nav2_core
](/p/nav2_core#galactic)
[ ](/p/pluginlib#galactic-deps) |  [ 1 ](/packages/pluginlib) |  [ pluginlib
](/p/pluginlib#galactic)

###  System Dependencies


Method is called when controller server enters on_configure state. Ideally
this method should perform declarations of ROS parameters and initialization
of controller’s member variables. This method takes 4 input params: weak
pointer to parent node, controller name, tf buffer pointer and shared pointer
to costmap.


  * [ Australia ](https://au.mathworks.com) (English)
  * [ India ](https://in.mathworks.com) (English)
  * [ New Zealand ](https://au.mathworks.com) (English)
  * 中国
    * [ 简体中文 ](https://ww2.mathworks.cn)
    * [ English ](https://ww2.mathworks.cn)
  * [ 日本 ](https://jp.mathworks.com) (日本語)
  * [ 한국 ](https://kr.mathworks.com) (한국어)


![](/assets/package.png) |


[ https://navigation.ros.org/configuration/packages/configuring-mppic.html
](https://navigation.ros.org/configuration/packages/configuring-mppic.html)


  * MathWorks
  * Help Center


[ expand all ](javascript:void\(0\);)


**Introduced in R2023a**


Older


###  ` ReferencePath ` —  Reference path to follow
_N_ -by-2 matrix  |  _N_ -by-3 matrix  |  ` navPath ` object with SE(2) state
space


CHANGELOG


###  Messages


> if you like in the meantime (and I’d be very open to reviewing a design/PR
> for one!).


  * [ Belgium ](https://nl.mathworks.com) (English)
  * [ Denmark ](https://se.mathworks.com) (English)
  * [ Deutschland ](https://de.mathworks.com) (Deutsch)
  * [ España ](https://es.mathworks.com) (Español)
  * [ Finland ](https://se.mathworks.com) (English)
  * [ France ](https://fr.mathworks.com) (Français)
  * [ Ireland ](https://uk.mathworks.com) (English)
  * [ Italia ](https://it.mathworks.com) (Italiano)
  * [ Luxembourg ](https://nl.mathworks.com) (English)


* [ ` step ` ](controllerteb.step.html) |  [ ` clone ` ](controllerteb.clone.html) |  [ ` headingFromXY ` ](headingfromxy.html) |  [ ` velocityCommand ` ](velocitycommand.html)


* Carl Delsey


_No additional links._


  * [ Switzerland (English) ](https://ch.mathworks.com)
  * [ Switzerland (Deutsch) ](https://ch.mathworks.com)
  * [ Switzerland (Français) ](https://ch.mathworks.com)


**Tags** |  _No category tags._
---|---
**Version** |  1.1.14
**License** |  Apache-2.0
**Build type** |  AMENT_CMAKE
**Use** |  RECOMMENDED

###  Repository Summary


Reference path to follow, specified as an _N_ -by-2 matrix, _N_ -by-3 matrix,
or [ ` navPath ` ](navpath.html) object with an SE(2) state space. When
specified as a matrix, each row represents a pose on the path. Use the [
LookAheadTime  ](controllerteb.html#mw_cd2437c1-decb-4378-9581-58cb25711d8b)
property to select a part of the ` ReferencePath ` for which to optimize the
trajectory and generate velocity commands.


###  ` GoalTolerance ` —  Tolerance around goal pose
[ ` 0.1 0.1 0.1 ` ]  (default) |  three-element vector


Create a ` controllerTEB ` object by using the reference path generated by the
global planner and the local map.