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

Fix gripper mimic joint control #8

Merged
merged 2 commits into from
Aug 24, 2023
Merged
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
11 changes: 10 additions & 1 deletion urdf/crane_x7.gazebo_ros2_control.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
name_joint_6
name_joint_7
name_joint_gripper_finger_a
name_joint_gripper_finger_b
joint_1_lower_limit
joint_1_upper_limit
joint_2_lower_limit
Expand Down Expand Up @@ -113,7 +114,15 @@
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="${name_joint_gripper_finger_b}">
<param name="mimic">${name_joint_gripper_finger_a}</param>
<param name="multiplier">1</param>
<command_interface name="position"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>

</ros2_control>
</xacro:macro>
</robot>
</robot>
2 changes: 1 addition & 1 deletion urdf/crane_x7.ros2_control.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@

</ros2_control>
</xacro:macro>
</robot>
</robot>
1 change: 1 addition & 0 deletions urdf/crane_x7.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@
name_joint_6="${NAME_JOINT_6}"
name_joint_7="${NAME_JOINT_7}"
name_joint_gripper_finger_a="${NAME_JOINT_GRIPPER_FINGER_A}"
name_joint_gripper_finger_b="${NAME_JOINT_GRIPPER_FINGER_B}"
joint_1_lower_limit="${JOINT_1_LOWER_LIMIT}"
joint_1_upper_limit="${JOINT_1_UPPER_LIMIT}"
joint_2_lower_limit="${JOINT_2_LOWER_LIMIT}"
Expand Down
9 changes: 9 additions & 0 deletions urdf/crane_x7_wide_two_finger_gripper.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@
</inertial>
</link>

<!--Dummy joint/link to prevent error with mimic joint
See https://github.com/ros-controls/gazebo_ros2_control/issues/173
-->
<joint name="${name_joint_gripper_finger_b}_mimic" type="fixed">
<parent link="world" />
<child link="dummy_mimic_fix" />
</joint>
<link name="dummy_mimic_fix"/>

<joint name="${name_joint_gripper_finger_b}" type="revolute">
<origin xyz="0.012 0.0 0.024" rpy="0 0 0"/>
<axis xyz="0 1 0"/>
Expand Down