Skip to content

Commit c4388fd

Browse files
committed
Merge pull request #354 from shadow-robot/F#307_gazebo_ros_control
Fixes #307 gazebo ros control
2 parents f7264db + 192153f commit c4388fd

29 files changed

+549
-808
lines changed

project.rosinstall

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
- git:
77
local-name: universal_robot
8-
uri: 'https://github.com/shadow-robot/universal_robot.git'
9-
version: F_sr_plugin_compatible
8+
uri: 'https://github.com/ros-industrial/universal_robot.git'
9+
version: indigo-devel
1010

1111
- git:
1212
local-name: sr_ur_arm

shadow_robot/package.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<!-- Dependencies needed after this package is compiled. -->
2424
<run_depend>sr_description</run_depend>
2525
<run_depend>sr_example</run_depend>
26-
<run_depend>sr_gazebo_plugins</run_depend>
26+
<run_depend>sr_gazebo_sim</run_depend>
2727
<run_depend>sr_hand</run_depend>
2828
<run_depend>sr_hardware_interface</run_depend>
2929
<run_depend>sr_mechanism_controllers</run_depend>

sr_description/hand/xacro/finger/knuckle/knuckle.transmission.xacro

+13-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
44
xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
55
xmlns:xacro="http://www.ros.org/wiki/xacro">
6-
6+
77
<!-- muscletrans is true for muscle transmission or false for motor transmission -->
88
<!-- prefix can be anything but usually is "r_" or "l_" for right and left hands distinction -->
99
<!-- link_prefix prepends fingername to the link names -->
@@ -17,16 +17,21 @@
1717
<joint name="${prefix}${joint_prefix}J4" />
1818
<mechanicalReduction>1</mechanicalReduction>
1919
</transmission>
20-
</xacro:if>
20+
</xacro:if>
2121
<!-- motor hand -->
2222
<xacro:unless value="${muscletrans}">
23-
<transmission type="sr_mechanism_model/SimpleTransmission" name="${prefix}${link_prefix}knuckle_transmission">
24-
<actuator name="${prefix}${joint_prefix}J4" />
25-
<joint name="${prefix}${joint_prefix}J4" />
26-
<mechanicalReduction>1</mechanicalReduction>
23+
<transmission name="${prefix}${link_prefix}knuckle_transmission">
24+
<type>sr_mechanism_model/SimpleTransmission</type>
25+
<actuator name="${prefix}${joint_prefix}J4">
26+
<mechanicalReduction>1</mechanicalReduction>
27+
</actuator>
28+
<joint name="${prefix}${joint_prefix}J4">
29+
<hardwareInterface>EffortJointInterface</hardwareInterface>
30+
<hardwareInterface>PositionJointInterface</hardwareInterface>
31+
</joint>
2732
</transmission>
28-
</xacro:unless>
29-
33+
</xacro:unless>
34+
3035
</xacro:macro>
3136

3237
</robot>

sr_description/hand/xacro/finger/lfmetacarpal/lfmetacarpal.transmission.xacro

+13-8
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,21 @@
1515
<joint name="${prefix}LFJ5" />
1616
<mechanicalReduction>1</mechanicalReduction>
1717
</transmission>
18-
</xacro:if>
18+
</xacro:if>
1919
<!-- motor hand -->
2020
<xacro:unless value="${muscletrans}">
21-
<transmission type="sr_mechanism_model/SimpleTransmission" name="${prefix}lfmetacarpal_transmission">
22-
<actuator name="${prefix}LFJ5" />
23-
<joint name="${prefix}LFJ5" />
24-
<mechanicalReduction>1</mechanicalReduction>
21+
<transmission name="${prefix}lfmetacarpal_transmission">
22+
<type>sr_mechanism_model/SimpleTransmission</type>
23+
<actuator name="${prefix}LFJ5">
24+
<mechanicalReduction>1</mechanicalReduction>
25+
</actuator>
26+
<joint name="${prefix}LFJ5">
27+
<hardwareInterface>EffortJointInterface</hardwareInterface>
28+
<hardwareInterface>PositionJointInterface</hardwareInterface>
29+
</joint>
2530
</transmission>
26-
</xacro:unless>
27-
31+
</xacro:unless>
32+
2833
</xacro:macro>
29-
34+
3035
</robot>

sr_description/hand/xacro/finger/middle/middle.transmission.xacro

+12-7
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,20 @@
1818
<joint name="${prefix}${joint_prefix}J2" />
1919
<mechanicalReduction>1</mechanicalReduction>
2020
</transmission>
21-
</xacro:if>
21+
</xacro:if>
2222
<!-- motor hand -->
2323
<xacro:unless value="${muscletrans}">
24-
<transmission type="sr_mechanism_model/J0Transmission" name="${prefix}${link_prefix}middle_transmission">
25-
<actuator name="${prefix}${joint_prefix}J0" />
26-
<joint name="${prefix}${joint_prefix}J1" />
27-
<joint name="${prefix}${joint_prefix}J2" />
28-
<mechanicalReduction>1</mechanicalReduction>
24+
<transmission name="${prefix}${link_prefix}middle_transmission">
25+
<type>sr_mechanism_model/J0Transmission</type>
26+
<actuator name="${prefix}${joint_prefix}J0">
27+
<mechanicalReduction>1</mechanicalReduction>
28+
</actuator>
29+
<joint name="${prefix}${joint_prefix}J1">
30+
<hardwareInterface>EffortJointInterface</hardwareInterface>
31+
<hardwareInterface>PositionJointInterface</hardwareInterface>
32+
</joint>
33+
<secondJoint name="${prefix}${joint_prefix}J2" />
2934
</transmission>
30-
</xacro:unless>
35+
</xacro:unless>
3136
</xacro:macro>
3237
</robot>

sr_description/hand/xacro/finger/proximal/proximal.transmission.xacro

+12-7
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,20 @@
1717
<joint name="${prefix}${joint_prefix}J3" />
1818
<mechanicalReduction>1</mechanicalReduction>
1919
</transmission>
20-
</xacro:if>
20+
</xacro:if>
2121
<!-- motor hand -->
2222
<xacro:unless value="${muscletrans}">
23-
<transmission type="sr_mechanism_model/SimpleTransmission" name="${prefix}${link_prefix}proximal_transmission">
24-
<actuator name="${prefix}${joint_prefix}J3" />
25-
<joint name="${prefix}${joint_prefix}J3" />
26-
<mechanicalReduction>1</mechanicalReduction>
23+
<transmission name="${prefix}${link_prefix}proximal_transmission">
24+
<type>sr_mechanism_model/SimpleTransmission</type>
25+
<actuator name="${prefix}${joint_prefix}J3">
26+
<mechanicalReduction>1</mechanicalReduction>
27+
</actuator>
28+
<joint name="${prefix}${joint_prefix}J3">
29+
<hardwareInterface>EffortJointInterface</hardwareInterface>
30+
<hardwareInterface>PositionJointInterface</hardwareInterface>
31+
</joint>
2732
</transmission>
28-
</xacro:unless>
29-
33+
</xacro:unless>
34+
3035
</xacro:macro>
3136
</robot>

sr_description/hand/xacro/palm/palm.transmission.xacro

+12-7
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,21 @@
1515
<joint name="${prefix}WRJ1" />
1616
<mechanicalReduction>1</mechanicalReduction>
1717
</transmission>
18-
</xacro:if>
18+
</xacro:if>
1919
<!-- motor hand -->
2020
<xacro:unless value="${muscletrans}">
21-
<transmission type="sr_mechanism_model/SimpleTransmission" name="${prefix}palm_transmission">
22-
<actuator name="${prefix}WRJ1" />
23-
<joint name="${prefix}WRJ1" />
24-
<mechanicalReduction>1</mechanicalReduction>
21+
<transmission name="${prefix}palm_transmission">
22+
<type>sr_mechanism_model/SimpleTransmission</type>
23+
<actuator name="${prefix}WRJ1">
24+
<mechanicalReduction>1</mechanicalReduction>
25+
</actuator>
26+
<joint name="${prefix}WRJ1">
27+
<hardwareInterface>EffortJointInterface</hardwareInterface>
28+
<hardwareInterface>PositionJointInterface</hardwareInterface>
29+
</joint>
2530
</transmission>
26-
</xacro:unless>
27-
31+
</xacro:unless>
32+
2833
</xacro:macro>
2934

3035
</robot>

sr_description/hand/xacro/thumb/thbase.transmission.xacro

+11-6
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,19 @@
1515
<joint name="${prefix}THJ5" />
1616
<mechanicalReduction>1</mechanicalReduction>
1717
</transmission>
18-
</xacro:if>
18+
</xacro:if>
1919
<!-- motor hand -->
2020
<xacro:unless value="${muscletrans}">
21-
<transmission type="sr_mechanism_model/SimpleTransmission" name="${prefix}thbase_transmission">
22-
<actuator name="${prefix}THJ5" />
23-
<joint name="${prefix}THJ5" />
24-
<mechanicalReduction>1</mechanicalReduction>
21+
<transmission name="${prefix}thbase_transmission">
22+
<type>sr_mechanism_model/SimpleTransmission</type>
23+
<actuator name="${prefix}THJ5">
24+
<mechanicalReduction>1</mechanicalReduction>
25+
</actuator>
26+
<joint name="${prefix}THJ5">
27+
<hardwareInterface>EffortJointInterface</hardwareInterface>
28+
<hardwareInterface>PositionJointInterface</hardwareInterface>
29+
</joint>
2530
</transmission>
26-
</xacro:unless>
31+
</xacro:unless>
2732
</xacro:macro>
2833
</robot>

sr_description/hand/xacro/thumb/thdistal.transmission.xacro

+12-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
44
xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
55
xmlns:xacro="http://www.ros.org/wiki/xacro">
6-
6+
77
<!-- muscletrans is true for muscle transmission or false for motor transmission -->
88
<!-- prefix can be anything but usually is "r_" or "l_" for right and left hands distinction -->
99
<xacro:macro name="thdistal_transmission" params="muscletrans prefix" >
@@ -15,14 +15,19 @@
1515
<joint name="${prefix}THJ1" />
1616
<mechanicalReduction>1</mechanicalReduction>
1717
</transmission>
18-
</xacro:if>
18+
</xacro:if>
1919
<!-- motor hand -->
2020
<xacro:unless value="${muscletrans}">
21-
<transmission type="sr_mechanism_model/SimpleTransmission" name="${prefix}thdistal_transmission">
22-
<actuator name="${prefix}THJ1" />
23-
<joint name="${prefix}THJ1" />
24-
<mechanicalReduction>1</mechanicalReduction>
21+
<transmission name="${prefix}thdistal_transmission">
22+
<type>sr_mechanism_model/SimpleTransmission</type>
23+
<actuator name="${prefix}THJ1">
24+
<mechanicalReduction>1</mechanicalReduction>
25+
</actuator>
26+
<joint name="${prefix}THJ1">
27+
<hardwareInterface>EffortJointInterface</hardwareInterface>
28+
<hardwareInterface>PositionJointInterface</hardwareInterface>
29+
</joint>
2530
</transmission>
26-
</xacro:unless>
31+
</xacro:unless>
2732
</xacro:macro>
2833
</robot>

sr_description/hand/xacro/thumb/thhub.transmission.xacro

+11-6
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,19 @@
1515
<joint name="${prefix}THJ3" />
1616
<mechanicalReduction>1</mechanicalReduction>
1717
</transmission>
18-
</xacro:if>
18+
</xacro:if>
1919
<!-- motor hand -->
2020
<xacro:unless value="${muscletrans}">
21-
<transmission type="sr_mechanism_model/SimpleTransmission" name="${prefix}thhub_transmission">
22-
<actuator name="${prefix}THJ3" />
23-
<joint name="${prefix}THJ3" />
24-
<mechanicalReduction>1</mechanicalReduction>
21+
<transmission name="${prefix}thhub_transmission">
22+
<type>sr_mechanism_model/SimpleTransmission</type>
23+
<actuator name="${prefix}THJ3">
24+
<mechanicalReduction>1</mechanicalReduction>
25+
</actuator>
26+
<joint name="${prefix}THJ3">
27+
<hardwareInterface>EffortJointInterface</hardwareInterface>
28+
<hardwareInterface>PositionJointInterface</hardwareInterface>
29+
</joint>
2530
</transmission>
26-
</xacro:unless>
31+
</xacro:unless>
2732
</xacro:macro>
2833
</robot>

sr_description/hand/xacro/thumb/thmiddle.transmission.xacro

+11-6
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,19 @@
1515
<joint name="${prefix}THJ2" />
1616
<mechanicalReduction>1</mechanicalReduction>
1717
</transmission>
18-
</xacro:if>
18+
</xacro:if>
1919
<!-- motor hand -->
2020
<xacro:unless value="${muscletrans}">
21-
<transmission type="sr_mechanism_model/SimpleTransmission" name="${prefix}thmiddle_transmission">
22-
<actuator name="${prefix}THJ2" />
23-
<joint name="${prefix}THJ2" />
24-
<mechanicalReduction>1</mechanicalReduction>
21+
<transmission name="${prefix}thmiddle_transmission">
22+
<type>sr_mechanism_model/SimpleTransmission</type>
23+
<actuator name="${prefix}THJ2">
24+
<mechanicalReduction>1</mechanicalReduction>
25+
</actuator>
26+
<joint name="${prefix}THJ2">
27+
<hardwareInterface>EffortJointInterface</hardwareInterface>
28+
<hardwareInterface>PositionJointInterface</hardwareInterface>
29+
</joint>
2530
</transmission>
26-
</xacro:unless>
31+
</xacro:unless>
2732
</xacro:macro>
2833
</robot>

sr_description/hand/xacro/thumb/thproximal.transmission.xacro

+11-6
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,19 @@
1515
<joint name="${prefix}THJ4" />
1616
<mechanicalReduction>1</mechanicalReduction>
1717
</transmission>
18-
</xacro:if>
18+
</xacro:if>
1919
<!-- motor hand -->
2020
<xacro:unless value="${muscletrans}">
21-
<transmission type="sr_mechanism_model/SimpleTransmission" name="${prefix}thproximal_transmission">
22-
<actuator name="${prefix}THJ4" />
23-
<joint name="${prefix}THJ4" />
24-
<mechanicalReduction>1</mechanicalReduction>
21+
<transmission name="${prefix}thproximal_transmission">
22+
<type>sr_mechanism_model/SimpleTransmission</type>
23+
<actuator name="${prefix}THJ4">
24+
<mechanicalReduction>1</mechanicalReduction>
25+
</actuator>
26+
<joint name="${prefix}THJ4">
27+
<hardwareInterface>EffortJointInterface</hardwareInterface>
28+
<hardwareInterface>PositionJointInterface</hardwareInterface>
29+
</joint>
2530
</transmission>
26-
</xacro:unless>
31+
</xacro:unless>
2732
</xacro:macro>
2833
</robot>

sr_description/hand/xacro/wrist/wrist.transmission.xacro

+13-8
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,29 @@
77

88
<!-- muscletrans is true for muscle transmission or false for motor transmission -->
99
<!-- prefix can be anything but usually is "r_" or "l_" for right and left hands distinction -->
10-
<xacro:macro name="shadowhand_wrist_transmission" params="muscletrans prefix" >
10+
<xacro:macro name="shadowhand_wrist_transmission" params="muscletrans prefix" >
1111
<!-- muscle hand -->
1212
<xacro:if value="${muscletrans}">
1313
<transmission type="sr_mechanism_model/SimpleTransmissionForMuscle" name="${prefix}wrist_transmission">
1414
<actuator name="${prefix}WRJ2" />
1515
<joint name="${prefix}WRJ2" />
1616
<mechanicalReduction>1</mechanicalReduction>
1717
</transmission>
18-
</xacro:if>
18+
</xacro:if>
1919
<!-- motor hand -->
2020
<xacro:unless value="${muscletrans}">
21-
<transmission type="sr_mechanism_model/SimpleTransmission" name="${prefix}wrist_transmission">
22-
<actuator name="${prefix}WRJ2" />
23-
<joint name="${prefix}WRJ2" />
24-
<mechanicalReduction>1</mechanicalReduction>
21+
<transmission name="${prefix}wrist_transmission">
22+
<type>sr_mechanism_model/SimpleTransmission</type>
23+
<actuator name="${prefix}WRJ2">
24+
<mechanicalReduction>1</mechanicalReduction>
25+
</actuator>
26+
<joint name="${prefix}WRJ2">
27+
<hardwareInterface>EffortJointInterface</hardwareInterface>
28+
<hardwareInterface>PositionJointInterface</hardwareInterface>
29+
</joint>
2530
</transmission>
26-
</xacro:unless>
27-
31+
</xacro:unless>
32+
2833
</xacro:macro>
2934

3035
</robot>

sr_description/other/xacro/gazebo/gazebo.urdf.xacro

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controlle
44
xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface">
55

66
<gazebo>
7-
<plugin name="sr_gazebo_ros_controller_manager"
8-
filename="libsr_gazebo_ros_controller_manager.so">
9-
<alwaysOn>true</alwaysOn>
10-
<updateRate>1400.0</updateRate>
11-
<!-- <robotParam>sh_description</robotParam> -->
7+
<plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
8+
<robotSimType>sr_gazebo_sim/SrGazeboHWSim</robotSimType>
129
</plugin>
1310
</gazebo>
11+
1412
</robot>

sr_gazebo_plugins/CHANGELOG.rst

-22
This file was deleted.

0 commit comments

Comments
 (0)