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
stateSpaceDubinsState space for Dubins vehicles
stateSpaceReedsSheppState space for Reeds-Shepp vehicles
validatorOccupancyMapState validator based on 2-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*)
plannerHybridAStarHybrid A* path planner
trajectoryOptimalFrenetFind optimal trajectory for 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


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


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.

Optimal Trajectory Generation for Urban Driving

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

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