Main Content

findpath

Find path between start and goal points on roadmap

Description

xy = findpath(prm,start,goal) finds an obstacle-free path between start and goal locations within prm, a roadmap object that contains a network of connected points.

If any properties of prm change, or if the roadmap is not created, update is called.

Input Arguments

collapse all

Roadmap path planner, specified as a mobileRobotPRM object.

Start location of path, specified as a 1-by-2 vector representing an [x y] pair.

Example: [0 0]

Final location of path, specified as a 1-by-2 vector representing an [x y] pair.

Example: [10 10]

Output Arguments

collapse all

Waypoints for a path between start and goal, specified as a n-by-2 column vector of [x y] pairs, where n is the number of waypoints. These pairs represent the solved path from the start and goal locations, given the roadmap from the prm input object.

Version History

Introduced in R2019b