Skip to main content

Installation

The SDK ships two packages. Install both, just one, or neither — depending on your test stack.

Python: pip install roboticks

For MCAP recording (optional, pulls in mcap and mcap-ros2-support):
All extras: The base install has no ROS2 dependency — see ROS-version-agnostic below.

In a colcon workspace

Add to your test package’s package.xml:
…or, more pragmatically for a private workspace, install via pip into the colcon environment:

In a virtualenv

The pytest plugin loads via the 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 to package.xml:
Then:

Vendored

CMakeLists.txt

See C++ reference for the available targets (roboticks_cpp::roboticks_cpp, roboticks_cpp::gtest_main).

ROS2 distro matrix

Foxy and earlier are end-of-life and not supported.

Python version matrix

The Python package supports CPython 3.10 through 3.13. PyPy is not supported (rclpy bindings are CPython-only).

ROS-version-agnostic

The Python package’s pyproject.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:
This means:
  • 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

For the C++ package:

Troubleshooting

Run pytest --trace-config and look for roboticks in the active plugins list. If absent: pip install --force-reinstall roboticks then re-run.
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).
Source the right setup file: source install/setup.bash (not setup.sh). Confirm with ros2 pkg list | grep roboticks_cpp.
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.