Skip to content

Latest commit

 

History

History
115 lines (74 loc) · 3.27 KB

File metadata and controls

115 lines (74 loc) · 3.27 KB

Quickstart

Audience

This page gives two short paths:

  • install lifecore_ros2 from 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.

Before You Start

  • ROS 2 Jazzy must already be installed on the system.
  • uv must already be available in your shell.
  • rclpy comes from the system ROS installation, not from PyPI.

Install from PyPI

Use this path when adding lifecore_ros2 to an application project:

source /opt/ros/jazzy/setup.bash
uv add lifecore-ros2

1. Clone the Repository

git clone https://github.com/apajon/lifecore_ros2.git
cd lifecore_ros2

2. Install Development Dependencies

Sync the local project environment with the repository's development tools:

uv sync --extra dev

3. Build the ROS 2 Workspace

This 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 build

4. Source the Workspace

Because 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.bash

5. Run the Minimal Composed Lifecycle Example

Start the node in one terminal:

uv run python examples/minimal_node.py

In 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 activate

You 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 shutdown

Expected Behavior

At a high level, you should observe the following:

  • the node starts and waits for lifecycle commands
  • configure triggers the component's _on_configure hook and logs [logger_component] on_configure called
  • activate succeeds 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

Next Step

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.