Modern, SOVD-compatible diagnostics for ROS 2 robots β built around an entity tree (Area / Component / Function / App) for runtime discovery, health modeling, and troubleshooting.
- π 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
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.
- OS: Ubuntu 24.04 LTS
- ROS 2: Jazzy Jalisco
- Compiler: GCC 13+ (C++17 support)
- Build System: colcon + ament_cmake
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 -yNote: If you cloned without
--recurse-submodules, run:git submodule update --init --recursive
colcon build --symlink-install
source install/setup.bashros2 launch ros2_medkit_gateway gateway.launch.pyOpen your browser at http://localhost:8080/api/v1/areas or use curl:
curl http://localhost:8080/api/v1/areasFor more examples, see our Postman collection.
- π Full Documentation
- πΊοΈ Roadmap
- π GitHub Milestones
We'd love to have you join our community!
- π¬ Discord β Join our server for discussions, help, and announcements
- π Issues β Report bugs or request features
- π‘ Discussions β GitHub Discussions for Q&A and ideas
This section is for contributors and developers who want to build and test ros2_medkit locally.
rosdep install --from-paths src --ignore-src -r -ycolcon build --symlink-installRun all tests:
source install/setup.bash
colcon test
colcon test-result --verboseRun linters:
source install/setup.bash
colcon test --ctest-args -L linters
colcon test-result --verboseRun only unit tests (everything except integration):
source install/setup.bash
colcon test --ctest-args -E test_integration
colcon test-result --verboseRun only integration tests:
source install/setup.bash
colcon test --ctest-args -R test_integration
colcon test-result --verboseTo generate code coverage reports locally:
- Build with coverage flags enabled:
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON- Run tests:
source install/setup.bash
colcon test --ctest-args -LE linter- 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- (Optional) Generate HTML report:
genhtml coverage.info --output-directory coverage_htmlThen open coverage_html/index.html in your browser.
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.
Contributions are welcome! Whether it's bug reports, feature requests, documentation improvements, or code contributions β we appreciate your help.
- Read our Contributing Guidelines
- Check out good first issues for beginners
- Follow our Code of Conduct
If you discover a security vulnerability, please follow the responsible disclosure process in SECURITY.md.
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