Ask Your Question

multiple ar.drones on tum_simulator

asked 2013-05-17 07:14:07 -0600

jacky_90 gravatar image

updated 2013-05-20 18:33:36 -0600

Hello everyone. I've been trying to make the ros-gazebo simulator working with 2 or more drones, with no result. Using rostopic list, the topics appear with the right name (/ardrone/takeoff and /ardrone_2/takeoff etc.) but when I send a command, only one drones is receiving them, often with unexpected outcomes (it flies away =( ))

Here is my launch file,

<?xml version="1.0"?>


  <!-- Start Gazebo with wg world running in (max) realtime -->
  <arg name="gui" default="true"/>

  <param name="/use_sim_time" value="true" />

  <node name="gazebo" pkg="gazebo" type="gazebo" args="$(find cvg_sim_gazebo)/worlds/" respawn="false" output="screen"/>
    <!-- start gui -->
  <group if="$(arg gui)">
    <node name="gazebo_gui" pkg="gazebo" type="gui" respawn="false" output="screen" required="true"/>

  <group ns="ardrone">
  <!-- Spawn simulated quadrotor uav -->
  <include file="$(find cvg_sim_gazebo)/launch/spawn_quadrotor_classic.launch" >
    <arg name="model" value="$(find cvg_sim_gazebo)/urdf/quadrotor_sensors.urdf.xacro"/>
    <arg name="init_pose" value="-x 0 -y 0 -z 0.5"

  <group ns="ardrone_2">
  <!-- Spawn simulated quadrotor uav -->
  <include file="$(find cvg_sim_gazebo)/launch/spawn_quadrotor_classic.launch" >
    <arg name="model" value="$(find cvg_sim_gazebo)/urdf/quadrotor_sensors.urdf.xacro"/>
    <arg name="init_pose" value="-x 1 -y 0 -z 0.5"


while the spawn_quadrotor_classic launch file is,

   <arg name="model" default="$(find cvg_sim_gazebo)/urdf/quadrotor.urdf.xacro"/>
   <arg name="init_pose" />
   <!-- send the robot XML to param server -->
   <param name="robot_description" command="$(find xacro)/ '$(arg model)'" />

   <!-- push robot_description to factory and spawn robot in gazebo -->
   <node name="spawn_robot" pkg="gazebo" type="spawn_model"
   args="-param robot_description
   $(arg init_pose)
   -model quadrotor"
     respawn="false" output="screen"/>

   <!-- start robot state publisher -->
   <node pkg="robot_state_publisher" type="state_publisher" name="robot_state_publisher" output="screen" >
     <param name="publish_frequency" type="double" value="50.0" />
     <param name="tf_prefix" type="string" value="" />

   <node name="ground_truth_to_tf" pkg="message_to_tf" type="message_to_tf" output="screen">
     <param name="odometry_topic" value="ground_truth/state" />
     <param name="frame_id" value="nav" />
   <!-- node name="hector_pose_estimation" pkg="hector_pose_estimation" type="hector_pose_estimation_node" output="screen"/-->


Any help would be appreciated! Thank you!

edit retag flag offensive close merge delete


Related question (and answer):

aukejw gravatar image aukejw  ( 2013-05-31 01:42:21 -0600 )edit

I can recreate your error, but have not yet found a solution. Controlling two drones from one PC works irl, rostopics are correct.. it seems as if one simulated drone receives all commands based on the ground truth of the other drone (i.e. altd == 0, so go up).

aukejw gravatar image aukejw  ( 2013-05-31 03:34:06 -0600 )edit

Any news regarding this?

alfa_80 gravatar image alfa_80  ( 2014-05-07 03:34:43 -0600 )edit

4 Answers

Sort by » oldest newest most voted

answered 2014-05-08 04:31:37 -0600

We had multiple (4) quadrotors flying using hector_quadrotor (which tum_simulator is based off) in ROS fuerte and groovy. I think that setup was using tf_prefix, which is not supported anymore with hydro, though. In principle it´s possible to get multiple UAVs working in Gazebo simulation, but making it work will probably require some effort.

edit flag offensive delete link more


can you send me how you did more detail to my email please? I also wonder if it also can work with tum_simulator in ROS fuerte

Yonggun Lee gravatar image Yonggun Lee  ( 2014-06-12 14:49:30 -0600 )edit

Could you also send me how this ros-multiple-uav-control is made? I'm using hector_quadrtor and facing the same issue.

Humberto Beltrao gravatar image Humberto Beltrao  ( 2014-10-29 13:38:05 -0600 )edit

Please try to keep the discussion on the site, where it can benefit the entire community.

ahendrix gravatar image ahendrix  ( 2014-10-29 14:36:31 -0600 )edit

Hi, anyone found the solution to this ??

malharjajoo gravatar image malharjajoo  ( 2018-02-03 21:33:12 -0600 )edit

answered 2014-05-07 14:05:52 -0600

jacky_90 gravatar image

I contacted the developer some time ago. He said that the simulator is structured in such a way that allows the spawning of only a single robot at each time.

edit flag offensive delete link more

answered 2013-06-28 04:54:59 -0600

David Saldana gravatar image

Something new?? I have the same problem...

edit flag offensive delete link more

answered 2014-07-23 09:03:30 -0600

Yonggun Lee gravatar image

I was be able to spawn multiple of them. When I was doing this as first time, first ardrone takeoff forever. Now, I finally fix it, and I can control 1st ardrone while I am spawning multiple ardrones. However, Still I can't control 2nd ardrone even though I can take some data from there but not the controll

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2013-05-17 07:14:07 -0600

Seen: 2,063 times

Last updated: May 08 '14