1. MPI_Allgatherv, version 0.6.2

2. add test worlds and for single machine two Gazebo.
This commit is contained in:
zhangshuai 2019-10-21 15:31:30 +08:00
parent 4957a0e337
commit 37dc593069
11 changed files with 2246 additions and 211 deletions

View File

@ -24,108 +24,108 @@
<!-- For distributed simulation -->
<distribution flag=1>
<gazebo_id num=0>
<model_name>robot_1</model_name>
<model_name>robot_2</model_name>
<model_name>robot_3</model_name>
<model_name>robot_4</model_name>
<model_name>robot_5</model_name>
<model_name>robot_6</model_name>
<model_name>robot_7</model_name>
<model_name>robot_8</model_name>
<model_name>robot_9</model_name>
<model_name>robot_10</model_name>
<model_name>robot_11</model_name>
<model_name>robot_12</model_name>
<model_name>robot_13</model_name>
<model_name>robot_14</model_name>
<model_name>robot_15</model_name>
<model_name>robot_16</model_name>
<model_name>robot_17</model_name>
<model_name>robot_18</model_name>
<model_name>robot_19</model_name>
<model_name>robot_20</model_name>
<model_name>robot_21</model_name>
<model_name>robot_22</model_name>
<model_name>robot_23</model_name>
<model_name>robot_24</model_name>
<model_name>robot_25</model_name>
<model_name>robot_26</model_name>
<model_name>robot_27</model_name>
<model_name>robot_28</model_name>
<model_name>robot_29</model_name>
<model_name>robot_30</model_name>
<model_name>robot_31</model_name>
<model_name>robot_32</model_name>
<model_name>robot_33</model_name>
<model_name>robot_34</model_name>
<model_name>robot_35</model_name>
<model_name>robot_36</model_name>
<model_name>robot_37</model_name>
<model_name>robot_38</model_name>
<model_name>robot_39</model_name>
<model_name>robot_40</model_name>
<model_name>robot_41</model_name>
<model_name>robot_42</model_name>
<model_name>robot_43</model_name>
<model_name>robot_44</model_name>
<model_name>robot_45</model_name>
<model_name>robot_46</model_name>
<model_name>robot_47</model_name>
<model_name>robot_48</model_name>
<model_name>robot_49</model_name>
<model_name>robot_50</model_name>
<model_name>bebop_0</model_name>
<model_name>bebop_1</model_name>
<model_name>bebop_2</model_name>
<model_name>bebop_3</model_name>
<model_name>bebop_4</model_name>
<model_name>bebop_5</model_name>
<model_name>bebop_6</model_name>
<model_name>bebop_7</model_name>
<model_name>bebop_8</model_name>
<model_name>bebop_9</model_name>
<model_name>bebop_10</model_name>
<model_name>bebop_11</model_name>
<model_name>bebop_12</model_name>
<model_name>bebop_13</model_name>
<model_name>bebop_14</model_name>
<model_name>bebop_15</model_name>
<model_name>bebop_16</model_name>
<model_name>bebop_17</model_name>
<model_name>bebop_18</model_name>
<model_name>bebop_19</model_name>
<model_name>bebop_20</model_name>
<model_name>bebop_21</model_name>
<model_name>bebop_22</model_name>
<model_name>bebop_23</model_name>
<model_name>bebop_24</model_name>
<model_name>bebop_25</model_name>
<model_name>bebop_26</model_name>
<model_name>bebop_27</model_name>
<model_name>bebop_28</model_name>
<model_name>bebop_29</model_name>
<model_name>bebop_30</model_name>
<model_name>bebop_31</model_name>
<model_name>bebop_32</model_name>
<model_name>bebop_33</model_name>
<model_name>bebop_34</model_name>
<model_name>bebop_35</model_name>
<model_name>bebop_36</model_name>
<model_name>bebop_37</model_name>
<model_name>bebop_38</model_name>
<model_name>bebop_39</model_name>
<model_name>bebop_40</model_name>
<model_name>bebop_41</model_name>
<model_name>bebop_42</model_name>
<model_name>bebop_43</model_name>
<model_name>bebop_44</model_name>
<model_name>bebop_45</model_name>
<model_name>bebop_46</model_name>
<model_name>bebop_47</model_name>
<model_name>bebop_48</model_name>
<model_name>bebop_49</model_name>
</gazebo_id>
<gazebo_id num=1>
<model_name>robot_51</model_name>
<model_name>robot_52</model_name>
<model_name>robot_53</model_name>
<model_name>robot_54</model_name>
<model_name>robot_55</model_name>
<model_name>robot_56</model_name>
<model_name>robot_57</model_name>
<model_name>robot_58</model_name>
<model_name>robot_59</model_name>
<model_name>robot_60</model_name>
<model_name>robot_61</model_name>
<model_name>robot_62</model_name>
<model_name>robot_63</model_name>
<model_name>robot_64</model_name>
<model_name>robot_65</model_name>
<model_name>robot_66</model_name>
<model_name>robot_67</model_name>
<model_name>robot_68</model_name>
<model_name>robot_69</model_name>
<model_name>robot_70</model_name>
<model_name>robot_71</model_name>
<model_name>robot_72</model_name>
<model_name>robot_73</model_name>
<model_name>robot_74</model_name>
<model_name>robot_75</model_name>
<model_name>robot_76</model_name>
<model_name>robot_77</model_name>
<model_name>robot_78</model_name>
<model_name>robot_79</model_name>
<model_name>robot_80</model_name>
<model_name>robot_81</model_name>
<model_name>robot_82</model_name>
<model_name>robot_83</model_name>
<model_name>robot_84</model_name>
<model_name>robot_85</model_name>
<model_name>robot_86</model_name>
<model_name>robot_87</model_name>
<model_name>robot_88</model_name>
<model_name>robot_89</model_name>
<model_name>robot_90</model_name>
<model_name>robot_91</model_name>
<model_name>robot_92</model_name>
<model_name>robot_93</model_name>
<model_name>robot_94</model_name>
<model_name>robot_95</model_name>
<model_name>robot_96</model_name>
<model_name>robot_97</model_name>
<model_name>robot_98</model_name>
<model_name>robot_99</model_name>
<model_name>robot_100</model_name>
<gazebo_id num=1>
<model_name>bebop_50</model_name>
<model_name>bebop_51</model_name>
<model_name>bebop_52</model_name>
<model_name>bebop_53</model_name>
<model_name>bebop_54</model_name>
<model_name>bebop_55</model_name>
<model_name>bebop_56</model_name>
<model_name>bebop_57</model_name>
<model_name>bebop_58</model_name>
<model_name>bebop_59</model_name>
<model_name>bebop_60</model_name>
<model_name>bebop_61</model_name>
<model_name>bebop_62</model_name>
<model_name>bebop_63</model_name>
<model_name>bebop_64</model_name>
<model_name>bebop_65</model_name>
<model_name>bebop_66</model_name>
<model_name>bebop_67</model_name>
<model_name>bebop_68</model_name>
<model_name>bebop_69</model_name>
<model_name>bebop_70</model_name>
<model_name>bebop_71</model_name>
<model_name>bebop_72</model_name>
<model_name>bebop_73</model_name>
<model_name>bebop_74</model_name>
<model_name>bebop_75</model_name>
<model_name>bebop_76</model_name>
<model_name>bebop_77</model_name>
<model_name>bebop_78</model_name>
<model_name>bebop_79</model_name>
<model_name>bebop_80</model_name>
<model_name>bebop_81</model_name>
<model_name>bebop_82</model_name>
<model_name>bebop_83</model_name>
<model_name>bebop_84</model_name>
<model_name>bebop_85</model_name>
<model_name>bebop_86</model_name>
<model_name>bebop_87</model_name>
<model_name>bebop_88</model_name>
<model_name>bebop_89</model_name>
<model_name>bebop_90</model_name>
<model_name>bebop_91</model_name>
<model_name>bebop_92</model_name>
<model_name>bebop_93</model_name>
<model_name>bebop_94</model_name>
<model_name>bebop_95</model_name>
<model_name>bebop_96</model_name>
<model_name>bebop_97</model_name>
<model_name>bebop_98</model_name>
<model_name>bebop_99</model_name>
</gazebo_id>
</distribution>

View File

@ -20,114 +20,6 @@
</clouds>
</sky>
</scene>
<!-- For distributed simulation -->
<distribution flag=0>
<gazebo_id num=0>
<model_name>robot_1</model_name>
<model_name>robot_2</model_name>
<model_name>robot_3</model_name>
<model_name>robot_4</model_name>
<model_name>robot_5</model_name>
<model_name>robot_6</model_name>
<model_name>robot_7</model_name>
<model_name>robot_8</model_name>
<model_name>robot_9</model_name>
<model_name>robot_10</model_name>
<model_name>robot_11</model_name>
<model_name>robot_12</model_name>
<model_name>robot_13</model_name>
<model_name>robot_14</model_name>
<model_name>robot_15</model_name>
<model_name>robot_16</model_name>
<model_name>robot_17</model_name>
<model_name>robot_18</model_name>
<model_name>robot_19</model_name>
<model_name>robot_20</model_name>
<model_name>robot_21</model_name>
<model_name>robot_22</model_name>
<model_name>robot_23</model_name>
<model_name>robot_24</model_name>
<model_name>robot_25</model_name>
<model_name>robot_26</model_name>
<model_name>robot_27</model_name>
<model_name>robot_28</model_name>
<model_name>robot_29</model_name>
<model_name>robot_30</model_name>
<model_name>robot_31</model_name>
<model_name>robot_32</model_name>
<model_name>robot_33</model_name>
<model_name>robot_34</model_name>
<model_name>robot_35</model_name>
<model_name>robot_36</model_name>
<model_name>robot_37</model_name>
<model_name>robot_38</model_name>
<model_name>robot_39</model_name>
<model_name>robot_40</model_name>
<model_name>robot_41</model_name>
<model_name>robot_42</model_name>
<model_name>robot_43</model_name>
<model_name>robot_44</model_name>
<model_name>robot_45</model_name>
<model_name>robot_46</model_name>
<model_name>robot_47</model_name>
<model_name>robot_48</model_name>
<model_name>robot_49</model_name>
<model_name>robot_50</model_name>
</gazebo_id>
<gazebo_id num=1>
<model_name>robot_51</model_name>
<model_name>robot_52</model_name>
<model_name>robot_53</model_name>
<model_name>robot_54</model_name>
<model_name>robot_55</model_name>
<model_name>robot_56</model_name>
<model_name>robot_57</model_name>
<model_name>robot_58</model_name>
<model_name>robot_59</model_name>
<model_name>robot_60</model_name>
<model_name>robot_61</model_name>
<model_name>robot_62</model_name>
<model_name>robot_63</model_name>
<model_name>robot_64</model_name>
<model_name>robot_65</model_name>
<model_name>robot_66</model_name>
<model_name>robot_67</model_name>
<model_name>robot_68</model_name>
<model_name>robot_69</model_name>
<model_name>robot_70</model_name>
<model_name>robot_71</model_name>
<model_name>robot_72</model_name>
<model_name>robot_73</model_name>
<model_name>robot_74</model_name>
<model_name>robot_75</model_name>
<model_name>robot_76</model_name>
<model_name>robot_77</model_name>
<model_name>robot_78</model_name>
<model_name>robot_79</model_name>
<model_name>robot_80</model_name>
<model_name>robot_81</model_name>
<model_name>robot_82</model_name>
<model_name>robot_83</model_name>
<model_name>robot_84</model_name>
<model_name>robot_85</model_name>
<model_name>robot_86</model_name>
<model_name>robot_87</model_name>
<model_name>robot_88</model_name>
<model_name>robot_89</model_name>
<model_name>robot_90</model_name>
<model_name>robot_91</model_name>
<model_name>robot_92</model_name>
<model_name>robot_93</model_name>
<model_name>robot_94</model_name>
<model_name>robot_95</model_name>
<model_name>robot_96</model_name>
<model_name>robot_97</model_name>
<model_name>robot_98</model_name>
<model_name>robot_99</model_name>
<model_name>robot_100</model_name>
</gazebo_id>
</distribution>
<physics type="ode" name="ode">
<real_time_update_rate>0</real_time_update_rate>

View File

@ -0,0 +1,317 @@
#!/usr/bin/env python
#
# Copyright 2013 Open Source Robotics Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Desc: helper script for spawning models in gazebo
# Author: John Hsu, Dave Coleman
#
import rospy, sys, os, time
import string
import warnings
import re
from gazebo_ros import gazebo_interface
from gazebo_msgs.msg import *
from gazebo_msgs.srv import *
from std_srvs.srv import Empty
from geometry_msgs.msg import Point, Pose, Quaternion, Twist, Wrench
import tf.transformations as tft
model_database_template = """<sdf version="1.4">
<world name="default">
<include>
<uri>model://MODEL_NAME</uri>
</include>
</world>
</sdf>"""
def usage():
print('''Commands:
-[urdf|sdf|trimesh|gazebo] - specify incoming xml is urdf, sdf or trimesh format. gazebo arg is deprecated in ROS Hydro
-[file|param|database] [<file_name>|<param_name>|<model_name>] - source of the model xml or the trimesh file
-model <model_name> - name of the model to be spawned.
-reference_frame <entity_name> - optinal: name of the model/body where initial pose is defined.
If left empty or specified as "world", gazebo world frame is used.
-gazebo_namespace <gazebo ros_namespace> - optional: ROS namespace of gazebo offered ROS interfaces. Defaults to /gazebo/ (e.g. /gazebo/spawn_model).
-robot_namespace <robot ros_namespace> - optional: change ROS namespace of gazebo-plugins.
-unpause - optional: !!!Experimental!!! unpause physics after spawning model
-wait - optional: !!!Experimental!!! wait for model to exist
-trimesh_mass <mass in kg> - required if -trimesh is used: linear mass
-trimesh_ixx <moment of inertia in kg*m^2> - required if -trimesh is used: moment of inertia about x-axis
-trimesh_iyy <moment of inertia in kg*m^2> - required if -trimesh is used: moment of inertia about y-axis
-trimesh_izz <moment of inertia in kg*m^2> - required if -trimesh is used: moment of inertia about z-axis
-trimesh_gravity <bool> - required if -trimesh is used: gravity turned on for this trimesh model
-trimesh_material <material name as a string> - required if -trimesh is used: E.g. Gazebo/Blue
-trimesh_name <link name as a string> - required if -trimesh is used: name of the link containing the trimesh
-x <x in meters> - optional: initial pose, use 0 if left out
-y <y in meters> - optional: initial pose, use 0 if left out
-z <z in meters> - optional: initial pose, use 0 if left out
-R <roll in radians> - optional: initial pose, use 0 if left out
-P <pitch in radians> - optional: initial pose, use 0 if left out
-Y <yaw in radians> - optional: initial pose, use 0 if left out
-J <joint_name joint_position> - optional: initialize the specified joint at the specified value
-package_to_model - optional: convert urdf <mesh filename="package://..." to <mesh filename="model://..."
-b - optional: bond to gazebo and delete the model when this program is interrupted
''')
sys.exit(1)
class SpawnModel():
def __init__(self):
self.initial_xyz = [0,0,0]
self.initial_rpy = [0,0,0]
self.initial_q = [0,0,0,1]
self.file_name = ""
self.param_name = ""
self.database_name = ""
self.model_name = ""
self.robot_namespace = rospy.get_namespace()
self.gazebo_namespace = "/xxx"
self.reference_frame = ""
self.unpause_physics = False
self.wait_for_model = ""
self.wait_for_model_exists = False
self.urdf_format = False
self.sdf_format = False
self.joint_names = []
self.joint_positions = []
self.package_to_model = False
self.bond = False
def parseUserInputs(self):
# get goal from commandline
for i in range(0,len(sys.argv)):
if sys.argv[i] == '-h' or sys.argv[i] == '--help' or sys.argv[i] == '-help':
usage()
sys.exit(1)
if sys.argv[i] == '-unpause':
self.unpause_physics = True
if sys.argv[i] == '-urdf':
if self.sdf_format == True:
rospy.logerr("Error: you cannot specify both urdf and sdf format xml, must pick one")
sys.exit(0)
else:
self.urdf_format = True;
if sys.argv[i] == '-sdf' or sys.argv[i] == '-gazebo':
if self.urdf_format == True:
rospy.logerr("Error: you cannot specify both urdf and sdf format xml, must pick one")
sys.exit(0)
else:
if sys.argv[i] == '-gazebo':
rospy.logwarn("Deprecated: the -gazebo tag is now -sdf")
warnings.warn("Deprecated: the -gazebo tag is now -sdf", DeprecationWarning)
self.sdf_format = True;
if sys.argv[i] == '-J':
if len(sys.argv) > i+2:
self.joint_names.append(sys.argv[i+1])
self.joint_positions.append(float(sys.argv[i+2]))
else:
rospy.logerr("Error: must specify a joint name and joint value pair")
sys.exit(0)
if sys.argv[i] == '-param':
if len(sys.argv) > i+1:
if self.file_name != "" or self.database_name != "":
rospy.logerr("Error: you cannot specify file name if parameter or database name is given, must pick one source of model xml")
sys.exit(0)
else:
self.param_name = sys.argv[i+1]
if sys.argv[i] == '-file':
if len(sys.argv) > i+1:
if self.param_name != "" or self.database_name != "":
rospy.logerr("Error: you cannot specify parameter if file or database name is given, must pick one source of model xml")
sys.exit(0)
else:
self.file_name = sys.argv[i+1]
if sys.argv[i] == '-database':
if len(sys.argv) > i+1:
if self.param_name != "" or self.file_name != "":
rospy.logerr("Error: you cannot specify parameter if file or parameter name is given, must pick one source of model xml")
sys.exit(0)
else:
self.database_name = sys.argv[i+1]
if sys.argv[i] == '-model':
if len(sys.argv) > i+1:
self.model_name = sys.argv[i+1]
if sys.argv[i] == '-wait':
if len(sys.argv) > i+1:
self.wait_for_model = sys.argv[i+1]
if sys.argv[i] == '-reference_frame':
if len(sys.argv) > i+1:
self.reference_frame = sys.argv[i+1]
if sys.argv[i] == '-robot_namespace':
if len(sys.argv) > i+1:
self.robot_namespace = sys.argv[i+1]
if sys.argv[i] == '-namespace':
if len(sys.argv) > i+1:
self.robot_namespace = sys.argv[i+1]
if sys.argv[i] == '-gazebo_namespace':
if len(sys.argv) > i+1:
self.gazebo_namespace = sys.argv[i+1]
if sys.argv[i] == '-x':
if len(sys.argv) > i+1:
self.initial_xyz[0] = float(sys.argv[i+1])
if sys.argv[i] == '-y':
if len(sys.argv) > i+1:
self.initial_xyz[1] = float(sys.argv[i+1])
if sys.argv[i] == '-z':
if len(sys.argv) > i+1:
self.initial_xyz[2] = float(sys.argv[i+1])
if sys.argv[i] == '-R':
if len(sys.argv) > i+1:
self.initial_rpy[0] = float(sys.argv[i+1])
if sys.argv[i] == '-P':
if len(sys.argv) > i+1:
self.initial_rpy[1] = float(sys.argv[i+1])
if sys.argv[i] == '-Y':
if len(sys.argv) > i+1:
self.initial_rpy[2] = float(sys.argv[i+1])
if sys.argv[i] == '-package_to_model':
self.package_to_model = True;
if sys.argv[i] == '-b':
self.bond = True
if not self.sdf_format and not self.urdf_format:
rospy.logerr("Error: you must specify incoming format as either urdf or sdf format xml")
sys.exit(0)
if self.model_name == "":
rospy.logerr("Error: you must specify model name")
sys.exit(0)
def checkForModel(self,model):
for n in model.name:
if n == self.wait_for_model:
self.wait_for_model_exists = True
# Generate a blank SDF file with an include for the model from the model database
def createDatabaseCode(self, database_name):
return model_database_template.replace("MODEL_NAME", database_name);
def callSpawnService(self):
# wait for model to exist
rospy.init_node('spawn_model')
if not self.wait_for_model == "":
rospy.Subscriber("%s/model_states"%(self.gazebo_namespace), ModelStates, self.checkForModel)
r= rospy.Rate(10)
while not rospy.is_shutdown() and not self.wait_for_model_exists:
r.sleep()
if rospy.is_shutdown():
sys.exit(0)
if self.file_name != "":
rospy.loginfo("Loading model XML from file")
if os.path.exists(self.file_name):
if os.path.isdir(self.file_name):
rospy.logerr("Error: file name is a path? %s", self.file_name)
sys.exit(0)
if not os.path.isfile(self.file_name):
rospy.logerr("Error: unable to open file %s", self.file_name)
sys.exit(0)
else:
rospy.logerr("Error: file does not exist %s", self.file_name)
sys.exit(0)
# load file
f = open(self.file_name,'r')
model_xml = f.read()
if model_xml == "":
rospy.logerr("Error: file is empty %s", self.file_name)
sys.exit(0)
# ROS Parameter
elif self.param_name != "":
rospy.loginfo( "Loading model XML from ros parameter")
model_xml = rospy.get_param(self.param_name)
if model_xml == "":
rospy.logerr("Error: param does not exist or is empty")
sys.exit(0)
# Gazebo Model Database
elif self.database_name != "":
rospy.loginfo( "Loading model XML from Gazebo Model Database")
model_xml = self.createDatabaseCode(self.database_name)
if model_xml == "":
rospy.logerr("Error: an error occured generating the SDF file")
sys.exit(0)
else:
rospy.logerr("Error: user specified param or filename is an empty string")
sys.exit(0)
if self.package_to_model:
model_xml = re.sub("<\s*mesh\s+filename\s*=\s*([\"|'])package://","<mesh filename=\g<1>model://", model_xml)
# setting initial pose
initial_pose = Pose()
initial_pose.position.x = self.initial_xyz[0]
initial_pose.position.y = self.initial_xyz[1]
initial_pose.position.z = self.initial_xyz[2]
# convert rpy to quaternion for Pose message
tmpq = tft.quaternion_from_euler(self.initial_rpy[0],self.initial_rpy[1],self.initial_rpy[2])
q = Quaternion(tmpq[0],tmpq[1],tmpq[2],tmpq[3])
initial_pose.orientation = q;
# spawn model
if self.urdf_format:
success = gazebo_interface.spawn_urdf_model_client(self.model_name, model_xml, self.robot_namespace,
initial_pose, self.reference_frame, self.gazebo_namespace)
elif self.sdf_format:
success = gazebo_interface.spawn_sdf_model_client(self.model_name, model_xml, self.robot_namespace,
initial_pose, self.reference_frame, self.gazebo_namespace)
else:
rospy.logerr("Error: should not be here in spawner helper script, there is a bug")
sys.exit(0)
# set model configuration before unpause if user requested
if len(self.joint_names) != 0:
try:
success = gazebo_interface.set_model_configuration_client(self.model_name, self.param_name,
self.joint_names, self.joint_positions, self.gazebo_namespace)
except rospy.ServiceException as e:
rospy.logerr("Set model configuration service call failed: %s", e)
# unpause physics if user requested
if self.unpause_physics:
rospy.wait_for_service('%s/unpause_physics'%(self.gazebo_namespace))
try:
unpause_physics = rospy.ServiceProxy('%s/unpause_physics'%(self.gazebo_namespace), Empty)
unpause_physics()
except rospy.ServiceException as e:
rospy.logerr("Unpause physics service call failed: %s", e)
return
def callDeleteService(self):
try:
delete_model = rospy.ServiceProxy('%s/delete_model'%(self.gazebo_namespace), DeleteModel)
delete_model(model_name=self.model_name)
except rospy.ServiceException as e:
rospy.logerr("Delete model service call failed: %s", e)
if __name__ == "__main__":
if len(sys.argv) < 2:
print(usage())
else:
print("SpawnModel script started") # make this a print incase roscore has not been started
sm = SpawnModel()
sm.parseUserInputs()
sm.callSpawnService()
if sm.bond:
rospy.on_shutdown(sm.callDeleteService)
rospy.spin()

View File

@ -0,0 +1,317 @@
#!/usr/bin/env python
#
# Copyright 2013 Open Source Robotics Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Desc: helper script for spawning models in gazebo
# Author: John Hsu, Dave Coleman
#
import rospy, sys, os, time
import string
import warnings
import re
from gazebo_ros import gazebo_interface
from gazebo_msgs.msg import *
from gazebo_msgs.srv import *
from std_srvs.srv import Empty
from geometry_msgs.msg import Point, Pose, Quaternion, Twist, Wrench
import tf.transformations as tft
model_database_template = """<sdf version="1.4">
<world name="default">
<include>
<uri>model://MODEL_NAME</uri>
</include>
</world>
</sdf>"""
def usage():
print('''Commands:
-[urdf|sdf|trimesh|gazebo] - specify incoming xml is urdf, sdf or trimesh format. gazebo arg is deprecated in ROS Hydro
-[file|param|database] [<file_name>|<param_name>|<model_name>] - source of the model xml or the trimesh file
-model <model_name> - name of the model to be spawned.
-reference_frame <entity_name> - optinal: name of the model/body where initial pose is defined.
If left empty or specified as "world", gazebo world frame is used.
-gazebo_namespace <gazebo ros_namespace> - optional: ROS namespace of gazebo offered ROS interfaces. Defaults to /gazebo/ (e.g. /gazebo/spawn_model).
-robot_namespace <robot ros_namespace> - optional: change ROS namespace of gazebo-plugins.
-unpause - optional: !!!Experimental!!! unpause physics after spawning model
-wait - optional: !!!Experimental!!! wait for model to exist
-trimesh_mass <mass in kg> - required if -trimesh is used: linear mass
-trimesh_ixx <moment of inertia in kg*m^2> - required if -trimesh is used: moment of inertia about x-axis
-trimesh_iyy <moment of inertia in kg*m^2> - required if -trimesh is used: moment of inertia about y-axis
-trimesh_izz <moment of inertia in kg*m^2> - required if -trimesh is used: moment of inertia about z-axis
-trimesh_gravity <bool> - required if -trimesh is used: gravity turned on for this trimesh model
-trimesh_material <material name as a string> - required if -trimesh is used: E.g. Gazebo/Blue
-trimesh_name <link name as a string> - required if -trimesh is used: name of the link containing the trimesh
-x <x in meters> - optional: initial pose, use 0 if left out
-y <y in meters> - optional: initial pose, use 0 if left out
-z <z in meters> - optional: initial pose, use 0 if left out
-R <roll in radians> - optional: initial pose, use 0 if left out
-P <pitch in radians> - optional: initial pose, use 0 if left out
-Y <yaw in radians> - optional: initial pose, use 0 if left out
-J <joint_name joint_position> - optional: initialize the specified joint at the specified value
-package_to_model - optional: convert urdf <mesh filename="package://..." to <mesh filename="model://..."
-b - optional: bond to gazebo and delete the model when this program is interrupted
''')
sys.exit(1)
class SpawnModel():
def __init__(self):
self.initial_xyz = [0,0,0]
self.initial_rpy = [0,0,0]
self.initial_q = [0,0,0,1]
self.file_name = ""
self.param_name = ""
self.database_name = ""
self.model_name = ""
self.robot_namespace = rospy.get_namespace()
self.gazebo_namespace = "/yyy"
self.reference_frame = ""
self.unpause_physics = False
self.wait_for_model = ""
self.wait_for_model_exists = False
self.urdf_format = False
self.sdf_format = False
self.joint_names = []
self.joint_positions = []
self.package_to_model = False
self.bond = False
def parseUserInputs(self):
# get goal from commandline
for i in range(0,len(sys.argv)):
if sys.argv[i] == '-h' or sys.argv[i] == '--help' or sys.argv[i] == '-help':
usage()
sys.exit(1)
if sys.argv[i] == '-unpause':
self.unpause_physics = True
if sys.argv[i] == '-urdf':
if self.sdf_format == True:
rospy.logerr("Error: you cannot specify both urdf and sdf format xml, must pick one")
sys.exit(0)
else:
self.urdf_format = True;
if sys.argv[i] == '-sdf' or sys.argv[i] == '-gazebo':
if self.urdf_format == True:
rospy.logerr("Error: you cannot specify both urdf and sdf format xml, must pick one")
sys.exit(0)
else:
if sys.argv[i] == '-gazebo':
rospy.logwarn("Deprecated: the -gazebo tag is now -sdf")
warnings.warn("Deprecated: the -gazebo tag is now -sdf", DeprecationWarning)
self.sdf_format = True;
if sys.argv[i] == '-J':
if len(sys.argv) > i+2:
self.joint_names.append(sys.argv[i+1])
self.joint_positions.append(float(sys.argv[i+2]))
else:
rospy.logerr("Error: must specify a joint name and joint value pair")
sys.exit(0)
if sys.argv[i] == '-param':
if len(sys.argv) > i+1:
if self.file_name != "" or self.database_name != "":
rospy.logerr("Error: you cannot specify file name if parameter or database name is given, must pick one source of model xml")
sys.exit(0)
else:
self.param_name = sys.argv[i+1]
if sys.argv[i] == '-file':
if len(sys.argv) > i+1:
if self.param_name != "" or self.database_name != "":
rospy.logerr("Error: you cannot specify parameter if file or database name is given, must pick one source of model xml")
sys.exit(0)
else:
self.file_name = sys.argv[i+1]
if sys.argv[i] == '-database':
if len(sys.argv) > i+1:
if self.param_name != "" or self.file_name != "":
rospy.logerr("Error: you cannot specify parameter if file or parameter name is given, must pick one source of model xml")
sys.exit(0)
else:
self.database_name = sys.argv[i+1]
if sys.argv[i] == '-model':
if len(sys.argv) > i+1:
self.model_name = sys.argv[i+1]
if sys.argv[i] == '-wait':
if len(sys.argv) > i+1:
self.wait_for_model = sys.argv[i+1]
if sys.argv[i] == '-reference_frame':
if len(sys.argv) > i+1:
self.reference_frame = sys.argv[i+1]
if sys.argv[i] == '-robot_namespace':
if len(sys.argv) > i+1:
self.robot_namespace = sys.argv[i+1]
if sys.argv[i] == '-namespace':
if len(sys.argv) > i+1:
self.robot_namespace = sys.argv[i+1]
if sys.argv[i] == '-gazebo_namespace':
if len(sys.argv) > i+1:
self.gazebo_namespace = sys.argv[i+1]
if sys.argv[i] == '-x':
if len(sys.argv) > i+1:
self.initial_xyz[0] = float(sys.argv[i+1])
if sys.argv[i] == '-y':
if len(sys.argv) > i+1:
self.initial_xyz[1] = float(sys.argv[i+1])
if sys.argv[i] == '-z':
if len(sys.argv) > i+1:
self.initial_xyz[2] = float(sys.argv[i+1])
if sys.argv[i] == '-R':
if len(sys.argv) > i+1:
self.initial_rpy[0] = float(sys.argv[i+1])
if sys.argv[i] == '-P':
if len(sys.argv) > i+1:
self.initial_rpy[1] = float(sys.argv[i+1])
if sys.argv[i] == '-Y':
if len(sys.argv) > i+1:
self.initial_rpy[2] = float(sys.argv[i+1])
if sys.argv[i] == '-package_to_model':
self.package_to_model = True;
if sys.argv[i] == '-b':
self.bond = True
if not self.sdf_format and not self.urdf_format:
rospy.logerr("Error: you must specify incoming format as either urdf or sdf format xml")
sys.exit(0)
if self.model_name == "":
rospy.logerr("Error: you must specify model name")
sys.exit(0)
def checkForModel(self,model):
for n in model.name:
if n == self.wait_for_model:
self.wait_for_model_exists = True
# Generate a blank SDF file with an include for the model from the model database
def createDatabaseCode(self, database_name):
return model_database_template.replace("MODEL_NAME", database_name);
def callSpawnService(self):
# wait for model to exist
rospy.init_node('spawn_model')
if not self.wait_for_model == "":
rospy.Subscriber("%s/model_states"%(self.gazebo_namespace), ModelStates, self.checkForModel)
r= rospy.Rate(10)
while not rospy.is_shutdown() and not self.wait_for_model_exists:
r.sleep()
if rospy.is_shutdown():
sys.exit(0)
if self.file_name != "":
rospy.loginfo("Loading model XML from file")
if os.path.exists(self.file_name):
if os.path.isdir(self.file_name):
rospy.logerr("Error: file name is a path? %s", self.file_name)
sys.exit(0)
if not os.path.isfile(self.file_name):
rospy.logerr("Error: unable to open file %s", self.file_name)
sys.exit(0)
else:
rospy.logerr("Error: file does not exist %s", self.file_name)
sys.exit(0)
# load file
f = open(self.file_name,'r')
model_xml = f.read()
if model_xml == "":
rospy.logerr("Error: file is empty %s", self.file_name)
sys.exit(0)
# ROS Parameter
elif self.param_name != "":
rospy.loginfo( "Loading model XML from ros parameter")
model_xml = rospy.get_param(self.param_name)
if model_xml == "":
rospy.logerr("Error: param does not exist or is empty")
sys.exit(0)
# Gazebo Model Database
elif self.database_name != "":
rospy.loginfo( "Loading model XML from Gazebo Model Database")
model_xml = self.createDatabaseCode(self.database_name)
if model_xml == "":
rospy.logerr("Error: an error occured generating the SDF file")
sys.exit(0)
else:
rospy.logerr("Error: user specified param or filename is an empty string")
sys.exit(0)
if self.package_to_model:
model_xml = re.sub("<\s*mesh\s+filename\s*=\s*([\"|'])package://","<mesh filename=\g<1>model://", model_xml)
# setting initial pose
initial_pose = Pose()
initial_pose.position.x = self.initial_xyz[0]
initial_pose.position.y = self.initial_xyz[1]
initial_pose.position.z = self.initial_xyz[2]
# convert rpy to quaternion for Pose message
tmpq = tft.quaternion_from_euler(self.initial_rpy[0],self.initial_rpy[1],self.initial_rpy[2])
q = Quaternion(tmpq[0],tmpq[1],tmpq[2],tmpq[3])
initial_pose.orientation = q;
# spawn model
if self.urdf_format:
success = gazebo_interface.spawn_urdf_model_client(self.model_name, model_xml, self.robot_namespace,
initial_pose, self.reference_frame, self.gazebo_namespace)
elif self.sdf_format:
success = gazebo_interface.spawn_sdf_model_client(self.model_name, model_xml, self.robot_namespace,
initial_pose, self.reference_frame, self.gazebo_namespace)
else:
rospy.logerr("Error: should not be here in spawner helper script, there is a bug")
sys.exit(0)
# set model configuration before unpause if user requested
if len(self.joint_names) != 0:
try:
success = gazebo_interface.set_model_configuration_client(self.model_name, self.param_name,
self.joint_names, self.joint_positions, self.gazebo_namespace)
except rospy.ServiceException as e:
rospy.logerr("Set model configuration service call failed: %s", e)
# unpause physics if user requested
if self.unpause_physics:
rospy.wait_for_service('%s/unpause_physics'%(self.gazebo_namespace))
try:
unpause_physics = rospy.ServiceProxy('%s/unpause_physics'%(self.gazebo_namespace), Empty)
unpause_physics()
except rospy.ServiceException as e:
rospy.logerr("Unpause physics service call failed: %s", e)
return
def callDeleteService(self):
try:
delete_model = rospy.ServiceProxy('%s/delete_model'%(self.gazebo_namespace), DeleteModel)
delete_model(model_name=self.model_name)
except rospy.ServiceException as e:
rospy.logerr("Delete model service call failed: %s", e)
if __name__ == "__main__":
if len(sys.argv) < 2:
print(usage())
else:
print("SpawnModel script started") # make this a print incase roscore has not been started
sm = SpawnModel()
sm.parseUserInputs()
sm.callSpawnService()
if sm.bond:
rospy.on_shutdown(sm.callDeleteService)
rospy.spin()

View File

@ -3,5 +3,5 @@
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="
controller/twist
--timeout 300"/>
--timeout 1000"/>
</launch>

View File

@ -43,7 +43,7 @@
<link name="${name}_optical_frame"/>
<gazebo reference="${name}_link">
<sensor type="camera" name="${name}_camera_sensor">
<!--<sensor type="camera" name="${name}_camera_sensor">
<update_rate>${update_rate}</update_rate>
<camera>
<horizontal_fov>${hfov * M_PI/180.0}</horizontal_fov>
@ -64,6 +64,31 @@
<cameraInfoTopicName>${cam_info_topic}</cameraInfoTopicName>
<frameName>${name}_optical_frame</frameName>
</plugin>
</sensor>-->
<sensor name='back_left_far_sonar_sensor' type='ray'>
<ray>
<scan>
<horizontal>
<samples>1</samples>
<resolution>1</resolution>
<min_angle>0</min_angle>
<max_angle>0</max_angle>
</horizontal>
<vertical>
<samples>1</samples>
<min_angle>0</min_angle>
<max_angle>0</max_angle>
</vertical>
</scan>
<range>
<min>0.2</min>
<max>5</max>
<resolution>0.1</resolution>
</range>
</ray>
<always_on>0</always_on>
<update_rate>5</update_rate>
<pose frame=''>0.7 2.4 0.5 0 -0 1.5707</pose>
</sensor>
</gazebo>
</xacro:macro>

View File

@ -0,0 +1,668 @@
<!-- This is a launch file that runs the bare minimum requirements to get -->
<!-- gazebo running for a fixed-wing aircraft -->
<launch>
<group ns="bebop_0">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_0" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_0" />
<arg name="x" value="0.0" />
<arg name="y" value="0.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_1">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_1" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_1" />
<arg name="x" value="0.0" />
<arg name="y" value="5.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_2">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_2" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_2" />
<arg name="x" value="0.0" />
<arg name="y" value="10.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_3">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_3" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_3" />
<arg name="x" value="0.0" />
<arg name="y" value="15.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_4">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_4" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_4" />
<arg name="x" value="0.0" />
<arg name="y" value="20.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_5">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_5" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_5" />
<arg name="x" value="0.0" />
<arg name="y" value="25.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_6">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_6" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_6" />
<arg name="x" value="0.0" />
<arg name="y" value="30.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_7">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_7" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_7" />
<arg name="x" value="0.0" />
<arg name="y" value="35.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_8">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_8" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_8" />
<arg name="x" value="0.0" />
<arg name="y" value="40.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_9">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_9" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_9" />
<arg name="x" value="0.0" />
<arg name="y" value="45.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_10">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_10" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_10" />
<arg name="x" value="5.0" />
<arg name="y" value="0.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_11">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_11" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_11" />
<arg name="x" value="5.0" />
<arg name="y" value="5.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_12">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_12" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_12" />
<arg name="x" value="5.0" />
<arg name="y" value="10.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_13">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_13" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_13" />
<arg name="x" value="5.0" />
<arg name="y" value="15.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_14">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_14" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_14" />
<arg name="x" value="5.0" />
<arg name="y" value="20.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_15">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_15" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_15" />
<arg name="x" value="5.0" />
<arg name="y" value="25.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_16">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_16" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_16" />
<arg name="x" value="5.0" />
<arg name="y" value="30.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_17">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_17" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_17" />
<arg name="x" value="5.0" />
<arg name="y" value="35.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_18">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_18" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_18" />
<arg name="x" value="5.0" />
<arg name="y" value="40.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_19">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_19" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_19" />
<arg name="x" value="5.0" />
<arg name="y" value="45.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_20">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_20" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_20" />
<arg name="x" value="10.0" />
<arg name="y" value="0.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_21">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_21" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_21" />
<arg name="x" value="10.0" />
<arg name="y" value="5.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_22">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_22" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_22" />
<arg name="x" value="10.0" />
<arg name="y" value="10.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_23">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_23" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_23" />
<arg name="x" value="10.0" />
<arg name="y" value="15.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_24">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_24" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_24" />
<arg name="x" value="10.0" />
<arg name="y" value="20.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_25">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_25" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_25" />
<arg name="x" value="10.0" />
<arg name="y" value="25.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_26">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_26" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_26" />
<arg name="x" value="10.0" />
<arg name="y" value="30.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_27">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_27" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_27" />
<arg name="x" value="10.0" />
<arg name="y" value="35.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_28">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_28" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_28" />
<arg name="x" value="10.0" />
<arg name="y" value="40.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_29">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1.launch">
<arg name="name" value="bebop_29" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_29" />
<arg name="x" value="10.0" />
<arg name="y" value="45.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_30">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_30" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_30" />
<arg name="x" value="15.0" />
<arg name="y" value="0.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_31">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_31" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_31" />
<arg name="x" value="15.0" />
<arg name="y" value="5.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_32">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_32" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_32" />
<arg name="x" value="15.0" />
<arg name="y" value="10.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_33">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_33" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_33" />
<arg name="x" value="15.0" />
<arg name="y" value="15.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_34">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_34" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_34" />
<arg name="x" value="15.0" />
<arg name="y" value="20.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_35">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_35" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_35" />
<arg name="x" value="15.0" />
<arg name="y" value="25.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_36">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_36" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_36" />
<arg name="x" value="15.0" />
<arg name="y" value="30.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_37">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_37" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_37" />
<arg name="x" value="15.0" />
<arg name="y" value="35.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_38">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_38" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_38" />
<arg name="x" value="15.0" />
<arg name="y" value="40.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_39">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_39" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_39" />
<arg name="x" value="15.0" />
<arg name="y" value="45.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_40">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_40" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_40" />
<arg name="x" value="20.0" />
<arg name="y" value="0.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_41">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_41" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_41" />
<arg name="x" value="20.0" />
<arg name="y" value="5.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_42">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_42" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_42" />
<arg name="x" value="20.0" />
<arg name="y" value="10.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_43">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_43" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_43" />
<arg name="x" value="20.0" />
<arg name="y" value="15.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_44">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_44" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_44" />
<arg name="x" value="20.0" />
<arg name="y" value="20.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_45">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_45" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_45" />
<arg name="x" value="20.0" />
<arg name="y" value="25.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_46">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_46" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_46" />
<arg name="x" value="20.0" />
<arg name="y" value="30.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_47">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_47" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_47" />
<arg name="x" value="20.0" />
<arg name="y" value="35.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_48">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_48" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_48" />
<arg name="x" value="20.0" />
<arg name="y" value="40.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_49">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_49" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_49" />
<arg name="x" value="20.0" />
<arg name="y" value="45.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_50">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_50" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_50" />
<arg name="x" value="25.0" />
<arg name="y" value="0.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_51">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_51" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_51" />
<arg name="x" value="25.0" />
<arg name="y" value="5.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_52">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_52" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_52" />
<arg name="x" value="25.0" />
<arg name="y" value="10.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_53">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_53" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_53" />
<arg name="x" value="25.0" />
<arg name="y" value="15.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_54">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_54" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_54" />
<arg name="x" value="25.0" />
<arg name="y" value="20.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_55">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_55" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_55" />
<arg name="x" value="25.0" />
<arg name="y" value="25.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_56">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_56" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_56" />
<arg name="x" value="25.0" />
<arg name="y" value="30.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_57">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_57" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_57" />
<arg name="x" value="25.0" />
<arg name="y" value="35.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_58">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_58" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_58" />
<arg name="x" value="25.0" />
<arg name="y" value="40.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_59">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_1_without_controller.launch">
<arg name="name" value="bebop_59" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_59" />
<arg name="x" value="25.0" />
<arg name="y" value="45.0" />
<arg name="z" value="0.186" />
</include>
</group>
<!--<node name="simple_takeoff" pkg="hector" type="hector_simple_takeoff"/>-->
</launch>

View File

@ -0,0 +1,668 @@
<!-- This is a launch file that runs the bare minimum requirements to get -->
<!-- gazebo running for a fixed-wing aircraft -->
<launch>
<group ns="bebop_0">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_0" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_0" />
<arg name="x" value="0.0" />
<arg name="y" value="0.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_1">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_1" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_1" />
<arg name="x" value="0.0" />
<arg name="y" value="5.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_2">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_2" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_2" />
<arg name="x" value="0.0" />
<arg name="y" value="10.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_3">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_3" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_3" />
<arg name="x" value="0.0" />
<arg name="y" value="15.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_4">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_4" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_4" />
<arg name="x" value="0.0" />
<arg name="y" value="20.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_5">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_5" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_5" />
<arg name="x" value="0.0" />
<arg name="y" value="25.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_6">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_6" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_6" />
<arg name="x" value="0.0" />
<arg name="y" value="30.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_7">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_7" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_7" />
<arg name="x" value="0.0" />
<arg name="y" value="35.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_8">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_8" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_8" />
<arg name="x" value="0.0" />
<arg name="y" value="40.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_9">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_9" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_9" />
<arg name="x" value="0.0" />
<arg name="y" value="45.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_10">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_10" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_10" />
<arg name="x" value="5.0" />
<arg name="y" value="0.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_11">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_11" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_11" />
<arg name="x" value="5.0" />
<arg name="y" value="5.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_12">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_12" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_12" />
<arg name="x" value="5.0" />
<arg name="y" value="10.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_13">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_13" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_13" />
<arg name="x" value="5.0" />
<arg name="y" value="15.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_14">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_14" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_14" />
<arg name="x" value="5.0" />
<arg name="y" value="20.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_15">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_15" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_15" />
<arg name="x" value="5.0" />
<arg name="y" value="25.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_16">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_16" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_16" />
<arg name="x" value="5.0" />
<arg name="y" value="30.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_17">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_17" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_17" />
<arg name="x" value="5.0" />
<arg name="y" value="35.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_18">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_18" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_18" />
<arg name="x" value="5.0" />
<arg name="y" value="40.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_19">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_19" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_19" />
<arg name="x" value="5.0" />
<arg name="y" value="45.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_20">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_20" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_20" />
<arg name="x" value="10.0" />
<arg name="y" value="0.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_21">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_21" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_21" />
<arg name="x" value="10.0" />
<arg name="y" value="5.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_22">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_22" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_22" />
<arg name="x" value="10.0" />
<arg name="y" value="10.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_23">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_23" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_23" />
<arg name="x" value="10.0" />
<arg name="y" value="15.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_24">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_24" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_24" />
<arg name="x" value="10.0" />
<arg name="y" value="20.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_25">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_25" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_25" />
<arg name="x" value="10.0" />
<arg name="y" value="25.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_26">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_26" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_26" />
<arg name="x" value="10.0" />
<arg name="y" value="30.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_27">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_27" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_27" />
<arg name="x" value="10.0" />
<arg name="y" value="35.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_28">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_28" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_28" />
<arg name="x" value="10.0" />
<arg name="y" value="40.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_29">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2_without_controller.launch">
<arg name="name" value="bebop_29" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_29" />
<arg name="x" value="10.0" />
<arg name="y" value="45.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_30">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_30" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_30" />
<arg name="x" value="15.0" />
<arg name="y" value="0.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_31">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_31" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_31" />
<arg name="x" value="15.0" />
<arg name="y" value="5.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_32">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_32" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_32" />
<arg name="x" value="15.0" />
<arg name="y" value="10.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_33">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_33" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_33" />
<arg name="x" value="15.0" />
<arg name="y" value="15.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_34">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_34" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_34" />
<arg name="x" value="15.0" />
<arg name="y" value="20.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_35">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_35" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_35" />
<arg name="x" value="15.0" />
<arg name="y" value="25.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_36">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_36" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_36" />
<arg name="x" value="15.0" />
<arg name="y" value="30.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_37">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_37" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_37" />
<arg name="x" value="15.0" />
<arg name="y" value="35.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_38">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_38" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_38" />
<arg name="x" value="15.0" />
<arg name="y" value="40.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_39">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_39" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_39" />
<arg name="x" value="15.0" />
<arg name="y" value="45.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_40">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_40" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_40" />
<arg name="x" value="20.0" />
<arg name="y" value="0.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_41">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_41" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_41" />
<arg name="x" value="20.0" />
<arg name="y" value="5.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_42">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_42" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_42" />
<arg name="x" value="20.0" />
<arg name="y" value="10.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_43">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_43" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_43" />
<arg name="x" value="20.0" />
<arg name="y" value="15.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_44">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_44" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_44" />
<arg name="x" value="20.0" />
<arg name="y" value="20.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_45">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_45" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_45" />
<arg name="x" value="20.0" />
<arg name="y" value="25.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_46">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_46" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_46" />
<arg name="x" value="20.0" />
<arg name="y" value="30.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_47">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_47" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_47" />
<arg name="x" value="20.0" />
<arg name="y" value="35.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_48">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_48" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_48" />
<arg name="x" value="20.0" />
<arg name="y" value="40.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_49">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_49" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_49" />
<arg name="x" value="20.0" />
<arg name="y" value="45.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_50">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_50" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_50" />
<arg name="x" value="25.0" />
<arg name="y" value="0.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_51">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_51" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_51" />
<arg name="x" value="25.0" />
<arg name="y" value="5.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_52">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_52" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_52" />
<arg name="x" value="25.0" />
<arg name="y" value="10.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_53">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_53" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_53" />
<arg name="x" value="25.0" />
<arg name="y" value="15.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_54">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_54" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_54" />
<arg name="x" value="25.0" />
<arg name="y" value="20.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_55">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_55" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_55" />
<arg name="x" value="25.0" />
<arg name="y" value="25.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_56">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_56" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_56" />
<arg name="x" value="25.0" />
<arg name="y" value="30.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_57">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_57" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_57" />
<arg name="x" value="25.0" />
<arg name="y" value="35.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_58">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_58" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_58" />
<arg name="x" value="25.0" />
<arg name="y" value="40.0" />
<arg name="z" value="0.186" />
</include>
</group>
<group ns="bebop_59">
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor_2.launch">
<arg name="name" value="bebop_59" />
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" value="bebop_59" />
<arg name="x" value="25.0" />
<arg name="y" value="45.0" />
<arg name="z" value="0.186" />
</include>
</group>
<node name="simple_takeoff" pkg="hector" type="hector_simple_takeoff"/>
</launch>

