Skip to content

feat: Add support for QoS profiles - #1291

Open
bjsowa wants to merge 8 commits into
developfrom
feat/add-qos-profiles
Open

bjsowa wants to merge 8 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
* @param [options.queue_size=100] - The queue created at bridge side for re-publishing webtopics.
* @param [options.latch=false] - Latch the topic when publishing.
* @param [options.queue_length=0] - The queue length at bridge side used when subscribing.
* @param [options.qos] - QoS profile for the topic. When provided, `latch` and `queue_size` are ignored.

@EzraBrooks EzraBrooks Nov 5, 2026 •

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.

Please create a new union type for this options object that makes qos mutually exclusive with latch and queue_size. You should just need to make a base type with two interfaces that extend it, one with

{
  qos?: RosBridgeQosProfile;
  latch: never;
  queue_size: never;
}

and one with

{
  latch: boolean;
  queue_size: number;
  qos: never;
}

This branch has not been deployed

No deployments
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.

3 participants