feat(ros2-bridge): port to ros2-client 0.10.0 and RustDDS 0.13.1 - #2854
feat(ros2-bridge): port to ros2-client 0.10.0 and RustDDS 0.13.1#2854bobdingAI wants to merge 1 commit into
Conversation
Bumps `dora-ros2-bridge` from ros2-client 0.8.0 / rustdds =0.11.4 to ros2-client 0.10.0 / rustdds 0.13.1, and lifts the `=` pin on RustDDS. The two are one upgrade: ros2-client 0.10 declares `rustdds = "0.13"`. No source changes were required. Every ros2-client symbol the bridge uses survives 0.8 -> 0.10 (the public-surface diff is additions only), and the removed APIs — `QosPolicyBuilder::property()` and the `rustdds::CdrEncodingSize` re-export — were never referenced here. `ros2-client` and `cdr-encoding` move to `[workspace.dependencies]` so the bridge and its arrow helper cannot drift apart on the ROS distro. `cdr-encoding` goes 0.10.2 -> 0.11 to match what RustDDS 0.13 depends on, leaving a single copy in the lockfile; its only API change tightens `from_bytes` to `&'de [u8]`, and every call site here yields owned types. Two consequences worth review attention: ROS distro is now explicit. 0.10 gained distro features (0.8 only had a `pre-iron-gid` opt-out), and they select `Gid` width. This builds with `humble`, giving a 24-byte `Gid` where the previous build had 16 — a deliberate wire change that aligns the build with the distro our harness actually runs (`scripts/ros2dev.sh`). It affects `rmw_dds_common` graph discovery only; topic/service/action payloads are untouched. Windows is excluded rather than fixed. RustDDS 0.11.5+ depends unconditionally on `pnet`, whose `pnet_datalink` declares `#[link(name = "Packet")]` on Windows, so linking needs the Npcap SDK (Atostek/RustDDS#375, still open — this was the reason for the pin). The four crates that transitively pull RustDDS are excluded from the Windows build/test steps in nightly.yml. `Packet.lib` is link-time only, so the `cargo check` steps and the `cross-check` job's windows-gnu target are unaffected and stay as they were. The durable fix is upstreaming an optional-`pnet` feature — RustDDS needs it for one `pnet::datalink::interfaces()` call. Verified on Linux against a real ROS 2 Humble install: fmt, clippy -D warnings, `cargo check --examples`, 110 bridge tests, 1543 workspace tests, and `cargo deny check licenses advisories bans sources` all pass. Live interop against `demo_nodes_cpp talker` receives messages and shows the dora node in `ros2 node list` with a 24-octet GID; the same probe built with the `jazzy` default is absent from `ros2 node list` while still receiving payloads, confirming the Gid width governs graph discovery only. The Windows link failure and the exclusion that avoids it are NOT verified here — no Windows host was available. That needs a nightly run. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
No issues found. This is a manifest + CI + docs change with no source edits. Points I verified from the diff:
The two riding behavior changes — selecting Generated by Claude Code |
What
Ports
dora-ros2-bridgefrom ros2-client 0.8.0 / rustdds=0.11.4toros2-client 0.10.0 / rustdds 0.13.1, removing the
=pin on RustDDS.These are one upgrade, not two: ros2-client 0.10 declares
rustdds = "0.13", soresolving RustDDS to >= 0.13.1 follows from the ros2-client bump.
No source changes were required. Every ros2-client symbol the bridge uses
(~60 items) survives 0.8 → 0.10 — the public-surface diff is additions only
(
distributions,pub use rustdds,Node::stop_spinner). The APIs that wereremoved,
QosPolicyBuilder::property()and therustdds::CdrEncodingSizere-export, were never referenced here.
ros2-clientandcdr-encodingmove into[workspace.dependencies]so thebridge and its arrow helper cannot drift apart on the ROS distro.
cdr-encodinggoes 0.10.2 → 0.11 to match what RustDDS 0.13 depends on, leavinga single copy in the lockfile; its only API change tightens
from_bytesto&'de [u8], and every call site here yields owned types.Two things that need reviewer attention
1. ROS distro is now explicit, and this picks
humble— a wire change0.10 gained distro Cargo features (
default = [jazzy], plusgalactic/humble/iron/kilted/lyrical); 0.8 only had apre-iron-gidopt-out. These select
Gidwidth inros2-client'ssrc/gid.rs:GID_LENGTHpre-iron-gidoff)default = [jazzy](jazzy ⊃ iron)humble(this PR)This aligns the build with the distro our own harness runs
(
scripts/ros2dev.sh:57,scripts/ros2-zenoh-interop.sh). Previously we emittediron-era 16-byte Gids while testing against a 24-byte-Gid distro.
It is a deliberate wire-format change. It affects
rmw_dds_commongraphdiscovery only — topic, service, and action payloads are ordinary CDR and
interoperate across distros either way. Anyone currently doing graph
introspection against an iron-or-newer stack is affected. Flagging it plainly
because it is a behavior change riding along with a version bump; happy to split
it out or switch to a feature passthrough (
ros-humble/ros-jazzy/ …) ifyou'd rather.
2. Windows is excluded, not fixed
The
=0.11.4pin was load-bearing. RustDDS 0.11.5+ depends unconditionallyon
pnet, whosepnet_datalinkdeclares#[link(name = "Packet")]under#[cfg(windows)](src/bindings/winpcap.rs:357), so Windows linking needsPacket.libfrom the Npcap SDK. That isAtostek/RustDDS#375, and it is
still open — 0.13.1 still has the dependency.
This PR excludes the affected crates from the Windows build/test steps in
nightly.ymlrather than forking RustDDS or requiring the SDK of every Windowsdeveloper. The exclusion set is exactly the crates that transitively pull
RustDDS, verified with
cargo tree -e normal:dora-ros2-bridgedora-ros2-bridge-arrowdora-ros2-bridge-noderust-ros2-example-nodedora-ros2-bridge-msg-gendora-cli,dora-daemonPacket.libis required at link time only, so deliberately unchanged: thecargo check --all/cargo check --examplessteps in the same job, and thecross-checkjob'sx86_64-pc-windows-gnutarget (which only runscargo check). macOS keeps full bridge coverage via a per-platform matrixvariable.
The excludes are carried in
matrix.ros2_excludesrather than duplicated, andmacOS gets an empty string.
The durable fix is upstream: RustDDS needs
pnetfor a singlepnet::datalink::interfaces()call (src/network/util.rs:61). Anoptional-
pnetfeature would close #375 and restore Windows for everyone. Notedas a follow-up rather than expanding this PR's scope.
Verification
Run on Linux against a real ROS 2 Humble install.
cargo fmt --all -- --check— cleancargo clippy --lib --bins --tests -- -D warningson all five bridge crates — cleancargo check --examples— cleancargo test --all(CLAUDE.md exclude list) — 1543 passed, 0 failed, 126 binariescargo deny check licenses advisories bans sources— all okcargo build --examplelinks against RustDDS 0.13.1, so the port is proven tolink, not merely typecheck
Live interop against
ros2 run demo_nodes_cpp talker, using a throwawayprobe node on the bridge's ros2-client stack subscribed to
/chatter(std_msgs/String). A counterfactual run with thejazzydefaultisolates what the distro feature actually buys:
ros2 node listsees the dora nodehumble(24-byte Gid)/dora_interop_probelistedjazzy(16-byte Gid)/talkerlistedros2 topic info -v /chatteron the humble build attributes the dorasubscription to node
dora_interop_probewith a 24-octet GID matching thetalker's format. This confirms the Gid width governs graph discovery and nothing
else. The probe was temporary scaffolding and is not part of the diff.
New lockfile entries — six crates:
pnet,pnet_macros,pnet_macros_support,pnet_packet,pnet_transport,pastey. (pnet_datalink,pnet_sys,ipnetwork,winapiwere already present.)Not verified here
The Windows link failure and the exclusion that avoids it. No Windows host
was available, and
cargo checkcannot reproduce a link error. This needs anightly run to confirm. The reasoning is spelled out above and in the
nightly.ymlcomment, but it is reasoning, not a green run.Also noted, not fixed:
cargo clippy --all-targetson the bridge trips apre-existing
single_component_path_importserror onuse tokio;atexamples/ros2-bridge/rust/service-server/run.rs:4. It is unrelated to thischange and invisible to CI (which doesn't pass
--all-targets), so perCONTRIBUTING/CLAUDE.md guidance on unrelated warnings I left it alone.
Design doc
docs/superpowers/specs/2026-07-26-ros2-client-0.10-port-design.mdrecords theinvestigation, the alternatives considered for the Windows problem (Npcap SDK in
CI / exclusion / RustDDS fork), and the follow-ups.
🤖 Generated with Claude Code