Plan motion for rigid body tree using bidirectional RRT
The manipulatorRRT
object is a single-query planner for
manipulator arms that uses the bidirectional rapidly exploring random trees (RRT) algorithm
with an optional connect heuristic to potentially increase speed.
The bidirectional RRT planner creates two trees with root nodes at the specified start and
goal configurations. To extend each tree, the planner generates a random configuration and, if
valid, takes a step from the nearest node based on the
MaxConnectionDistance
property. After each extension, the planner
attempts to connect between the two trees using the new extension and the closest node on the
opposite tree. Invalid configurations or connections that collide with the environment are not
added to the tree.
For a greedier search, enabling the EnableConnectHeuristic
property
disables the limit on the MaxConnectionDistance
property when connecting
between the two trees.
Setting the EnableConnectHueristic
property to
false
limits the extension distance when connecting between the two trees
to the value of the MaxConnectionDistance
property.
The object uses a rigidBodyTree
robot model to generate the
random configurations and intermediate states between nodes. Collision objects are specified
in the robot model to validate the configurations and check for collisions with the
environment or the robot itself.
To plan a path between a start and a goal configuration, use the plan
object
function. After planning, you can interpolate states along the path using the interpolate
object function. To attempt to shorten the path by trimming edges, use the shorten
object
function.
For more information about the computation complexity, see Planning Complexity.
rrt = manipulatorRRT(
creates
a bidirectional RRT planner for the specified robotRBT
,{})rigidBodyTree
robot model. The empty cell array indicates that there are no
obstacles in the environment.
rrt = manipulatorRRT(
creates a planner for a robot model with collision objects placed in the environment.
The planner checks for collisions with these objects.robotRBT
,collisionObjects
)
plan | Plan path using RRT for manipulators |
interpolate | Interpolate states along path from RRT |
shorten | Trim edges to shorten path from RRT |
Planning Complexity
When planning the motion between nodes in the tree, a set of configurations are generated and validated. This computation time of the planner is proportional to the number of configurations generated. The number of configurations between nodes is controlled by the ratio of the MaxConnectionDistance and ValidationDistance properties. To improve planning time, consider increasing the validation distance or decreasing the max connection distance.
Validating each configuration has a complexity of
O(mn+m2), where m is
the number of collision bodies in the rigidBodyTree
object and n is the number of collision
objects in worldObjects
. Using large numbers of meshes to represent your robot or
environment increases the time for validating each configuration.
Infinite Joint Limits
If your rigidBodyTree
robot model has joint limits
that have infinite range (e.g. revolute joint with limits of [-Inf
Inf]
), the manipulatorRRT
object uses limits of [-1e10
1e10]
to perform uniform random sampling in the joint limits.
Kuffner, J. J., and S. M. LaValle. “RRT-Connect: An Efficient Approach to Single-Query Path Planning.” In Proceedings 2000 ICRA. Millennium Conference. IEEE International Conference on Robotics and Automation. Symposia Proceedings (Cat. No.00CH37065), 2:995–1001. San Francisco, CA, USA: IEEE, 2000. https://doi:10.1109/ROBOT.2000.844730.
[1]