Skip to content

Adds Arena G1 locomanipulation retargeters - #4140

Merged
kellyguo11 merged 2 commits into
isaac-sim:mainfrom
rwiltz:rwiltz/add_arena_g1_locomanip_retargeting
Dec 10, 2025
Merged

kellyguo11 merged 2 commits into
isaac-sim:mainfrom
rwiltz:rwiltz/add_arena_g1_locomanip_retargeting

Conversation

@rwiltz

@rwiltz rwiltz commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

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

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions Bot added isaac-mimic Related to Isaac Mimic team isaac-lab Related to Isaac Lab team labels Dec 3, 2025
@rwiltz rwiltz changed the title Adding Arean G1 locomanipulation retargeters Adding Arena G1 locomanipulation retargeters Dec 3, 2025
@greptile-apps

greptile-apps Bot commented Dec 3, 2025 •

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

This PR adds G1TriHandUpperBodyMotionControllerGripperRetargeter, a new retargeter for the Unitree G1 robot that maps VR motion controller inputs to binary gripper states and wrist poses. The retargeter uses hysteresis (thresholds at 0.4 and 0.6) to prevent gripper flickering when trigger values hover near the threshold, outputting 0.0 for open and 1.0 for closed states.

Key changes:

  • Implemented gripper state extraction from controller trigger inputs with hysteresis logic
  • Added wrist pose retargeting with fixed rotation offset (-75° Y + 90° Z) for ergonomic alignment
  • Created comprehensive unit tests covering the new retargeter and existing ones
  • Updated exports, changelog, and version number appropriately
  • Output format: [left_gripper(1), right_gripper(1), left_wrist(7), right_wrist(7)] totaling 16 elements

Confidence Score: 4/5

  • This PR is safe to merge with minor documentation correction needed
  • The implementation is well-structured and follows existing patterns in the codebase. Hysteresis logic is correctly implemented to prevent gripper flickering. Comprehensive unit tests validate functionality. The only issue found is a minor docstring inconsistency about quaternion format that doesn't affect runtime behavior.
  • Pay attention to g1_upper_body_motion_ctrl_gripper.py:51 for the docstring correction

Important Files Changed

File Analysis

Filename Score Overview
source/isaaclab/isaaclab/devices/openxr/retargeters/humanoid/unitree/trihand/g1_upper_body_motion_ctrl_gripper.py 4/5 New retargeter that maps VR controller trigger inputs to binary gripper states with hysteresis, plus wrist pose retargeting
source/isaaclab/test/devices/test_retargeters.py 5/5 Comprehensive unit tests for all retargeters including the new gripper retargeter with proper mocking

Sequence Diagram

sequenceDiagram
    participant User as VR User
    participant Controllers as VR Controllers
    participant Retargeter as G1TriHandUpperBodyMotionControllerGripperRetargeter
    participant Device as DeviceBase
    participant Robot as G1 Robot

    User->>Controllers: Press triggers & move controllers
    Controllers->>Device: Raw controller data (pose + inputs)
    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/>trigger > 0.6 → close<br/>trigger < 0.4 → open
    
    Retargeter->>Retargeter: _extract_hand_state(right_controller, prev_state)
    
    Retargeter->>Retargeter: _extract_wrist_pose(left_controller)
    Retargeter->>Retargeter: _retarget_abs(left_wrist)
    Note over Retargeter: Apply -75° Y + 90° Z rotation<br/>Transform to robot frame
    
    Retargeter->>Retargeter: _extract_wrist_pose(right_controller)
    Retargeter->>Retargeter: _retarget_abs(right_wrist)
    
    Note over Retargeter: Concatenate outputs:<br/>[gripper_states(2), left_wrist(7), right_wrist(7)]
    
    Retargeter-->>Device: torch.Tensor (16 elements)
    Device-->>Robot: Gripper commands + wrist poses
    Robot->>Robot: Execute gripper open/close + move wrists
Loading

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

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

Edit Code Review Agent Settings | Greptile

@peterd-NV peterd-NV left a comment

Copy link
Copy Markdown
Collaborator

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?

@rwiltz

rwiltz commented Dec 8, 2025

Copy link
Copy Markdown
Contributor Author

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?

Yes, in the demo we had implemented the retargeting in Arena, this MR essentially moves it from Arena to Isaac Lab.

@hougantc-nvda

Copy link
Copy Markdown
Contributor

LGTM. One comment that we can refactor to extract some common functionality at some point, but doesn't have to be now.

@rwiltz
rwiltz force-pushed the rwiltz/add_arena_g1_locomanip_retargeting branch from fe362ca to 30a470c Compare December 8, 2025 21:53
@rwiltz

rwiltz commented Dec 8, 2025

Copy link
Copy Markdown
Contributor Author

@greptile

@greptile-apps greptile-apps Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Comments (1)

  1. source/isaaclab/isaaclab/devices/openxr/retargeters/humanoid/unitree/trihand/g1_upper_body_motion_ctrl_gripper.py, line 51 (link)

    syntax: quaternion format in docstring is [qw, qx, qy, qz] but should be [x, y, z, qw, qx, qy, qz] to match the actual format used

5 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@hougantc-nvda hougantc-nvda left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Added minor comment that can be done in a later PR to extract common functionality.

@ooctipus ooctipus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, maybe you can consider using configclass instead of dataclass, but I am good with either choice

@kellyguo11 kellyguo11 changed the title Adding Arena G1 locomanipulation retargeters Adds Arena G1 locomanipulation retargeters Dec 10, 2025
@kellyguo11
kellyguo11 merged commit 941ebdf into isaac-sim:main Dec 10, 2025
T-K-233 pushed a commit to ucb-bar/IsaacLab that referenced this pull request Dec 29, 2025
# 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

<!-- As you go through the list, delete the ones that are not
applicable. -->

- New feature (non-breaking change which adds functionality)

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

Signed-off-by: Kelly Guo <[email protected]>
Co-authored-by: Kelly Guo <[email protected]>
Edify0991 pushed a commit to Edify0991/IsaacLab that referenced this pull request Jan 14, 2026
# 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

<!-- As you go through the list, delete the ones that are not
applicable. -->

- New feature (non-breaking change which adds functionality)

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

Signed-off-by: Kelly Guo <[email protected]>
Co-authored-by: Kelly Guo <[email protected]>
nitesh-subedi pushed a commit to nitesh-subedi/IsaacLab that referenced this pull request Feb 5, 2026
# 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

<!-- As you go through the list, delete the ones that are not
applicable. -->

- New feature (non-breaking change which adds functionality)

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

Signed-off-by: Kelly Guo <[email protected]>
Co-authored-by: Kelly Guo <[email protected]>
csj-275 pushed a commit to csj-275/IsaacLab that referenced this pull request Jul 8, 2026
# 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

<!-- As you go through the list, delete the ones that are not
applicable. -->

- New feature (non-breaking change which adds functionality)

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

Signed-off-by: Kelly Guo <[email protected]>
Co-authored-by: Kelly Guo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team isaac-mimic Related to Isaac Mimic team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants