Skip to content
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
6 changes: 0 additions & 6 deletions examples/1_tune_teleop_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,6 @@ def on_button_b_pressed() -> None:
default=None,
help="IP address of Meta Quest device (optional, defaults to None for auto-discovery)",
)
parser.add_argument(
"--dataset-name",
type=str,
default=None,
help="Optional name for the saved teleop data file",
)
args = parser.parse_args()

print("=" * 60)
Expand Down
10 changes: 6 additions & 4 deletions piper_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,14 @@ def __init__(
)

# Gripper range in degrees (for internal SDK communication)
self.GRIPPER_DEGREES_MIN = 0.000
self.GRIPPER_DEGREES_MIN = -5.000
self.GRIPPER_DEGREES_MAX = 95.00
self.GRIPPER_DEGREES_RANGE = self.GRIPPER_DEGREES_MAX - self.GRIPPER_DEGREES_MIN

# Home gripper value in normalized form (53.8 / 95.0)
self.HOME_GRIPPER_OPEN_VALUE_DEGREES = 53.800
# Home gripper value in degrees
self.HOME_GRIPPER_OPEN_VALUE_DEGREES = (
self.GRIPPER_DEGREES_RANGE / 2.0
) + self.GRIPPER_DEGREES_MIN

# End-effector target pose
self._target_pose = self.HOME_POSE.copy()
Expand Down Expand Up @@ -351,7 +353,6 @@ def set_gripper_open_value(self, gripper_open_value: float) -> None:
self._gripper_open_value_degrees = (
normalized * self.GRIPPER_DEGREES_RANGE + self.GRIPPER_DEGREES_MIN
)

if self.debug_mode:
print(f"Gripper updated: {normalized:.3f} (normalized)")

Expand Down Expand Up @@ -549,6 +550,7 @@ def _send_gripper_command(self, gripper_open_value_degrees: float) -> None:
try:
# Convert from degrees to piper SDK units (0.001degrees)
gripper_value = round(gripper_open_value_degrees * 1000)

self.piper.GripperCtrl(gripper_value, 1000, 0x01, 0)

except Exception as e:
Expand Down