ompl#

class mplib.planning.ompl.FixedJoint#

Bases: pybind11_object

__init__(
self: mplib.pymp.planning.ompl.FixedJoint,
articulation_idx: int,
joint_idx: int,
value: float,
) None#
property articulation_idx#
property joint_idx#
property value#
class mplib.planning.ompl.OMPLPlanner#

Bases: pybind11_object

OMPL Planner

__init__(
self: mplib.pymp.planning.ompl.OMPLPlanner,
world: mplib::PlanningWorldTpl<double>,
) None#

Construct an OMPLPlanner from a PlanningWorld

Parameters:

world – planning world

plan(self: mplib.pymp.planning.ompl.OMPLPlanner, start_state: numpy.ndarray[numpy.float64[m, 1]], goal_states: list[numpy.ndarray[numpy.float64[m, 1]]], *, time: float = 1.0, range: float = 0.0, fixed_joints: set[mplib::planning::ompl::FixedJointTpl<double>] = set(), simplify: bool = True, constraint_function: Callable[[numpy.ndarray[numpy.float64[m, 1]], numpy.ndarray[numpy.float64[m, 1], flags.writeable]], None] = None, constraint_jacobian: Callable[[numpy.ndarray[numpy.float64[m, 1]], numpy.ndarray[numpy.float64[m, 1], flags.writeable]], None] = None, constraint_tolerance: float = 0.001, verbose: bool = False) tuple[str, numpy.ndarray[numpy.float64[m, n]]]#

Plan a path from start state to goal states.

Parameters:
  • start_state – start state of the movegroup joints

  • goal_states – list of goal states. Planner will stop when one of them is reached

  • time – planning time limit

  • range – planning range (for RRT family of planners and represents the maximum step size)

  • fixed_joints – list of fixed joints not considered in planning for this particular call

  • simplify – whether the path will be simplified by calling _simplifyPath() (constained planning does not support simplification)

  • constraint_function – a R^d to R^1 function that evals to 0 when constraint is satisfied. Constraint ignored if fixed joints not empty

  • constraint_jacobian – the jacobian of the constraint w.r.t. the joint angles

  • constraint_tolerance – tolerance of what level of deviation from 0 is acceptable

  • verbose – print debug information. Default: False.

Returns:

pair of planner status and path. If planner succeeds, status is “Exact solution.”

simplify_path(
self: mplib.pymp.planning.ompl.OMPLPlanner,
path: numpy.ndarray[numpy.float64[m, n]],
) numpy.ndarray[numpy.float64[m, n]]#

Simplify the provided path.

Parameters:

path – path to be simplified (numpy array of shape (n, dim))

Returns:

simplified path