-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Bug report
Required Info:
- Operating System:
- Ubuntu 24.04.3 LTS
- Computer:
- AMD Ryzen 5 3500U
- ROS2 Version:
- Jazzy binaries
- Version or commit hash:
- ros-jazzy-navigation2
1.3.10-1noble.20251108.013534
- ros-jazzy-navigation2
- DDS implementation:
- Tested with
FastDDSandCycloneDDS
- Tested with
Steps to reproduce issue
Configure both the local_costmap and global_costmap with a scan topic name that does not start with a leading slash (/) in a params file:
local_costmap:
local_costmap:
ros__parameters:
voxel_layer:
observation_sources: scan
scan:
topic: prefix/scan # <--- Topic name without leading slash
global_costmap:
global_costmap:
ros__parameters:
obstacle_layer:
observation_sources: scan
scan:
topic: prefix/scan # <--- Topic name without leading slash
Expected behavior
Both local_costmap and global_costmap should successfully subscribe to the configured scan source, as the topic name is a valid relative topic name in ROS 2.
Actual behavior
The local_costmap and global_costmap observation layers start without any subscription to the configured scan source and without emitting any warning or error regarding the failure.
- The
global_costmapgenerates a costmap based only on the static map (fromamcl). - The
local_costmapgenerates an empty costmap.
Reproduction instructions
For now, the issue is resolved by adding a leading slash (/) in front of the scan topic name in the params file (e.g., changing prefix/scan to /prefix/scan).
Additional information
This suggests an inconsistent approach in the scan topic name parsing and resolution within the Nav2 stack:
- The
local_costmapandglobal_costmapobservation layers fail silently when the scan topic lacks a leading slash. - Conversely, other core Nav2 components, such as
amcland thecollision_monitor, appear to handle the same topic naming convention (relative names without a leading slash) correctly, highlighting a functional divergence in how scan topic names are resolved across the Nav2 package.