Skip to content

tesseract_robotics.task_composer

Task composition and planning pipelines.

Overview

TaskComposer orchestrates complex planning tasks by chaining planners, post-processors, and validators into pipelines.

Python
from tesseract_robotics.task_composer import (
    TaskComposerPluginFactory, TaskflowTaskComposerExecutor,
    TaskComposerDataStorage, TaskComposerContext, TaskComposerServer,
)

Quick Start

Python
import tesseract_robotics
from tesseract_robotics.common import GeneralResourceLocator
from tesseract_robotics.task_composer import (
    AnyPoly_as_CompositeInstruction, AnyPoly_wrap_CompositeInstruction,
    AnyPoly_wrap_EnvironmentConst, AnyPoly_wrap_ProfileDictionary,
    TaskComposerDataStorage, TaskComposerPluginFactory,
)

# Create factory and executor
config = tesseract_robotics.get_task_composer_config_path()  # a pathlib.Path
factory = TaskComposerPluginFactory(config, GeneralResourceLocator())
executor = factory.createTaskComposerExecutor("TaskflowExecutor")

# Get pipeline task
task = factory.createTaskComposerNode("TrajOptPipeline")

# Setup data storage
data = TaskComposerDataStorage()
data.setData("planning_input", AnyPoly_wrap_CompositeInstruction(program))
data.setData("environment", AnyPoly_wrap_EnvironmentConst(env))
data.setData("profiles", AnyPoly_wrap_ProfileDictionary(profiles))

# Execute
future = executor.run(task, data)
future.wait()

# Get result
context = future.context
output_key = task.getOutputPortMappings().single("program")
result = AnyPoly_as_CompositeInstruction(context.data_storage.getData(output_key))

Components

TaskComposerPluginFactory

Loads pipeline definitions from YAML config. As on the kinematics and contact-manager plugin factories, an os.PathLike (pathlib.Path) is a config file and a str is YAML text:

Python
from pathlib import Path

from tesseract_robotics.task_composer import TaskComposerPluginFactory

factory = TaskComposerPluginFactory(Path(config_path), locator)       # a file
factory = TaskComposerPluginFactory(Path(config_path).read_text(), locator)  # YAML text

# Or build it up
factory = TaskComposerPluginFactory()
factory.loadConfig(Path(config_path), locator)

# Get available pipelines
# Common pipelines: TrajOptPipeline, OMPLPipeline, FreespacePipeline
task = factory.createTaskComposerNode("TrajOptPipeline")

# Inspect and edit the loaded config (after `!include` expansion)
factory.getTaskComposerNodePlugins()               # {node name: PluginInfo}, a copy
factory.getTaskComposerExecutorPlugins()           # {executor name: PluginInfo}, a copy
factory.getAvailableTaskComposerNodePlugins()      # node factory class names; loads the plugin libraries
factory.getAvailableTaskComposerExecutorPlugins()  # executor factory class names; the same
factory.addTaskComposerNodePlugin("MyTrajOpt", plugin_info)
factory.createTaskComposerNode("Unconfigured", plugin_info)  # from an explicit PluginInfo
factory.getConfig()                                # the config as a YAML document string
factory.saveConfig(Path("task_composer_plugins.yaml"))

A path passed as str is parsed as YAML text and raises TaskComposerConfigError (a ValueError) naming the text; so does YAML text without a top-level task_composer_plugins mapping (empty, ~, a list, an unrelated mapping), which upstream loads as an empty config.

createTaskComposerNode and createTaskComposerExecutor raise TaskComposerPluginError (a RuntimeError) when the name is not configured, listing the configured names, or when its plugin fails to load or build; they never return None. Upstream only logs a tesseract warning and returns null, so the warning on stderr carries the build failure's cause. remove*Plugin and setDefault*Plugin raise KeyError for an unknown name.

TaskflowTaskComposerExecutor

Executes tasks with parallel support.

Python
from tesseract_robotics.task_composer import TaskflowTaskComposerExecutor

executor = TaskflowTaskComposerExecutor("MyExecutor", 4)  # name, threads

future = executor.run(task, data_storage)
future.wait()

# Check success
if future.context.isSuccessful():
    print("Planning succeeded")

TaskComposerDataStorage

Key-value storage for pipeline data.

Python
from tesseract_robotics.task_composer import TaskComposerDataStorage

data = TaskComposerDataStorage()  # or TaskComposerDataStorage("name")

# Set inputs
data.setData("planning_input", AnyPoly_wrap_CompositeInstruction(program))
data.setData("environment", AnyPoly_wrap_EnvironmentConst(env))
data.setData("profiles", AnyPoly_wrap_ProfileDictionary(profiles))

# Get outputs
result = data.getData("program")
everything = data.getData()        # {key: AnyPoly}
data.remapData({"program": "seed"})  # rename keys; copy=True keeps both

TaskComposerContext

Execution context with results and status. executor.run(task, data) builds one from the data storage (named "run", or name=); build one yourself to choose its name, share a node-info container, or abort it:

Python
from tesseract_robotics.task_composer import TaskComposerContext

context = TaskComposerContext("my_run", data)
future = executor.run(task, context)
future.wait()
assert future.context is context

# Check status
if context.isSuccessful():
    output = context.data_storage.getData(output_key)
else:
    print("Failed")

# Access task info
info = context.task_infos

task.run(context, executor) runs a node synchronously in the calling thread; graphs and pipelines still need an executor for their children.

TaskComposerFuture

Async execution handle.

Python
future = executor.run(task, data)

# Wait for completion
future.wait()

# Or wait with timeout (seconds)
status = future.waitFor(5.0)  # FutureStatus.ready / .timeout

# Get context
context = future.context

The run uses the node, the data and the executor after run returns. The bindings hold them until the run ends, independent of the future: dropping the future, the node or the executor mid-run is safe and never blocks. A finished run's node and executor are released when a future is seen done (wait(), waitFor() returning FutureStatus.ready, ready() returning True) or at the next run. A server run also holds the executor it runs on, so TaskComposerServer.addExecutor may replace it mid-run. At interpreter exit, runs still in flight, including runs started while waiting (also by a Python log record handler on a worker), are waited for (an atexit hook).

Node infos

Every node that ran records a TaskComposerNodeInfo in context.task_infos, keyed by node uuid (a canonical uuid str):

Python
infos = future.context.task_infos
root = infos.getInfo(infos.getRootNode())   # the node passed to run()
print(root.name, root.status_message, root.start_time, root.elapsed_time)

for uuid, info in infos.getInfoMap().items():
    print(uuid, info.name, info.return_value)

trajopt = infos.find(lambda i: i.name == "TrajOptMotionPlannerTask")
aborting = infos.getInfo(infos.getAbortingNode())  # None if nothing aborted

# prune edits every stored info: the callback gets a copy, which is stored when prune returns
infos.prune(lambda i: setattr(i, "data_storage", TaskComposerDataStorage()))

find and prune call back on a snapshot taken before the first call, outside the container's lock, so a callback may call into the container. prune stores the copies its callback changed, each only if the stored info is still the one the callback was given; when one was changed or removed meanwhile, the other edits are stored and TaskComposerPruneConflictError (a RuntimeError) names the conflicting uuids. An info kept from a prune callback is an independent copy: edits made to it after prune returns are not stored.

Graphs and pipelines

Pipelines from the factory are TaskComposerPipeline objects (a TaskComposerGraph): their children, terminals and override keys are readable, and a graph can be built in Python from factory nodes:

Python
from tesseract_robotics.task_composer import TaskComposerGraph

pipeline = factory.createTaskComposerNode("TrajOptPipeline")
pipeline.getNodes()     # {uuid: TaskComposerNode}
pipeline.getTerminals()

graph = TaskComposerGraph("two_pass")
first = graph.addNode(factory.createTaskComposerNode("TrajOptPipeline"))
second = graph.addNode(factory.createTaskComposerNode("TrajOptPipeline"))
graph.addEdges(first, [second])
graph.setTerminals([second])
# A graph has no port contract of its own: its boundary mappings declare the ports
nodes = graph.getNodes()
graph.setPortMappings(nodes[first].getInputPortMappings(), nodes[second].getOutputPortMappings())
assert graph.isValid()[0]
future = executor.run(graph, data)

TaskComposerServer

Upstream's top-level entry point: one config, executors and tasks by name.

Python
from tesseract_robotics.task_composer import TaskComposerServer

server = TaskComposerServer()
server.loadConfig(config, GeneralResourceLocator())  # Path; a str is YAML text
future = server.run("TrajOptPipeline", data, False, "TaskflowExecutor")
future.wait()

The server's tasks cannot be held: upstream exposes them only as const&. So a server task is never replaced while a run or Python can reach it. loadConfig (which re-creates every task) and addTask with an existing task's name raise TaskComposerServerBusyError (a RuntimeError) naming the task and the reason:

  • the task is running: a run by name, server.run(task, ...) or executor.run(task, ...) with a getTask() result is unfinished. wait() for its future first;
  • the task is referenced from Python: a getTask() result is alive. del it first. A result caught in a reference cycle stays alive, and blocks replacement, until gc.collect(). A task you added with addTask is owned by its Python object and never blocks.
Python
task = server.getTask("TrajOptPipeline")
future = executor.run(task, data)
future.wait()
del task
server.loadConfig(config, GeneralResourceLocator())  # now allowed

While a server is inside loadConfig, addTask or addExecutor, other threads wait for it, including a Python log record handler on an executor worker. Only calls from inside it raise the same error: calls from a Python ResourceLocator that runs during the reload. A call made from inside another server's reload raises too while this server reloads: two reloads whose locators reach each other's server would wait for each other. Adding a task under a new name, and running a node you built yourself, are unaffected.

A reload never waits for the log handlers, so a handler waiting for it always gets its turn. A handler runs on the thread that logs: one called by the reloading thread itself (a record logged inside loadConfig) is a call from inside the reload and raises.

TaskComposerLog

Upstream's record of a run for replay: the input data, the finished context and the dot graph. serialization saves and loads it:

Python
from tesseract_robotics.serialization import (
    task_composer_log_from_file, task_composer_log_to_file,
)
from tesseract_robotics.task_composer import TaskComposerLog

task = factory.createTaskComposerNode("TrajOptPipeline")
log = TaskComposerLog("failing plan")
log.initial_data = data            # a copy, taken before the run
future = executor.run(task, data)
future.wait()
log.context = future.context
log.dotgraph = task.getDotgraph(future.context.task_infos.getInfoMap())
task_composer_log_to_file(log, "failing_plan.tclx")
replay = task_composer_log_from_file("failing_plan.tclx")

The archive holds planner profiles (TrajOptDefaultMoveProfile, …) as well as the program and environment; serialization registers them on every platform. A data storage holding an environment is large: tens of MB as XML for a robot with meshes, so prefer the binary form. A loaded log is not == to the original: AnyPoly compares shared_ptr payloads (environment, profiles, nested data storages) by pointer. Nor is its XML byte-identical when saved again: the storage's unordered_map iterates differently after a reload, and cereal numbers types and pointers in the order it meets them. The content is the same.

DOT Graph Export

Every TaskComposerNode (pipelines included) exports its task graph as Graphviz DOT, mirroring the C++ dump():

Python
task = factory.createTaskComposerNode("FreespacePipeline")

# Structure only
dot = task.getDotgraph()             # DOT source as a string
task.saveDotgraph("pipeline.dot")    # write to file (str or Path); OSError if it cannot

# Annotated with execution results — pass the run's info map:
# successful nodes render green with execution time, failed/aborted nodes red
future = executor.run(task, data)
future.wait()
results = future.context.task_infos.getInfoMap()
dot = task.getDotgraph(results)
task.saveDotgraph("debug.dot", results)

Render with graphviz: dot -Tsvg pipeline.dot -o pipeline.svg.

See Visualizing Pipelines for rendered graphs of the stock pipelines.

Available Pipelines

High-Level API (TaskComposer)

The TaskComposer class provides user-friendly pipeline names:

Pipeline Description
FreespacePipeline OMPL + TrajOpt smoothing + time param
CartesianPipeline Cartesian path with TrajOpt
OMPLPipeline OMPL sampling-based planning only
TrajOptPipeline TrajOpt optimization only
DescartesDPipeline Descartes graph search, double precision (DescartesFPipeline in float; the *NPC variants skip the post-plan contact check)

Raw Config Pipelines

All pipelines available via createTaskComposerNode():

Pipeline Description
FreespacePipeline OMPL + TrajOpt + time param
FreespaceIfoptPipeline OMPL + TrajOptIfopt (OSQP)
CartesianPipeline Cartesian path planning
OMPLPipeline OMPL only
TrajOptPipeline TrajOpt only
TrajOptIfoptPipeline TrajOptIfopt (OSQP solver)
DescartesFPipeline Descartes forward search
DescartesDPipeline Descartes backward search
RasterFtPipeline Raster with freespace transitions
RasterCtPipeline Raster with cartesian transitions
RasterFtOnlyPipeline Raster freespace only
RasterCtOnlyPipeline Raster cartesian only

See task_composer_plugins.yaml for the full list including global variants.

Pipeline Input/Output Keys

Different pipelines use different data keys:

Python
# Get keys from task
input_ports = task.getInputPortMappings()   # TaskComposerPortMap: port -> storage key(s)
output_ports = task.getOutputPortMappings()

# Common patterns:
# TrajOptPipeline: input="planning_input", output="program"
# OMPLPipeline: input="program", output="program"

# Check available ports; write to the storage key the port maps to
if input_ports.contains("planning_input"):
    data.setData(input_ports.single("planning_input"), any_poly)
elif input_ports.contains("program"):
    data.setData(input_ports.single("program"), any_poly)

AnyPoly Wrapping

TaskComposer uses type-erased AnyPoly for data storage:

Python
from tesseract_robotics.task_composer import (
    AnyPoly_wrap_CompositeInstruction,
    AnyPoly_wrap_EnvironmentConst,
    AnyPoly_wrap_ProfileDictionary,
    AnyPoly_as_CompositeInstruction,
)

# Wrap for storage
wrapped_program = AnyPoly_wrap_CompositeInstruction(program)
wrapped_env = AnyPoly_wrap_EnvironmentConst(env)
wrapped_profiles = AnyPoly_wrap_ProfileDictionary(profiles)

# Unwrap from storage
program = AnyPoly_as_CompositeInstruction(any_poly)

Complete Example

Python
import tesseract_robotics
from tesseract_robotics.common import GeneralResourceLocator
from tesseract_robotics.task_composer import (
    AnyPoly_as_CompositeInstruction, AnyPoly_wrap_CompositeInstruction,
    AnyPoly_wrap_EnvironmentConst, AnyPoly_wrap_ProfileDictionary,
    TaskComposerDataStorage, TaskComposerPluginFactory,
)

# Setup
factory = TaskComposerPluginFactory(
    tesseract_robotics.get_task_composer_config_path(), GeneralResourceLocator()
)
executor = factory.createTaskComposerExecutor("TaskflowExecutor")
task = factory.createTaskComposerNode("FreespacePipeline")

# Prepare data
data = TaskComposerDataStorage()
data.setData("planning_input", AnyPoly_wrap_CompositeInstruction(program))
data.setData("environment", AnyPoly_wrap_EnvironmentConst(env))
data.setData("profiles", AnyPoly_wrap_ProfileDictionary(profiles))

# Execute pipeline
future = executor.run(task, data)
future.wait()

# Extract result
context = future.context
if context.isSuccessful():
    output_key = task.getOutputPortMappings().single("program")
    result = AnyPoly_as_CompositeInstruction(
        context.data_storage.getData(output_key)
    )
    print(f"Planned trajectory with {len(result)} instructions")
else:
    print("Planning failed")
    for info in context.task_infos.getInfoMap().values():
        if info.status_message:
            print(f"  {info.name}: {info.status_message}")

High-Level Alternative

For most users the tesseract_robotics.planning module is simpler:

Python
from tesseract_robotics.planning import Robot, TaskComposer, plan_freespace

locator = GeneralResourceLocator(paths=[get_tesseract_resource_path()])  # the tesseract-robotics-nanobind-support wheel
robot = Robot.from_tesseract_support("abb_irb2400", locator)

# One-liner — picks pipeline defaults per entry point
result = plan_freespace(robot, program)

# Or reuse a composer to amortize plugin loading across calls
composer = TaskComposer.from_config(warmup=True)
result = composer.plan(robot, program, pipeline="TrajOptPipeline")

if result.successful:
    for point in result:
        print(point.positions)

Reference

tesseract_task_composer Python bindings

TaskComposerPortMap

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

__init__

Python
__init__() -> None

erase

Python
erase(port: str) -> None

contains

Python
contains(port: str) -> bool

at

Python
at(port: str) -> str | list[str]

single

Python
single(port: str) -> str

multiple

Python
multiple(port: str) -> list[str]

renameStorageKeys

Python
renameStorageKeys(storage_key_remapping: Mapping[str, str]) -> None

data

Python
data() -> dict[str, str | list[str]]

size

Python
size() -> int

empty

Python
empty() -> bool

__str__

Python
__str__() -> str

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

TaskComposerDataStorage

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

__init__

Python
__init__(name: str = '') -> None

getName

Python
getName() -> str

setName

Python
setName(name: str) -> None

hasKey

Python
hasKey(key: str) -> bool

setData

Python
setData(key: str, data: AnyPoly) -> None

removeData

Python
removeData(key: str) -> None

remapData

Python
remapData(remapping: Mapping[str, str], copy: bool = False) -> bool

Rename (or with copy=True, duplicate) entries old key -> new key. Returns False, with a tesseract error, at the first missing key.

copyAsInputData

Python
copyAsInputData(data_storage: TaskComposerDataStorage, keys: TaskComposerPortMap, override_keys: TaskComposerPortMap) -> None

For each port in keys: self[key] = data_storage[override key, else key].

copyAsOutputData

Python
copyAsOutputData(data_storage: TaskComposerDataStorage, keys: TaskComposerPortMap, override_keys: TaskComposerPortMap) -> None

For each port in keys: self[override key, else key] = data_storage[key].

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

TaskComposerNodeType

