This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

findpath

Class: robotics.PRM
Package: robotics

Find path between start and goal points on roadmap

Syntax

xy = findpath(prm,start,goal)

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

expand all

Roadmap path planner, specified as a robotics.PRM 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 vector representing an [x y] pair.

Example: [10 10]

Output Arguments

expand 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.

Introduced in R2015a