How to send tf data from multiple namespaces to Rviz?
My setup: I have setup a launch file with two groups defining the namespaces for two robots, and launching rviz together with a joint_state_publisher, robot_state_publisher, ned_static_transform_publisher and a robot_description parameter.
The goal is to simulate multiple robots, each in its own namespace and visualize in Rviz.
Each robot sends tf transforms with sendTransform() from tf.TransformBroadcaster(), but they become the same /tf when seen in rqt_graph, and in rviz it means that my robot model is updating to the two robots seperatepositions, and not having a seperate model for each.
I have tried to used the tf_prefix, but that does not do any thing. I am using Indigo. I have found that it might be because that method is not valid since Hydro. See [1].
I have searched quite a bit around via google and directly on the answers.ros.org , but only found older posts saying to use tf prefixes as , and also a lot saying that it does not work any more. But I have not found a solution. I have thought about writing another node that takes the poes from the two robots and let this send the transforms.
I hope someone has another and more elegant solution that the one I just proposed. Any pointers or help is appreciated.