Skip to content

Add "Code Link" sections and rename classes for consistency #1214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions PathPlanning/Dijkstra/dijkstra.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
show_animation = True


class Dijkstra:
class DijkstraPlanner:

def __init__(self, ox, oy, resolution, robot_radius):
"""
Expand Down Expand Up @@ -246,7 +246,7 @@ def main():
plt.grid(True)
plt.axis("equal")

dijkstra = Dijkstra(ox, oy, grid_size, robot_radius)
dijkstra = DijkstraPlanner(ox, oy, grid_size, robot_radius)
rx, ry = dijkstra.planning(sx, sy, gx, gy)

if show_animation: # pragma: no cover
Expand Down
14 changes: 7 additions & 7 deletions PathPlanning/Eta3SplineTrajectory/eta3_spline_trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self, actual_vel, max_vel):
self.message = f'Actual velocity {actual_vel} does not equal desired max velocity {max_vel}!'


class eta3_trajectory(Eta3Path):
class Eta3SplineTrajectory(Eta3Path):
"""
eta3_trajectory

Expand Down Expand Up @@ -300,8 +300,8 @@ def test1(max_vel=0.5):
trajectory_segments.append(Eta3PathSegment(
start_pose=start_pose, end_pose=end_pose, eta=eta, kappa=kappa))

traj = eta3_trajectory(trajectory_segments,
max_vel=max_vel, max_accel=0.5)
traj = Eta3SplineTrajectory(trajectory_segments,
max_vel=max_vel, max_accel=0.5)

# interpolate at several points along the path
times = np.linspace(0, traj.total_time, 101)
Expand Down Expand Up @@ -334,8 +334,8 @@ def test2(max_vel=0.5):
trajectory_segments.append(Eta3PathSegment(
start_pose=start_pose, end_pose=end_pose, eta=eta, kappa=kappa))

traj = eta3_trajectory(trajectory_segments,
max_vel=max_vel, max_accel=0.5)
traj = Eta3SplineTrajectory(trajectory_segments,
max_vel=max_vel, max_accel=0.5)

# interpolate at several points along the path
times = np.linspace(0, traj.total_time, 101)
Expand Down Expand Up @@ -400,8 +400,8 @@ def test3(max_vel=2.0):
start_pose=start_pose, end_pose=end_pose, eta=eta, kappa=kappa))

# construct the whole path
traj = eta3_trajectory(trajectory_segments,
max_vel=max_vel, max_accel=0.5, max_jerk=1)
traj = Eta3SplineTrajectory(trajectory_segments,
max_vel=max_vel, max_accel=0.5, max_jerk=1)

# interpolate at several points along the path
times = np.linspace(0, traj.total_time, 1001)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@ You can get different Beizer course:

.. image:: Figure_2.png

Code Link
~~~~~~~~~~~~~~~

.. autofunction:: PathPlanning.BezierPath.bezier_path.calc_4points_bezier_path


Reference
~~~~~~~~~~~~~~~

- `Continuous Curvature Path Generation Based on Bezier Curves for
Autonomous
Vehicles <https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=b00b657c3e0e828c589132a14825e7119772003d>`
Vehicles <https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=b00b657c3e0e828c589132a14825e7119772003d>`__
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ The default spline degree is 3, so curvature changes smoothly.

.. image:: interp_and_curvature.png

API
++++
Code link
++++++++++

.. autofunction:: PathPlanning.BSplinePath.bspline_path.interpolate_b_spline_path

Expand All @@ -133,8 +133,8 @@ The default spline degree is 3, so curvature changes smoothly.

.. image:: approx_and_curvature.png

API
++++
Code Link
++++++++++

.. autofunction:: PathPlanning.BSplinePath.bspline_path.approximate_b_spline_path

Expand Down
8 changes: 8 additions & 0 deletions docs/modules/5_path_planning/bugplanner/bugplanner_main.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,12 @@ This is a 2D planning with Bug algorithm.

.. image:: https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/PathPlanning/BugPlanner/animation.gif

Code Link
~~~~~~~~~~~~~~~

.. autofunction:: PathPlanning.BugPlanning.bug.main

Reference
~~~~~~~~~~~~

- `ECE452 Bug Algorithms <https://web.archive.org/web/20201103052224/https://sites.google.com/site/ece452bugalgorithms/>`_
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ Catmull-Rom Spline API

This section provides an overview of the functions used for Catmull-Rom spline path planning.

API
++++
Code Link
++++++++++

