Created
July 2, 2019 13:27
-
-
Save zkytony/d4531114bd6acd7bbf3bab674c01d3da to your computer and use it in GitHub Desktop.
Gazebo launch file: A UR3 robot arm on a tabletop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<launch> | |
<arg name="limited" default="false" | |
doc="If true, limits joint range [-PI, PI] on all joints." /> | |
<arg name="paused" default="true" | |
doc="Starts gazebo in paused mode" /> | |
<arg name="gui" default="true" | |
doc="Starts gazebo gui" /> | |
<!-- Robot pose --> | |
<arg name="x" default="0"/> | |
<arg name="y" default="0"/> | |
<arg name="z" default="1"/> | |
<arg name="roll" default="0"/> | |
<arg name="pitch" default="0"/> | |
<arg name="yaw" default="0"/> | |
<!-- startup simulated world --> | |
<include file="$(find gazebo_ros)/launch/empty_world.launch"> | |
<arg name="world_name" default="$(find simulation_tabletop)/world/Gazebo/tabletop.world"/> | |
<arg name="paused" value="$(arg paused)"/> | |
<arg name="gui" value="$(arg gui)"/> | |
</include> | |
<!-- send robot urdf to param server --> | |
<param unless="$(arg limited)" name="robot_description" | |
value="$(find simulation_tabletop)/urdf/ur3_robot.urdf"/> | |
<param if="$(arg limited)" name="robot_description" | |
value="$(find simulation_tabletop)/urdf/ur3_joint_limited_robot.urdf"/> | |
<include file="$(find ur_description)/launch/ur3_upload.launch"> | |
<arg name="limited" value="$(arg limited)"/> | |
</include> | |
<!-- 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 | |
-x $(arg x) -y $(arg y) -z $(arg z) | |
-R $(arg roll) -P $(arg pitch) -Y $(arg yaw)" | |
respawn="false" output="screen" /> | |
<include file="$(find ur_gazebo)/launch/controller_utils.launch"/> | |
<!-- start this controller --> | |
<rosparam file="$(find ur_gazebo)/controller/arm_controller_ur3.yaml" | |
command="load"/> | |
<node name="arm_controller_spawner" pkg="controller_manager" | |
type="controller_manager" args="spawn arm_controller" | |
respawn="false" output="screen"/> | |
<!-- load other controllers --> | |
<node name="ros_control_controller_manager" pkg="controller_manager" | |
type="controller_manager" respawn="false" output="screen" | |
args="load joint_group_position_controller" /> | |
</launch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment