Main Content

Motion Planning

Path metrics, RRT path planners, path following

Use motion planning to plan a path through an environment. You can use common sampling-based planners like RRT, RRT*, and Hybrid A*, or specify your own customizable path-planning interfaces. Use path metrics, state space sampling, and state validation to ensure your path is valid and has proper obstacle clearance or smoothness. Follow your path and avoid obstacles using pure pursuit, vector field histogram (VFH), and timed elastic band (TEB) algorithms.

Functions

expand all

plannerRRTCreate an RRT planner for geometric planning (Since R2019b)
plannerRRTStarCreate an optimal RRT path planner (RRT*) (Since R2019b)
plannerBiRRTCreate bidirectional RRT planner for geometric planning (Since R2021a)
plannerControlRRTControl-based RRT planner (Since R2021b)
plannerAStarGraph-based A* path planner (Since R2023a)
plannerAStarGridA* path planner for grid map (Since R2020b)
plannerHybridAStarHybrid A* path planner (Since R2019b)
plannerPRMCreate probabilistic roadmap path planner (Since R2022a)
plannerBenchmarkBenchmark path planners using generated metrics (Since R2022a)
navGraphCreate navGraph object (Since R2023a)
navPathPlanned path (Since R2019b)
navPathControlPath representing control-based kinematic trajectory (Since R2021b)
dubinsConnectionDubins path connection type (Since R2019b)
dubinsPathSegmentDubins path segment connecting two poses (Since R2019b)
reedsSheppConnectionReeds-Shepp path connection type (Since R2019b)
reedsSheppPathSegmentReeds-Shepp path segment connecting two poses (Since R2019b)
pathmetricsInformation for path metrics (Since R2019b)
optimizePathOptimize path while maintaining safe distance from obstacle (Since R2022a)
optimizePathOptionsCreate optimization options for optimizePath function (Since R2022a)
controllerVFHAvoid obstacles using vector field histogram (Since R2019b)
controllerPurePursuitCreate controller to follow set of waypoints (Since R2019b)
controllerTEBAvoid unseen obstacles with time-optimal trajectories (Since R2023a)
headingFromXYCompute heading angle from XY-points of path (Since R2023a)
velocityCommandRetrieve velocity command from time series of velocity commands (Since R2023a)
nav.StateSpaceCreate state space for path planning (Since R2019b)
stateSpaceSE2SE(2) state space (Since R2019b)
stateSpaceSE3SE(3) state space (Since R2020b)
stateSpaceDubinsState space for Dubins vehicles (Since R2019b)
stateSpaceReedsSheppState space for Reeds-Shepp vehicles (Since R2019b)
checkCollisionCheck if two geometries are in collision (Since R2019b)
checkMapCollisionCheck for collision between 3-D occupancy map and geometry (Since R2022b)
nav.StateValidatorCreate state validator for path planning (Since R2019b)
validatorOccupancyMapState validator based on 2-D grid map (Since R2019b)
validatorOccupancyMap3DState validator based on 3-D grid map (Since R2020b)
validatorVehicleCostmapState validator based on 2-D costmap (Since R2019b)
dynamicCapsuleListDynamic capsule-based obstacle list (Since R2020b)
dynamicCapsuleList3DDynamic capsule-based obstacle list (Since R2020b)
collisionBoxCreate box collision geometry (Since R2019b)
collisionCapsuleCapsule primitive collision geometry (Since R2022b)
collisionCylinderCreate collision cylinder geometry (Since R2019b)
collisionMeshCreate convex mesh collision geometry (Since R2019b)
collisionSphereCreate sphere collision geometry (Since R2019b)
collisionVHACDDecompose mesh into convex collision meshes using V-HACD (Since R2023b)
showCollisionArrayShow array of collision objects in figure (Since R2023b)
nav.StateSamplerCreate state sampler for path planning (Since R2023b)
stateSamplerGaussianGaussian state sampler for sampling-based motion planning (Since R2023b)
stateSamplerUniformUniform state sampler for sampling-based motion planning (Since R2023b)
mpnetSE2Motion Planning Networks (Since R2023b)
mpnetPrepareDataPrepare training data for Motion Planning Networks (Since R2023b)
stateSamplerMPNETMPNet state sampler for sampling-based motion planning (Since R2023b)
nav.StatePropagatorState propagator for control-based planning (Since R2021b)
mobileRobotPropagatorState propagator for wheeled robotic systems (Since R2021b)
createPlanningTemplateCreate sample implementation for path planning interface (Since R2019b)
nav.StateSpaceCreate state space for path planning (Since R2019b)
nav.StateValidatorCreate state validator for path planning (Since R2019b)
nav.StateSamplerCreate state sampler for path planning (Since R2023b)
referencePathFrenetSmooth reference path fit to waypoints (Since R2020b)
trajectoryGeneratorFrenetFind optimal trajectory along reference path (Since R2020b)
trajectoryOptimalFrenetFind optimal trajectory along reference path (Since R2019b)
plannerLineSpec.goalSpecifications for plotting goal state (Since R2023b)
plannerLineSpec.goalTreeSpecifications for plotting search tree from goal to start (Since R2023b)
plannerLineSpec.headingSpecifications for plotting heading angle (Since R2023b)
plannerLineSpec.pathSpecifications for plotting forward path (Since R2023b)
plannerLineSpec.reversePathSpecifications for plotting reverse path (Since R2023b)
plannerLineSpec.reverseTreeSpecifications for plotting reverse search tree (Since R2023b)
plannerLineSpec.startSpecifications for plotting start state (Since R2023b)
plannerLineSpec.stateSpecifications for plotting generic states (Since R2023b)
plannerLineSpec.treeSpecifications for plotting forward search tree (Since R2023b)

Blocks

Pure PursuitLinear and angular velocity control commands (Since R2019b)
Vector Field HistogramAvoid obstacles using vector field histogram (Since R2019b)

Concepts

Examples and How To