Repository navigation
Connect demos to the selfpatch platform through the agent - #80
Merged
Merged
Conversation
lib/connect-platform.sh pairs a running demo with the platform and runs the agent next to its gateway. Wrappers for sensor_diagnostics, ota_nav2_sensor_fix and turtlebot3_integration. The sensor demo can run several instances side by side. PLATFORM.md covers the setup for people and AI assistants.
bburda
reviewed
Oct 12, 2026
Stopped gateway containers no longer pass the check, the disconnect hint names the gateway container, and the turtlebot3 wrapper picks the nvidia container. PLATFORM.md adds clear-fault and how to stop a second robot.
bburda
approved these changes
Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
The demos can now show up in the selfpatch platform as robots. The connection goes through the selfpatch agent, which opens an outbound connection to the platform and lets it read the demo's gateway.
lib/connect-platform.sh <gateway container>: pairs the agent with a pairing code from the platform, then runs it asselfpatch-agent-<container>on the demo's Docker network, with its credential in a volume of the same name.--disconnectremoves the container and the volume. TakesPLATFORM_URL,PAIRING_CODE,SELFPATCH_AGENT_IMAGEandPLATFORM_INSECURE_HTTP(for a platform on your own machine).connect-platform.shwrappers insensor_diagnostics,ota_nav2_sensor_fixandturtlebot3_integration.sensor_diagnostics/docker-compose.yml: container names, ports andROS_DOMAIN_IDcome from environment variables with the current values as defaults, so several robots can run side by side. Nothing changes for./run-demo.sh.PLATFORM.md: setup, several robots, a local platform, how to trigger faults per demo, what the gateway exposes and the rule to build UI on real responses rather than mocks. Written to be pasted into an AI assistant's context too.No demo compose file gets an agent service, so a demo without the platform runs exactly as before.
Tested
On an arm64 Mac against a staging deployment of the platform:
sensor_diagnosticsandota_nav2_sensor_fixconnected, online, entity tree and faults visible in the platform.COMPOSE_PROJECT_NAME=robot2, port 8082,ROS_DOMAIN_ID=41) connected withGATEWAY_CONTAINER=robot2 ./connect-platform.sh: its own device, online, and a fault injected on it (LIDAR_SIM) showed on that device only.--disconnectremoved the agent container and its volume.docker compose configvalid.The agent image
ghcr.io/selfpatch/agent:0.1is public (amd64 and arm64), pulled without login.