Bases: Enum

NODE class-attribute instance-attribute

Python
NODE = 0

TASK class-attribute instance-attribute

Python
TASK = 1

PIPELINE class-attribute instance-attribute

Python
PIPELINE = 2

GRAPH class-attribute instance-attribute

Python
GRAPH = 3

TaskComposerNodePorts

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

Cardinality

Bases: Enum

SINGLE class-attribute instance-attribute
Python
SINGLE = 0
MULTIPLE class-attribute instance-attribute
Python
MULTIPLE = 1

Requirement

Bases: Enum

REQUIRED class-attribute instance-attribute
Python
REQUIRED = 0
OPTIONAL class-attribute instance-attribute
Python
OPTIONAL = 1

Direction

Bases: Enum

INPUT class-attribute instance-attribute
Python
INPUT = 0
OUTPUT class-attribute instance-attribute
Python
OUTPUT = 1

PortDefinition

cardinality property writable
Python
cardinality: Cardinality
requirement property writable
Python
requirement: Requirement
__hash__ class-attribute instance-attribute
Python
__hash__: None = None
__eq__
Python
__eq__(other: object) -> bool
__ne__
Python
__ne__(other: object) -> bool

ValidationError

direction property
Python
direction: Direction
port property
Python
port: str
message property
Python
message: str
path
Python
path() -> str
toString
Python
toString() -> str

': '

__str__
Python
__str__() -> str

__init__

Python
__init__() -> None

addRequiredInput

Python
addRequiredInput(name: str, cardinality: Cardinality = TaskComposerNodePorts.Cardinality.SINGLE) -> TaskComposerNodePorts

addOptionalInput

Python
addOptionalInput(name: str, cardinality: Cardinality = TaskComposerNodePorts.Cardinality.SINGLE) -> TaskComposerNodePorts

addRequiredOutput

Python
addRequiredOutput(name: str, cardinality: Cardinality = TaskComposerNodePorts.Cardinality.SINGLE) -> TaskComposerNodePorts

addOptionalOutput

Python
addOptionalOutput(name: str, cardinality: Cardinality = TaskComposerNodePorts.Cardinality.SINGLE) -> TaskComposerNodePorts

inputs

Python
inputs() -> dict[str, TaskComposerNodePorts.PortDefinition]

Input port name -> PortDefinition.

outputs

Python
outputs() -> dict[str, TaskComposerNodePorts.PortDefinition]

Output port name -> PortDefinition.

inputSchema

Python
inputSchema() -> tesseract_robotics.common.PropertyTree

The schema of an inputs: port-mapping config.

outputSchema

Python
outputSchema() -> tesseract_robotics.common.PropertyTree

The schema of an outputs: port-mapping config.

validate

Python
validate(inputs: TaskComposerPortMap, outputs: TaskComposerPortMap) -> list[TaskComposerNodePorts.ValidationError]

Every way inputs / outputs break the contract; empty when they satisfy it.

validateOrThrow

Python
validateOrThrow(inputs: TaskComposerPortMap, outputs: TaskComposerPortMap, node_name: str = '') -> None

Raise RuntimeError listing every violation of the contract.

__str__

Python
__str__() -> str

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

TaskComposerNodeInfo

uuid property writable

Python
uuid: str

root_uuid property writable

Python
root_uuid: str

parent_uuid property writable

Python
parent_uuid: str

inbound_edges property writable

Python
inbound_edges: list[str]

outbound_edges property writable

Python
outbound_edges: list[str]

terminals property writable

Python
terminals: list[str]

name property writable

Python
name: str

ns property writable

Python
ns: str

type property writable

Python
type: TaskComposerNodeType

type_hash_code property writable

Python
type_hash_code: int

conditional property writable

Python
conditional: bool

input_port_mappings property writable

Python
input_port_mappings: TaskComposerPortMap

output_port_mappings property writable

Python
output_port_mappings: TaskComposerPortMap

triggers_abort property writable

Python
triggers_abort: bool

return_value property writable

Python
return_value: int

status_code property writable

Python
status_code: int

status_message property writable

Python
status_message: str

start_time property writable

Python
start_time: datetime

elapsed_time property writable

Python
elapsed_time: float

color property writable

Python
color: str

dotgraph property writable

Python
dotgraph: str

data_storage property writable

Python
data_storage: TaskComposerDataStorage

aborted property writable

Python
aborted: bool

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

__init__

Python
__init__(node: TaskComposerNode) -> None

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

TaskComposerServerBusyError

Bases: RuntimeError

TaskComposerServer.loadConfig / addTask would replace a task that a run or Python can reach (wait() for the runs, del the getTask() results first), or the server is inside loadConfig / addTask and getTask / run cannot reach its tasks.

