Skip to content

Adding options to override the footprint subscription qos #5196

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
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MarcoMatteoBassa
Copy link
Contributor


Basic Info

Info Please fill out this column
Primary OS tested on Ubuntu
Robotic platform tested on Simulation
Does this PR contain AI generated software? No

Description of contribution in a few bullet points

It is common for robots to publish their footprint on a latched topic.
This change allows the final user to configure the desired qos for the footprint subscription in the costmap objects.
Ex to set the topic as latched in the local costmap:

local_costmap:
  local_costmap:
    ros__parameters:
      qos_overrides:
        /footprint_topic_name:
          subscription:
            reliability: "reliable"
            depth: 1
            durability: "transient_local"

Description of documentation updates required from your changes

New parameters available

Description of how this change was tested

Validated in simulation that the qos changes using the cli.

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

Signed-off-by: Marco Bassa <marco.bassa@idealworks.com>
Copy link

codecov bot commented May 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
nav2_costmap_2d/src/costmap_2d_ros.cpp 87.63% <100.00%> (+0.03%) ⬆️

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SteveMacenski
Copy link
Member

I'm going to let this sit a little while because I'm working this week on migrating Nav2 to our own QoS profiles and utilities to have better control over the stack (and easier to change in one place). Adding in a Nav2 SubOptions seems totally in the scope of that work and I've noted it down to plan to incorporate. I'm leaving it open until that's ready but expect something in the next few days that I'll tag you in to review :-)

@SteveMacenski
Copy link
Member

SteveMacenski commented Jun 6, 2025

This is turning out to be quite the rabbit hole as this sparked a few new refactoring action items attached to all these changes. I've made good progress so far and added a new nav2_ros_common package that contains ROS-based wrappers (Service Client, Service Server, Simple Action, Node Thread, Node Utils, Lifecycle Node) and new interface factories that wrap all the create_* to output Nav2 wrappers instead of the ROS 2 base tools to make it easy to use / ergonomic.

So for example, now a create_service will output a nav2::ServiceServer instead of an rclcpp::Service coming with all the tools and conveniences that they entail. As part of that, I enforce consistent QoS settings for things like Actions and Services so that they cannot be incompatible. Also, I have new Nav2 Publisher and Subscription options factories that include things like QoS overrides, callback groups, and lost message callbacks as exposed to the user and default can be set via ROS 2 param files using the param allow_parameter_qos_overrides.

tl;dr: I'm working on it in https://github.com/ros-navigation/navigation2/tree/4888 and cleaning up some architectural bits along the way to make QoS easier to deal with and make sure things based on a Nav2 stack are consistent.

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