Repository navigation
feat: Add support for QoS profiles - #1291
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The newly exported RosbridgeQosProfile references RosbridgeDuration without exposing it through the public entry point, triggering TypeDoc warnings that fail the docs CI job.
1 open issue
What changed in this PR
This PR adds QoS profile support to Topic, allowing callers to configure ROS 2 publisher and subscriber behavior through rosbridge.
Changes:
- Accept and forward QoS profiles when advertising and subscribing.
- Add protocol types and publicly export
RosbridgeQosProfile. - Add unit tests and ROS 2 integration examples covering QoS behavior.
| File | Description |
|---|---|
packages/roslib/test/topic.test.ts |
Tests QoS forwarding, omission, publishing, and reconnect behavior. |
packages/roslib/test/examples/pubsub.example.ts |
Adds ROS 2 durability and reliability integration cases. |
packages/roslib/src/types/protocol.ts |
Defines QoS profiles and extends message types. |
packages/roslib/src/RosLib.ts |
Exports the public QoS profile type. |
packages/roslib/src/core/Topic.ts |
Accepts QoS options and forwards them to rosbridge. |
Review effort: Balanced
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Overall this matches the rosbridge 2.1.0 spec (§4.2.1) well: field names, enum values, the duration formats (incl. best_available only for deadline), {} passed through, and qos left out entirely when not set. Two things: a patch for the union-type request is in the thread on Topic.ts, and there's a note below on what the volatile integration test actually checks.
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
@EzraBrooks Do you think we should get rid of |
|
@bjsowa it probably would make the generated docs more readable, so sounds good to me |


Public API Changes
The Topic class now accepts the
qosparamDescription
The QoS support in rosbridge server released back in May so it's safe to assume it's available on every ROS 2 distro