ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

multiple ar.drones on tum_simulator

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

jacky_90 gravatar image

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

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"?>

<launch>

  <!-- 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/3boxes_room.world" 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>

  <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"
  </include>
  </group>

  <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"
  </include>
  </group>

</launch>

while the spawn_quadrotor_classic launch file is,

 <launch>
   <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)/xacro.py '$(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
   -urdf
   $(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>

   <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>
   <!-- node name="hector_pose_estimation" pkg="hector_pose_estimation" type="hector_pose_estimation_node" output="screen"/-->

 </launch>

Any help would be appreciated! Thank you!

edit retag flag offensive close merge delete

Comments

Related question (and answer): http://answers.gazebosim.org/question/896/name-dependent-plugin-topics/

aukejw gravatar image aukejw  ( 2013-05-31 01:42:21 -0500 )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 -0500 )edit
1

Any news regarding this?

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

4 Answers

Sort by » oldest newest most voted
1

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

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

Comments

can you send me how you did more detail to my email please? yongari1290@gmail.com 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 -0500 )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 -0500 )edit

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

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

Hi, anyone found the solution to this ??

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

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

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
1

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

David Saldana gravatar image

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

edit flag offensive delete link more
0

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

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

Question Tools

3 followers

Stats

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

Seen: 2,213 times

Last updated: May 08 '14