-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgazebo.launch
41 lines (37 loc) · 1.84 KB
/
gazebo.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
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<!-- 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="false" />
<arg name="gui" default="true" />
<arg name="headless" default="false" />
<arg name="debug" default="false" />
<!-- We resume the logic in empty_world.launch, changing only the name of the
world to be launched -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(find urdf_tutorial)/robot.world" />
<arg name="debug" value="$(arg debug)" />
<arg name="gui" value="$(arg gui)" />
<arg name="paused" value="$(arg paused)" />
<arg name="use_sim_time" value="$(arg use_sim_time)" />
<arg name="headless" value="$(arg headless)" />
</include>
<!-- Load the URDF into the ROS Parameter Server -->
<param name="robot_description" command="$(find xacro)/xacro.py $(find urdf_tutorial)/wheel.xacro"/>
<rosparam file="$(find urdf_tutorial)/control.yaml" command="load"/>
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 robot1 -param robot_description" />
<node name="controller_spawn" pkg="controller_manager" type="spawner" output="screen" respawn="false"
args="/joint_state_controller
/imu_joint1_controller
/imu_joint2_controller
/imu_joint3_controller">
</node>
<node name="robot_states" pkg="robot_state_publisher" type="robot_state_publisher" respawn="false" output="screen">
</node>
<node name="urdf_spawner1" pkg="gazebo_ros" type="spawn_model" respawn="false"
output="screen" args="-urdf -model robot2 -file $(find urdf_tutorial)/ball.urdf" />
</launch>