Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Dec 2, 2022
1 parent c5e5480 commit 7ab7c9e
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 0 deletions.
46 changes: 46 additions & 0 deletions doc/source/tutorial-motion-planning.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
.. _tutorial_motion_planning:

############################
Motion planning
############################

.. note::
For more advanced motion planning algorithms,
refer to the `selfdriving library <https://github.com/jlblancoc/selfdriving>`_.

.. contents:: :local:

1. Path planning for circular robots and 2D grid maps
------------------------------------------------------
The basic `value iteration algorithm <https://en.wikipedia.org/wiki/Markov_decision_process#Value_iteration>`_
for searching shortest paths is implemented in MRPT for circular robots and obstacles described by means of
occupancy grids in the class `mrpt::nav::PlannerSimple2D <class_mrpt_nav_PlannerSimple2D.html>`_.

The method comprises two steps:

- Growth of the obstacles by the robot radius. This assure that just one single free cell is enough for the robot to move without collision.

- The value iteration algorithm, starting at the source position, increase iteratively the area covered by shortest paths until the target cell is reached.
Note that this is a very simple method, not suitable for robots with shapes very different from circular and/or moving in cluttered environments.
For those cases, see the obstacle avoidance methods above.

Using this planner requires declaring the gridmap, the mrpt::nav::PlannerSimple2D object, setting the robot radius,
and invoking `mrpt::nav::PlannerSimple2D::computePath()`.
See the complete example source code `here <page_nav_circ_robot_path_planning.html>`_.


.. image:: images/nav_circ_robot_path_planning_screenshot.png
:align: right
:width: 300px


2. RRT path planning
--------------------------




3. Obstacle avoidance (reactive navigation)
------------------------------------------------

See: https://www.mrpt.org/Obstacle_avoidance
6 changes: 6 additions & 0 deletions doc/source/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ Note: This page is in the process of being imported from https://www.mrpt.org/tu

page_tutorial_3D_scenes

.. toctree::
:maxdepth: 2
:caption: Motion planning

tutorial-motion-planning

.. toctree::
:maxdepth: 2
:caption: Maths, Geometry
Expand Down
5 changes: 5 additions & 0 deletions samples/nav_circ_robot_path_planning/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This example shows the use of the basic 2D path planning
algorithm implemented in the mrpt-nav class [PlannerSimple2D](class_mrpt_nav_PlannerSimple2D.html).

See also: [index of motion planning algorithms]()

7 changes: 7 additions & 0 deletions samples/nav_rrt_planning_example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This example demonstrates how to install a custom OpenGL
shader replacing one of MRPT default ones.

In particular, the fragment shader is modified such that
depth (raw depth, in opengl internal logarithmic scale)
with respect to the eye is visualized as grayscale levels.

0 comments on commit 7ab7c9e

Please sign in to comment.