Main Content

Motion Planning

Path metrics, RRT path planners, MPNet path planner, 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*, deep-learning-based planner, 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
plannerRRTStarCreate an optimal RRT path planner (RRT*)
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
plannerPRMCreate probabilistic roadmap path planner (Since R2022a)
plannerMPNETCreate MPNet based bidirectional path planner (Since R2024a)
plannerBenchmarkBenchmark path planners using generated metrics (Since R2022a)
navGraphCreate navGraph object (Since R2023a)
navPathPlanned path
navPathControlPath representing control-based kinematic trajectory (Since R2021b)
dubinsConnectionDubins path connection type
dubinsPathSegmentDubins path segment connecting two poses
reedsSheppConnectionReeds-Shepp path connection type
reedsSheppPathSegmentReeds-Shepp path segment connecting two poses
pathmetricsInformation for path metrics
optimizePathOptimize path while maintaining safe distance from obstacle (Since R2022a)
optimizePathOptionsCreate optimization options for optimizePath function (Since R2022a)
shortenpathShorten path by removing redundant nodes (Since R2024b)
controllerVFHAvoid obstacles using vector field histogram
controllerPurePursuitCreate controller to follow set of waypoints
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
stateSpaceSE2SE(2) state space
stateSpaceSE3SE(3) state space (Since R2020b)
stateSpaceDubinsState space for Dubins vehicles
stateSpaceReedsSheppState space for Reeds-Shepp vehicles
checkCollisionCheck if two geometries are in collision
checkMapCollisionCheck for collision between 3-D occupancy map and geometry (Since R2022b)
nav.StateValidatorCreate state validator for path planning
validatorOccupancyMapState validator based on 2-D grid map
validatorOccupancyMap3DState validator based on 3-D grid map (Since R2020b)
validatorVehicleCostmapState validator based on 2-D costmap
dynamicCapsuleListDynamic capsule-based obstacle list (Since R2020b)
dynamicCapsuleList3DDynamic capsule-based obstacle list (Since R2020b)
collisionBoxCreate box collision geometry
collisionCapsuleCapsule primitive collision geometry (Since R2022b)
collisionCylinderCreate collision cylinder geometry
collisionMeshCreate convex mesh collision geometry
collisionSphereCreate sphere collision geometry
geom2structConvert collision geometry objects to structure array (Since R2024a)
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)
stateSamplerMPNETMPNet state sampler for sampling-based motion planning (Since R2023b)
sampleStartGoalSample start and goal states for motion planning (Since R2024a)
nav.StatePropagatorState propagator for control-based planning (Since R2021b)
mobileRobotPropagatorState propagator for wheeled robotic systems (Since R2021b)
createPlanningTemplateCreate sample implementation for path planning interface
nav.StateSpaceCreate state space for path planning
nav.StateValidatorCreate state validator for path planning
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
mpnetLayersCreate custom motion planning networks (Since R2024a)
mpnetSE2Motion Planning Networks (Since R2023b)
mpnetPrepareDataPrepare training data for Motion Planning Networks (Since R2023b)
bpsEncoderBasis point set encoder (Since R2024a)
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
Vector Field HistogramAvoid obstacles using vector field histogram

Topics

Motion Planning Topics

Featured Examples