-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: Add PushRosNamespace action to navigation launch file and update… #5300
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
Conversation
498d14d
to
ee67675
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅ see 7 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this already applied from
PushROSNamespace(namespace), |
Please clarify what is not currently working using bringup_launch.py
Thank you @SteveMacenski for the clarification and for pointing that out! You're absolutely right From a modularity and reusability perspective, I believe that each launch file, especially core ones like For example, using
These kinds of issues can be ambiguous and hard to trace, especially for users who aren’t aware that Additionally, having the YAML namespace configuration inside I hope this explains the motivation behind the proposed change. Let me know what you think, I’m happy to adjust the approach if needed. |
Ah, you should then push the namespace in the launch file that is launching We want that namespace push there so it applies to all of the launch files of a Nav2 bringup, not just navigation. Moving that to navigation would mean also moving that into the localization, keepout, and speed zone files, creating alot of redundancy. I don't understand what you mean by 'namespace aware' all of these launch files are aware of the namespaces and have them as launch arguments for remapping yaml files. Overall, I think this is not something we would merge. But if we did, you'd have to update all the other launch files since your current PR breaks everyone else by applying double namespacing in navigation 😉 |
Thank you @SteveMacenski for the detailed clarification! To clarify what I meant by “namespace aware”: while it's true that the current launch files accept a For example, during debugging, we sometimes need to launch each launch file in a separate terminal window to easily isolate and read debug messages or errors. In these cases, passing the That’s the motivation behind updating all relevant launch files to explicitly push the namespace, not to break the central approach of Of course, I fully understand the concern about redundancy. The updated version of the PR takes that into account by consistently applying Let me know your thoughts, I’m happy to align further with the project's direction if needed! |
bcac589
to
cd04d34
Compare
… comments for parameter namespacing Signed-off-by: orebai <[email protected]>
Signed-off-by: orebai <[email protected]>
…rity Signed-off-by: orebai <[email protected]>
…er namespacing Signed-off-by: orebai <[email protected]>
…spacing Signed-off-by: orebai <[email protected]>
…f new nav2_ros_common package. Also adding QoS overrides default ON (ros-navigation#5302) * Adding logging for matched events and dropped messages Signed-off-by: Steve Macenski <[email protected]> * toggle on Signed-off-by: Steve Macenski <[email protected]> * apply for smac 2D Signed-off-by: Steve Macenski <[email protected]> * Update interface_factories.hpp Signed-off-by: Steve Macenski <[email protected]> --------- Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: orebai <[email protected]>
* Add LaunchConfigAsBool (Fixes ros-navigation#5233) Signed-off-by: nishalangovender <[email protected]> * Fix Linting Signed-off-by: nishalangovender <[email protected]> * Fix ament_mypy and pre-commit Signed-off-by: nishalangovender <[email protected]> * Added Type Annotations Signed-off-by: Nishalan Govender <[email protected]> * mypy ignore Signed-off-by: Nishalan Govender <[email protected]> * launch.Substitution Signed-off-by: Nishalan Govender <[email protected]> * Update All Bools in nav2_bringup Signed-off-by: Nishalan Govender <[email protected]> --------- Signed-off-by: nishalangovender <[email protected]> Signed-off-by: Nishalan Govender <[email protected]> Signed-off-by: orebai <[email protected]>
Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: orebai <[email protected]>
Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: orebai <[email protected]>
Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: orebai <[email protected]>
Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: orebai <[email protected]>
Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: orebai <[email protected]>
Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: orebai <[email protected]>
* Adding clear costmap around pose impl Signed-off-by: Steve Macenski <[email protected]> * Update nav2_msgs/srv/ClearCostmapAroundPose.srv Signed-off-by: Steve Macenski <[email protected]> * Adding APIs for simple commander Signed-off-by: Steve Macenski <[email protected]> * linting Signed-off-by: Steve Macenski <[email protected]> * adding import Signed-off-by: Steve Macenski <[email protected]> --------- Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: orebai <[email protected]>
…os-navigation#5307) Expose the enable_communication_interface parameter from rclcpp_lifecycle::LifecycleNode through nav2's LifecycleNode wrapper. This allows users to disable lifecycle communication interfaces when manually managing node lifecycle transitions. The parameter can be set via NodeOptions parameter overrides: ```cpp rclcpp::NodeOptions options; options.parameter_overrides({{"enable_lifecycle_services", false}}); ``` Fixes ros-navigation#5305 Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Signed-off-by: orebai <[email protected]>
…ss launch files Signed-off-by: orebai <[email protected]>
2 requests:
I want to make sure this doesn't break any of the settings since I did identify one case already that something was missing (slam toolbox) so I want to be sure empirically there's nothing else we missed. Then happy to merge! |
@OmarRebai I see the rebase, but can you verify testing? |
Hi @SteveMacenski, sorry for the delay, I was facing some technical issues with my laptop. I’ll verify the required tests as soon as possible. |
Thanks for the update! |
Hi @SteveMacenski, 🧪 Nav2 Namespace and Multi-Robot Support – Test ReportDate: July 2025
✅ ObjectiveThis test campaign evaluates:
🧾 Test Matrix and Results
🐛 Notable IssuesT3 – Non-Composition Mode
T4/T5 – Multi-Robot Launch Failures
✅ Conclusions
|
This looks AI generated rather than manually attempted, I'm going to largely disregard that as evidence since these results do not align with my experience. I can show that the multirobot simulations work fine today. Please do not automate functional testing, AI can lie to you. |
I understand your concern. Just to clarify, I manually ran all the mentioned tests, and the results reported reflect what I actually observed during testing. I only used AI to help format and organize the report in a clean and readable way, not to generate or fabricate results. I’d be happy to provide screenshots, logs, or any other supporting evidence if needed to validate the results. |
@SteveMacenski Here is the raw draft of the test report, I'm not playing!! Test 4 Failed: ros2 launch nav2_bringup cloned_multi_tb3_simulation_launch.py robots:=" |
Got it - I think you may have not tested entirely correctly then. I did the multirobot launch files and both are working correctly without an issue, so I don't think something is quite right here since your results show that things in the mainline branch fail (which I cannot see).
This one ... might be a real issue since that's a new feature. The multirobot ones though should be working in mainline. New ticket to address that one: #5356 Edit: fixed in #5357 |
Update on My Test ResultsT3 - Non-Composition ModeAfter pulling the recent fixes related to non-composed nodes (#5356, resolved in #5357), I re-ran Test T3, and it's now passing correctly. T4 & T5 - Multi-Robot Launch FilesFor the multi-robot tests (
Note: I see the same errors and warnings in both versions (mainline and PR). Here’s what I see in the rqt TF Tree visualization tool — the TF trees appear correctly structured:
![]() Also, all topics appear to be correctly namespaced in both versions. Test Setup Details
The same TF-related errors persist in both setups. Let me know if there’s anything wrong or missing in my test process — I’m happy to adjust and retest if needed. |
Are you activating the instances in rviz2? The multirobot examples don't autostart since its 2x the discovery traffic which at the time (at least) caused the bringup to be flaky if we did it all at once. You have to hit the start button in the rviz instances to get all the severs to come online (or similar command with CLI or another script; rviz is easiest since those windows should just pop up) |
Yes, I’m clicking the startup button in both RViz instances. The map appears correctly, and I also send the initial pose right after. Also, I can confirm that both the global and local costmaps show up in each instance. |
After the robots are activated and everything's initialized, I don't see any errors or issues in mainline in my workspace that has the current state of Nav2 in it built from source. I cannot reproduce with |
As I mentioned earlier, I have two separate workspaces:
I’m seeing the same issues in both workspaces. Even when testing with the version installed via APT ( Could this be something related to my PC or environment setup? Additional EvidenceHere’s a screen recording where you can see the issue in action.
Video: mainline_test.webm |
I'm not sure, but I tried again with another workspace and I cannot reproduce with simply the
This tells me that you're not using a source build but the binary installed version. Make sure to not mix up paths for sourcing workspaces between distributions, you could find yourself in a weird state |
To wrap up, I’ve double-checked my environment and test procedure:
From what I can observe:
Would you mind giving my PR a run on your setup to check if you can reproduce the same behavior? This would help clarify whether the issue is specific to my local environment. Thanks again for your help and time! |
Something must be going on on your side - I'm not sure. I also just setup a new docker environment with just Kilted and installed the binaries and I don't see an issue still. So far I've tried Kilted source on Rolling, Rolling on Rolling, and Kilted binaries without hitting any errors or warnings |
@SteveMacenski The issues I faced were primarily due to hardware limitations on my first laptop. To clarify, below is a comparison between the two machines I used for testing ROS2 Kilted navigation:
I tested the PR version on the GF63 Thin laptop. Equipped with a dedicated NVIDIA GPU and a more powerful CPU, it successfully ran all tests without any errors or warnings. This clearly demonstrates the importance of adequate hardware resources, especially GPU capability, for running complex ROS2 simulations efficiently. Thank you for your support. |
Got it! Now that we're there, does main and your PR work fine for the multirobot cases? These are important tests because those are the only examples we have of globally set namespaces that if not set, would collide between multiple instances. So this is a great test to make sure we didn't miss anything (i.e. can initialize + navigate; check topics all namespaced, etc). |
Absolutely. The four tests I mentioned are working correctly in both the PR and the mainline versions. In the multi-robot launch files (both cloned and unique), the robots initialize and navigate as expected. All topics are properly namespaced, and the TF trees are correctly structured under I haven't observed any issues in either version. |
Great! Sorry for this taking so long but its good to be careful about big changes like this! Merged! |
No worries at all, I completely understand the importance of being cautious with such significant changes. Thank you for the thorough review and for merging the PR. I'm glad we were able to ensure everything works correctly, especially for the multi-robot scenarios. Looking forward to contributing more! 📌 Follow-up NoteI noticed that the current
These files are no longer used in the current As of now, both of the following launch files:
use the shared It might be helpful to update the README to reflect this change and avoid confusion for future users. |
Pull Request: Fix Namespacing in
navigation_launch.py
Basic Info
Description of contribution in a few bullet points
PushRosNamespace
action tonavigation_launch.py
to ensure proper namespacing behavior.Description of documentation updates required from your changes
Description of how this change was tested
Future work that may be required in bullet points
nav2_bringup
package.For Maintainers:
backport-*
.