-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Adding Arena G1 locomanipulation retargeters #4140
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
base: main
Are you sure you want to change the base?
Adding Arena G1 locomanipulation retargeters #4140
Conversation
Greptile OverviewGreptile SummaryAdded
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User as VR Controller
participant Retargeter as G1TriHandUpperBodyMotionControllerGripperRetargeter
participant Device as DeviceBase
participant PoseUtils as isaaclab.utils.math
participant Robot as G1 Robot
User->>Device: Trigger Input (0.0-1.0)
User->>Device: Controller Pose [x,y,z,qw,qx,qy,qz]
Device->>Retargeter: retarget(data)
Note over Retargeter: Extract Controller Data
Retargeter->>Retargeter: _extract_hand_state(left_controller, prev_state)
Note over Retargeter: Apply Hysteresis Logic<br/>threshold_high=0.6, threshold_low=0.4
Retargeter->>Retargeter: Update prev_left_state
Retargeter->>Retargeter: _extract_hand_state(right_controller, prev_state)
Retargeter->>Retargeter: Update prev_right_state
Note over Retargeter: Process Wrist Poses
Retargeter->>Retargeter: _extract_wrist_pose(left_controller)
Retargeter->>Retargeter: _extract_wrist_pose(right_controller)
Retargeter->>Retargeter: _retarget_abs(left_wrist)
Retargeter->>PoseUtils: make_pose(pos, rot_matrix)
Retargeter->>PoseUtils: pose_in_A_to_pose_in_B(transform, openxr_pose)
Note over Retargeter: Apply -75° Y + 90° Z rotation
PoseUtils-->>Retargeter: transformed_pose
Retargeter->>Retargeter: _retarget_abs(right_wrist)
Retargeter->>PoseUtils: Transform pose
PoseUtils-->>Retargeter: transformed_pose
Note over Retargeter: Concatenate Results
Retargeter->>Retargeter: torch.cat([gripper(2), left_wrist(7), right_wrist(7)])
Retargeter->>Robot: [left_gripper_state, right_gripper_state, left_wrist_pose, right_wrist_pose]
Note over Robot: Total: 16 values<br/>2 gripper + 14 pose
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 files reviewed, 1 comment
| return controller_data[DeviceBase.MotionControllerDataRowIndex.POSE.value] | ||
| return default_pose | ||
|
|
||
| def _retarget_abs(self, wrist: np.ndarray, is_left: bool) -> np.ndarray: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: is_left parameter is unused in this method
| def _retarget_abs(self, wrist: np.ndarray, is_left: bool) -> np.ndarray: | |
| def _retarget_abs(self, wrist: np.ndarray) -> np.ndarray: |
peterd-NV
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rwiltz @hougantc-nvda for helping get teleop for G1 Arena.
I recall trying out the full body teleop with Quest on the Arena G1 env during the onsite. Was that setup using this upper body retargeting?
Description
Added a retargeter for G1 upper body which takes in controller input and outputs a bool for hand open/close in addition to the left and right EE targets based on the controller position.
Fixes # (issue)
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there