This page gives two short paths:
- install
lifecore_ros2from PyPI when using the library in an application - clone this repository when running the bundled examples or contributing
The repository path uses the smallest composed lifecycle example already in the
repository: examples/minimal_node.py.
- ROS 2 Jazzy must already be installed on the system.
uvmust already be available in your shell.rclpycomes from the system ROS installation, not from PyPI.
Use this path when adding lifecore_ros2 to an application project:
source /opt/ros/jazzy/setup.bash
uv add lifecore-ros2git clone https://github.com/apajon/lifecore_ros2.git
cd lifecore_ros2Sync the local project environment with the repository's development tools:
uv sync --extra devThis repository does not currently ship a colcon package or generate a local
install/setup.bash overlay. The build command supported by the project today is the
package build below:
uv run python -m buildBecause this repository does not generate a local overlay setup script today, source the
system ROS 2 environment so rclpy and the ROS CLI are available:
source /opt/ros/jazzy/setup.bashStart the node in one terminal:
uv run python examples/minimal_node.pyIn a second terminal, from the same repository, source ROS 2 Jazzy again and drive the lifecycle transitions:
source /opt/ros/jazzy/setup.bash
ros2 lifecycle set /minimal_lifecore_node configure
ros2 lifecycle set /minimal_lifecore_node activateYou can then stop the node cleanly with:
ros2 lifecycle set /minimal_lifecore_node deactivate
ros2 lifecycle set /minimal_lifecore_node cleanup
ros2 lifecycle set /minimal_lifecore_node shutdownAt a high level, you should observe the following:
- the node starts and waits for lifecycle commands
configuretriggers the component's_on_configurehook and logs[logger_component] on_configure calledactivatesucceeds without extra component output because the base activation hook is silent by design- there are no publishers or subscribers in this example; it exists to show the smallest explicit composition pattern
After this minimal composed example works, continue with :doc:`Examples <examples>` to run the subscriber, publisher, telemetry, and composed pipeline walkthroughs.
If you want the next applied step instead of another minimal example, open the
sensor watchdog comparison in lifecore_ros2_examples
for a side-by-side run of plain ROS 2, classic lifecycle, and lifecore_ros2.