TaskComposerPruneConflictError

Bases: RuntimeError

TaskComposerNodeInfoContainer.prune: an info changed or was removed while prune ran, so the edit of its stale copy was not stored.

TaskComposerNodeInfoContainer

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

__init__

Python
__init__() -> None

addInfo

Python
addInfo(info: TaskComposerNodeInfo) -> None

getInfo

Python
getInfo(key: str) -> TaskComposerNodeInfo | None

A copy of the info of node key, or None.

getInfoMap

Python
getInfoMap() -> dict[str, TaskComposerNodeInfo]

Every info, node uuid -> info (a copy).

setRootNode

Python
setRootNode(node_uuid: str) -> None

getRootNode

Python
getRootNode() -> str

setAborted

Python
setAborted(node_uuid: str) -> None

getAbortingNode

Python
getAbortingNode() -> str

The uuid of the node that aborted the run; the nil uuid if none did.

find

Python
find(search_fn: Callable[[TaskComposerNodeInfo], bool]) -> list[TaskComposerNodeInfo]

Copies of the infos for which search_fn(info) is true. search_fn sees a snapshot taken before the first call, and may call back into the container.

insertInfoMap

Python
insertInfoMap(container: TaskComposerNodeInfoContainer) -> None

mergeInfoMap

Python
mergeInfoMap(container: TaskComposerNodeInfoContainer) -> None

clear

Python
clear() -> None

prune

Python
prune(prune_fn: Callable[[TaskComposerNodeInfo], None]) -> None

Call prune_fn(info) on a copy of every stored info, then store the copies it changed. prune_fn sees a snapshot taken before the first call, and may call back into the container. A changed copy is stored only if the stored info is still the one prune_fn was given; if any was changed or removed meanwhile, the other edits are stored and TaskComposerPruneConflictError names the conflicting uuids. Edits made to info after prune returns, or before prune_fn raises, are not stored.

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

TaskComposerContext

name property writable

Python
name: str

dotgraph property writable

Python
dotgraph: bool

data_storage property writable

Python
data_storage: TaskComposerDataStorage

task_infos property

Python
task_infos: TaskComposerNodeInfoContainer

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

isAborted

Python
isAborted() -> bool

isSuccessful

Python
isSuccessful() -> bool

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

FutureStatus

Bases: Enum

ready class-attribute instance-attribute

Python
ready = 0

timeout class-attribute instance-attribute

Python
timeout = 1

deferred class-attribute instance-attribute

Python
deferred = 2

TaskComposerFuture

context property writable

Python
context: TaskComposerContext

clear

Python
clear() -> None

valid

Python
valid() -> bool

ready

Python
ready() -> bool

wait

Python
wait() -> None

waitFor

Python
waitFor(duration: timedelta | float) -> FutureStatus

copy

Python
copy() -> TaskComposerFuture

__copy__

Python
__copy__() -> TaskComposerFuture

TaskComposerExecutor

getName

Python
getName() -> str

getWorkerCount

Python
getWorkerCount() -> int

getTaskCount

Python
getTaskCount() -> int

TaskComposerNode

run

Python
run(context: TaskComposerContext, executor: TaskComposerExecutor | None = None) -> int

setName

Python
setName(name: str) -> None

getName

Python
getName() -> str

setNamespace

Python
setNamespace(ns: str) -> None

getNamespace

Python
getNamespace() -> str

getType

Python
getType() -> TaskComposerNodeType

getUUID

Python
getUUID() -> str

getUUIDString

Python
getUUIDString() -> str

getParentUUID

Python
getParentUUID() -> str

getParentUUIDString

Python
getParentUUIDString() -> str

getOutboundEdges

Python
getOutboundEdges() -> list[str]

getInboundEdges

Python
getInboundEdges() -> list[str]

isConditional

Python
isConditional() -> bool

setConditional

Python
setConditional(enable: bool) -> None

getInputPortMappings

Python
getInputPortMappings() -> TaskComposerPortMap

getOutputPortMappings

Python
getOutputPortMappings() -> TaskComposerPortMap

setPortMappings

Python
setPortMappings(input_port_mappings: TaskComposerPortMap, output_port_mappings: TaskComposerPortMap) -> None

getPortContract

Python
getPortContract() -> TaskComposerNodePorts | None

getDataStorage

Python
getDataStorage(context: TaskComposerContext) -> TaskComposerDataStorage

The context's data storage for a root node, else its parent graph's.

getDotgraph

Python
getDotgraph(results_map: Mapping[str, TaskComposerNodeInfo] = {}) -> str

The DOT graph of this node, annotated with the results in results_map.

