From 6b8aa5c8dd0e899c56a4bca96a93c3eff3906691 Mon Sep 17 00:00:00 2001
From: ipa-nhg <nadia.hammoudeh-garcia@ipa.fraunhofer.de>
Date: Mon, 8 Apr 2013 15:21:14 +0200
Subject: [PATCH] Renamed packages and new groovy version

---
 ur_bringup/manifest.xml                       | 10 ++--
 ur_description/launch/ur10_upload.launch      |  6 +++
 ur_description/launch/ur5_upload.launch       |  5 ++
 ur_description/manifest.xml                   |  6 +--
 ur_description/urdf/gazebo.urdf.xacro         | 28 +++++++++++
 ur_description/urdf/materials.urdf.xacro      |  4 +-
 ur_description/urdf/ur10.urdf.xacro           | 16 +++----
 ur_description/urdf/ur10_robot.urdf.xacro     | 42 ++++++++++++++--
 ur_description/urdf/ur5_robot.urdf.xacro      | 17 +++++--
 ur_driver/manifest.xml                        |  4 +-
 ur_gazebo/controller/arm_controller_ur10.yaml | 48 +++++++++----------
 ur_gazebo/controller/arm_controller_ur5.yaml  | 48 +++++++++----------
 ur_gazebo/launch/ur10.launch                  |  4 +-
 ur_gazebo/launch/ur5.launch                   |  4 +-
 ur_gazebo/manifest.xml                        |  8 ++--
 15 files changed, 166 insertions(+), 84 deletions(-)
 create mode 100644 ur_description/urdf/gazebo.urdf.xacro

diff --git a/ur_bringup/manifest.xml b/ur_bringup/manifest.xml
index eab5b0c..37cf010 100644
--- a/ur_bringup/manifest.xml
+++ b/ur_bringup/manifest.xml
@@ -1,17 +1,17 @@
 <package>
-  <description brief="ur5_bringup">
+  <description brief="ur_bringup">
 
-     ur5_bringup
+     ur_bringup
 
   </description>
   <author>Wim Meeussen</author>
   <license>BSD</license>
   <review status="unreviewed" notes=""/>
-  <url>http://ros.org/wiki/ur5_bringup</url>
+  <url>http://ros.org/wiki/ur_bringup</url>
 
   <depend package="tf2_ros" />
-  <depend package="ur5_driver" />
-  <depend package="ur5_description" />
+  <depend package="ur_driver" />
+  <depend package="ur_description" />
 
 </package>
 
diff --git a/ur_description/launch/ur10_upload.launch b/ur_description/launch/ur10_upload.launch
index 192829a..ae9c650 100644
--- a/ur_description/launch/ur10_upload.launch
+++ b/ur_description/launch/ur10_upload.launch
@@ -1,3 +1,9 @@
+<?xml version="1.0"?>
 <launch>
   <param name="robot_description" command="$(find xacro)/xacro.py '$(find ur_description)/urdf/ur10_robot.urdf.xacro'" />
+
+   <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
+
+   <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
+
 </launch>
diff --git a/ur_description/launch/ur5_upload.launch b/ur_description/launch/ur5_upload.launch
index 774df52..1df82f9 100644
--- a/ur_description/launch/ur5_upload.launch
+++ b/ur_description/launch/ur5_upload.launch
@@ -1,3 +1,8 @@
+<?xml version="1.0"?>
 <launch>
   <param name="robot_description" command="$(find xacro)/xacro.py '$(find ur_description)/urdf/ur5_robot.urdf.xacro'" />
+
+   <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
+
+   <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
 </launch>
diff --git a/ur_description/manifest.xml b/ur_description/manifest.xml
index 1eca42b..5130dcb 100644
--- a/ur_description/manifest.xml
+++ b/ur_description/manifest.xml
@@ -1,13 +1,13 @@
 <package>
-  <description brief="ur5_description">
+  <description brief="ur_description">
 
-     Universal robot UR5 description
+     Universal robot ur description
 
   </description>
   <author>wim</author>
   <license>BSD</license>
   <review status="unreviewed" notes=""/>
-  <url>http://ros.org/wiki/ur5_description</url>
+  <url>http://ros.org/wiki/ur_description</url>
   <depend package="urdf"/>
 
 </package>
diff --git a/ur_description/urdf/gazebo.urdf.xacro b/ur_description/urdf/gazebo.urdf.xacro
new file mode 100644
index 0000000..e82aab9
--- /dev/null
+++ b/ur_description/urdf/gazebo.urdf.xacro
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<robot xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
+       xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
+       xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface">
+
+  <gazebo>
+    <controller:gazebo_ros_controller_manager name="gazebo_ros_controller_manager" plugin="libgazebo_ros_controller_manager.so">
+      <alwaysOn>true</alwaysOn>
+      <updateRate>1000.0</updateRate>
+      <interface:audio name="gazebo_ros_controller_manager_dummy_iface" />
+    </controller:gazebo_ros_controller_manager>
+
+    <controller:gazebo_ros_power_monitor name="gazebo_ros_power_monitor_controller" plugin="libgazebo_ros_power_monitor.so">
+      <alwaysOn>true</alwaysOn>
+      <updateRate>1.0</updateRate>
+      <timeout>5</timeout>
+      <interface:audio name="power_monitor_dummy_interface" />
+      <powerStateTopic>power_state</powerStateTopic>
+      <powerStateRate>10.0</powerStateRate>
+      <fullChargeCapacity>87.78</fullChargeCapacity>     
+      <dischargeRate>-474</dischargeRate>
+      <chargeRate>525</chargeRate>
+      <dischargeVoltage>15.52</dischargeVoltage>
+      <chargeVoltage>16.41</chargeVoltage>
+    </controller:gazebo_ros_power_monitor>
+  </gazebo>
+
+</robot>
diff --git a/ur_description/urdf/materials.urdf.xacro b/ur_description/urdf/materials.urdf.xacro
index 58ff835..c1467e3 100644
--- a/ur_description/urdf/materials.urdf.xacro
+++ b/ur_description/urdf/materials.urdf.xacro
@@ -1,11 +1,11 @@
 <?xml version="1.0"?>
 <robot>
 
-  <material name="Blue">
+  <material name="UR/Blue">
     <color rgba="0.0 0.0 0.8 1.0"/>
   </material>
 
-  <material name="Grey">
+  <material name="UR/Grey">
     <color rgba="0.7 0.7 0.7 1.0"/>
   </material>
 
diff --git a/ur_description/urdf/ur10.urdf.xacro b/ur_description/urdf/ur10.urdf.xacro
index 007984e..cea91e4 100644
--- a/ur_description/urdf/ur10.urdf.xacro
+++ b/ur_description/urdf/ur10.urdf.xacro
@@ -79,7 +79,7 @@ center_of_mass = [ [0, -0.02561, 0.00193], [0.2125, 0, 0.11336], [0.11993, 0.0,
         <mesh filename="package://ur_description/meshes/ur10/Base.stl" />
       </geometry>
       <origin xyz="0.0 0.0 0.003" rpy="0.0 0.0 ${3.0 * pi / 4.0}" />
-      <material name="Blue" />
+      <material name="UR/Blue" />
     </visual>
     <inertial>
       <mass value="${base_mass}" />
@@ -101,7 +101,7 @@ center_of_mass = [ [0, -0.02561, 0.00193], [0.2125, 0, 0.11336], [0.11993, 0.0,
       <geometry>
         <mesh filename="package://ur_description/meshes/ur10/Shoulder.stl" />
       </geometry>
-      <material name="Grey" />
+      <material name="UR/Grey" />
     </visual>
     <collision>
       <geometry>
@@ -131,7 +131,7 @@ center_of_mass = [ [0, -0.02561, 0.00193], [0.2125, 0, 0.11336], [0.11993, 0.0,
         <mesh filename="package://ur_description/meshes/ur10/UpperArm.stl" />
       </geometry>
       <origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
-      <material name="Blue" />
+      <material name="UR/Blue" />
     </visual>
     <collision>
       <geometry>
@@ -160,7 +160,7 @@ center_of_mass = [ [0, -0.02561, 0.00193], [0.2125, 0, 0.11336], [0.11993, 0.0,
       <geometry>
         <mesh filename="package://ur_description/meshes/ur10/Forearm_new.stl" />
       </geometry>
-      <material name="Grey" />
+      <material name="UR/Grey" />
     </visual>
     <collision>
       <geometry>
@@ -190,7 +190,7 @@ center_of_mass = [ [0, -0.02561, 0.00193], [0.2125, 0, 0.11336], [0.11993, 0.0,
         <mesh filename="package://ur_description/meshes/ur10/Wrist1_new.stl" />
       </geometry>
       <origin xyz="0.0 ${wrist_1_length} 0.0" rpy="0.0 0 0.0" />
-      <material name="Blue" />
+      <material name="UR/Blue" />
     </visual>
     <collision>
       <geometry>
@@ -220,7 +220,7 @@ center_of_mass = [ [0, -0.02561, 0.00193], [0.2125, 0, 0.11336], [0.11993, 0.0,
         <mesh filename="package://ur_description/meshes/ur10/Wrist2_new.stl" />
       </geometry>
       <origin xyz="0.0 0.0 ${wrist_2_length}" rpy="0.0 0.0 0.0" />
-      <material name="Grey" />
+      <material name="UR/Grey" />
     </visual>
     <collision>
       <geometry>
@@ -250,7 +250,7 @@ center_of_mass = [ [0, -0.02561, 0.00193], [0.2125, 0, 0.11336], [0.11993, 0.0,
         <mesh filename="package://ur_description/meshes/ur10/Wrist3_new.stl" />
       </geometry>
       <origin xyz="0.0 ${wrist_3_length} 0.0" rpy="0.0 0.0 0" />
-      <material name="Blue" />
+      <material name="UR/Blue" />
     </visual>
     <collision>
       <geometry>
@@ -308,7 +308,7 @@ center_of_mass = [ [0, -0.02561, 0.00193], [0.2125, 0, 0.11336], [0.11993, 0.0,
   <xacro:ur10_arm_gazebo name="${name}" />
 
   <!--gazebo reference="universal_robot">
-    <material>Gazebo/Blue</material>
+    <material>Gazebo/UR/Blue</material>
   </gazebo-->
 
 
diff --git a/ur_description/urdf/ur10_robot.urdf.xacro b/ur_description/urdf/ur10_robot.urdf.xacro
index de66aa9..00c9fb4 100644
--- a/ur_description/urdf/ur10_robot.urdf.xacro
+++ b/ur_description/urdf/ur10_robot.urdf.xacro
@@ -1,11 +1,45 @@
 <?xml version="1.0"?>
-<robot xmlns:xacro="http://ros.org/wiki/xacro" 
-       name="ur10">
+<robot xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
+       xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
+       xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
+       xmlns:xacro="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
+       name="ur10" >
 
-  <include filename="$(find ur_description)/urdf/ur10.gazebo.xacro" />
+  <!-- common stuff -->
+  <include filename="$(find ur_description)/urdf/gazebo.urdf.xacro" />
+  <!--include filename="$(find ur_description)/urdf/materials.urdf.xacro" /-->
 
+  <!-- ur10 -->
   <include filename="$(find ur_description)/urdf/ur10.urdf.xacro" />
-  <xacro:ur10_robot prefix="" />
+
+  <!-- foot for arm -->
+	<link name="base_link">
+		<inertial>
+		   <origin xyz="0 0 -10" rpy="0 0 0"/>
+		   <mass value="1000.0"/>
+		   <inertia ixx="100.0"  ixy="0"  ixz="0" iyy="100.0" iyz="0" izz="100.0" />
+		</inertial>
+
+		<visual>
+		   <origin xyz="0 0 0.25" rpy="0 0 0" />
+		   <geometry>
+			  <cylinder radius="0.1" length="0.5"/>
+		   </geometry>
+		   <material name="Grey" />
+		</visual>
+
+		<collision>
+		   <origin xyz="0 0 0.25" rpy="0 0 0" />
+		   <geometry>
+			  <cylinder radius="0.1" length="0.5"/>
+		   </geometry>
+		</collision>
+	</link>
+
+  <!-- arm -->
+  <xacro:ur10_robot name="arm" parent="base_link">
+    <origin xyz="0 0 0.5" rpy="0 0 0" />
+  </xacro:ur10_robot>
 
 
 </robot>
diff --git a/ur_description/urdf/ur5_robot.urdf.xacro b/ur_description/urdf/ur5_robot.urdf.xacro
index 6fad6b8..0e96b97 100644
--- a/ur_description/urdf/ur5_robot.urdf.xacro
+++ b/ur_description/urdf/ur5_robot.urdf.xacro
@@ -1,11 +1,20 @@
 <?xml version="1.0"?>
-<robot xmlns:xacro="http://ros.org/wiki/xacro" 
-       name="ur5">
+<robot xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
+       xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
+       xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
+       xmlns:xacro="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
+       name="ur5" >
 
-  <include filename="$(find ur_description)/urdf/ur5.gazebo.xacro" />
+  <!-- common stuff -->
+  <include filename="$(find ur_description)/urdf/gazebo.urdf.xacro" />
+  <include filename="$(find ur_description)/urdf/materials.urdf.xacro" />
 
+  <!-- ur5 -->
   <include filename="$(find ur_description)/urdf/ur5.urdf.xacro" />
-  <xacro:ur5_robot prefix="" />
 
 
+  <!-- arm -->
+  <xacro:ur5_robot prefix="arm_">
+  </xacro:ur5_robot>
+
 </robot>
diff --git a/ur_driver/manifest.xml b/ur_driver/manifest.xml
index d6cf473..3858f40 100644
--- a/ur_driver/manifest.xml
+++ b/ur_driver/manifest.xml
@@ -1,5 +1,5 @@
 <package>
-  <description brief="ur5_driver">
+  <description brief="ur_driver">
 
      universal_robot_driver
 
@@ -7,7 +7,7 @@
   <author>Stuart Glaser</author>
   <license>BSD</license>
   <review status="unreviewed" notes=""/>
-  <url>http://ros.org/wiki/ur5_driver</url>
+  <url>http://ros.org/wiki/ur_driver</url>
 
   <depend package="rospy" />
   <depend package="actionlib" />
diff --git a/ur_gazebo/controller/arm_controller_ur10.yaml b/ur_gazebo/controller/arm_controller_ur10.yaml
index 4e247f3..48f7b72 100644
--- a/ur_gazebo/controller/arm_controller_ur10.yaml
+++ b/ur_gazebo/controller/arm_controller_ur10.yaml
@@ -1,53 +1,53 @@
 arm_controller:
   type: robot_mechanism_controllers/JointTrajectoryActionController
   joints:
-    - shoulder_pan_joint
-    - shoulder_lift_joint
-    - elbow_joint
-    - wrist_1_joint
-    - wrist_2_joint
-    - wrist_3_joint
+    - arm_shoulder_pan_joint
+    - arm_shoulder_lift_joint
+    - arm_elbow_joint
+    - arm_wrist_1_joint
+    - arm_wrist_2_joint
+    - arm_wrist_3_joint
   gains:
-    shoulder_pan_joint:
+    arm_shoulder_pan_joint:
       p: 2000.0
       d: 0.0
-    shoulder_lift_joint:
+    arm_shoulder_lift_joint:
       p: 2000.0
       d: 0.0
-    elbow_joint:
+    arm_elbow_joint:
       p: 2000.0
       d: 0.0
-    wrist_1_joint:
+    arm_wrist_1_joint:
       p: 2020.0
       d: 0.0
-    wrist_2_joint:
+    arm_wrist_2_joint:
       p: 2030.0
       d: 0.0
-    wrist_3_joint:
+    arm_wrist_3_joint:
       p: 2050.0
       d: 0.0
 
   arm_joint_trajectory_action_node:
     joints:
-        - shoulder_pan_joint
-        - shoulder_lift_joint
-        - elbow_joint
-        - wrist_1_joint
-        - wrist_2_joint
-        - wrist_3_joint
+        - arm_shoulder_pan_joint
+        - arm_shoulder_lift_joint
+        - arm_elbow_joint
+        - arm_wrist_1_joint
+        - arm_wrist_2_joint
+        - arm_wrist_3_joint
     constraints:
       goal_time: 0.6
-      shoulder_pan_joint:
+      arm_shoulder_pan_joint:
         goal: 0.05
-      shoulder_lift_joint:
+      arm_shoulder_lift_joint:
         goal: 0.05
-      elbow_joint:
+      arm_elbow_joint:
         goal: 0.05
-      wrist_1_joint:
+      arm_wrist_1_joint:
         goal: 0.05
-      wrist_2_joint:
+      arm_wrist_2_joint:
         goal: 0.05
-      wrist_3_joint:
+      arm_wrist_3_joint:
         goal: 0.05
 
 
diff --git a/ur_gazebo/controller/arm_controller_ur5.yaml b/ur_gazebo/controller/arm_controller_ur5.yaml
index 4e247f3..48f7b72 100644
--- a/ur_gazebo/controller/arm_controller_ur5.yaml
+++ b/ur_gazebo/controller/arm_controller_ur5.yaml
@@ -1,53 +1,53 @@
 arm_controller:
   type: robot_mechanism_controllers/JointTrajectoryActionController
   joints:
-    - shoulder_pan_joint
-    - shoulder_lift_joint
-    - elbow_joint
-    - wrist_1_joint
-    - wrist_2_joint
-    - wrist_3_joint
+    - arm_shoulder_pan_joint
+    - arm_shoulder_lift_joint
+    - arm_elbow_joint
+    - arm_wrist_1_joint
+    - arm_wrist_2_joint
+    - arm_wrist_3_joint
   gains:
-    shoulder_pan_joint:
+    arm_shoulder_pan_joint:
       p: 2000.0
       d: 0.0
-    shoulder_lift_joint:
+    arm_shoulder_lift_joint:
       p: 2000.0
       d: 0.0
-    elbow_joint:
+    arm_elbow_joint:
       p: 2000.0
       d: 0.0
-    wrist_1_joint:
+    arm_wrist_1_joint:
       p: 2020.0
       d: 0.0
-    wrist_2_joint:
+    arm_wrist_2_joint:
       p: 2030.0
       d: 0.0
-    wrist_3_joint:
+    arm_wrist_3_joint:
       p: 2050.0
       d: 0.0
 
   arm_joint_trajectory_action_node:
     joints:
-        - shoulder_pan_joint
-        - shoulder_lift_joint
-        - elbow_joint
-        - wrist_1_joint
-        - wrist_2_joint
-        - wrist_3_joint
+        - arm_shoulder_pan_joint
+        - arm_shoulder_lift_joint
+        - arm_elbow_joint
+        - arm_wrist_1_joint
+        - arm_wrist_2_joint
+        - arm_wrist_3_joint
     constraints:
       goal_time: 0.6
-      shoulder_pan_joint:
+      arm_shoulder_pan_joint:
         goal: 0.05
-      shoulder_lift_joint:
+      arm_shoulder_lift_joint:
         goal: 0.05
-      elbow_joint:
+      arm_elbow_joint:
         goal: 0.05
-      wrist_1_joint:
+      arm_wrist_1_joint:
         goal: 0.05
-      wrist_2_joint:
+      arm_wrist_2_joint:
         goal: 0.05
-      wrist_3_joint:
+      arm_wrist_3_joint:
         goal: 0.05
 
 
diff --git a/ur_gazebo/launch/ur10.launch b/ur_gazebo/launch/ur10.launch
index 78cbf0c..aaf8cfd 100644
--- a/ur_gazebo/launch/ur10.launch
+++ b/ur_gazebo/launch/ur10.launch
@@ -2,13 +2,13 @@
 <launch>
 
   <!-- startup simulated world -->
-  <include file="$(find cob_gazebo_worlds)/launch/empty-world.launch" />
+  <include file="$(find gazebo_worlds)/launch/empty_world.launch" />
 
   <!-- send frida urdf to param server -->
   <param name="robot_description" command="$(find xacro)/xacro.py '$(find ur_description)/urdf/ur10_robot.urdf.xacro'" />
 
   <!-- push robot_description to factory and spawn robot in gazebo -->
-  <node name="spawn_gazebo_model" pkg="gazebo" type="spawn_model" args="-urdf -param robot_description -model robot -z 0.1	 " respawn="false" output="screen" />
+  <node name="spawn_gazebo_model" pkg="gazebo" type="spawn_model" args="-urdf -param robot_description -model robot -z 0.1" respawn="false" output="screen" />
 
   <!-- Controller Manager -->
   <include file="$(find pr2_controller_manager)/controller_manager.launch" />
diff --git a/ur_gazebo/launch/ur5.launch b/ur_gazebo/launch/ur5.launch
index a5c35db..61f5eb8 100644
--- a/ur_gazebo/launch/ur5.launch
+++ b/ur_gazebo/launch/ur5.launch
@@ -2,13 +2,13 @@
 <launch>
 
   <!-- startup simulated world -->
-  <include file="$(find cob_gazebo_worlds)/launch/empty-world.launch" />
+  <include file="$(find gazebo_worlds)/launch/empty_world.launch" />
 
   <!-- send frida urdf to param server -->
   <param name="robot_description" command="$(find xacro)/xacro.py '$(find ur_description)/urdf/ur5_robot.urdf.xacro'" />
 
   <!-- push robot_description to factory and spawn robot in gazebo -->
-  <node name="spawn_gazebo_model" pkg="gazebo" type="spawn_model" args="-urdf -param robot_description -model robot -z 0.1	 " respawn="false" output="screen" />
+  <node name="spawn_gazebo_model" pkg="gazebo" type="spawn_model" args="-urdf -param robot_description -model robot -z 0.1" respawn="false" output="screen" />
 
   <!-- Controller Manager -->
   <include file="$(find pr2_controller_manager)/controller_manager.launch" />
diff --git a/ur_gazebo/manifest.xml b/ur_gazebo/manifest.xml
index 84d83a8..8dc5186 100644
--- a/ur_gazebo/manifest.xml
+++ b/ur_gazebo/manifest.xml
@@ -1,14 +1,14 @@
 <package>
-  <description brief="ur5_gazebo">
+  <description brief="ur_gazebo">
 
-     ur5_gazebo
+     ur_gazebo
 
   </description>
   <author>Alexander Bubeck</author>
   <license>BSD</license>
   <review status="unreviewed" notes=""/>
-  <url>http://ros.org/wiki/ur5_gazebo</url>
-  <depend package="ur5_description"/>
+  <url>http://ros.org/wiki/ur_gazebo</url>
+  <depend package="ur_description"/>
 
 </package>
 
-- 
GitLab