Skip to content

ROS 2 Jazzy diagnostics and remote operations toolkit with SOVD style REST API. Runtime discovery, introspection, faults, secure access.

License

Notifications You must be signed in to change notification settings

selfpatch/ros2_medkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

ros2_medkit

CI codecov Docs License ROS 2 Discord

Modern, SOVD-compatible diagnostics for ROS 2 robots β€” built around an entity tree (Area / Component / Function / App) for runtime discovery, health modeling, and troubleshooting.


✨ Features

  • πŸ” Runtime Discovery β€” Automatically discover what is actually running on your robot
  • πŸ—οΈ Entity Tree Model β€” Organize diagnostics as Area β†’ Component β†’ Function β†’ App
  • πŸ”— SOVD Compatible β€” Align with Service-Oriented Vehicle Diagnostics standards
  • 🌐 REST API Gateway β€” HTTP interface for integration with external tools and UIs
  • πŸ“Š Health Modeling β€” Track health state per entity for fleet-level observability
  • πŸ”§ Easy Integration β€” Works with existing ROS 2 Jazzy nodes out of the box

πŸ“– Overview

ros2_medkit provides modern diagnostics for ROS 2–based systems.

Instead of hardcoding knowledge about every node, topic, or ECU, ros2_medkit models a robot as a diagnostic entity tree:

Entity Description Example
Area Physical or logical domain base, arm, safety, navigation
Component Hardware or software component within an area motor_controller, lidar_driver
Function Capability provided by one or more components localization, obstacle_detection
App Deployable software unit node, container, process

The goal is to make this tree compatible with the SOVD (Service-Oriented Vehicle Diagnostics) model, so the same concepts can be used across robots, vehicles, and other embedded systems.

πŸ“‹ Requirements

  • OS: Ubuntu 24.04 LTS
  • ROS 2: Jazzy Jalisco
  • Compiler: GCC 13+ (C++17 support)
  • Build System: colcon + ament_cmake

πŸš€ Quick Start

1. Clone and Install Dependencies

mkdir -p ~/ros2_medkit_ws/src
cd ~/ros2_medkit_ws/src
git clone --recurse-submodules https://github.com/selfpatch/ros2_medkit.git
cd ~/ros2_medkit_ws
rosdep install --from-paths src --ignore-src -r -y

Note: If you cloned without --recurse-submodules, run: git submodule update --init --recursive

2. Build

colcon build --symlink-install
source install/setup.bash

3. Launch the Gateway

ros2 launch ros2_medkit_gateway gateway.launch.py

4. Explore the API

Open your browser at http://localhost:8080/api/v1/areas or use curl:

curl http://localhost:8080/api/v1/areas

For more examples, see our Postman collection.

πŸ“š Documentation

πŸ’¬ Community

We'd love to have you join our community!


πŸ› οΈ Development

This section is for contributors and developers who want to build and test ros2_medkit locally.

Installing Dependencies

rosdep install --from-paths src --ignore-src -r -y

Building

colcon build --symlink-install

Testing

Run all tests:

source install/setup.bash
colcon test
colcon test-result --verbose

Run linters:

source install/setup.bash
colcon test --ctest-args -L linters
colcon test-result --verbose

Run only unit tests (everything except integration):

source install/setup.bash
colcon test --ctest-args -E test_integration
colcon test-result --verbose

Run only integration tests:

source install/setup.bash
colcon test --ctest-args -R test_integration
colcon test-result --verbose

Code Coverage

To generate code coverage reports locally:

  1. Build with coverage flags enabled:
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON
  1. Run tests:
source install/setup.bash
colcon test --ctest-args -LE linter
  1. Generate coverage report:
lcov --capture --directory build --output-file coverage.raw.info --ignore-errors mismatch,negative
lcov --extract coverage.raw.info '*/ros2_medkit/src/*/src/*' '*/ros2_medkit/src/*/include/*' --output-file coverage.info --ignore-errors unused
lcov --list coverage.info
  1. (Optional) Generate HTML report:
genhtml coverage.info --output-directory coverage_html

Then open coverage_html/index.html in your browser.

CI/CD

All pull requests and pushes to main are automatically built and tested using GitHub Actions. The CI workflow runs on Ubuntu 24.04 with ROS 2 Jazzy and consists of two parallel jobs:

build-and-test:

  • Code linting and formatting checks (clang-format, clang-tidy)
  • Unit tests and integration tests with demo automotive nodes

coverage:

  • Builds with coverage instrumentation (Debug mode)
  • Runs unit tests only (for stable coverage metrics)
  • Generates lcov coverage report (available as artifact)
  • Uploads coverage to Codecov (only on push to main)

After every run the workflow uploads test results and coverage reports as artifacts for debugging and review.


🀝 Contributing

Contributions are welcome! Whether it's bug reports, feature requests, documentation improvements, or code contributions β€” we appreciate your help.

  1. Read our Contributing Guidelines
  2. Check out good first issues for beginners
  3. Follow our Code of Conduct

πŸ”’ Security

If you discover a security vulnerability, please follow the responsible disclosure process in SECURITY.md.

πŸ“„ License

This project is licensed under the Apache License 2.0 β€” see the LICENSE file for details.


Made with ❀️ by the selfpatch community
πŸ’¬ Join us on Discord

About

ROS 2 Jazzy diagnostics and remote operations toolkit with SOVD style REST API. Runtime discovery, introspection, faults, secure access.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •