Skip to content

Commit

Permalink
change gazebo launch file and tests
Browse files Browse the repository at this point in the history
* added e-series
  • Loading branch information
Ludovic Delval committed Sep 16, 2019
1 parent eb25fdd commit a3b48f3
Show file tree
Hide file tree
Showing 11 changed files with 157 additions and 95 deletions.
29 changes: 11 additions & 18 deletions ur_gazebo/launch/ur10.launch
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
<?xml version="1.0"?>
<launch>
<arg name="limited" default="false" doc="If true, limits joint range [-PI, PI] on all joints." />
<!--ur10 parameters files -->
<arg name="joints_limits_params" default="$(find ur_description)/config/ur10/joints_limits_parameters.yaml"/>
<arg name="physical_params" default="$(find ur_description)/config/ur10/physical_parameters.yaml"/>
<arg name="visual_params" default="$(find ur_description)/config/ur10/visual_parameters.yaml"/>
<!-- gazebo parameters-->
<arg name="paused" default="false" doc="Starts gazebo in paused mode" />
<arg name="gui" default="true" doc="Starts gazebo gui" />

<!-- startup simulated world -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" default="worlds/empty.world"/>
<arg name="paused" value="$(arg paused)"/>
<arg name="gui" value="$(arg gui)"/>
</include>

<!-- send robot urdf to param server -->
<include file="$(find ur_description)/launch/ur10_upload.launch">
<arg name="limited" value="$(arg limited)"/>
<include file="$(find ur_gazebo)/launch/ur_common.launch">
<arg name="joints_limits_params" value="$(arg joints_limits_params)"/>
<arg name="physical_params" value="$(arg physical_params)"/>
<arg name="visual_params" value="$(arg visual_params)"/>
<arg name="paused" value="$(arg paused)"/>
<arg name="gui" value="$(arg gui)"/>
</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 -z 0.1" respawn="false" output="screen" />

<include file="$(find ur_gazebo)/launch/controller_utils.launch"/>

<!-- start this controller -->
<rosparam file="$(find ur_gazebo)/controller/arm_controller_ur10.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>
10 changes: 0 additions & 10 deletions ur_gazebo/launch/ur10_joint_limited.launch

This file was deleted.

24 changes: 24 additions & 0 deletions ur_gazebo/launch/ur10e.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<launch>
<!--ur10e parameters files -->
<arg name="joints_limits_params" default="$(find ur_description)/config/ur10e/joints_limits_parameters.yaml"/>
<arg name="physical_params" default="$(find ur_description)/config/ur10e/physical_parameters.yaml"/>
<arg name="visual_params" default="$(find ur_description)/config/ur10e/visual_parameters.yaml"/>
<!-- gazebo parameters-->
<arg name="paused" default="false" doc="Starts gazebo in paused mode" />
<arg name="gui" default="true" doc="Starts gazebo gui" />

<!-- send robot urdf to param server -->
<include file="$(find ur_gazebo)/launch/ur_common.launch">
<arg name="joints_limits_params" value="$(arg joints_limits_params)"/>
<arg name="physical_params" value="$(arg physical_params)"/>
<arg name="visual_params" value="$(arg visual_params)"/>
<arg name="paused" value="$(arg paused)"/>
<arg name="gui" value="$(arg gui)"/>
</include>

<!-- start this controller -->
<rosparam file="$(find ur_gazebo)/controller/arm_controller_ur10.yaml" command="load"/>
<node name="arm_controller_spawner" pkg="controller_manager" type="controller_manager" args="spawn arm_controller" respawn="false" output="screen"/>

</launch>
29 changes: 11 additions & 18 deletions ur_gazebo/launch/ur3.launch
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
<?xml version="1.0"?>
<launch>
<arg name="limited" default="false" doc="If true, limits joint range [-PI, PI] on all joints." />
<!--ur3 parameters files -->
<arg name="joints_limits_params" default="$(find ur_description)/config/ur3/joints_limits_parameters.yaml"/>
<arg name="physical_params" default="$(find ur_description)/config/ur3/physical_parameters.yaml"/>
<arg name="visual_params" default="$(find ur_description)/config/ur3/visual_parameters.yaml"/>
<!-- gazebo parameters-->
<arg name="paused" default="false" doc="Starts gazebo in paused mode" />
<arg name="gui" default="true" doc="Starts gazebo gui" />

