Skip to main content

Modules

A navigable index of every submodule shipped in the roboticks Python package. Each section links to the dedicated reference page.
roboticks/
├── __init__.py             # public re-exports
├── decorators/             # @confirms, @tags, @deadline, @requires_sim
├── assertions/             # rclpy-aware assertion helpers
├── fault_injection/        # drop / delay / kill / corrupt context managers
├── mcap_capture/           # per-test MCAP recorder
├── launch_testing/         # launch_testing thin wrappers
├── pytest_plugin/          # pytest11 entry point
├── reporters/              # JUnit-with-confirms writer + stitchers
└── wire/                   # SCHEMA_VERSION, schema loaders

roboticks.decorators

Source: decorators/__init__.py. Re-exported at the package root: from roboticks import confirms, tags, deadline, requires_sim.
SymbolTypeReference
confirms(*req_ids)decorator factoryDecorators
tags(*tags)decorator factoryDecorators
deadline(*, milliseconds)decorator factoryDecorators
requires_sim(engine, *, gpu)decorator factoryDecorators
No rclpy dependency; importable on any host.

roboticks.assertions

Source: assertions/__init__.py. rclpy-aware wait-and-assert helpers. Importing this module on a host without rclpy raises a clear RuntimeError.
SymbolReference
assert_topic_publishedAssertions
assert_service_responseAssertions
assert_action_resultAssertions
assert_param_equalsAssertions
assert_tf_transformAssertions

roboticks.fault_injection

Source: fault_injection/__init__.py. Context managers that manipulate the rclpy DDS layer for the duration of a with block.
SymbolReference
drop_messages(topic, *, rate, seed=None)Fault injection
delay_messages(topic, *, ms, jitter_ms=0)Fault injection
kill_node(name, *, signal, wait_for_exit)Fault injection
corrupt_topic(topic, *, mutator)Fault injection
Requires rclpy at call time; importable without it.

roboticks.mcap_capture

Source: mcap_capture/__init__.py. Per-test MCAP recording. Requires the mcap extra (pip install 'roboticks[mcap]').
SymbolReference
mcap_capture(*, topics, path, upload_on, compression, ...)MCAP capture
McapHandleMCAP capture
Re-exported at the package root: from roboticks import mcap_capture.

roboticks.launch_testing

Source: launch_testing/__init__.py. Thin wrappers around the standard ROS2 launch_testing module.
SymbolDescription
make_node_action(package, executable, **kwargs)Builds a launch_ros.actions.Node with sensible defaults.
generate_test_description(*actions, ready_event=None)Wraps a list of actions in the dance launch_testing expects.
spin_node(node, *, within)Spins a single rclpy node for a bounded duration.
See Launch testing for tutorial.

roboticks.pytest_plugin

Source: pytest_plugin/__init__.py. Pytest11 entry-point plugin. Loaded automatically by pytest. Not normally imported directly.
HookBehaviour
pytest_sessionstartStamps roboticks_schema_version and SDK metadata.
pytest_collection_modifyitemsScans for decorator attributes.
pytest_runtest_setupRecords fault-injection / mcap state at test start.
pytest_runtest_makereportWrites roboticks.* properties via user_properties.
pytest_addoptionRegisters --no-roboticks-junit-extras.
See Pytest plugin.

roboticks.reporters

Source: reporters/__init__.py. Standalone JUnit writers and stitchers, useful when not running under pytest.
SymbolCLIDescription
JUnitWriterProgrammatic writer of JUnit-with-confirms.
stitch_cpp_junitroboticks-stitch-cpp-junitMerges a C++ confirms.json into a gtest JUnit XML.
stitch_junitroboticks-stitch-junitBack-fills a pytest JUnit XML by re-importing test modules and reading decorators.
validate_junitroboticks-validate-junitValidates JUnit XML against the XSD.
Used by the C++ workflow and the colcon test --event-handlers roboticks+ integration.

roboticks.wire

Source: wire/__init__.py. Schema version and on-disk schema-file accessors.
SymbolDescription
SCHEMA_VERSIONThe integer the running SDK emits.
JUNIT_XSD_PATHPath to the bundled XSD.
RESULT_SCHEMA_PATHPath to the bundled JSON Schema.
load_junit_xsd()Returns the XSD as a lxml.etree.XMLSchema.
load_result_schema()Returns the JSON Schema as a dict.
See Wire contract.

Importing patterns

The top-level package re-exports the things you’ll use most:
from roboticks import (
    confirms, tags, deadline, requires_sim,   # decorators
    mcap_capture,                              # context manager
    __version__,                               # SDK version
)
Submodule imports are for the rest:
from roboticks.assertions import assert_topic_published
from roboticks.fault_injection import drop_messages
from roboticks.launch_testing import make_node_action

Module dependency map

wire is the leaf — every other module reads SCHEMA_VERSION from it. Decorators are leaf-free (no rclpy, no MCAP). Everything else has a runtime dependency on rclpy or the mcap extra.

Next

Installation

pip install roboticks and [mcap] extra.

Decorators

The most-touched module.

C++ reference

The C++ counterpart.

Examples

End-to-end gallery.