feat(hiroz): embed the bundled message definitions - #314
Merged
Merged
Conversation
YuanYuYuan
force-pushed
the
feat/hu-embedded-msgs
branch
from
August 21, 2026 06:41
df248a6 to
11ae23a
Compare
YuanYuYuan
force-pushed
the
fix/hu-schema-discovery
branch
from
August 21, 2026 10:42
030a7dd to
237914d
Compare
YuanYuYuan
force-pushed
the
feat/hu-embedded-msgs
branch
from
August 21, 2026 10:48
11ae23a to
bc4c506
Compare
YuanYuYuan
force-pushed
the
fix/hu-schema-discovery
branch
from
August 21, 2026 12:17
237914d to
d3b55c7
Compare
YuanYuYuan
force-pushed
the
feat/hu-embedded-msgs
branch
from
August 21, 2026 12:17
bc4c506 to
e28fd80
Compare
YuanYuYuan
force-pushed
the
fix/hu-schema-discovery
branch
from
August 21, 2026 13:27
d3b55c7 to
bd2615d
Compare
YuanYuYuan
force-pushed
the
feat/hu-embedded-msgs
branch
from
August 21, 2026 13:27
e28fd80 to
3d70c4f
Compare
YuanYuYuan
force-pushed
the
fix/hu-schema-discovery
branch
from
August 21, 2026 14:12
bd2615d to
862d9ed
Compare
YuanYuYuan
force-pushed
the
feat/hu-embedded-msgs
branch
from
August 21, 2026 14:12
3d70c4f to
c939356
Compare
YuanYuYuan
force-pushed
the
fix/hu-schema-discovery
branch
from
August 21, 2026 15:08
862d9ed to
1040021
Compare
YuanYuYuan
force-pushed
the
feat/hu-embedded-msgs
branch
from
August 21, 2026 15:08
c939356 to
9a2f3bc
Compare
A downloaded hu could not decode a topic even when a publisher was live. Measured against a running talker on /chatter: discovery fell through and the .msg fallback had nowhere to look, so echo reported no .msg for std_msgs/msg/String (advertised by /chatter) was found on HIROZ_MSG_PATH and exited 1. A release ships no message definitions, so that is the default outcome, not an edge case. build.rs now embeds every bundled .msg as source text and the schema loader consults it when HIROZ_MSG_PATH yields nothing. Disk still wins: a user who sets that variable means it, and a stale embedded copy must not beat the definitions their publisher was built from. The whole jazzy set is ~122 KB of text, so nothing is subsetted. Embedded text goes through the same parser as a file, via parse_msg_string, so the two cannot diverge.
Local `cargo fmt --all --check` passed and CI's failed on the same commit. The repo's rustfmt.toml sets nightly-only keys including skip_children; a nightly local toolchain honours it and skips child modules, while CI's stable rustfmt ignores it and formats them. Local fmt-green is therefore weaker evidence than it looks.
`hu meter pub --msg-type std_msgs/msg/String` to a topic with a live endpoint failed with topic /pub_target carries std_msgs::msg::dds_::String_, not the requested std_msgs/msg/String The graph reports a DDS-mangled name; --msg-type is the ROS form. The guard compared them raw, so a correct publish was rejected. The branch was unreachable until a schema could resolve without a live node: it needs both a resolvable schema and a live endpoint, and the one test that resolves from disk publishes to an empty topic, where there is no live type to compare against. Embedding the definitions made the combination reachable and the latent defect fired. Normalises with the same helper the discovery branch's names already come in as, rather than adding a second copy of the mangling rules.
YuanYuYuan
force-pushed
the
feat/hu-embedded-msgs
branch
from
August 21, 2026 16:15
9a2f3bc to
e2c5d6d
Compare
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.
Closes G2 of the release-usability gaps. This now targets
main. The five slices that split the original #311 are merged: #317, #318, #319, #320 and #311.What fails without this
A downloaded
hucould not decode a topic, even when a publisher was live. A release ships no message definitions, so the.msgfallback had nowhere to look.Measured against a real talker on
/chatter, withHIROZ_MSG_PATHunset:hu meter echo /chatterno .msg for std_msgs/msg/String (advertised by /chatter) was found on HIROZ_MSG_PATH[/chatter] {"data":"Hello hiroz - #11"}— 17 messages in an 18 s windowhu meter echoon a topic nobody publishesThat second row is the control. Embedding must not turn a genuine failure into silence.
What this does
build.rsembeds every bundled.msgfile as source text. The schema loader reads that table whenHIROZ_MSG_PATHyields nothing.HIROZ_MSG_PATHmeans it. A stale embedded copy must not beat the definitions that the publisher was built from. A test pins this with a sentinel field.parse_msg_stringreads the embedded text and the file text, so the two cannot diverge.A latent defect that embedding made reachable
hu meter pub --msg-type std_msgs/msg/Stringfailed against a topic with a live endpoint:The graph reports a DDS-mangled name.
--msg-typetakes the ROS form. The guard compared the two raw.That guard needs a resolvable schema and a live endpoint before it runs. The one test that resolves from disk publishes to an empty topic. Nothing therefore exercised the combination until a schema could resolve without a live node.
This branch fixes it with
ros_type_name_from_dds, the helper that #320 exported. A second copy of the mangling rules would drift from the first.Breaking changes
None. This adds a fallback, and the host consults it only after the existing path fails.