Skip to content

Expose PID_USER_DATA from SEDP endpoint discovery#403

Open
alvgaona wants to merge 1 commit intoAtostek:masterfrom
alvgaona:feat/pid-user-data
Open

Expose PID_USER_DATA from SEDP endpoint discovery#403
alvgaona wants to merge 1 commit intoAtostek:masterfrom
alvgaona:feat/pid-user-data

Conversation

@alvgaona
Copy link
Contributor

@alvgaona alvgaona commented Mar 15, 2026

Summary

Expose PID_USER_DATA (0x002C) from SEDP-discovered endpoints. This is a standard DDS parameter that RustDDS currently discards during parsing.

The user_data field is added as Vec<u8> to DiscoveredReaderData, DiscoveredWriterData, and EndpointDescription, making it available through WriterDetected/ReaderDetected status events.

Use case

ROS 2 Jazzy embeds type hashes in PID_USER_DATA (e.g. typehash=RIHS01_<hex>;). These hashes are needed to call the get_type_description service for runtime message schema resolution, enabling pure-DDS tools to deserialize ROS 2 messages without a ROS 2 installation.

Design

  • Vec<u8> — matches the DDS spec definition of opaque bytes; no interpretation imposed.
  • Empty vec when absent — avoids Option wrapping since most endpoints don't set it.
  • Not serialized back out — local endpoints set user data through QoS, not by echoing remote data

Extract PID_USER_DATA from discovered reader and writer parameter lists
and expose it on EndpointDescription. This allows applications to access
DDS user data set by remote participants, such as ROS 2 type hashes.
@alvgaona
Copy link
Contributor Author

alvgaona commented Mar 16, 2026

Reference: https://www.omg.org/spec/DDSI-RTPS/2.0/PDF (p. 185)

@alvgaona
Copy link
Contributor Author

@jhelovuo what do you think of supporting this?

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