Skip to content

feat: Add support for QoS profiles - #1291

Merged
bjsowa merged 16 commits into
developfrom
feat/add-qos-profiles
Nov 19, 2026
Merged

bjsowa merged 16 commits into
developfrom
feat/add-qos-profiles

Conversation

@bjsowa

@bjsowa bjsowa commented Nov 4, 2026

Copy link
Copy Markdown
Member

Public API Changes
The Topic class now accepts the qos param

Description
The QoS support in rosbridge server released back in May so it's safe to assume it's available on every ROS 2 distro

Copilot AI balanced review requested due to automatic review settings November 4, 2026 22:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread packages/roslib/src/types/protocol.ts Resolved
Copilot AI balanced review requested due to automatic review settings November 4, 2026 22:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The missing RosbridgeDuration re-export causes a TypeDoc referenced-but-not-included warning that fails the docs job under --treatWarningsAsErrors.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread packages/roslib/src/RosLib.ts Resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 4, 2026 22:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are identified for the QoS profile support change.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@bjsowa
bjsowa requested a review from EzraBrooks November 4, 2026 22:51
Copilot AI balanced review requested due to automatic review settings November 5, 2026 09:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Under Noetic, the skipped QoS suite opens a WebSocket during test collection without running its cleanup hook, leaving the connection unclosed.

1 open issue

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 5, 2026 10:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues requiring changes to the optional QoS profile support.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 5, 2026 10:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the addition of configurable ROS 2 QoS support for topics.

No open issues 🎉

Review effort: Balanced

@bjsowa
bjsowa requested a review from MatthijsBurgh November 5, 2026 10:29
Comment thread packages/roslib/src/core/Topic.ts Resolved

@MatthijsBurgh MatthijsBurgh left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot AI balanced review requested due to automatic review settings November 16, 2026 16:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The public Ros.Topic signature references DistributiveOmit without re-exporting it, triggering a TypeDoc warning that fails the docs CI job.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread packages/roslib/src/RosLib.ts Resolved
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 16, 2026 16:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are flagged for the QoS support changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@bjsowa

bjsowa commented Nov 16, 2026

Copy link
Copy Markdown
Member Author

CI is broken since #1299 . a0889a0 fixes it. I can move it to a separate PR if needed

Comment thread packages/roslib/src/core/Ros.ts Resolved
Copilot AI balanced review requested due to automatic review settings November 17, 2026 11:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the configurable QoS change.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 17, 2026 12:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the QoS profile support change.

No open issues 🎉

Review effort: Balanced

@bjsowa
bjsowa requested a review from EzraBrooks November 17, 2026 14:33
@bjsowa
bjsowa merged commit 5aa3695 into develop Nov 19, 2026
15 checks passed
@bjsowa
bjsowa deleted the feat/add-qos-profiles branch November 19, 2026 05:19
@bjsowa

bjsowa commented Nov 19, 2026

Copy link
Copy Markdown
Member Author

@EzraBrooks Do you think we should get rid of Omit<ConstructorParameters<>, "ros"> pattern altogether and add ServiceOptions, ParamOptions, etc?

@EzraBrooks

Copy link
Copy Markdown
Contributor

@bjsowa it probably would make the generated docs more readable, so sounds good to me

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.

4 participants