Repository navigation
Closed
Description
Context
The Zenoh connector ships the ros2_talker and ros2_listener examples, which the interop test uses. Its README shows how plain Zenoh and ROS 2 can share one session. Two runnable examples should show what AimDB adds next to a ROS 2 system:
- Observe: a gateway that reads a robot's topic, keeps it as a typed record and republishes it for non-ROS consumers.
- Command: an LLM, through
aimdb-mcp, sets goals; an AimDB controller turns goal + pose into velocity commands. The model says what to do, the controller decides how to move, and ROS 2 actuates.
The second example is the basis for a walkthrough and a blog post.
Part 1: ros2_gateway (Twist → JSON)
- Topic type:
geometry_msgs/msg/Twiston/cmd_vel. It is a standard type with nested messages (Vector3) but no header or sequences, so the derive and CDR path carry it today. Type hash (Jazzy and Lyrical):RIHS01_9c45bf16fe0983d80e3cfe750d6835843d265a9a6c46bd2e609fcddde6fb8d2a. - Flow:
ros2://cmd_vel→ recordrobot.cmd_vel→zenoh://telemetry/cmd_velas JSON, on one Zenoh session. Read-only AimX on a Unix socket foraimdb watch. - Location:
aimdb-zenoh-connector/examples/ros2_gateway.rs, with a smallzenoh_subexample so the payload can be read without the Zenoh tools.
Part 2: turtlesim_mcp (goals over MCP)
Claude ──set_record──▶ turtle.goal {"GoTo": {"x": 8.0, "y": 8.0}} | "Stop"
turtlesim ──/turtle1/pose──▶ turtle.pose
turtle.goal + turtle.pose ──transform_join──▶ turtle.cmd_vel ──▶ /turtle1/cmd_vel
- Records:
turtle.goalis an enum withGoTo { x, y }andStop. It is the only record writable over AimX.turtle.poseis turtlesim's pose, read-only. turtlesim's messages moved packages after Jazzy, so the type name and hash depend on the distro:- Jazzy:
turtlesim/msg/Pose(RIHS01_739beba26bcba6920404ba722b7b8321348512f92ea5be235c47251940dd8aa9) - Lyrical:
turtlesim_msgs/msg/Pose(RIHS01_37b07ace09a0ed2c5b774b1410dec972dfd1d292de5656ebc2b075ac646e09c8)
- Jazzy:
turtle.cmd_velis a Twist produced by the controller, so remote writes to it are refused.
- Controller: a
transform_joinover goal and pose that runs on every pose. It turns toward the target, drives, and stops within a tolerance. Speeds are clamped in the controller, not trusted from the caller. - Location:
aimdb-zenoh-connector/examples/turtlesim_mcp.rs.
Acceptance criteria
-
ros2_gateway: subscribes to Twist overros2://, stores it as a typed record, and republishes JSON onzenoh://. Both links share one session, and AimX serves the record foraimdb watch. -
turtlesim_mcp:GoToandStopset over AimX (aimdb-mcpset_record, or the CLI) move the turtle to the target and stop it there.turtle.cmd_velandturtle.poseare readable but not writable. - A walkthrough with a supported ROS 2 distro and
rmw_zenoh_cpp. It covers:- starting the router,
ROS_DOMAIN_IDandZENOH_ENDPOINT,ros2 topic pubwith the expectedaimdb watchoutput and Zenoh JSON payload,- turtlesim with
aimdb-mcpconfigured in Claude.
-
tests/interop/ros2_interop.shand its Dockerfile run both examples against real ROS 2, so the walkthrough can't drift:- the gateway's republished JSON and its
aimdb watchoutput, - a
GoToreaching its target in turtlesim within a tolerance, - a refused write to
turtle.cmd_vel.
- the gateway's republished JSON and its
- Both examples are linked from the connector README.
Not in scope
Services and actions (for example turtlesim's RotateAbsolute), path planning, and hardcoded maneuvers. A square is four GoTos sequenced by the caller.
Shared-session setup · Existing talker example · Existing interop test
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]Add a runnable ROS 2 → Zenoh telemetry gateway example[/-][+]ROS 2 examples: a Twist → Zenoh gateway and a turtlesim driven by goals over MCP[/+]feat(zenoh): ROS 2 gateway and turtlesim-over-MCP examples (#421)
wip(zenoh): ROS 2 -> Zenoh telemetry gateway example (#421) (#442)
lxsaah commentedon Nov 8, 2026
Closed by #442