Skip to content

Software

ros2_medkit

By selfpatch, Poland (checked on github.com/selfpatch (opens in a new tab)), from github.com/selfpatch/ros2_medkit (opens in a new tab)

  • Middleware
  • Tool
  • Apache-2.0

A diagnostics REST API for ROS 2 robots that discovers nodes, topics, services and actions and turns failures into tracked faults, with no code changes needed.

Facts

GitHub stars
291read on 29 Nov 2026
Last update
28 Nov 2026Newest commit on main
Maintenance
Activea commit in the last 90 days
Difficulty
Intermediate

Checked on GitHub on 29 Nov 2026.

Licenses

Code
Apache-2.0 (opens in a new tab)

Read by Robotheca from LICENSE (opens in a new tab) (Apache-2.0) at commit 510a0c6 (opens in a new tab), on 29 Nov 2026.

Commercial use
Yes

At a glance

What it is
  • Discovers every node, topic, service and action on the robot automatically, without configuration.
  • Turns error logs, failed actions and /diagnostics messages into faults showing what broke, where and how severe.
  • Confirms each fault, keeps its history, and clears it once fixed.
  • Saves a snapshot and a rosbag of the moment each fault happened.
  • Reads topics as JSON, calls services and actions, and reads and sets parameters through the API.
  • Streams faults live and offers software updates through a plugin, with sign-in and per-user permissions.

Robotheca's summary of the project's documents, not the creator's words.

Robots on Robotheca
No robot on Robotheca uses it yet.
Licence
Apache-2.0. Commercial use: Yes. Where it was read
Install
In the creator's words: The project's website (opens in a new tab)
Maintenance
Active, last commit on 28 Nov 2026.

Use it

How to install it, in the creator's words: The project's website (opens in a new tab)

Robotheca doesn't review code. Read it before running it.

Files and versions

Facts read at commit 510a0c6

Robotheca read the repository at two versions: the summary at 2b508e5 and the facts and the README at 510a0c6 (read on 29 Nov 2026).

Robotheca never hosts the code: each link goes to the creator's own page.

The README

The creator's own README, copied as written: README.md by selfpatch, at commit 510a0c6, under Apache-2.0 (opens in a new tab). The original on GitHub (opens in a new tab).

Read the README here

selfpatch.ai (opens in a new tab)

ros2_medkit: see what broke on any ROS 2 robot, from one REST API.

(opens in a new tab) (opens in a new tab) (opens in a new tab) (opens in a new tab) (opens in a new tab) (opens in a new tab)

ros2_medkit gives your ROS 2 robot a diagnostics REST API. It finds every node, topic, service and action by itself, and turns failures - error logs, failed actions, /diagnostics - into clear faults: what broke, where, how bad, with a snapshot and a rosbag of the moment it happened. No changes to your code.

Quick start
  1. Get Docker (opens in a new tab), if you don't have it yet.

  2. While your robot is running, start ros2_medkit on its computer:

    docker run --rm --network host --ipc host \
      -e ROS_DOMAIN_ID="${ROS_DOMAIN_ID:-0}" \
      -e RMW_IMPLEMENTATION="${RMW_IMPLEMENTATION:-rmw_fastrtps_cpp}" \
      ghcr.io/selfpatch/ros2_medkit-jazzy:latest \
      ros2 launch ros2_medkit_gateway bringup.launch.py
    

    On Humble or Lyrical, change jazzy to humble or lyrical.

  3. See what it found:

    curl localhost:8080/api/v1/apps     # every node on your robot
    curl localhost:8080/api/v1/faults   # everything that has failed
    

    Or browse the whole API at localhost:8080/api/v1/docs (opens in a new tab).

[!TIP] That's it. ros2_medkit is now watching your robot, and every new failure shows up as a fault.

See it in the browser. Connect the robot to the selfpatch platform (opens in a new tab) to see its faults, replay the rosbag around each one and find the cause, without SSH or a VPN.

No robot at hand? The sensor demo runs on any laptop and lets you break things on purpose (it needs curl and jq):

git clone https://github.com/selfpatch/selfpatch_demos.git
cd selfpatch_demos/demos/sensor_diagnostics
./run-demo.sh     # start the demo robot
./inject-nan.sh   # break a sensor, then watch the fault appear

After a Nav2 goal is aborted:

// GET /api/v1/faults
{
  "items": [
    { "fault_code": "ACTION_NAVIGATE_TO_POSE_ABORTED",
      "severity_label": "ERROR", "status": "CONFIRMED",
      "reporting_sources": ["/bt_navigator"] }
  ],
  "x-medkit": { "count": 1 }
}

Each fault also keeps a snapshot of the moment it happened and a rosbag of the seconds around it:

curl localhost:8080/api/v1/apps/bt_navigator/faults/ACTION_NAVIGATE_TO_POSE_ABORTED
curl -O -J localhost:8080/api/v1/apps/bt_navigator/bulk-data/rosbags/ACTION_NAVIGATE_TO_POSE_ABORTED
curl -N localhost:8080/api/v1/faults/stream

ros2_medkit is on its way into the official ROS packages. Once it reaches your distro:

sudo apt install ros-jazzy-ros2-medkit-gateway   # or ros-humble- / ros-lyrical-
ros2 launch ros2_medkit_gateway bringup.launch.py

To build from source or use Pixi, follow the installation guide (opens in a new tab).

  • Robot missing? Run ros2_medkit on the robot's computer, or one on the same network, from a terminal where your ROS 2 setup works.
  • Opening it from another computer? Add server_host:=0.0.0.0 allow_unauthenticated_remote:=true to the end of the command in step 2, on a network you trust, and use the robot's IP address instead of localhost. Without authentication the gateway refuses to bind anything but a loopback address unless you pass allow_unauthenticated_remote:=true; to require a login instead, set MEDKIT_JWT_SECRET and MEDKIT_CLIENTS.
  • Running it in a container without --network host? bringup.launch.py binds the REST API to 127.0.0.1, which is then the container's own loopback, and the published port answers with Connection reset by peer or an empty reply. Add server_host:=0.0.0.0 allow_unauthenticated_remote:=true and publish the port as -p 127.0.0.1:8080:8080, which keeps the API, unauthenticated by default, off the LAN.
  • No faults from /diagnostics? Add enable_diagnostic_bridge:=true to the end of the command in step 2.
  • Still stuck? See troubleshooting (opens in a new tab) or ask on Discord (opens in a new tab).
How it works

How it works. Your robot: error logs, failed actions, /diagnostics, and your own nodes through FaultReporter. ros2_medkit listens to logs, actions and diagnostics, records each fault with its history, a snapshot and a rosbag, and serves it all on one REST API, with every node it found. You read it from a browser, curl, the web UI or an AI assistant.

ros2_medkit listens to what your robot already publishes, so it works without code changes. For more control, report faults from your own nodes with the FaultReporter (opens in a new tab) client, see the integration tutorial (opens in a new tab). The API follows SOVD (ISO 17978), the diagnostics standard from the automotive world.

Features
  • Finds every node, topic, service and action, with no config
  • Turns error logs, failed actions and /diagnostics into faults
  • Confirms each fault, keeps its history and clears it once it's fixed
  • Saves a snapshot and a rosbag of the moment each fault happened
  • Reads any topic as JSON, calls services and actions, and reads and sets parameters
  • Streams faults as they happen
  • Software updates through a plugin, and sign-in with per-user permissions
  • Rosbags open in whatever tool you already use to browse robot data

Compared with standard ROS 2 diagnostics

ros2_medkit builds on them. It reads /diagnostics too, so keep your diagnostic_updater code.

Standard ROS 2 diagnosticsros2_medkit
Where you see itA desktop app next to the robotA REST API, from anywhere
Code changesEach node reports its own healthNone needed
What you getOK, WARN, ERROR or STALE, right nowA fault that is confirmed, tracked and cleared once fixed
When it breaksNothing is savedA snapshot and a rosbag
HistoryNoneSaved, so you can look back
CoversROS onlyROS today, PLCs and vehicle controllers through the same API
AI assistantsNoYes, through MCP
Ecosystem
Documentation
Contributing

Contributions are welcome. Read CONTRIBUTING.md (opens in a new tab), pick a good first issue (opens in a new tab), or ask on Discord (opens in a new tab) and in Discussions (opens in a new tab). Report security issues privately, see SECURITY.md (opens in a new tab).

License

Apache License 2.0, see LICENSE (opens in a new tab). ros2_medkit is built and maintained by selfpatch.ai (opens in a new tab).

Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.