-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbasicbot_ga.launch
157 lines (121 loc) · 6.7 KB
/
basicbot_ga.launch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<launch>
<!-- ********************* Begin Gazebo Defaults ******************************** -->
<!-- these are the arguments you can pass this launch file, for example paused:=true -->
<arg name="paused" default="true"/>
<arg name="use_sim_time" default="true"/>
<arg name="gui" default="false"/>
<arg name="headless" default="true"/>
<arg name="debug" default="false"/>
<!-- these are the arguments you can pass this launch file, for example paused:=true -->
<arg name="extra_gazebo_args" default="--seed 0"/>
<arg name="physics" default="ode"/>
<arg name="verbose" default="true"/>
<arg name="world_name" value="$(find basicbot_gazebo)/worlds/basicbot.world"/>
<arg name="respawn_gazebo" default="false"/>
<arg name="use_clock_frequency" default="false"/>
<arg name="pub_clock_frequency" default="100"/>
<!-- set use_sim_time flag -->
<group if="$(arg use_sim_time)">
<param name="/use_sim_time" value="true" />
</group>
<!-- set command arguments -->
<arg unless="$(arg paused)" name="command_arg1" value=""/>
<arg if="$(arg paused)" name="command_arg1" value="-u"/>
<arg unless="$(arg headless)" name="command_arg2" value=""/>
<arg if="$(arg headless)" name="command_arg2" value="-r"/>
<arg unless="$(arg verbose)" name="command_arg3" value=""/>
<arg if="$(arg verbose)" name="command_arg3" value="--verbose"/>
<arg unless="$(arg debug)" name="script_type" value="gzserver"/>
<arg if="$(arg debug)" name="script_type" value="debug"/>
<group if="$(arg use_clock_frequency)">
<param name="gazebo/pub_clock_frequency" value="$(arg pub_clock_frequency)" />
</group>
<!-- ********************* End Gazebo Defaults ******************************** -->
<!-- <group ns="basicbot_ga_1"> -->
<group ns="ga1">
<remap from="/clock" to="/ga1/clock"/>
<!-- start gazebo server-->
<env name="GAZEBO_MASTER_URI" value="http://localhost:11345"/>
<node name="gazebo" pkg="gazebo_ros" type="$(arg script_type)" respawn="$(arg respawn_gazebo)"
args="$(arg command_arg1) $(arg command_arg2) $(arg command_arg3) -e $(arg physics)
$(arg extra_gazebo_args) $(arg world_name)">
</node>
<!-- Load the URDF into the ROS Parameter Server -->
<param name="robot_description"
command="$(find xacro)/xacro '$(find basicbot_description)/urdf/basicbot.xacro'" />
<!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot -->
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
args="-urdf -model basicbot -param robot_description -gazebo_namespace /ga1/gazebo"/>
<!-- Load the transporter node -->
<node name="basicbot_transporter" pkg="basicbot_ga" type="basicbot_transporter.py" output="screen"></node>
<!-- Load the turn_drive_scan node -->
<node name="turn_drive_scan" pkg="basicbot_ga" type="turn_drive_scan_node.py" output="screen">
</node>
<!-- Load the step world node -->
<node name="step_world" pkg="world_step" type="step_world_server"></node>
</group>
<group ns="ga2">
<remap from="/clock" to="/ga2/clock"/>
<!-- start gazebo server-->
<env name="GAZEBO_MASTER_URI" value="http://localhost:11346"/>
<node name="gazebo" pkg="gazebo_ros" type="$(arg script_type)" respawn="$(arg respawn_gazebo)"
args="$(arg command_arg1) $(arg command_arg2) $(arg command_arg3) -e $(arg physics)
$(arg extra_gazebo_args) $(arg world_name)">
</node>
<!-- Load the URDF into the ROS Parameter Server -->
<param name="robot_description"
command="$(find xacro)/xacro '$(find basicbot_description)/urdf/basicbot.xacro'" />
<!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot -->
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
args="-urdf -model basicbot -param robot_description -gazebo_namespace /ga2/gazebo"/>
<!-- Load the transporter node -->
<node name="basicbot_transporter" pkg="basicbot_ga" type="basicbot_transporter.py" output="screen"></node>
<!-- Load the turn_drive_scan node -->
<node name="turn_drive_scan" pkg="basicbot_ga" type="turn_drive_scan_node.py" output="screen">
</node>
<!-- Load the step world node -->
<node name="step_world" pkg="world_step" type="step_world_server"/>
</group>
<group ns="ga3">
<remap from="/clock" to="/ga3/clock"/>
<!-- start gazebo server-->
<env name="GAZEBO_MASTER_URI" value="http://localhost:11347"/>
<node name="gazebo" pkg="gazebo_ros" type="$(arg script_type)" respawn="$(arg respawn_gazebo)"
args="$(arg command_arg1) $(arg command_arg2) $(arg command_arg3) -e $(arg physics)
$(arg extra_gazebo_args) $(arg world_name)">
</node>
<!-- Load the URDF into the ROS Parameter Server -->
<param name="robot_description"
command="$(find xacro)/xacro '$(find basicbot_description)/urdf/basicbot.xacro'" />
Run a python script to the send a service call to gazebo_ros to spawn a URDF robot
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
args="-urdf -model basicbot -param robot_description -gazebo_namespace /ga3/gazebo"/>
<!-- Load the transporter node -->
<node name="basicbot_transporter" pkg="basicbot_ga" type="basicbot_transporter.py" output="screen"></node>
<!-- Load the turn_drive_scan node -->
<node name="turn_drive_scan" pkg="basicbot_ga" type="turn_drive_scan_node.py" output="screen"></node>
<!-- Load the step world node -->
<node name="step_world" pkg="world_step" type="step_world_server"/>
</group>
<group ns="ga4">
<remap from="/clock" to="/ga4/clock"/>
<!-- start gazebo server-->
<env name="GAZEBO_MASTER_URI" value="http://localhost:11348"/>
<node name="gazebo" pkg="gazebo_ros" type="$(arg script_type)" respawn="$(arg respawn_gazebo)"
args="$(arg command_arg1) $(arg command_arg2) $(arg command_arg3) -e $(arg physics)
$(arg extra_gazebo_args) $(arg world_name)">
</node>
<!-- Load the URDF into the ROS Parameter Server -->
<param name="robot_description"
command="$(find xacro)/xacro '$(find basicbot_description)/urdf/basicbot.xacro'" />
<!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot -->
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
args="-urdf -model basicbot -param robot_description -gazebo_namespace /ga4/gazebo"/>
<!-- Load the transporter node -->
<node name="basicbot_transporter" pkg="basicbot_ga" type="basicbot_transporter.py" output="screen"></node>
<!-- Load the turn_drive_scan node -->
<node name="turn_drive_scan" pkg="basicbot_ga" type="turn_drive_scan_node.py" output="screen"></node>
<!-- Load the step world node -->
<node name="step_world" pkg="world_step" type="step_world_server"/>
</group>
</launch>