forked from arthurrichards77/farscope_group_project
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfarscope_example_robot_simulate.launch
34 lines (24 loc) · 1.74 KB
/
farscope_example_robot_simulate.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
<?xml version="1.0" ?>
<!-- simulate example robot with example controller in the challenge scenario -->
<launch>
<!-- launch Gazebo in the Group Challenge world -->
<!-- use `roslaunch farscope_example_robot_simulate use_gui:=false` to turn off Gazebo GUI -->-->
<arg name="use_gui" default="true" />
<include file="$(find farscope_group_project)/launch/challenge/farscope_group_challenge_gazebo.launch">
<arg name="gui" value="$(arg use_gui)" />
</include>
<!-- load the example robot description-->
<param name="robot_description" command="$(find xacro)/xacro $(find farscope_group_project)/models/example_robot/farscope_example_robot.urdf.xacro" />
<!-- need a robot state publisher to translate joints into TF information -->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="spawn_gazebo_model" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -model robot" respawn="false" output="screen" />
<!-- start controllers for the UR10 arm and the simple gripper -->
<include file="$(find farscope_group_project)/launch/common/ur10_controllers.launch" />
<include file="$(find farscope_group_project)/launch/common/gripper_controller.launch" />
<!-- run example controller -->
<node name="robot_controller" pkg="farscope_group_project" type="test_pickup.py" />
<!-- optional RViz is very CPU hungry : use `roslaunch farscope_example_robot_simulate use_rviz:=true` to include it anyway -->
<arg name="use_rviz" default="false" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find farscope_group_project)/launch/example_robot/simulate.rviz" if="$(arg use_rviz)" />
</launch>