robotics_toolbox.planning.rrt.RRT

class robotics_toolbox.planning.rrt.RRT(robot, delta_q=0.2, p_sample_goal=0.5)

Bases: object

Parameters:

robot (RobotBase)

__init__(robot, delta_q=0.2, p_sample_goal=0.5)

RRT planner for a given robot. :param robot: robot used to sample configuration and check collisions :param delta_q: maximum distance between two configurations :param p_sample_goal: probability of sampling goal as q_rand

Parameters:

robot (RobotBase)

Return type:

None

Methods

__init__(robot[, delta_q, p_sample_goal])

RRT planner for a given robot.

plan(q_start, q_goal[, max_iterations])

RRT algorithm for motion planning.

random_shortcut(path[, max_iterations])

Random shortcut algorithm that pick two points on the path randomly and tries to interpolate between them.

plan(q_start, q_goal, max_iterations=10000)

RRT algorithm for motion planning.

Parameters:
  • q_start (_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | SE2 | SE3)

  • q_goal (_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | SE2 | SE3)

  • max_iterations (int)

Return type:

list[_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | SE2 | SE3]

random_shortcut(path, max_iterations=100)

Random shortcut algorithm that pick two points on the path randomly and tries to interpolate between them. If collision free interpolation exists, the path between selected points is replaced by the interpolation.

Parameters:

path (list[ndarray | SE2 | SE3])

Return type:

list[ndarray | SE2 | SE3]