diff --git a/configuration/index.rst b/configuration/index.rst index 836a198460..b55a4da7cd 100644 --- a/configuration/index.rst +++ b/configuration/index.rst @@ -9,7 +9,6 @@ the best navigation performance. .. toctree:: :maxdepth: 1 - packages/configuring-waypoint-follower.rst packages/configuring-bt-navigator.rst packages/configuring-bt-xml.rst packages/configuring-costmaps.rst @@ -20,13 +19,15 @@ the best navigation performance. packages/configuring-thetastar.rst packages/configuring-controller-server.rst packages/configuring-dwb-controller.rst + packages/configuring-regulated-pp.rst + packages/configuring-rotation-shim-controller.rst packages/configuring-map-server.rst packages/configuring-amcl.rst packages/configuring-behavior-server.rst packages/configuring-smoother-server.rst packages/configuring-simple-smoother.rst - packages/configuring-regulated-pp.rst - packages/configuring-rotation-shim-controller.rst + packages/configuring-savitzky-golay-smoother.rst packages/configuring-constrained-smoother.rst packages/configuring-velocity-smoother.rst packages/configuring-collision-monitor.rst + packages/configuring-waypoint-follower.rst diff --git a/configuration/packages/configuring-savitzky-golay-smoother.rst b/configuration/packages/configuring-savitzky-golay-smoother.rst new file mode 100644 index 0000000000..a09d6f0811 --- /dev/null +++ b/configuration/packages/configuring-savitzky-golay-smoother.rst @@ -0,0 +1,58 @@ +.. _configuring_savitzky_golay_filter_smoother: + +Savitzky-Golay Smoother +####################### + +Source code on Github_. + +.. _Github: https://github.com/ros-planning/navigation2/tree/main/nav2_smoother + +The Savitzky-Golay Smoother is a Smoother Server plugin that will take in an input path and smooth it using a simple and fast smoothing technique based on `Savitzky Golay Filters `_. It uses a digital signal processing technique designed to reduce noise distorting a reference signal, in this case, a path. + +It is useful for all types of planners, but particularly in NavFn to remove tiny artifacts that can occur near the end of paths or Theta* to slightly soften the transition between Line of Sight line segments **without** modifying the primary path. It is very fast (<< 1ms) so is a recommended default for planners that may result in slight discontinuities. However, it will not smooth out larger scale discontinuities, oscillations, or improve smoothness. For those, use one of the other provided smoother plugins. It also provides estimated orientation vectors of the path points after smoothing. + +This algorithm is deterministic and low-parameter. In the below image, some odd points from NavFn's gradient descent are smoothed out by the smoother in the middle and end of a given path, while otherwise retaining the exact character of the path. + +.. image:: images/savitzky-golay-example.png + :align: center + +Savitzky-Golay Smoother Parameters +********************************** + +:do_refinement: + + ============== =========================== + Type Default + -------------- --------------------------- + bool True + ============== =========================== + + Description + Whether to smooth the smoothed results ``refinement_num`` times to get an improved result. + +:refinement_num: + + ============== =========================== + Type Default + -------------- --------------------------- + int 2 + ============== =========================== + + Description + Number of times to recursively smooth a segment + +Example +******* +.. code-block:: yaml + + smoother_server: + ros__parameters: + costmap_topic: global_costmap/costmap_raw + footprint_topic: global_costmap/published_footprint + robot_base_frame: base_link + transform_timeout: 0.1 + smoother_plugins: ["savitzky_golay_smoother"] + savitzky_golay_smoother: + plugin: "nav2_smoother::SavitzkyGolaySmoother" + do_refinement: True + refinement_num: 2 diff --git a/configuration/packages/images/savitzky-golay-example.png b/configuration/packages/images/savitzky-golay-example.png new file mode 100644 index 0000000000..5f229b42e8 Binary files /dev/null and b/configuration/packages/images/savitzky-golay-example.png differ diff --git a/migration/Humble.rst b/migration/Humble.rst index 7a84cc947b..46a8b07544 100644 --- a/migration/Humble.rst +++ b/migration/Humble.rst @@ -67,3 +67,8 @@ Costmap Filters Costmap Filters now are have an ability to be enabled/disabled in run-time by calling ``toggle_filter`` service for appropriate filter (`PR #3229 `_). Added new binary flip filter, allowing e.g. to turn off camera in sensitive areas, turn on headlights/leds/other safety things or switch operating mode when robot is inside marked on mask areas (`PR #3228 `_). + +Savitzky-Golay Smoother +*********************** + +Adding a new smoother algorithm, the Savitzky-Golay smoother to the smoother server plugin list. See the configuration guide :ref:`configuring_savitzky_golay_filter_smoother` for more details. diff --git a/plugins/index.rst b/plugins/index.rst index 25a91e78ce..984906c39d 100644 --- a/plugins/index.rst +++ b/plugins/index.rst @@ -66,9 +66,13 @@ Costmap Filters | `Speed Filter`_ | Alexey Merzlyakov | Limits maximum velocity of robot | | | | in speed restriction areas | +--------------------+--------------------+-----------------------------------+ +| `Binary Filter`_ | Alexey Merzlyakov | Enables binary (boolean) mask | +| | | behavior to trigger actions. | ++--------------------+--------------------+-----------------------------------+ .. _Keepout Filter: https://github.com/ros-planning/navigation2/tree/main/nav2_costmap_2d/plugins/costmap_filters/keepout_filter.cpp .. _Speed Filter: https://github.com/ros-planning/navigation2/tree/main/nav2_costmap_2d/plugins/costmap_filters/speed_filter.cpp +.. _Binary Filter: https://github.com/ros-planning/navigation2/tree/main/nav2_costmap_2d/plugins/costmap_filters/binary_filter.cpp Controllers =========== @@ -166,9 +170,17 @@ Smoothers | | | maintaining minimum turning | | | | radius | +---------------------------+---------------------------------------+------------------------------+ +|`Savitzky-Golay Smoother`_ | Steve Macenski | A path smoother using a | +| | | Savitzky-Golay filter | +| | | to smooth the path via | +| | | digital signal processing | +| | | to remove noise from the | +| | | path. | ++---------------------------+---------------------------------------+------------------------------+ .. _Simple Smoother: https://github.com/ros-planning/navigation2/tree/main/nav2_smoother .. _Constrained Smoother: https://github.com/ros-planning/navigation2/tree/main/nav2_constrained_smoother +.. _Savitzky-Golay Smoother: https://github.com/ros-planning/navigation2/tree/main/nav2_smoother Behaviors =========