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 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 and vector field histogram algorithms.


expand all

navPathPlanned path
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
clearanceMinimum clearance of path
isPathValidDetermine if planned path is obstacle free
smoothnessSmoothness of path
showVisualize path metrics in map environment
stateSpaceSE2SE(2) state space
stateSpaceSE3SE(3) state space
stateSpaceDubinsState space for Dubins vehicles
stateSpaceReedsSheppState space for Reeds-Shepp vehicles
validatorOccupancyMapState validator based on 2-D grid map
validatorOccupancyMap3DState validator based on 3-D grid map
validatorVehicleCostmapState validator based on 2-D costmap
isStateValidCheck if state is valid
isMotionValidCheck if path between states is valid
plannerRRTCreate an RRT planner for geometric planning
plannerRRTStarCreate an optimal RRT path planner (RRT*)
plannerBiRRTCreate bidirectional RRT planner for geometric planning
plannerAStarGridA* path planner for grid map
plannerHybridAStarHybrid A* path planner
referencePathFrenetSmooth reference path fit to waypoints
trajectoryGeneratorFrenetFind optimal trajectory along reference path
trajectoryOptimalFrenetFind optimal trajectory along reference path
createPlanningTemplateCreate sample implementation for path planning interface
nav.StateSpaceCreate state space for path planning
nav.StateValidatorCreate state validator for path planning
controllerVFHAvoid obstacles using vector field histogram
controllerPurePursuitCreate controller to follow set of waypoints
dynamicCapsuleListDynamic capsule-based obstacle list
dynamicCapsuleList3DDynamic capsule-based obstacle list
addEgoAdd ego bodies to capsule list
addObstacleAdd obstacles to 2-D capsule list
checkCollisionCheck for collisions between ego bodies and obstacles
egoGeometryGeometric properties of ego bodies
egoPosePoses of ego bodies
obstacleGeometryGeometric properties of obstacles
obstaclePosePoses of obstacles


Pure PursuitLinear and angular velocity control commands
Vector Field HistogramAvoid obstacles using vector field histogram


Choose Path Planning Algorithms for Navigation

Details about the benefits of different path and motion planning algorithms.

Plan Mobile Robot Paths Using RRT

This example shows how to use the rapidly-exploring random tree (RRT) algorithm to plan a path for a vehicle through a known map.

Moving Furniture in a Cluttered Room with RRT

This example shows how to plan a path to move bulky furniture in a tight space avoiding poles.

Motion Planning with RRT for a Robot Manipulator

Plan a grasping motion for a Kinova Jaco Assistive Robotics Arm using the rapidly-exploring random tree (RRT) algorithm.

Dynamic Replanning on an Indoor Map

This example shows how to perform dynamic replanning on a warehouse map with a range finder and an A* path planner.

Highway Lane Change

This example shows how to simulate an automated lane change maneuver system for highway driving scenario.

Highway Trajectory Planning Using Frenet Reference Path

This example demonstrates how to plan a local trajectory in a highway driving scenario.

Optimal Trajectory Generation for Urban Driving

This example shows how to perform dynamic replanning in an urban scenario using trajectoryOptimalFrenet.

Motion Planning in Urban Environments Using Dynamic Occupancy Grid Map

This example shows you how to perform dynamic replanning in an urban driving scene using a Frenet reference path.

Path Following with Obstacle Avoidance in Simulink®

This example shows you how to use Simulink to avoid obstacles while following a path for a differential drive robot.

Obstacle Avoidance with TurtleBot and VFH

This example shows how to use ROS Toolbox and a TurtleBot® with vector field histograms (VFH) to perform obstacle avoidance when driving a robot in an environment.

Vector Field Histogram

VFH algorithm details and tunable properties.

Pure Pursuit Controller

Pure Pursuit Controller functionality and algorithm details.

Featured Examples