-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathopen_world.launch
38 lines (32 loc) · 1.51 KB
/
open_world.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
<launch>
<!--
Opens a give world from "sb_gazebo/worlds" and
places a robot with a given name in it at a
given x,y and with a given rotation
-->
<arg name="world"/>
<arg name="x_start_coordinate"/>
<arg name="y_start_coordinate"/>
<arg name="initial_rotation"/>
<arg name="robot"/>
<!-- Start up the world -->
<include file="$(find sb_gazebo)/launch/gazebo_open_world.launch">
<arg name="world_name" value="$(find sb_gazebo)/worlds/$(arg world)"/>
<arg name="gui" value="true"/>
<!-- Remap the tf topic to another topic, so that we can test out things
that create tf's, like robot_pose_ekf -->
<arg name="tf_topic" value="gazebo_tf"/>
</include>
<remap from="tf" to="gazebo_tf"/>
<!-- setup controllers for robot -->
<include file="$(find sb_gazebo)/launch/$(arg robot)_control.launch" />
<!--
- Convert the xacro representation of the robot to xml
- Load the xml representation of the robot to the paramater server
-->
<param name="robot_description"
command="$(find xacro)/xacro --inorder '$(find sb_gazebo)/urdf/$(arg robot).xacro'" />
<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="robot_spawn" pkg="gazebo_ros" type="spawn_model" output="screen"
args="-urdf -param robot_description -model $(arg robot) -x $(arg x_start_coordinate) -y $(arg y_start_coordinate) -Y $(arg initial_rotation)" />
</launch>