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

Add option to lock finger joints #7

Open
wants to merge 1 commit into
base: humble_devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions end_effectors/common/franka_hand.xacro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="hand">
<!-- safety_distance: Minimum safety distance in [m] by which the collision volumes are expanded and which is enforced during robot motions -->
<xacro:macro name="franka_hand" params="connected_to:='' arm_id ee_id ee_inertials rpy:='0 0 0' xyz:='0 0 0' tcp_xyz:='0 0 0.1034' tcp_rpy:='0 0 0' safety_distance:=0 gazebo:=false description_pkg:=franka_description with_sc:=false">
<xacro:macro name="franka_hand" params="connected_to:='' arm_id ee_id ee_inertials rpy:='0 0 0' xyz:='0 0 0' tcp_xyz:='0 0 0.1034' tcp_rpy:='0 0 0' safety_distance:=0 gazebo:=false description_pkg:=franka_description with_sc:=false lock_finger_joints:=false">
<xacro:unless value="${connected_to == ''}">
<joint name="${arm_id}_hand_joint" type="fixed">
<parent link="${connected_to}" />
Expand Down Expand Up @@ -101,15 +101,21 @@
<xacro:ee-inertials name="rightfinger" />
</xacro:if>
</link>
<joint name="${arm_id}_finger_joint1" type="prismatic">
<xacro:if value="${lock_finger_joints}">
<xacro:property name="finger_joint_type" value="fixed" />
</xacro:if>
<xacro:unless value="${lock_finger_joints}">
<xacro:property name="finger_joint_type" value="prismatic" />
</xacro:unless>
<joint name="${arm_id}_finger_joint1" type="${finger_joint_type}">
<parent link="${arm_id}_hand" />
<child link="${arm_id}_leftfinger" />
<origin xyz="0 0 0.0584" rpy="0 0 0" />
<axis xyz="0 1 0" />
<limit effort="100" lower="0.0" upper="0.04" velocity="0.2" />
<dynamics damping="0.3" />
</joint>
<joint name="${arm_id}_finger_joint2" type="prismatic">
<joint name="${arm_id}_finger_joint2" type="${finger_joint_type}">
<parent link="${arm_id}_hand" />
<child link="${arm_id}_rightfinger" />
<origin xyz="0 0 0.0584" rpy="0 0 0" />
Expand Down
3 changes: 2 additions & 1 deletion end_effectors/franka_hand/franka_hand.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
safety_distance="$(arg safety_distance)"
gazebo="$(arg gazebo)"
description_pkg="$(arg description_pkg)"
with_sc="$(arg with_sc)">
with_sc="$(arg with_sc)"
lock_finger_joints="$(arg lock_finger_joints)">
</xacro:franka_hand>

</robot>
3 changes: 3 additions & 0 deletions end_effectors/franka_hand/franka_hand_arguments.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,7 @@
<!-- Should fake sensors be used? -->
<xacro:arg name="description_pkg" default="franka_description" />

<!-- Should finger joints be locked? -->
<xacro:arg name="lock_finger_joints" default="false" />

</robot>
1 change: 1 addition & 0 deletions robots/common/franka_robot.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
gazebo="${gazebo}"
description_pkg="$(arg description_pkg)"
with_sc="${with_sc}"
lock_finger_joints="$(arg lock_finger_joints)"
/>
</xacro:if>

Expand Down