> ## Documentation Index
> Fetch the complete documentation index at: https://docs.roboticks.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Modules

> Module-by-module map of the roboticks Python package - decorators, assertions, fault_injection, mcap_capture, launch_testing_helpers, pytest_plugin, reporters.

# Modules

A navigable index of every submodule shipped in the [`roboticks`](https://pypi.org/project/roboticks/) Python package. Each section links to the dedicated reference page.

```text theme={null}
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`.

| Symbol                         | Type              | Reference                                                  |
| ------------------------------ | ----------------- | ---------------------------------------------------------- |
| `confirms(*req_ids)`           | decorator factory | [Decorators](/sdk/decorators#confirmsreq_ids)              |
| `tags(*tags)`                  | decorator factory | [Decorators](/sdk/decorators#tagstags)                     |
| `deadline(*, milliseconds)`    | decorator factory | [Decorators](/sdk/decorators#deadlinemillisecondsint)      |
| `requires_sim(engine, *, gpu)` | decorator factory | [Decorators](/sdk/decorators#requires_simengine--gpufalse) |

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`.

| Symbol                    | Reference                                             |
| ------------------------- | ----------------------------------------------------- |
| `assert_topic_published`  | [Assertions](/sdk/assertions#assert_topic_published)  |
| `assert_service_response` | [Assertions](/sdk/assertions#assert_service_response) |
| `assert_action_result`    | [Assertions](/sdk/assertions#assert_action_result)    |
| `assert_param_equals`     | [Assertions](/sdk/assertions#assert_param_equals)     |
| `assert_tf_transform`     | [Assertions](/sdk/assertions#assert_tf_transform)     |

## `roboticks.fault_injection`

Source: `fault_injection/__init__.py`.

Context managers that manipulate the rclpy DDS layer for the duration of a `with` block.

| Symbol                                      | Reference                                              |
| ------------------------------------------- | ------------------------------------------------------ |
| `drop_messages(topic, *, rate, seed=None)`  | [Fault injection](/sdk/fault-injection#drop_messages)  |
| `delay_messages(topic, *, ms, jitter_ms=0)` | [Fault injection](/sdk/fault-injection#delay_messages) |
| `kill_node(name, *, signal, wait_for_exit)` | [Fault injection](/sdk/fault-injection#kill_node)      |
| `corrupt_topic(topic, *, mutator)`          | [Fault injection](/sdk/fault-injection#corrupt_topic)  |

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]'`).

| Symbol                                                       | Reference                                                  |
| ------------------------------------------------------------ | ---------------------------------------------------------- |
| `mcap_capture(*, topics, path, upload_on, compression, ...)` | [MCAP capture](/sdk/mcap-capture)                          |
| `McapHandle`                                                 | [MCAP capture](/sdk/mcap-capture#returns-as-context-value) |

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.

| Symbol                                                  | Description                                                   |
| ------------------------------------------------------- | ------------------------------------------------------------- |
| `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](/testing/launch-testing) for tutorial.

## `roboticks.pytest_plugin`

Source: `pytest_plugin/__init__.py`.

Pytest11 entry-point plugin. Loaded automatically by pytest. Not normally imported directly.

| Hook                            | Behaviour                                              |
| ------------------------------- | ------------------------------------------------------ |
| `pytest_sessionstart`           | Stamps `roboticks_schema_version` and SDK metadata.    |
| `pytest_collection_modifyitems` | Scans for decorator attributes.                        |
| `pytest_runtest_setup`          | Records fault-injection / mcap state at test start.    |
| `pytest_runtest_makereport`     | Writes `roboticks.*` properties via `user_properties`. |
| `pytest_addoption`              | Registers `--no-roboticks-junit-extras`.               |

See [Pytest plugin](/sdk/pytest-plugin).

## `roboticks.reporters`

Source: `reporters/__init__.py`.

Standalone JUnit writers and stitchers, useful when not running under pytest.

| Symbol             | CLI                          | Description                                                                        |
| ------------------ | ---------------------------- | ---------------------------------------------------------------------------------- |
| `JUnitWriter`      | —                            | Programmatic writer of JUnit-with-confirms.                                        |
| `stitch_cpp_junit` | `roboticks-stitch-cpp-junit` | Merges a C++ `confirms.json` into a gtest JUnit XML.                               |
| `stitch_junit`     | `roboticks-stitch-junit`     | Back-fills a pytest JUnit XML by re-importing test modules and reading decorators. |
| `validate_junit`   | `roboticks-validate-junit`   | Validates JUnit XML against the XSD.                                               |

Used by the [C++ workflow](/sdk/cpp-reference#stitching-into-junit) and the `colcon test --event-handlers roboticks+` integration.

## `roboticks.wire`

Source: `wire/__init__.py`.

Schema version and on-disk schema-file accessors.

| Symbol                 | Description                                  |
| ---------------------- | -------------------------------------------- |
| `SCHEMA_VERSION`       | The integer the running SDK emits.           |
| `JUNIT_XSD_PATH`       | Path to the bundled XSD.                     |
| `RESULT_SCHEMA_PATH`   | Path 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](/sdk/wire-contract).

## Importing patterns

The top-level package re-exports the things you'll use most:

```python theme={null}
from roboticks import (
    confirms, tags, deadline, requires_sim,   # decorators
    mcap_capture,                              # context manager
    __version__,                               # SDK version
)
```

Submodule imports are for the rest:

```python theme={null}
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

```mermaid theme={null}
%%{init: {"theme": "neutral", "themeVariables": {"primaryColor": "#4040ff"}} }%%
flowchart TD
    Pub["__init__.py (public)"] --> Dec[decorators]
    Pub --> Mcap[mcap_capture]
    Plug[pytest_plugin] --> Dec
    Plug --> Wire
    Assert[assertions] --> Wire
    FI[fault_injection] --> Wire
    LT[launch_testing] --> Wire
    Mcap --> Wire
    Rep[reporters] --> Wire
```

`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

<CardGroup cols={2}>
  <Card title="Installation" icon="download" href="/sdk/installation">
    `pip install roboticks` and `[mcap]` extra.
  </Card>

  <Card title="Decorators" icon="at" href="/sdk/decorators">
    The most-touched module.
  </Card>

  <Card title="C++ reference" icon="code" href="/sdk/cpp-reference">
    The C++ counterpart.
  </Card>

  <Card title="Examples" icon="book" href="/sdk/examples">
    End-to-end gallery.
  </Card>
</CardGroup>
