Skip to content

Feat: clearer naming convention for init-level dicts GRIPPER_OFFSETS#322

Open
tenfoldpaper wants to merge 3 commits into
masterfrom
jin/gripper_tcp_fixes
Open

Feat: clearer naming convention for init-level dicts GRIPPER_OFFSETS#322
tenfoldpaper wants to merge 3 commits into
masterfrom
jin/gripper_tcp_fixes

Conversation

@tenfoldpaper

Copy link
Copy Markdown
Collaborator

Currently, the package root __init__.py contains the variable GRIPPER_OFFSETS, which actually indicates the TCP offset for different grippers. Propose renaming it to GRIPPER_TCP_OFFSETS and introduce a new variable GRIPPER_MOUNT_OFFSETS to clearly differentiate between the two.
FR3DUO setup is not affected, because it was using a member variable instead of using something defined in __init__.
Went through existing files and updated existing GRIPPER_OFFSETS to the new GRIPPER_TCP_OFFSETS.

Unclear:
Existing TCP offset value for Robotiq2F85 only defines translation, not rotation (left as identity):
common.GripperType("Robotiq2F85"): common.Pose(translation=np.array([0, 0.0, 0.1493])),

Comparing Franka Hand TCP offset and mounting offset values, it seems that the TCP offset's rotation follows the mounting offset's:
TCP: common.GripperType.FrankaHand: common.Pose(pose_matrix=common.FrankaHandTCPOffset())
Mounting: common.GripperType.FrankaHand: common.Pose(rotation=common.FrankaHandTCPOffset()[:3, :3], translation=np.array([0.0, 0.0, 0.0])),
which means that Robotiq2F85's TCP offset needs to be updated (pseudocode) as:
common.GripperType("Robotiq2F85"): common.Pose(rotation=robotiq2f85_mount_rotation, translation=np.array([0, 0.0, 0.1493])),

@tenfoldpaper
tenfoldpaper requested a review from juelg July 20, 2026 21:15
Comment thread python/rcs/__init__.py Outdated

GRIPPER_MOUNT_OFFSETS: dict[common.GripperType, common.Pose] = {
common.GripperType.FrankaHand: common.Pose(rotation=common.FrankaHandTCPOffset()[:3, :3], translation=np.array([0.0, 0.0, 0.0])),
common.GripperType("Robotiq2F85"): common.Pose(translation=np.array([0.0, 0.0, 0.0]), quaternion=np.array([0.0, 0.0, 0.7071068, 0.7071068])),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldnt the mounting offset for the 2f85 have no rotation at all?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, we had this discussion during our previous project, it requires a 90 degree offset. I double-checked it with the photographs of 2f85-mounted FR3.

@tenfoldpaper tenfoldpaper Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gripper_mesh_quaternion_offset: ClassVar[list[float]] = [0, 0, 0.7071068, 0.7071068]

quaternion=np.array(self.gripper_mesh_quaternion_offset), translation=np.array([0.0, 0.0, 0.0])

This line here shows the mounting transform that was actually used for the FR3Duo setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants