Gazebo | Ignition | Community
Ask Your Question

Name-Dependent Plugin Topics

asked 2013-01-17 12:42:34 -0500

David Millard gravatar image

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?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-01-18 13:35:10 -0500

David Millard gravatar image

Figured it out: tum_simulator hardcodes some paths as absolute. Removing the leading '/' from relevant topics (/ardrone/takeoff, /ardrone/land, /ardrone/reset, etc) in the cvg_sim_gazebo_plugins package fixed it up.

edit flag offensive delete link more


I received an email about this answer recently over confusion on what to change. The relevant values are in

I don't believe that the package is taking pull requests since 2014, and I'm not aware of an active fork to submit a patch to.

David Millard gravatar imageDavid Millard ( 2020-12-02 11:46:21 -0500 )edit

answered 2013-06-27 23:01:53 -0500

Hi David,

Please, could you share your .launch files? I am also trying to simulate multiple ardrone.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2013-01-17 12:42:34 -0500

Seen: 786 times

Last updated: Jun 27 '13