-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(LibCarla/ros2): [1/3] add publisher durability QoS and latched OpenDRIVE map topic #9786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
JArmandoAnaya
wants to merge
7
commits into
carla-simulator:ue4-dev
Choose a base branch
from
JArmandoAnaya:feature/ros2-qos-durability-and-map
base: ue4-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,160
−57
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
95292ea
feat(LibCarla/ros2): add publisher durability QoS and latched /carla/…
JArmandoAnaya 7af7660
feat(examples/ros2): add map and lidar demo combining sensors and lan…
JArmandoAnaya 22a8fc6
fix(LibCarla/ros2): apply the history depth regardless of durability
JArmandoAnaya 88cdef1
fix(examples/ros2): use python3 shebangs and name the lane chain cap
JArmandoAnaya 41fa93f
feat(LibCarla/ros2): add publisher reliability QoS with best-effort s…
JArmandoAnaya 6d8e5b9
docs(ros2): document the header-less latched map topic semantics
JArmandoAnaya 356d1f6
fix(LibCarla/ros2): enable timestamping on the zenoh fallback session…
JArmandoAnaya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| // Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma de Barcelona (UAB). | ||
| // This work is licensed under the terms of the MIT license. | ||
| // For a copy, see <https://opensource.org/licenses/MIT>. | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <cstdint> | ||
|
|
||
| namespace carla { | ||
| namespace ros2 { | ||
|
|
||
| /// Durability of a publisher endpoint, mirroring the DDS durability QoS. | ||
| enum class DurabilityKind : uint8_t { | ||
| /// Late-joining subscribers only receive samples written after they match. | ||
| Volatile, | ||
| /// The writer keeps a sample cache so late-joining subscribers receive the | ||
| /// last history_depth samples (the ROS 2 "latched topic" behavior). | ||
| TransientLocal | ||
| }; | ||
|
|
||
| /// Reliability of a publisher endpoint, mirroring the DDS reliability QoS. | ||
| enum class ReliabilityKind : uint8_t { | ||
| /// The writer retransmits until every matched reliable subscriber acks the | ||
| /// sample, blocking the publish call while the writer history is full. | ||
| Reliable, | ||
| /// Samples are sent once and may be dropped; the publish call never blocks | ||
| /// on slow subscribers (the ROS 2 sensor-data idiom for high-rate streams). | ||
| BestEffort | ||
| }; | ||
|
|
||
| /// QoS settings applied to a publisher middleware at Init time. | ||
| /// The defaults reproduce the exact behavior every publisher had before QoS | ||
| /// support was added: reliable delivery, volatile durability, and a | ||
| /// keep-last history of 1. | ||
| struct PublisherQos { | ||
| DurabilityKind durability{DurabilityKind::Volatile}; | ||
| ReliabilityKind reliability{ReliabilityKind::Reliable}; | ||
| uint32_t history_depth{1u}; | ||
|
|
||
| /// Profile for high-rate sensor streams (camera images, point clouds): | ||
| /// best-effort delivery so a slow or vanished subscriber can never stall | ||
| /// the publishing thread, matching the ROS 2 sensor-data QoS reliability. | ||
| static PublisherQos SensorData() { | ||
| PublisherQos qos; | ||
| qos.reliability = ReliabilityKind::BestEffort; | ||
| return qos; | ||
| } | ||
|
|
||
| /// History depth to hand to the middleware: a keep-last history needs a | ||
| /// positive depth, so the invalid value 0 is clamped to 1. | ||
| uint32_t effective_history_depth() const { | ||
| return history_depth == 0u ? 1u : history_depth; | ||
| } | ||
| }; | ||
|
|
||
| } // namespace ros2 | ||
| } // namespace carla | ||
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.