saveDotgraph

Python
saveDotgraph(filepath: str | PathLike, results_map: Mapping[str, TaskComposerNodeInfo] = {}) -> None

Write getDotgraph(results_map) to filepath. Raises OSError if it cannot be written.

TaskComposerTask

Bases: TaskComposerNode

setTriggerAbort

Python
setTriggerAbort(enable: bool) -> None

schema staticmethod

Python
schema(ports: TaskComposerNodePorts) -> tesseract_robotics.common.PropertyTree

The config schema of a task with the port contract ports.

TaskComposerGraph

Bases: TaskComposerNode

__init__

Python
__init__(name: str = 'TaskComposerGraph') -> None

getRootNode

Python
getRootNode() -> str

addNode

Python
addNode(task_node: TaskComposerNode) -> str

Add a node to the graph; returns its uuid.

addEdges

Python
addEdges(source: str, destinations: Sequence[str]) -> None

getNodes

Python
getNodes() -> dict[str, TaskComposerNode]

The child nodes, uuid -> node.

getNodeByName

Python
getNodeByName(name: str) -> TaskComposerNode

setTerminals

Python
setTerminals(terminals: Sequence[str]) -> None

getTerminals

Python
getTerminals() -> list[str]

setTerminalTriggerAbort

Python
setTerminalTriggerAbort(terminal: str) -> None

setTerminalTriggerAbortByIndex

Python
setTerminalTriggerAbortByIndex(terminal_index: int) -> None

getAbortTerminal

Python
getAbortTerminal() -> str

getAbortTerminalIndex

Python
getAbortTerminalIndex() -> int

setOverrideInputPortMappings

Python
setOverrideInputPortMappings(override_input_port_mappings: TaskComposerPortMap) -> None

setOverrideOutputPortMappings

Python
setOverrideOutputPortMappings(override_output_port_mappings: TaskComposerPortMap) -> None

getOverrideInputPortMappings

Python
getOverrideInputPortMappings() -> TaskComposerPortMap

getOverrideOutputPortMappings

Python
getOverrideOutputPortMappings() -> TaskComposerPortMap

isValid

Python
isValid() -> tuple[bool, str]

(True, message) if valid, else (False, the reason).

schema staticmethod

Python
schema() -> tesseract_robotics.common.PropertyTree

The config schema of a TaskComposerGraph.

TaskComposerPipeline

Bases: TaskComposerGraph

schema staticmethod

Python
schema() -> tesseract_robotics.common.PropertyTree

The config schema of a TaskComposerPipeline.

TaskflowTaskComposerExecutor

Bases: TaskComposerExecutor

getName

Python
getName() -> str

getWorkerCount

Python
getWorkerCount() -> int

getTaskCount

Python
getTaskCount() -> int

schema staticmethod

Python
schema() -> tesseract_robotics.common.PropertyTree

The config schema of a TaskflowTaskComposerExecutor.

TaskComposerConfigError

Bases: ValueError

A str config passed to TaskComposerPluginFactory or TaskComposerServer is not a loadable task composer config (a str is YAML text; pass a pathlib.Path to load a file).

TaskComposerPluginError

Bases: RuntimeError

createTaskComposerNode / createTaskComposerExecutor could not create the named plugin: the name is not configured, or its plugin failed to load or build.

TaskComposerPluginFactory

addSearchPath

Python
addSearchPath(path: str) -> None

getSearchPaths

Python
getSearchPaths() -> list[str]

clearSearchPaths

Python
clearSearchPaths() -> None

addSearchLibrary

Python
addSearchLibrary(library_name: str) -> None

getSearchLibraries

Python
getSearchLibraries() -> list[str]

clearSearchLibraries

Python
clearSearchLibraries() -> None

addTaskComposerExecutorPlugin

Python
addTaskComposerExecutorPlugin(name: str, plugin_info: PluginInfo) -> None

getTaskComposerExecutorPlugins

Python
getTaskComposerExecutorPlugins() -> dict[str, tesseract_robotics.common.PluginInfo]

Configured executor plugins, name -> PluginInfo (a copy).

removeTaskComposerExecutorPlugin

Python
removeTaskComposerExecutorPlugin(name: str) -> None

setDefaultTaskComposerExecutorPlugin

Python
setDefaultTaskComposerExecutorPlugin(name: str) -> None

hasTaskComposerExecutorPlugins

Python
hasTaskComposerExecutorPlugins() -> bool

getDefaultTaskComposerExecutorPlugin

Python
getDefaultTaskComposerExecutorPlugin() -> str

addTaskComposerNodePlugin

Python
addTaskComposerNodePlugin(name: str, plugin_info: PluginInfo) -> None

getTaskComposerNodePlugins

Python
getTaskComposerNodePlugins() -> dict[str, tesseract_robotics.common.PluginInfo]

Configured task composer node plugins, name -> PluginInfo (a copy). The keys are the names createTaskComposerNode accepts.

removeTaskComposerNodePlugin

Python
removeTaskComposerNodePlugin(name: str) -> None

setDefaultTaskComposerNodePlugin

Python
setDefaultTaskComposerNodePlugin(name: str) -> None

hasTaskComposerNodePlugins

Python
hasTaskComposerNodePlugins() -> bool

getDefaultTaskComposerNodePlugin

Python
getDefaultTaskComposerNodePlugin() -> str

saveConfig

Python
saveConfig(file_path: str | PathLike) -> None

getConfig

Python
getConfig() -> str

The factory configuration as a YAML document string.

getAvailableTaskComposerNodePlugins

Python
getAvailableTaskComposerNodePlugins() -> list[str]

Node factory class names exported by the plugin search libraries (valid PluginInfo.class_name values), not the configured node names; see getTaskComposerNodePlugins. Loads the plugin libraries.

getAvailableTaskComposerExecutorPlugins

Python
getAvailableTaskComposerExecutorPlugins() -> list[str]

Executor factory class names exported by the plugin search libraries (valid PluginInfo.class_name values). Loads the plugin libraries.

TaskComposerServer

__init__

Python
__init__() -> None

addExecutor

Python
addExecutor(executor: TaskComposerExecutor) -> None

getExecutor

Python
getExecutor(name: str) -> TaskComposerExecutor

hasExecutor

Python
hasExecutor(name: str) -> bool

getAvailableExecutors

Python
getAvailableExecutors() -> list[str]

addTask

Python
addTask(task: TaskComposerNode) -> None

Add task under its name, replacing a task of that name. Raises TaskComposerServerBusyError if that task is running or referenced from Python (a getTask() result).

getTask

Python
getTask(name: str) -> TaskComposerNode

The server's task name. While this reference lives, loadConfig and addTask of that name raise TaskComposerServerBusyError: del it first.

hasTask

Python
hasTask(name: str) -> bool

getAvailableTasks

Python
getAvailableTasks() -> list[str]

getWorkerCount

Python
getWorkerCount(name: str) -> int

getTaskCount

Python
getTaskCount(name: str) -> int

TaskComposerLog

description property writable

Python
description: str

initial_data property writable

Python
initial_data: TaskComposerDataStorage

context property writable

Python
context: TaskComposerContext

dotgraph property writable

Python
dotgraph: str

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

__init__

Python
__init__(desc: str = '') -> None

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

AnyPoly

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

__init__

Python
__init__() -> None

isNull

Python
isNull() -> bool

getTypeName

Python
getTypeName() -> str

Demangled C++ type name of the stored value, or null.

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

AnyPoly_wrap_CompositeInstruction

Python
AnyPoly_wrap_CompositeInstruction(instruction: CompositeInstruction) -> AnyPoly

Wrap a CompositeInstruction into an AnyPoly

AnyPoly_wrap_ProfileDictionary

Python
AnyPoly_wrap_ProfileDictionary(profiles: ProfileDictionary) -> AnyPoly

Wrap a ProfileDictionary shared_ptr into an AnyPoly

AnyPoly_wrap_EnvironmentConst

Python
AnyPoly_wrap_EnvironmentConst(environment: Environment) -> AnyPoly

Wrap a const Environment shared_ptr into an AnyPoly

AnyPoly_wrap_TaskComposerDataStorage

Python
AnyPoly_wrap_TaskComposerDataStorage(data_storage: TaskComposerDataStorage) -> AnyPoly

Wrap a TaskComposerDataStorage shared_ptr into an AnyPoly

AnyPoly_as_CompositeInstruction

Python
AnyPoly_as_CompositeInstruction(any_poly: AnyPoly) -> tesseract_robotics.command_language.CompositeInstruction

Extract a CompositeInstruction from an AnyPoly

AnyPoly_as_TaskComposerDataStorage

Python
AnyPoly_as_TaskComposerDataStorage(any_poly: AnyPoly) -> TaskComposerDataStorage

Extract a TaskComposerDataStorage from an AnyPoly

AnyPoly_as_ContactResultMapVector

Python
AnyPoly_as_ContactResultMapVector(any_poly: AnyPoly) -> list[tesseract_robotics.collision.ContactResultMap]

Extract a std::vector from an AnyPoly. DiscreteContactCheckTask saves its per-step contact results under the 'contact_results' key on its node info's data_storage in this form.