Skip to content
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

Add subscription options to odometry subscriptions (main) #4968

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pele1410
Copy link

@pele1410 pele1410 commented Mar 6, 2025

Basic Info

Info Please fill out this column
Ticket(s) this addresses N/A
Primary OS tested on Ubuntu 22.04 docker container)
Robotic platform tested on Gazebo simulation
Does this PR contain AI generated software? No

Description of contribution in a few bullet points

Added rclcpp::SubscriptionOptions to the odometry topic subscribers to allow qos overrides in the configuration. We run our odometry topics with Unreliable QoS to prevent network issues that are common with high-rate, reliable DDS transmissions. This change allows us to override the Reliable QoS of the odom subscriptions to allow matching.

Description of documentation updates required from your changes

I would expect that this should be documented as a new configuration option, but I'm not entirely sure where that would happen.

Description of how this change was tested

Testing was done against the Jazzy branch with #4961


Future work that may be required in bullet points

N/A

For Maintainers:

  • Check that any new parameters added are updated in docs.nav2.org
  • Check that any significant change is added to the migration guide
  • Check that any new features OR changes to existing behaviors are reflected in the tuning guide
  • Check that any new functions have Doxygen added
  • Check that any new features have test coverage
  • Check that any new plugins is added to the plugins page
  • If BT Node, Additionally: add to BT's XML index of nodes for groot, BT package's readme table, and BT library lists

@SteveMacenski
Copy link
Member

CI failed unusually. I retriggered it to see if that resolves the issue.

In the meantime, please sign off your commits with DCO -- check out the failed DCO job for instructions how

@SteveMacenski
Copy link
Member

SteveMacenski commented Mar 7, 2025

@pele1410 the same test is failing repeatedly, I think there's a problem here. I just checked our nightly jobs and PRs I merged today and those builds have all passed, so I'm fairly confident this is introducing a subtle bug.

unknown file
C++ exception with description "cannot set or declare a parameter, or change the callback from within set callback" thrown in the test body.

I'm seeing a ticket with this mentioned ros2/rclcpp#2741. It looks like this touches upon a recently reported issue with rclcpp - which you would probably hit eventually with Jazzy as well (good thing we ran this across Nav2's extensive CI 😉 )

@pele1410
Copy link
Author

pele1410 commented Mar 7, 2025

Well that's unfortunate. I can see an easy way around re-creating the OdomSmoother when the odom_duration changes (add a setter). But the odom_topic change is trickier. I could see capturing the QoS Override properties on construction and storing them, then using them to recreate the subscriber in a new method when the odom_topic changes. But that seems bad in that it could mislead users since the qos_overrides wouldn't actually be allowed to be changed.

Or we wait for that issue/PR to be resolved, which I assume is the path forward here.

@SteveMacenski
Copy link
Member

I think so, there is a PR open, so hopefully it shouldn’t be too long! I commented in the ticket that we ran into it as well in Nav2, maybe that’ll help push it forward a bit 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants