Repository navigation
feat(zenoh): inbound ros2:// links (design 053 s10) - #312
Merged
Merged
Conversation
Each inbound link gets a subscription token (MS) with its QoS, after
the publishers' entity ids. One remote-only Zenoh subscriber per
distinct topic, on its rmw_zenoh data key, dispatches every put under
the link topic, so every record linked to the topic receives it;
deletes are ignored.
Both directions share one set of checks (topic name, registered type,
CDR, QoS). Inbound adds: a `{...}` pattern is refused by ExactGrammar,
and two types on one topic fail the build. A custom serializer or
deserializer still warns; the warning is now a value, unit-tested.
Verified live with `examples/ros2_listener.rs` against Jazzy and
Lyrical: `ros2 topic info -v` lists the subscription and every
`ros2 topic pub` message arrives.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Stage s10 of
docs/design/053-implementation-plan.md: inboundros2://(053 §4.3). It removes s09's temporary "inbound not supported yet" refusal.What it does
InboundDispatch::new(db, "ros2", &ExactGrammar), with each route's facts read fromroutes(), the API from s04.MS) per inbound link, carrying that link's QoS. Entity ids continue after the publishers'.putunder the link topic, so core's exact router hands the value to every record linked to that topic. Deletes are ignored, and the attachment isn't needed on the way in.link()holds what both directions verify: a valid ROS topic name, a registered type, CDR on the wire, and the QoS overrides. Outbound adds its topic-writer refusal; inbound adds the two below.Refusals (criterion 9, inbound rows)
{…}pattern onros2://ExactGrammarrefuses it inInboundDispatch::newbuild()error naming both typeslinked_from_with(url, Json))build()errorbuild()errorThe custom-serializer and custom-deserializer warning is now a value that the planning step returns and
build()logs once the configuration is valid. A unit test covers it for both cases, with the serializer alone and after a codec verb (whose recorded format it clears). No log capture is needed.Tests
tests/ros2_inbound.rs:/cell4. BothMStokens are present (entity ids 1 and 2, default QoS). A remotedelete()followed by a CDRputdelivers the value to both records, and the delete delivers nothing.Unit test:
codec_warningreturns nothing forcdr, a warning when no format is recorded, and an error for any other format.Live ROS, with the new
examples/ros2_listener.rsagainst Jazzy's and Lyrical'srmw_zenohd:ros2 topic info -v /aimdb_cmdlists the subscription: nodelistener, namespace/aimdb, the type hash, KEEP_LAST (10);ros2 topic pub --times 3arrive at the record.The first attempt looked empty only because the ROS CLI containers need about 20 s; I'd waited 16.
Checks
The full matrix runs in CI on this PR. Locally, as a quick signal only: the library tests (22 passed),
ros2_inbound(3) andros2_outbound(5), andcargo fmt --all -- --check.🤖 Generated with Claude Code