<!-- startup simulated world -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" default="worlds/empty.world"/>
<arg name="paused" value="$(arg paused)"/>
<arg name="gui" value="$(arg gui)"/>
</include>

<!-- send robot urdf to param server -->
<include file="$(find ur_description)/launch/ur3_upload.launch">
<arg name="limited" value="$(arg limited)"/>
<include file="$(find ur_gazebo)/launch/ur_common.launch">
<arg name="joints_limits_params" value="$(arg joints_limits_params)"/>
<arg name="physical_params" value="$(arg physical_params)"/>
<arg name="visual_params" value="$(arg visual_params)"/>
<arg name="paused" value="$(arg paused)"/>
<arg name="gui" value="$(arg gui)"/>
</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 -z 0.1" 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>
10 changes: 0 additions & 10 deletions ur_gazebo/launch/ur3_joint_limited.launch

This file was deleted.

24 changes: 24 additions & 0 deletions ur_gazebo/launch/ur3e.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<launch>
<!--ur3e parameters files -->
<arg name="joints_limits_params" default="$(find ur_description)/config/ur3e/joints_limits_parameters.yaml"/>
<arg name="physical_params" default="$(find ur_description)/config/ur3e/physical_parameters.yaml"/>
<arg name="visual_params" default="$(find ur_description)/config/ur3e/visual_parameters.yaml"/>
<!-- gazebo parameters-->
<arg name="paused" default="false" doc="Starts gazebo in paused mode" />
<arg name="gui" default="true" doc="Starts gazebo gui" />

<!-- send robot urdf to param server -->
<include file="$(find ur_gazebo)/launch/ur_common.launch">
<arg name="joints_limits_params" value="$(arg joints_limits_params)"/>
<arg name="physical_params" value="$(arg physical_params)"/>
<arg name="visual_params" value="$(arg visual_params)"/>
<arg name="paused" value="$(arg paused)"/>
<arg name="gui" value="$(arg gui)"/>
</include>

<!-- 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"/>

</launch>
29 changes: 11 additions & 18 deletions ur_gazebo/launch/ur5.launch
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
<?xml version="1.0"?>
<launch>
<arg name="limited" default="false" doc="If true, limits joint range [-PI, PI] on all joints." />
<!--ur5 parameters files -->
<arg name="joints_limits_params" default="$(find ur_description)/config/ur5/joints_limits_parameters.yaml"/>
<arg name="physical_params" default="$(find ur_description)/config/ur5/physical_parameters.yaml"/>
<arg name="visual_params" default="$(find ur_description)/config/ur5/visual_parameters.yaml"/>
<!-- gazebo parameters-->
<arg name="paused" default="false" doc="Starts gazebo in paused mode" />
<arg name="gui" default="true" doc="Starts gazebo gui" />

<!-- startup simulated world -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" default="worlds/empty.world"/>
<arg name="paused" value="$(arg paused)"/>
<arg name="gui" value="$(arg gui)"/>
</include>

<!-- send robot urdf to param server -->
<include file="$(find ur_description)/launch/ur5_upload.launch">
<arg name="limited" value="$(arg limited)"/>
<include file="$(find ur_gazebo)/launch/ur_common.launch">
<arg name="joints_limits_params" value="$(arg joints_limits_params)"/>
<arg name="physical_params" value="$(arg physical_params)"/>
<arg name="visual_params" value="$(arg visual_params)"/>
<arg name="paused" value="$(arg paused)"/>
<arg name="gui" value="$(arg gui)"/>
</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 -z 0.1" respawn="false" output="screen" />

<include file="$(find ur_gazebo)/launch/controller_utils.launch"/>

<!-- start this controller -->
<rosparam file="$(find ur_gazebo)/controller/arm_controller_ur5.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>
10 changes: 0 additions & 10 deletions ur_gazebo/launch/ur5_joint_limited.launch

This file was deleted.

24 changes: 24 additions & 0 deletions ur_gazebo/launch/ur5e.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<launch>
<!--ur5e parameters files -->
<arg name="joints_limits_params" default="$(find ur_description)/config/ur5e/joints_limits_parameters.yaml"/>
<arg name="physical_params" default="$(find ur_description)/config/ur5e/physical_parameters.yaml"/>
<arg name="visual_params" default="$(find ur_description)/config/ur5e/visual_parameters.yaml"/>
<!-- gazebo parameters-->
<arg name="paused" default="false" doc="Starts gazebo in paused mode" />
<arg name="gui" default="true" doc="Starts gazebo gui" />

<!-- send robot urdf to param server -->
<include file="$(find ur_gazebo)/launch/ur_common.launch">
<arg name="joints_limits_params" value="$(arg joints_limits_params)"/>
<arg name="physical_params" value="$(arg physical_params)"/>
<arg name="visual_params" value="$(arg visual_params)"/>
<arg name="paused" value="$(arg paused)"/>
<arg name="gui" value="$(arg gui)"/>
</include>

<!-- start this controller -->
<rosparam file="$(find ur_gazebo)/controller/arm_controller_ur5.yaml" command="load"/>
<node name="arm_controller_spawner" pkg="controller_manager" type="controller_manager" args="spawn arm_controller" respawn="false" output="screen"/>

</launch>
45 changes: 45 additions & 0 deletions ur_gazebo/launch/ur_common.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0"?>
<launch>

<!-- urdf model related parameters -->
<arg name="joints_limits_params" doc="YAML file containing the joints limits values"/>
<arg name="physical_params" doc="YAML file containing the phycical parameters of the robots"/>
<arg name="visual_params" doc="YAML file containing the visual model of the robots"/>

<!-- common parameters -->
<arg name="transmission_hw_interface" default="hardware_interface/PositionJointInterface" />
<arg name="safety_limits" default="false" doc="If True, enable the safety limits controller"/>
<arg name="safety_pos_margin" default="0.15" doc="The lower/upper limits in the safety controller" />
<arg name="safety_k_position" default="20" doc="Used to set k position in the safety controller" />

<!-- gazebo parameters -->
<arg name="paused" default="false" doc="Starts gazebo in paused mode" />
<arg name="gui" default="true" doc="Starts gazebo gui" />

<!-- startup simulated world -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" default="worlds/empty.world"/>
<arg name="paused" value="$(arg paused)"/>
<arg name="gui" value="$(arg gui)"/>
</include>

<!-- set robot urdf to param server -->
<param name="robot_description" command="$(find xacro)/xacro '$(find ur_gazebo)/urdf/ur_robot.urdf.xacro' --inorder
joints_limits_params:=$(arg joints_limits_params)
physical_params:=$(arg physical_params)
visual_params:=$(arg visual_params)
transmission_hw_interface:=$(arg transmission_hw_interface)
safety_limits:=$(arg safety_limits)
safety_pos_margin:=$(arg safety_pos_margin)
safety_k_position:=$(arg safety_k_position)"
/>

<!-- 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 -z 0.1" respawn="false" output="screen" />

<include file="$(find ur_gazebo)/launch/controller_utils.launch"/>

<!-- 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>
18 changes: 7 additions & 11 deletions ur_gazebo/tests/roslaunch_test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,16 @@
<include file="$(find ur_gazebo)/launch/ur10.launch"/>
</group>

<group ns="ur3_joint_limited__">
<include file="$(find ur_gazebo)/launch/ur3_joint_limited.launch"/>
<group ns="ur3e__">
<include file="$(find ur_gazebo)/launch/ur3e.launch"/>
</group>

<group ns="ur5_joint_limited__">
<include file="$(find ur_gazebo)/launch/ur5_joint_limited.launch"/>
<group ns="ur5e__">
<include file="$(find ur_gazebo)/launch/ur5e.launch"/>
</group>

<group ns="ur10_joint_limited__">
<include file="$(find ur_gazebo)/launch/ur10_joint_limited.launch"/>
<group ns="ur10e__">
<include file="$(find ur_gazebo)/launch/ur10e.launch"/>
</group>

<group ns="controller_utils__">
<include file="$(find ur_gazebo)/launch/controller_utils.launch"/>
</group>

</launch>
</launch>

0 comments on commit a3b48f3

Please sign in to comment.