Path planning

A set of path planners for robots operating in planar environments with configuration \(\vec{q} \in \mathbb{R}^2\) or \(\vec{q} \in \mathbb{R}^2 \times S^1 \sim \SE{2}\). All inherit from PlannerBase.

Some planners are based on code from the PathPlanning category of PythonRobotics by Atsushi Sakai.

Inheritance diagram of roboticstoolbox.mobile.Bug2.Bug2, roboticstoolbox.mobile.DistanceTransformPlanner.DistanceTransformPlanner, roboticstoolbox.mobile.DstarPlanner.DstarPlanner, roboticstoolbox.mobile.PRMPlanner.PRMPlanner, roboticstoolbox.mobile.LatticePlanner.LatticePlanner, roboticstoolbox.mobile.DubinsPlanner.DubinsPlanner, roboticstoolbox.mobile.ReedsSheppPlanner.ReedsSheppPlanner, roboticstoolbox.mobile.CurvaturePolyPlanner.CurvaturePolyPlanner, roboticstoolbox.mobile.QuinticPolyPlanner.QuinticPolyPlanner, roboticstoolbox.mobile.RRTPlanner.RRTPlanner

Planner

Plans in

Discrete/Continuous

Obstacle avoidance

Bug2

\(\mathbb{R}^2\)

discrete

yes

DistanceTransformPlanner

\(\mathbb{R}^2\)

discrete

yes

DstarPlanner

\(\mathbb{R}^2\)

discrete

yes

PRMPlanner

\(\mathbb{R}^2\)

continuous

yes

LatticePlanner

\(\SE{2}\)

discrete

yes

DubinsPlanner

\(\SE{2}\)

continuous

no

ReedsSheppPlanner

\(\SE{2}\)

continuous

no

CurvaturePolyPlanner

\(\SE{2}\)

continuous

no

QuinticPolyPlanner

\(\SE{2}\)

continuous

no

RRTPlanner

\(\SE{2}\)

continuous

yes

Using a planner

The planners do not share one call signature, because the algorithms need different things at different times. They fall into four families, and the verbs a planner has are the ones that make sense for it.

Family

Planners

plan

query or run

Plan for a goal, then query many starts

DistanceTransformPlanner, DstarPlanner, RRTPlanner

plan(goal)

query(start), Dstar also takes a sensor function

Build a map of the space, then query both ends

PRMPlanner, LatticePlanner

plan(npoints) or plan(iterations)

query(start, goal)

Nothing to plan

DubinsPlanner, ReedsSheppPlanner, QuinticPolyPlanner, CurvaturePolyPlanner

none

query(start, goal)

Reactive

Bug2

none

run(start, goal)

Failure

  • ValueError: the arguments are invalid, for example the start is inside an obstacle or has the wrong length.

  • NoPathError: the problem is valid but has no solution, for example the goal is unreachable or the robot is trapped. It is a RuntimeError.

  • RuntimeError: query was called before plan.

Animation

Planners that can animate take animate and movie arguments at the constructor, which set the default for the planner and can be overridden by the same arguments of the method that runs the animation. A movie implies animate.