Repository navigation
Conversation
Contributor
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>
EzraBrooks
requested changes
Nov 5, 2026
| * @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. |
Contributor
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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