Skip to content

Commit

Permalink
[update] update left hand dexpilot retargeting and improve rendering …
Browse files Browse the repository at this point in the history
…for onscreen case
  • Loading branch information
yzqin committed Aug 27, 2023
1 parent 0a4093c commit 18372ff
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
13 changes: 13 additions & 0 deletions dex_retargeting/configs/teleop/allegro_hand_left_dexpilot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
retargeting:
type: DexPilot
urdf_path: allegro_hand/allegro_hand_left.urdf
use_camera_frame_retargeting: False

# Target refers to the retargeting target, which is the robot hand
target_joint_names: null
wrist_link_name: "wrist"
finger_tip_link_names: [ "link_15.0_tip", "link_3.0_tip", "link_7.0_tip", "link_11.0_tip" ]
scaling_factor: 1.6

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


class RetargetingType(enum.Enum):
vector = enum.auto()
position = enum.auto()
dexpilot = enum.auto()
vector = enum.auto() # For teleoperation, no finger closing prior
position = enum.auto() # For offline data processing, especially hand-object interaction data
dexpilot = enum.auto() # For teleoperation, with finger closing prior


class HandType(enum.Enum):
Expand Down
2 changes: 2 additions & 0 deletions example/detect_from_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def main(
output_path: The file path for the output data in .pickle format.
retargeting_type: The type of retargeting, each type corresponds to a different retargeting algorithm.
hand_type: Specifies which hand is being tracked, either left or right.
Please note that retargeting is specific to the same type of hand: a left robot hand can only be retargeted
to another left robot hand, and the same applies for the right hand.
"""

config_path = get_config_path(robot_name, retargeting_type, hand_type)
Expand Down
2 changes: 2 additions & 0 deletions example/render_robot_hand.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ def render_by_sapien(
viewer = Viewer(renderer)
viewer.set_scene(scene)
viewer.focus_camera(cam)
viewer.toggle_axes(False)
viewer.toggle_camera_lines(False)
else:
viewer = None

Expand Down

0 comments on commit 18372ff

Please sign in to comment.