Skip to content

Commit

Permalink
pass the calibrated jaw max offset value when we reset the gripper
Browse files Browse the repository at this point in the history
  • Loading branch information
ahiuchingau committed Apr 26, 2024
1 parent 35e4e10 commit ec181c6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def __init__(
config: GripperDefinition,
gripper_cal_offset: GripperCalibrationOffset,
gripper_id: str,
jaw_max_offset: Optional[float] = None,
) -> None:
self._config = config
self._model = config.model
Expand Down Expand Up @@ -83,7 +84,7 @@ def __init__(
self._log.info(
f"loaded: {self._model}, gripper offset: {self._calibration_offset}"
)
self._jaw_max_offset: Optional[float] = None
self._jaw_max_offset = jaw_max_offset

@property
def grip_force_profile(self) -> GripForceProfile:
Expand Down Expand Up @@ -330,6 +331,9 @@ def _reload_gripper(
new_config,
cal_offset,
attached_instr._gripper_id,
attached_instr._jaw_max_offset
if attached_instr.has_jaw_width_calibration
else None,
),
False,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ def reset_gripper(self) -> None:
og_gripper.config,
load_gripper_calibration_offset(og_gripper.gripper_id),
og_gripper.gripper_id,
og_gripper._jaw_max_offset
if og_gripper.has_jaw_width_calibration
else None,
)
self._gripper = new_gripper

Expand Down

0 comments on commit ec181c6

Please sign in to comment.