Hello,
I want to simulate 2 turtlebots with their own slam and navigation together in the same Gazebo ROS2 Foxy simulation. For that, I want to separate them, so that they do not interfere with each other.
I stumbled across this post, but it is not clear to me, what is the best/right way.
As far as I understand, the tf (or tf2) library uses a global name server, to calculate transformations (But could be only in ROS1). When I have both robots publishing a frame with the name odom to /tf, I would expect, tf can no longer tell, which frame belongs to which robot.
I would expect the same behavior for /robot1/tf because of the global name server. So I thought, that the right way would be 1 tree with a frame prefix per robot.
But nav2 seems to use only the namespace, not the prefix. Also here they answered in the same way.
I also cant find any support for frame prefixes in most libraries, they only offer a namespace argument, so I am not sure how to remap their requests for frames.
Does anybody know, how it should be done? Maybe can even explain, how to use it in an example (e.g. Use namespace and remap for every node etc.)?
Thank you very much
EDIT: I think the name recognition is per tf node? So that if I have two /tf in separate name spaces, they will operate fine, right?
Originally posted by Zeckurbo on ROS Answers with karma: 105 on 2022-09-01
Post score: 2