[ROS2] Namespace on Navigation2 does not prefix frames
Ubuntu 20.04 ROS2 Galactic
I'm trying to have multiple Turtlebot4 in the same Gazebo(Ignition) simulation with namespaces. I'm able to spawn them correctly next to each other with basic commands working (tele-operation, docking/undocking, ..) but the navigation stack does not behave correctly. My project so far: https://github.com/sp-sophia-labs/turtlebot4_multi_sim
My question is related to how namespaces work in navigation2. Based on the code, navigation2 is using a combination of pushROSNamespace
and GroupAction
to propagate namespaces to all nodes in the launch file and it works well for topics and node names. Frames on the other hand are not prefixed at all. The way it behaves on my side is that properly prefixed nodes and topics messages are referring to map
, base_link
and odom
frames which do not exist because they are prefixed
At first, I thought that it was intended and should be fixed by a correct configuration file. Although static configuration for a specific namespace seems to work, I'm not able to allow any namespace. I've tried adding wildcard namespaces to the turtlebot4 config file to force the namespaces prefixing on the frames, but they are not taken into account and the param file is not read properly. original config file: https://github.com/sp-sophia-labs/turtlebot4/blob/galactic/turtlebot4_navigation/config/nav2.yaml
Am I missing something or is it a missing functionality from navigation2?
Asked by hugob on 2022-11-14 11:55:57 UTC
Comments