Installation
The SDK ships two packages. Install both, just one, or neither — depending on your test stack.Python: pip install roboticks
mcap and mcap-ros2-support):
| Extra | What it adds | When |
|---|---|---|
mcap | mcap, mcap-ros2-support | You use mcap_capture |
dev | pytest, pytest-cov, ruff, mypy | Contributing to the SDK |
In a colcon workspace
Add to your test package’spackage.xml:
pip into the colcon environment:
In a virtualenv
pytest11 entry point — no conftest.py changes required. Verify with:
C++: ament_cmake on roboticks_cpp
The C++ package is shipped via the ROS2 build farm (rosdep keys land on Humble, Iron, Rolling). For private workspaces, also vendor it as a submodule.
Via rosdep
Add topackage.xml:
Vendored
CMakeLists.txt
roboticks_cpp::roboticks_cpp, roboticks_cpp::gtest_main).
ROS2 distro matrix
| ROS2 distro | Python | roboticks | roboticks_cpp |
|---|---|---|---|
| Humble (Ubuntu 22.04) | 3.10 | supported | supported |
| Iron (Ubuntu 22.04) | 3.10 | supported | supported |
| Jazzy (Ubuntu 24.04) | 3.12 | supported | supported |
| Rolling | 3.10–3.12 | supported | supported |
| (none, plain host) | 3.10–3.13 | supported (decorators only) | n/a |
Python version matrix
The Python package supports CPython 3.10 through 3.13. PyPy is not supported (rclpy bindings are CPython-only).| Python | Supported | Notes |
|---|---|---|
| 3.9 | no | Below the ROS2 floor |
| 3.10 | yes | Humble / Iron default |
| 3.11 | yes | |
| 3.12 | yes | Jazzy default |
| 3.13 | yes | Decorator-only path |
ROS-version-agnostic
The Python package’spyproject.toml does not declare rclpy as a dependency. Imports of rclpy live behind try-blocks; assertion helpers raise a clear RuntimeError at call time on hosts without rclpy:
- Linters and type-checkers run anywhere.
- Unit tests that don’t touch rclpy can run on a Mac, in CI without a ROS2 base image, etc.
- The pytest plugin still emits properties; only the rclpy-touching code paths require ROS2.
Verify
Troubleshooting
The pytest plugin doesn't seem to be loaded
The pytest plugin doesn't seem to be loaded
Run
pytest --trace-config and look for roboticks in the active plugins list. If absent: pip install --force-reinstall roboticks then re-run.`ImportError: rclpy` when importing roboticks.assertions
`ImportError: rclpy` when importing roboticks.assertions
The assertions module imports rclpy lazily at the top level. If you’re on a non-ROS host and just want decorators, import from
roboticks directly: from roboticks import confirms (no rclpy required).colcon doesn't find roboticks_cpp
colcon doesn't find roboticks_cpp
Source the right setup file:
source install/setup.bash (not setup.sh). Confirm with ros2 pkg list | grep roboticks_cpp.MCAP capture errors on import
MCAP capture errors on import
The MCAP support is an extra.
pip install 'roboticks[mcap]' adds mcap and mcap-ros2-support.Next
Decorators
First thing to import:
@confirms.Modules
The full module map.
Quickstart
From zero to first traced PR in ten minutes.
C++ reference
roboticks_cpp API in full.