Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gazebo support + urdf model corrections #186

Open
wants to merge 10 commits into
base: kinetic-devel
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://wiki.ros.org/xacro">

<xacro:macro name="robotiq_arg2f_gazebo" params="prefix">
<!-- To fix broken gripper in gazebo according to the following issue-->
<!--https://github.com/ros-industrial/robotiq/issues/150-->
<gazebo>
<plugin filename="libroboticsgroup_gazebo_mimic_joint_plugin.so" name="${prefix}mimic_robotiq_140_1">
<joint>${prefix}finger_joint</joint>
<mimicJoint>${prefix}right_outer_knuckle_joint</mimicJoint>
<multiplier>-1.0</multiplier>
<offset>0.0</offset>
</plugin>
<plugin filename="libroboticsgroup_gazebo_mimic_joint_plugin.so" name="${prefix}mimic_robotiq_140_2">
<joint>${prefix}finger_joint</joint>
<mimicJoint>${prefix}left_inner_knuckle_joint</mimicJoint>
<multiplier>-1.0</multiplier>
<offset>0.0</offset>
</plugin>
<plugin filename="libroboticsgroup_gazebo_mimic_joint_plugin.so" name="${prefix}mimic_robotiq_140_3">
<joint>${prefix}finger_joint</joint>
<mimicJoint>${prefix}right_inner_knuckle_joint</mimicJoint>
<multiplier>-1.0</multiplier>
<offset>0.0</offset>
</plugin>
<plugin filename="libroboticsgroup_gazebo_mimic_joint_plugin.so" name="${prefix}mimic_robotiq_140_4">
<joint>${prefix}finger_joint</joint>
<mimicJoint>${prefix}left_inner_finger_joint</mimicJoint>
<multiplier>1.0</multiplier>
<offset>0.0</offset>
</plugin>
<plugin filename="libroboticsgroup_gazebo_mimic_joint_plugin.so" name="${prefix}mimic_robotiq_140_5">
<joint>${prefix}finger_joint</joint>
<mimicJoint>${prefix}right_inner_finger_joint</mimicJoint>
<multiplier>1.0</multiplier>
<offset>0.0</offset>
</plugin>
</gazebo>

</xacro:macro>

</robot>
4 changes: 2 additions & 2 deletions robotiq_2f_140_gripper_visualization/urdf/robotiq_arg2f.xacro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://ros.org/wiki/xacro">
<robot xmlns:xacro="http://wiki.ros.org/xacro">
<xacro:macro name="robotiq_arg2f_base_link" params="prefix">
<link name="${prefix}robotiq_arg2f_base_link">
<inertial>
Expand Down Expand Up @@ -39,4 +39,4 @@
<xacro:inner_finger_pad prefix="${prefix}" fingerprefix="${fingerprefix}"/>
<xacro:inner_knuckle prefix="${prefix}" fingerprefix="${fingerprefix}" stroke="${stroke}"/>
</xacro:macro>
</robot>
</robot>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://ros.org/wiki/xacro">
<robot xmlns:xacro="http://wiki.ros.org/xacro">
<xacro:include filename="$(find robotiq_2f_140_gripper_visualization)/urdf/robotiq_arg2f_transmission.xacro" />
<xacro:include filename="$(find robotiq_2f_140_gripper_visualization)/urdf/robotiq_arg2f.gazebo.xacro" />

<xacro:macro name="outer_knuckle" params="prefix fingerprefix stroke">
<link name="${prefix}${fingerprefix}_outer_knuckle">
Expand Down Expand Up @@ -165,7 +166,7 @@
<parent link="${prefix}robotiq_arg2f_base_link" />
<child link="${prefix}${fingerprefix}_inner_knuckle" />
<axis xyz="1 0 0" />
<limit lower="-0.8757" upper="0.8757" velocity="2.0" effort="1000" />
<limit lower="-0.8757" upper="0" velocity="0.5" effort="1000" />
<mimic joint="${prefix}finger_joint" multiplier="-1" offset="0" />
</joint>
</xacro:macro>
Expand All @@ -176,7 +177,7 @@
<parent link="${prefix}${fingerprefix}_outer_finger" />
<child link="${prefix}${fingerprefix}_inner_finger" />
<axis xyz="1 0 0" />
<limit lower="-0.8757" upper="0.8757" velocity="2.0" effort="1000" />
<limit lower="0" upper="0.8757" velocity="0.5" effort="1000" />
<mimic joint="${prefix}finger_joint" multiplier="1" offset="0" />
</joint>
</xacro:macro>
Expand All @@ -198,7 +199,7 @@
<parent link="${prefix}robotiq_arg2f_base_link" />
<child link="${prefix}left_outer_knuckle" />
<axis xyz="-1 0 0" />
<limit lower="0" upper="0.7" velocity="2.0" effort="1000" />
<limit lower="0" upper="0.7" velocity="0.5" effort="1000" />
</joint>
<xacro:finger_joints prefix="${prefix}" fingerprefix="left" reflect="1.0"/>
</xacro:macro>
Expand All @@ -209,7 +210,7 @@
<parent link="${prefix}robotiq_arg2f_base_link" />
<child link="${prefix}right_outer_knuckle" />
<axis xyz="1 0 0" />
<limit lower="-0.725" upper="0.725" velocity="2.0" effort="1000" />
<limit lower="-0.725" upper="0" velocity="0.5" effort="1000" />
<mimic joint="${prefix}finger_joint" multiplier="-1" offset="0" />
</joint>
<xacro:finger_joints prefix="${prefix}" fingerprefix="right" reflect="-1.0"/>
Expand All @@ -222,5 +223,6 @@
<xacro:finger_joint prefix="${prefix}"/>
<xacro:right_outer_knuckle_joint prefix="${prefix}"/>
<xacro:robotiq_arg2f_transmission prefix="${prefix}"/>
<xacro:robotiq_arg2f_gazebo prefix="${prefix}"/>
</xacro:macro>
</robot>
</robot>
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://ros.org/wiki/xacro">
<robot xmlns:xacro="http://wiki.ros.org/xacro">
<xacro:macro name="robotiq_arg2f_transmission" params="prefix">
<transmission name="${prefix}finger_joint_trans">
<type>transmission_interface/SimpleTransmission</type>
<joint name="${prefix}finger_joint">
<hardwareInterface>PositionJointInterface</hardwareInterface>
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<!--<hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>-->
</joint>
<actuator name="${prefix}finger_joint_motor">
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
</xacro:macro>
</robot>
</robot>
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<mesh filename="package://robotiq_2f_85_gripper_visualization/meshes/visual/robotiq_arg2f_85_base_link.dae" scale="0.001 0.001 0.001"/>
<mesh filename="package://robotiq_2f_85_gripper_visualization/meshes/visual/robotiq_arg2f_base_link.stl" />
</geometry>
<material name="">
<color rgba="0.1 0.1 0.1 1" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://ros.org/wiki/xacro">


<!-- To fix broken gripper in gazebo according to the following issue-->
<!--https://github.com/ros-industrial/robotiq/issues/150-->
<gazebo>
<!-- loading plugin: mimic joints works in gazebo now-->
<plugin filename="libroboticsgroup_gazebo_mimic_joint_plugin.so" name="${prefix}mimic_robotiq_85_4">
<joint>${prefix}finger_joint</joint>
<mimicJoint>${prefix}right_outer_knuckle_joint</mimicJoint>
<multiplier>1.0</multiplier>
<!--<multiplier>-1.0</multiplier>-->
<!--<offset>0.0</offset>-->
</plugin>
<plugin filename="libroboticsgroup_gazebo_mimic_joint_plugin.so" name="${prefix}mimic_robotiq_85_2">
<joint>${prefix}finger_joint</joint>
<mimicJoint>${prefix}left_inner_finger_joint</mimicJoint>
<multiplier>-1.0</multiplier>
<!--<multiplier>1.0</multiplier>-->
<!--<offset>0.0</offset>-->
</plugin>
<plugin filename="libroboticsgroup_gazebo_mimic_joint_plugin.so" name="${prefix}mimic_robotiq_85_6">
<joint>${prefix}finger_joint</joint>
<mimicJoint>${prefix}right_inner_finger_joint</mimicJoint>
<multiplier>-1.0</multiplier>
<!--<multiplier>1.0</multiplier>-->
<!--<offset>0.0</offset>-->
</plugin>
<plugin filename="libroboticsgroup_gazebo_mimic_joint_plugin.so" name="${prefix}mimic_robotiq_85_3">
<joint>${prefix}finger_joint</joint>
<mimicJoint>${prefix}left_inner_knuckle_joint</mimicJoint>
<multiplier>1.0</multiplier>
<!--<multiplier>-1.0</multiplier>-->
<!--<offset>0.0</offset>-->
</plugin>
<plugin filename="libroboticsgroup_gazebo_mimic_joint_plugin.so" name="${prefix}mimic_robotiq_85_5">
<joint>${prefix}finger_joint</joint>
<mimicJoint>${prefix}right_inner_knuckle_joint</mimicJoint>
<multiplier>1.0</multiplier>
<!--<multiplier>-1.0</multiplier>-->
<!--<offset>0.0</offset>-->
</plugin>
</gazebo>


</robot>
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

<xacro:macro name="outer_knuckle" params="prefix fingerprefix stroke">
<link name="${prefix}${fingerprefix}_outer_knuckle">
<!--<inertial>
<inertial>
<origin xyz="-0.000200000000003065 0.0199435877845359 0.0292245259211331" rpy="0 0 0" />
<mass value="0.00853198276973456" />
<inertia ixx="2.89328108496468E-06" ixy="-1.57935047237397E-19" ixz="-1.93980378593255E-19" iyy="1.86719750325683E-06" iyz="-1.21858577871576E-06" izz="1.21905238907251E-06" />
</inertial> -->
</inertial>
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
Expand All @@ -29,11 +29,11 @@

<xacro:macro name="outer_finger" params="prefix fingerprefix stroke">
<link name="${prefix}${fingerprefix}_outer_finger">
<!--<inertial>
<inertial>
<origin xyz="0.00030115855001899 0.0373907951953854 -0.0208027427000385" rpy="0 0 0" />
<mass value="0.022614240507152" />
<inertia ixx="1.52518312458174E-05" ixy="9.76583423954399E-10" ixz="-5.43838577022588E-10" iyy="6.17694243867776E-06" iyz="6.78636130740228E-06" izz="1.16494917907219E-05" />
</inertial> -->
</inertial>
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
Expand All @@ -54,11 +54,11 @@

<xacro:macro name="inner_knuckle" params="prefix fingerprefix stroke">
<link name="${prefix}${fingerprefix}_inner_knuckle">
<!--<inertial>
<inertial>
<origin xyz="0.000123011831763771 0.0507850843201817 0.00103968640075166" rpy="0 0 0" />
<mass value="0.0271177346495152" />
<inertia ixx="2.61910379223783E-05" ixy="-2.43616858946494E-07" ixz="-6.37789906117123E-09" iyy="2.8270243746167E-06" iyz="-5.37200748039765E-07" izz="2.83695868220296E-05" />
</inertial> -->
</inertial>
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
Expand All @@ -79,11 +79,11 @@

<xacro:macro name="inner_finger" params="prefix fingerprefix stroke">
<link name="${prefix}${fingerprefix}_inner_finger">
<!--<inertial>
<inertial>
<origin xyz="0.000299999999999317 0.0160078233491243 -0.0136945669206257" rpy="0 0 0" />
<mass value="0.0104003125914103" />
<inertia ixx="2.71909453810972E-06" ixy="1.35402465472579E-21" ixz="-7.1817349065269E-22" iyy="7.69100314106116E-07" iyz="6.74715432769696E-07" izz="2.30315190420171E-06" />
</inertial> -->
</inertial>
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
Expand Down Expand Up @@ -142,7 +142,7 @@
<parent link="${prefix}robotiq_arg2f_base_link" />
<child link="${prefix}${fingerprefix}_inner_knuckle" />
<axis xyz="1 0 0" />
<limit lower="0" upper="0.8757" velocity="2.0" effort="1000" />
<limit lower="0" upper="0.8757" velocity="0.5" effort="1000" />
<mimic joint="${prefix}finger_joint" multiplier="1" offset="0" />
</joint>
</xacro:macro>
Expand All @@ -153,7 +153,7 @@
<parent link="${prefix}${fingerprefix}_outer_finger" />
<child link="${prefix}${fingerprefix}_inner_finger" />
<axis xyz="1 0 0" />
<limit lower="0" upper="0.8757" velocity="2.0" effort="1000" />
<limit lower="-0.8757" upper="0" velocity="0.5" effort="1000" />
<mimic joint="${prefix}finger_joint" multiplier="-1" offset="0" />
</joint>
</xacro:macro>
Expand All @@ -175,7 +175,7 @@
<parent link="${prefix}robotiq_arg2f_base_link" />
<child link="${prefix}left_outer_knuckle" />
<axis xyz="1 0 0" />
<limit lower="0" upper="0.8" velocity="2.0" effort="1000" />
<limit lower="0" upper="0.8" velocity="0.5" effort="1000" />
</joint>
<xacro:finger_joints prefix="${prefix}" fingerprefix="left" reflect="1.0"/>
</xacro:macro>
Expand All @@ -186,7 +186,7 @@
<parent link="${prefix}robotiq_arg2f_base_link" />
<child link="${prefix}right_outer_knuckle" />
<axis xyz="1 0 0" />
<limit lower="0" upper="0.81" velocity="2.0" effort="1000" />
<limit lower="0" upper="0.81" velocity="0.5" effort="1000" />
<mimic joint="${prefix}finger_joint" multiplier="1" offset="0" />
</joint>
<xacro:finger_joints prefix="${prefix}" fingerprefix="right" reflect="-1.0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@
<transmission name="${prefix}finger_joint_trans">
<type>transmission_interface/SimpleTransmission</type>
<joint name="${prefix}finger_joint">
<hardwareInterface>PositionJointInterface</hardwareInterface>
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<!--<hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>-->
</joint>
<actuator name="${prefix}finger_joint_motor">
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>

<!--Gazebo mimic joints-->
<xacro:include filename="$(find robotiq_2f_85_gripper_visualization)/urdf/robotiq_arg2f_85.gazebo.xacro" />


</xacro:macro>
</robot>