Name-Dependent Plugin Topics
I'm trying to simulate multiple (2) AR.Drone Parrot quatrotors in gazebo. I'm using the tum_simulator package, which in turn presents the same interface as the ardrone_autonomy driver for the real-world drones. I can spawn a single drone without error, and fly it around programmatically with roscpp. I can also spawn multiple drones without error by duplicating the launch code and surrounding it with <group ns="drone{0,1}">
tags. After manipulating some tf
parameters, the drones spawn without error.
The simulator subscribes to properly namespaced topics, for the most part. For example, instead of /cmd_vel
, there are now two topics /drone0/cmd_vel
and /drone1/cmd_vel
. However, topics to control takeoff and landing are hardcoded in a gazebo plugin as /ardrone/{takeoff,landing,reset}
, and rxgraph
shows that these topics are not duplicated between namespaces, they remain prefixed only by /ardrone
.
How is it possible to have the plugin offer namespaced topics that are linked up to each drone?