pymoveit_mtc.core.Task

class Task(*args, **kwargs)

Bases: pybind11_object

Root stage of a planning pipeline. A task stage usually wraps a single container (by default SerialContainer) stage. The class provides methods to plan() for the configured pipeline and retrieve full solutions.

Overloaded function.

  1. __init__(self: pymoveit_mtc.core.Task, ns: str = ‘’, introspection: bool = True) -> None

  2. __init__(self: pymoveit_mtc.core.Task, ns: str = ‘’, introspection: bool = True, container: pymoveit_mtc.core.ContainerBase) -> None

Methods

add

Append stage(s) to the task's top-level container

clear

Reset the stage task (and all its stages)

enableIntrospection

Enable publishing intermediate results for inspection in rviz

execute

Send given solution to move_group node for execution

getRobotModel

init

Initialize the task (and all its stages)

insert

Insert stage before given index

loadRobotModel

Load robot model from given ROS parameter

plan

Reset, init, and plan.

preempt

Interrupt current planning (or execution)

publish

Publish the given solution to the ROS topic solution

reset

Reset task (and all its stages)

setCostTerm

Overloaded function.

Attributes

failures

Failed Solutions of the stage (read-only)

name

name of the task displayed e.g.

properties

PropertyMap of the stage (read-only)

solutions

Successful Solutions of the stage (read-only)

__getitem__(*args, **kwargs)

Overloaded function.

  1. __getitem__(self: pymoveit_mtc.core.Task, arg0: str) -> pymoveit_mtc.core.Stage

  2. __getitem__(self: pymoveit_mtc.core.Task, arg0: int) -> pymoveit_mtc.core.Stage

__iter__(self: pymoveit_mtc.core.Task) Iterator[pymoveit_mtc.core.Stage]
__len__(self: pymoveit_mtc.core.Task) None
add(self: pymoveit_mtc.core.Task, *args) None

Append stage(s) to the task’s top-level container

clear(self: pymoveit_mtc.core.Task) None

Reset the stage task (and all its stages)

enableIntrospection(self: pymoveit_mtc.core.Task, enabled: bool = True) None

Enable publishing intermediate results for inspection in rviz

static execute(solution: pymoveit_mtc.core.Solution) None

Send given solution to move_group node for execution

property failures

Failed Solutions of the stage (read-only)

Type:

Solutions

getRobotModel(self: pymoveit_mtc.core.Task) moveit::core::RobotModel
init(self: pymoveit_mtc.core.Task) None

Initialize the task (and all its stages)

insert(self: pymoveit_mtc.core.Task, stage: pymoveit_mtc.core.Stage, before: int = -1) None

Insert stage before given index

loadRobotModel(self: pymoveit_mtc.core.Task, robot_description: str = 'robot_description') None

Load robot model from given ROS parameter

property name

name of the task displayed e.g. in rviz

Type:

str

plan(self: pymoveit_mtc.core.Task, max_solutions: int = 0) pymoveit_mtc.core.MoveItErrorCode

Reset, init, and plan. Planning is limited to max_allowed_solutions. Returns if planning was successful.

preempt(self: pymoveit_mtc.core.Task) None

Interrupt current planning (or execution)

property properties

PropertyMap of the stage (read-only)

Type:

PropertyMap

publish(self: pymoveit_mtc.core.Task, solution: pymoveit_mtc.core.Solution) None

Publish the given solution to the ROS topic solution

reset(self: pymoveit_mtc.core.Task) None

Reset task (and all its stages)

setCostTerm(*args, **kwargs)

Overloaded function.

  1. setCostTerm(self: pymoveit_mtc.core.Task, arg0: pymoveit_mtc.core.CostTerm) -> None

Specify a CostTerm for calculation of stage costs

  1. setCostTerm(self: pymoveit_mtc.core.Task, arg0: Callable[[pymoveit_mtc.core.SubTrajectory, str], float]) -> None

Specify a function to calculate trajectory costs

  1. setCostTerm(self: pymoveit_mtc.core.Task, arg0: Callable[[pymoveit_mtc.core.SubTrajectory], float]) -> None

Specify a function to calculate trajectory costs

property solutions

Successful Solutions of the stage (read-only)