4.2 KiB
See the list of topics used for a general overview of the topic structure.
The DDS Device
A DDS device is a collection of topics on which information flows.
Specifically:
<topic-root>/notification— server notifications, responses, etc.control— client requests to servermetadata— optional stream information
rt/<topic-root>_— ROS2-compatible streams
The Topic Root
Note that topics are all using the same <topic-root> that is specified in the device-info. I.e., if the topic-root is known, all other topics can be found.
As long as the <topic-root> is a valid topic path, it can be anything and is entirely determined by Discovery.
Currently, the topic root as used by rs-dds-adapter is built as:
realsense/
<device-model>_<serial-number>
Settings
On the client, device behavior with librealsense can be fine-tuned with JSON settings passed through the participant (and therefore from the librealsense context's dds settings), inside a device object:
{
"dds": {
"device": {
"control": { "reply-timeout-ms": 2000 },
"metadata": { "reliability": "reliable" }
}
}
}
The above overrides the default reply timeout to 2 seconds and makes the metadata topic use reliable QoS rather than the default best-effort.
Standard topic QoS settings
control, notification, and metadata topics all can have their own objects to override default QoS and other settings. See the above for an example. They all share common settings:
reliabilitycan be a string denoting thekind, or an object:kindisbest-effortorreliable
durabilitycan be a string denoting thekind, or an object:kindisvolatile,transient-local,transient, orpersistent
historycan be a number denoting thedepth, or an object:kindiskeep-lastorkeep-alldepthis the number of samples to manage withkeep-last
data-sharingis a boolean:trueto automatically enable if needed;falseto turn offendpointis an object:history-memory-policyispreallocated,preallocated-with-realloc,dynamic-reserve, ordynamic-reusable
Note that these settings are overrides. The default values may be different depending on the topic for which they're intended (for example, metadata uses best-effort by default while control and notification use reliable).
Other Settings
| Field | Default | Type | Description |
|---|---|---|---|
control/ |
|||
reply-timeout-ms |
2000 | size_t | Reply timeout, in milliseconds |
Device Options
To use device-level options, the control-reply needs to be used.
The server publishes device options as part of the initialization sequence, in the device-options message.
If available, the query-option and set-option controls can be used (no stream-name) to retrieve or update the values. Setting these options will not take effect until the device is reset.
The following device options may be available:
| Setting | Default | Type | option-name |
Description |
|---|---|---|---|---|
| Domain ID | 0 | int, 0-232 | domain-id |
The DDS domain number to use to segment communications on the network |
| IP address | empty | string "#.#.#.#" | ip-address |
The static IP that the server uses for itself (empty=DHCP on) |
| Multicast IP | - | string "#.#.#.#" | multicast-ip |
The IP address to use for multicasting (empty to disable) |