Skip to content

Adds support for gear insertion with Flexiv Rizon 4s#5175

Draft
shauryadNv wants to merge 89 commits intoisaac-sim:developfrom
shauryadNv:shauryad/flexiv_gear_insertion
Draft

Adds support for gear insertion with Flexiv Rizon 4s#5175
shauryadNv wants to merge 89 commits intoisaac-sim:developfrom
shauryadNv:shauryad/flexiv_gear_insertion

Conversation

@shauryadNv
Copy link
Copy Markdown
Contributor

Description

Added support to train a gear assembly/insertion policy for the Flexiv Rizon 4s robot. Defined new envs/tasks for this.
Added required robot config for the Flexiv Rizon 4s with Grav gripper.
Added documentation for a tutorial on training a gear assembly policy with Flexiv Rizon 4s.

Type of change

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

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

@AntoineRichard AntoineRichard changed the title Shauryad/flexiv gear insertion Adds support for gear insertion with Flexiv Rizon 4s Apr 7, 2026
@AntoineRichard
Copy link
Copy Markdown
Collaborator

AntoineRichard commented Apr 7, 2026

Thanks for the work @shauryadNv ! If this PR is not ready for review would you mind putting in draft mode?

@AntoineRichard AntoineRichard marked this pull request as draft April 8, 2026 06:48
@AntoineRichard
Copy link
Copy Markdown
Collaborator

AntoineRichard commented Apr 8, 2026

I'm switching this PR to draft, please make sure you address all of the bots comments before moving it to "ready" again. Most of the comments are relevant.

@isaaclab-review-bot
Copy link
Copy Markdown

🤖 Follow-up Review (4dfee2d)

26 new commits since initial review. Good progress — here is what changed and what still needs attention.

✅ Fixed

  • Simulation frequency reverteddecimation=4 and dt=1/120 restored in base __post_init__. UR10e environments no longer get unexpected physics timestep changes.
  • eval.py removed — replaced with play_hardcoded.py, which resolves the C901 complexity pre-commit failure. The new script is well-documented with clear observation override constants and old-checkpoint conversion support.

🔴 Still Critical

  • New reward terms in base RewardsCfg still break UR10e. end_effector_base_keypoint_tracking and end_effector_base_keypoint_tracking_exp are defined in RewardsCfg (shared base) but require end_effector_body_name, grasp_rot_offset, and gear_offsets_grasp in their params. Only the Rizon4s __post_init__ (line 410-418 in joint_pos_env_cfg.py) populates these — the UR10e configs do not. The keypoint_ee_gear_error.__init__ does cfg.params["end_effector_body_name"] which will KeyError for all UR10e environments. Fix: Either move these reward terms to a Rizon4s-specific RewardsCfg, or have the UR10e configs also populate these params.

🟡 Still Open

  • Observation noise doubledgear_shaft_pos noise changed from ±5mm to ±10mm in the base class, affecting UR10e too.
  • is_close variable semantically invertedis_close = (mean_kp_error > threshold) is True when the gripper is FAR. With threshold=0.0 it is always True so no functional bug currently, but misleading.
  • import carb inside __call__ — runs every step in the hot path. Move to module level.
  • ~90% code duplication between keypoint_ee_gear_error and keypoint_ee_gear_error_exp. Extract shared logic (init, gear lookup, grasp transform, weight scaling) into a base class or helper.
  • Commented-out code# action = RewTerm(func=mdp.action_l2, weight=-5.0e-06) in RewardsCfg. Remove or uncomment.

🔵 Minor / Docs

  • Doc mismatchgear_assembly_policy.rst still shows IdealPDActuatorCfg; code uses ImplicitActuatorCfg.
  • Missing CHANGELOG entries for new robot config, environments, reward functions, and quaternion bug fix.

❌ CI

  • pre-commit still failingruff format needs 1 file reformatted. Run pre-commit run --all-files locally.

New Files (Quick Assessment)

  • play_hardcoded.py — Clean script. The _convert_old_checkpoint function is a nice addition for backward compat. Observation slice constants (_SHAFT_POS_SLICE, _SHAFT_QUAT_SLICE) are hardcoded to indices 14-21 which couples tightly to the obs layout — a brief comment noting the expected format would help.
  • hardcoded_inference_env_cfg.py — Clean config inheriting from ROS inference and zeroing out randomization. The GEAR_BASE_ROT quaternion (0.0, 0.0, 0.70711, -0.70711) uses (x,y,z,w) format per the comment — correct and consistent.
  • ResetSampledQuaternionNoiseModel — Well-designed noise model using quaternion multiplication instead of additive noise. Currently configured with zero ranges so no effect, but good infrastructure for future use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

asset New asset feature or request documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants