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 Panda gripper #24

Closed
wants to merge 2 commits into from
Closed
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
17 changes: 17 additions & 0 deletions dex_retargeting/configs/teleop/panda_gripper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
retargeting:
type: vector
urdf_path: panda_gripper/panda_v2_gripper.urdf
wrist_link_name: "base_link"

# Target refers to the retargeting target, which is the robot hand
target_joint_names: [ "panda_finger_joint1" ]
target_origin_link_names: [ "panda_leftfinger" ]
target_task_link_names: [ "panda_rightfinger" ]
scaling_factor: 1.5

# Source refers to the retargeting input, which usually corresponds to the human hand
# The joint indices of human hand joint which corresponds to each link in the target_link_names
target_link_human_indices: [ [ 4 ], [ 8 ] ]

# A smaller alpha means stronger filtering, i.e. more smooth but also larger latency
low_pass_alpha: 0.2
2 changes: 2 additions & 0 deletions dex_retargeting/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class RobotName(enum.Enum):
leap = enum.auto()
ability = enum.auto()
inspire = enum.auto()
panda = enum.auto()


class RetargetingType(enum.Enum):
Expand All @@ -29,6 +30,7 @@ class HandType(enum.Enum):
RobotName.leap: "leap_hand",
RobotName.ability: "ability_hand",
RobotName.inspire: "inspire_hand",
RobotName.panda: "panda_gripper",
}

ROBOT_NAMES = list(ROBOT_NAME_MAP.keys())
Expand Down
4 changes: 2 additions & 2 deletions example/vector_retargeting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ This command uses the data saved from the previous step to create a rendered vid
*The following instructions assume that your computer has a webcam connected.*

```bash
python3 capture_webcam.py --video-path example/vector_retargeting/data/my_human_hand_video.mp4
python3 capture_webcam.py --video-path data/my_human_hand_video.mp4
```

This command enables you to use your webcam to record a video saved in MP4 format. To stop recording, press `q` on your
This command enables you to use your webcam to record a video saved in MP4 format. To stop recording, press `Esc` on your
keyboard.

### Real-time Visualization of Hand Retargeting via Webcam
Expand Down
1 change: 1 addition & 0 deletions example/vector_retargeting/capture_webcam.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def main(video_path: str, video_capture_device: Union[str, int] = 0):
if cv2.waitKey(1) & 0xFF == 27:
break

print('Recording finished')
cap.release()
writer.release()
cv2.destroyAllWindows()
Expand Down
Loading