.. autofunction:: PathPlanning.Catmull_RomSplinePath.catmull_rom_spline_path.catmull_rom_point

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ The final clothoid path can be calculated with the path parameters and Fresnel i
&y(s)=y_{0}+\int_{0}^{s} \sin \left(\frac{1}{2} \kappa^{\prime} \tau^{2}+\kappa \tau+\vartheta_{0}\right) \mathrm{d} \tau
\end{aligned}

Code Link
~~~~~~~~~~~~~

.. autofunction:: PathPlanning.ClothoidPath.clothoid_path_planner.generate_clothoid_path


References
~~~~~~~~~~
Expand Down
21 changes: 21 additions & 0 deletions docs/modules/5_path_planning/coverage_path/coverage_path_main.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ This is a 2D grid based sweep coverage path planner simulation:

.. image:: https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/PathPlanning/GridBasedSweepCPP/animation.gif

Code Link
+++++++++++++

.. autofunction:: PathPlanning.GridBasedSweepCPP.grid_based_sweep_coverage_path_planner.planning

Spiral Spanning Tree
~~~~~~~~~~~~~~~~~~~~

Expand All @@ -17,6 +22,14 @@ This is a 2D grid based spiral spanning tree coverage path planner simulation:
.. image:: https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/PathPlanning/SpiralSpanningTreeCPP/animation2.gif
.. image:: https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/PathPlanning/SpiralSpanningTreeCPP/animation3.gif

Code Link
+++++++++++++

.. autofunction:: PathPlanning.SpiralSpanningTreeCPP.spiral_spanning_tree_coverage_path_planner.main

Reference
+++++++++++++

- `Spiral-STC: An On-Line Coverage Algorithm of Grid Environments by a Mobile Robot <https://ieeexplore.ieee.org/abstract/document/1013479>`_


Expand All @@ -29,6 +42,14 @@ This is a 2D grid based wavefront coverage path planner simulation:
.. image:: https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/PathPlanning/WavefrontCPP/animation2.gif
.. image:: https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/PathPlanning/WavefrontCPP/animation3.gif

Code Link
+++++++++++++

.. autofunction:: PathPlanning.WavefrontCPP.wavefront_coverage_path_planner.wavefront

Reference
+++++++++++++

- `Planning paths of complete coverage of an unstructured environment by a mobile robot <https://pinkwink.kr/attachment/cfile3.uf@1354654A4E8945BD13FE77.pdf>`_


Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ the second derivative by:

These equations can be calculated by differentiating the cubic polynomial.

API
===
Code Link
==========

This is the 1D cubic spline class API:

Expand All @@ -199,8 +199,8 @@ Curvature of each point can be also calculated analytically by:

:math:`\kappa=\frac{y^{\prime \prime} x^{\prime}-x^{\prime \prime} y^{\prime}}{\left(x^{\prime2}+y^{\prime2}\right)^{\frac{2}{3}}}`

API
===
Code Link
==========

.. autoclass:: PathPlanning.CubicSpline.cubic_spline_planner.CubicSpline2D
:members:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ You can generate a path from these information and the maximum curvature informa
A path type which has minimum course length among 6 types is selected,
and then a path is constructed based on the selected type and its distances.

API
Code Link
~~~~~~~~~~~~~~~~~~~~

.. autofunction:: PathPlanning.DubinsPath.dubins_path_planner.plan_dubins_path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@ Dynamic Window Approach

This is a 2D navigation sample code with Dynamic Window Approach.

.. image:: https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/PathPlanning/DynamicWindowApproach/animation.gif

Code Link
+++++++++++++

.. autofunction:: PathPlanning.DynamicWindowApproach.dynamic_window_approach.dwa_control


Reference
~~~~~~~~~~~~

- `The Dynamic Window Approach to Collision
Avoidance <https://www.ri.cmu.edu/pub_files/pub1/fox_dieter_1997_1/fox_dieter_1997_1.pdf>`__

.. image:: https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/PathPlanning/DynamicWindowApproach/animation.gif
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ This is a path planning with Elastic Bands.

.. image:: https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/PathPlanning/ElasticBands/animation.gif

Code Link
+++++++++++++

.. autoclass:: PathPlanning.ElasticBands.elastic_bands.ElasticBands


Core Concept
~~~~~~~~~~~~
Expand Down Expand Up @@ -69,6 +74,6 @@ Dynamic Path Maintenance
- Remove redundant nodes if adjacent nodes are too close

References
~~~~~~~~~~~~~~~~~~~~~~~
+++++++++++++

- `Elastic Bands: Connecting Path Planning and Control <http://www8.cs.umu.se/research/ifor/dl/Control/elastic%20bands.pdf>`__
7 changes: 7 additions & 0 deletions docs/modules/5_path_planning/eta3_spline/eta3_spline_main.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ Eta^3 Spline path planning

This is a path planning with Eta^3 spline.

Code Link
~~~~~~~~~~~~~~~

.. autoclass:: PathPlanning.Eta3SplineTrajectory.eta3_spline_trajectory.Eta3SplineTrajectory


Reference
~~~~~~~~~~~~~~~

- `\\eta^3-Splines for the Smooth Path Generation of Wheeled Mobile
Robots <https://ieeexplore.ieee.org/document/4339545/>`__
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ The cyan line is the target course and black crosses are obstacles.

The red line is predicted path.

Code Link
~~~~~~~~~~~~~~

.. autofunction:: PathPlanning.FrenetOptimalTrajectory.frenet_optimal_trajectory.main


High Speed and Velocity Keeping Scenario
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ This is a 2D grid based path planning with Breadth first search algorithm.

In the animation, cyan points are searched nodes.

Code Link
+++++++++++++

.. autofunction:: PathPlanning.BreadthFirstSearch.breadth_first_search.BreadthFirstSearchPlanner


Depth First Search
~~~~~~~~~~~~~~~~~~~~

Expand All @@ -19,6 +25,12 @@ This is a 2D grid based path planning with Depth first search algorithm.

In the animation, cyan points are searched nodes.

Code Link
+++++++++++++

.. autofunction:: PathPlanning.DepthFirstSearch.depth_first_search.DepthFirstSearchPlanner


.. _dijkstra:

Dijkstra algorithm
Expand All @@ -30,6 +42,12 @@ This is a 2D grid based shortest path planning with Dijkstra's algorithm.

In the animation, cyan points are searched nodes.

Code Link
+++++++++++++

.. autofunction:: PathPlanning.Dijkstra.dijkstra.DijkstraPlanner


.. _a*-algorithm:

A\* algorithm
Expand All @@ -43,6 +61,12 @@ In the animation, cyan points are searched nodes.

Its heuristic is 2D Euclid distance.

Code Link
+++++++++++++

.. autofunction:: PathPlanning.AStar.a_star.AStarPlanner


Bidirectional A\* algorithm
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand All @@ -52,6 +76,12 @@ This is a 2D grid based shortest path planning with bidirectional A star algorit

In the animation, cyan points are searched nodes.

Code Link
+++++++++++++

.. autofunction:: PathPlanning.BidirectionalAStar.bidirectional_a_star.BidirectionalAStarPlanner


.. _D*-algorithm:

D\* algorithm
Expand All @@ -63,7 +93,14 @@ This is a 2D grid based shortest path planning with D star algorithm.

The animation shows a robot finding its path avoiding an obstacle using the D* search algorithm.

Code Link
+++++++++++++

.. autoclass:: PathPlanning.DStar.dstar.Dstar


Reference
++++++++++++

- `D* search Wikipedia <https://en.wikipedia.org/wiki/D*>`__

Expand All @@ -74,7 +111,13 @@ This is a 2D grid based path planning and replanning with D star lite algorithm.

.. image:: https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/PathPlanning/DStarLite/animation.gif

Code Link
+++++++++++++

.. autoclass:: PathPlanning.DStarLite.d_star_lite.DStarLite

Reference
++++++++++++

- `Improved Fast Replanning for Robot Navigation in Unknown Terrain <http://www.cs.cmu.edu/~maxim/files/dlite_icra02.pdf>`_

Expand All @@ -88,7 +131,14 @@ This is a 2D grid based path planning with Potential Field algorithm.

In the animation, the blue heat map shows potential value on each grid.

Code Link
+++++++++++++

.. autofunction:: PathPlanning.PotentialFieldPlanning.potential_field_planning.potential_field_planning


Reference
++++++++++++

- `Robotic Motion Planning:Potential
Functions <https://www.cs.cmu.edu/~motionplanning/lecture/Chap4-Potential-Field_howie.pdf>`__
Expand Down
5 changes: 5 additions & 0 deletions docs/modules/5_path_planning/hybridastar/hybridastar_main.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ Hybrid a star
This is a simple vehicle model based hybrid A\* path planner.

.. image:: https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/PathPlanning/HybridAStar/animation.gif

Code Link
+++++++++++++

.. autofunction:: PathPlanning.HybridAStar.hybrid_a_star.hybrid_a_star_planning
Loading