View File

@ -0,0 +1,74 @@
<?xml version="1.0"?>
<launch>
<arg name="name" default="quadrotor"/>
<arg name="model" default="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" default="$(optenv ROS_NAMESPACE)"/>
<!--<arg name="controller_definition" default="$(find hector_quadrotor_controller)/launch/controller.launch"/>-->
<arg name="x" default="0.0"/>
<arg name="y" default="0.0"/>
<arg name="z" default="0.3"/>
<arg name="use_ground_truth_for_tf" default="true" />
<arg name="use_ground_truth_for_control" default="true" />
<arg name="use_pose_estimation" if="$(arg use_ground_truth_for_control)" default="false"/>
<arg name="use_pose_estimation" unless="$(arg use_ground_truth_for_control)" default="true"/>
<arg name="world_frame" default="world"/> <!-- This should actually be "/world". See https://github.com/ros-simulation/gazebo_ros_pkgs/pull/324 -->
<arg name="base_link_frame" default="$(arg tf_prefix)/base_link"/>
<!-- send the robot XML to param server -->
<param name="robot_description" command="$(find xacro)/xacro '$(arg model)' name:=$(arg name) base_link_frame:=$(arg base_link_frame) world_frame:=$(arg world_frame)" />
<param name="tf_prefix" type="string" value="$(arg tf_prefix)" />
<param name="base_link_frame" type="string" value="$(arg base_link_frame)"/>
<param name="world_frame" type="string" value="$(arg world_frame)"/>
<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="spawn_robot" pkg="gazebo_ros" type="spawn_model1"
args="-param robot_description
-urdf
-x $(arg x)
-y $(arg y)
-z $(arg z)
-model $(arg name)"
respawn="false" output="screen"/>
<!-- start robot state publisher -->
<!-- <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen" >
<param name="publish_frequency" type="double" value="50.0" />
</node> -->
<!-- publish state and tf -->
<!-- <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="/$(arg world_frame)" />
<param name="tf_prefix" value="$(arg tf_prefix)" if="$(arg use_ground_truth_for_tf)" />
<param name="tf_prefix" value="$(arg tf_prefix)/ground_truth" unless="$(arg use_ground_truth_for_tf)" />
</node>
<group if="$(arg use_pose_estimation)">
<node name="pose_estimation" pkg="hector_quadrotor_pose_estimation" type="hector_quadrotor_pose_estimation" output="screen">
<rosparam file="$(find hector_quadrotor_pose_estimation)/params/simulation.yaml" />
<param name="nav_frame" value="$(arg tf_prefix)/nav" />
<param name="publish_world_nav_transform" value="true" />
<param name="tf_prefix" value="$(arg tf_prefix)" unless="$(arg use_ground_truth_for_tf)" />
<param name="tf_prefix" value="$(arg tf_prefix)/pose_estimation" if="$(arg use_ground_truth_for_tf)" />
</node>
</group> -->
<!-- spawn controller -->
<!--<group if="$(arg use_ground_truth_for_control)">
<param name="controller/state_topic" value="" />
<param name="controller/imu_topic" value="" />
</group>
<group unless="$(arg use_ground_truth_for_control)">
<param name="controller/state_topic" value="state" />
<param name="controller/imu_topic" value="imu" />
</group>
<include file="$(arg controller_definition)" />
<arg name="motors" default="robbe_2827-34_epp1045" />
<rosparam command="load" file="$(find hector_quadrotor_model)/param/quadrotor_aerodynamics.yaml" />
<rosparam command="load" file="$(find hector_quadrotor_model)/param/$(arg motors).yaml" />-->
</launch>

View File

@ -0,0 +1,74 @@
<?xml version="1.0"?>
<launch>
<arg name="name" default="quadrotor"/>
<arg name="model" default="$(find hector_quadrotor_description)/urdf/quadrotor_with_downward_cam.gazebo.xacro"/>
<arg name="tf_prefix" default="$(optenv ROS_NAMESPACE)"/>
<!--<arg name="controller_definition" default="$(find hector_quadrotor_controller)/launch/controller.launch"/>-->
<arg name="x" default="0.0"/>
<arg name="y" default="0.0"/>
<arg name="z" default="0.3"/>
<arg name="use_ground_truth_for_tf" default="true" />
<arg name="use_ground_truth_for_control" default="true" />
<arg name="use_pose_estimation" if="$(arg use_ground_truth_for_control)" default="false"/>
<arg name="use_pose_estimation" unless="$(arg use_ground_truth_for_control)" default="true"/>
<arg name="world_frame" default="world"/> <!-- This should actually be "/world". See https://github.com/ros-simulation/gazebo_ros_pkgs/pull/324 -->
<arg name="base_link_frame" default="$(arg tf_prefix)/base_link"/>
<!-- send the robot XML to param server -->
<param name="robot_description" command="$(find xacro)/xacro '$(arg model)' name:=$(arg name) base_link_frame:=$(arg base_link_frame) world_frame:=$(arg world_frame)" />
<param name="tf_prefix" type="string" value="$(arg tf_prefix)" />
<param name="base_link_frame" type="string" value="$(arg base_link_frame)"/>
<param name="world_frame" type="string" value="$(arg world_frame)"/>
<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="spawn_robot" pkg="gazebo_ros" type="spawn_model2"
args="-param robot_description
-urdf
-x $(arg x)
-y $(arg y)
-z $(arg z)
-model $(arg name)"
respawn="false" output="screen"/>
<!-- start robot state publisher -->
<!-- <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen" >
<param name="publish_frequency" type="double" value="50.0" />
</node> -->
<!-- publish state and tf -->
<!-- <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="/$(arg world_frame)" />
<param name="tf_prefix" value="$(arg tf_prefix)" if="$(arg use_ground_truth_for_tf)" />
<param name="tf_prefix" value="$(arg tf_prefix)/ground_truth" unless="$(arg use_ground_truth_for_tf)" />
</node>
<group if="$(arg use_pose_estimation)">
<node name="pose_estimation" pkg="hector_quadrotor_pose_estimation" type="hector_quadrotor_pose_estimation" output="screen">
<rosparam file="$(find hector_quadrotor_pose_estimation)/params/simulation.yaml" />
<param name="nav_frame" value="$(arg tf_prefix)/nav" />
<param name="publish_world_nav_transform" value="true" />
<param name="tf_prefix" value="$(arg tf_prefix)" unless="$(arg use_ground_truth_for_tf)" />
<param name="tf_prefix" value="$(arg tf_prefix)/pose_estimation" if="$(arg use_ground_truth_for_tf)" />
</node>
</group> -->
<!-- spawn controller -->
<!--<group if="$(arg use_ground_truth_for_control)">
<param name="controller/state_topic" value="" />
<param name="controller/imu_topic" value="" />
</group>
<group unless="$(arg use_ground_truth_for_control)">
<param name="controller/state_topic" value="state" />
<param name="controller/imu_topic" value="imu" />
</group>
<include file="$(arg controller_definition)" />
<arg name="motors" default="robbe_2827-34_epp1045" />
<rosparam command="load" file="$(find hector_quadrotor_model)/param/quadrotor_aerodynamics.yaml" />
<rosparam command="load" file="$(find hector_quadrotor_model)/param/$(arg motors).yaml" />-->
</launch>