Skip to content

feat(hiroz): let the examples advertise their message types - #320

Merged
YuanYuYuan merged 1 commit into
mainfrom
feat/hiroz-type-desc-optin
Aug 21, 2026
Merged

YuanYuYuan merged 1 commit into
mainfrom
feat/hiroz-type-desc-optin

Conversation

@YuanYuYuan

Copy link
Copy Markdown
Collaborator

Slice 4 of 5, splitting #311. Sits on #319; #311 sits on this.

What this does

Makes the hiroz examples advertise their message types, and exposes the two library items an out-of-crate plugin host needs.

What fails without this

A plain hiroz node does not serve the type description service unless it asks. rclcpp and rclpy serve it by default, and hiroz's own RMW layer forces it on for every node it creates, so the examples were the only nodes on a hiroz graph that a runtime-typed consumer could not decode.

before after
a publishing example's node serves no type description serves it
hu meter echo against one cannot obtain a schema can
a dynamic subscriber or bridge same same
ZNodeBuilder::with_type_description_service existed, undocumented as to why documents why you want it

Two additive library items, no default changed:

item why it is public
ZLifecycleNodeBuilder::with_type_description_service() pass-through, so lifecycle publishers register schemas too
hiroz::dynamic::ros_type_name_from_dds out-of-crate consumers normalise graph-reported type names the same way instead of re-deriving it

Breaking changes

What changes Who is affected Before to after Action
z_pubsub node names anyone matching on them Sub / Pub to listener / talker none, unless you filtered on the old names; the docs always claimed the new ones

This is a rider: it is a rename, not a type-description change. It is two lines, and separating it would make a one-line pull request.

Verification

cargo build -p hiroz --examples produces a binary for all eight edited examples. Three of them are nested files whose Cargo target names differ from their filenames — demo_nodes_talker, lifecycle_talker, z_cache_talker — so a check keyed on the filename reports a false miss.

@YuanYuYuan
YuanYuYuan force-pushed the fix/hu-epoch-budget branch from 1a6629d to aa68097 Compare August 21, 2026 12:17
@YuanYuYuan
YuanYuYuan force-pushed the feat/hiroz-type-desc-optin branch from 542c04b to 49d9162 Compare August 21, 2026 12:17
@YuanYuYuan
YuanYuYuan force-pushed the feat/hiroz-type-desc-optin branch from 49d9162 to 52d29dc Compare August 21, 2026 13:27
Base automatically changed from fix/hu-epoch-budget to main August 21, 2026 14:07
A plain hiroz node does not serve the type description service unless it
asks. rclcpp and rclpy serve it by default, and hiroz's own RMW layer
forces it on, so the examples were the only nodes on a hiroz graph that
runtime-typed consumers could not decode: `hu meter echo`, dynamic
subscribers and bridges all had no schema to obtain.

Every publishing example now opts in, and `ZNodeBuilder` documents why
you probably want to.

Two additions the plugin host needs from outside the crate:
`ZLifecycleNodeBuilder::with_type_description_service()`, so lifecycle
publishers register their schemas too, and `ros_type_name_from_dds`,
which becomes public so out-of-crate consumers normalise graph-reported
type names the same way rather than re-deriving it.

Rider: z_pubsub's nodes are renamed `Sub`/`Pub` to `listener`/`talker`.
That is a user-visible rename, not a type-description change, and the
docs always claimed the new names.
@YuanYuYuan
YuanYuYuan force-pushed the feat/hiroz-type-desc-optin branch from 52d29dc to 207339b Compare August 21, 2026 14:12
@YuanYuYuan
YuanYuYuan merged commit 179198e into main Aug 21, 2026
28 checks passed
@YuanYuYuan
YuanYuYuan deleted the feat/hiroz-type-desc-optin branch August 21, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant