Flexiv Rizon4s Reach Policy Support#4526
Conversation
Greptile OverviewGreptile SummaryThis PR adds support for training reach policies on the Flexiv Rizon 4s robot, following the same pattern as the existing UR10e implementation. Key additions:
Issues found:
Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant GymEnv as Gym Environment
participant ReachEnv as Rizon4sReachEnvCfg
participant Robot as Flexiv Rizon 4s
participant Policy as PPO Policy
participant FrameTransformer
User->>GymEnv: Register Isaac-Deploy-Reach-Rizon4s-v0
GymEnv->>ReachEnv: Initialize environment config
ReachEnv->>Robot: Load FLEXIV_RIZON4S_CFG
Note over Robot: 7-DOF arm with actuator limits
ReachEnv->>FrameTransformer: Setup ee_frame_wrt_base_frame
Note over FrameTransformer: Track flange pose relative to base_link
loop Training Episode
ReachEnv->>ReachEnv: Sample target pose (pos + quat)
Note over ReachEnv: Workspace: x[0,0.8], y[-0.4,0.4], z[0.05,0.75]
ReachEnv->>Policy: Observe (joint_pos[7], joint_vel[7], target_pose[7])
Note over Policy: Input dim: 21
Policy->>Policy: Forward pass (256→128→64 network)
Policy->>ReachEnv: Output incremental joint positions[7]
Note over Policy: Scale: 0.0625
ReachEnv->>Robot: Apply RelativeJointPositionAction
Robot->>Robot: Update joint positions
FrameTransformer->>ReachEnv: Compute end-effector pose
ReachEnv->>ReachEnv: Calculate reward (pose tracking error)
ReachEnv->>Policy: Return (obs, reward, done)
end
User->>GymEnv: Load trained policy for deployment
GymEnv->>ReachEnv: Initialize ROS inference config
Note over ReachEnv: Fixed target or ROS commanded
loop Deployment
ReachEnv->>Policy: Observe robot state
Policy->>Robot: Command joint increments
Robot->>Robot: Execute motion
end
|
...aclab_tasks/manager_based/manipulation/deploy/reach/config/rizon_4s/ros_inference_env_cfg.py
Show resolved
Hide resolved
| # Disable visualization for the goal pose because the commands are generated wrt to the base frame | ||
| self.commands.ee_pose.debug_vis = True |
There was a problem hiding this comment.
comment says "Disable visualization" but code sets debug_vis = True
consider clarifying whether visualization should be enabled or disabled for Rizon 4s and update comment accordingly
dce1e98 to
638ee9d
Compare
...aclab_tasks/manager_based/manipulation/deploy/reach/config/rizon_4s/agents/rsl_rl_ppo_cfg.py
Outdated
Show resolved
Hide resolved
...lab_tasks/isaaclab_tasks/manager_based/manipulation/deploy/reach/config/rizon_4s/__init__.py
Outdated
Show resolved
Hide resolved
|
Hello, it's very unlikely we will merge this to main. Could you target develop instead? Thanks! |
kellyguo11
left a comment
There was a problem hiding this comment.
LGTM, we can merge this once we resolve the asset upload and TODO in the doc
75bfc29 to
b9b145d
Compare
15acee2 to
27a4644
Compare
There was a problem hiding this comment.
🤖 Isaac Lab Review Bot
Summary
This PR adds support for the Flexiv Rizon 4s robot with a reach policy training pipeline. It introduces:
- A new robot asset configuration (
FLEXIV_RIZON4S_CFG) - Gym environment registrations (train, play, ROS inference)
- PPO training configuration
- Comprehensive documentation tutorial
Design Assessment
The overall structure follows the established pattern set by the existing UR10e reach deployment config. The new Rizon 4s config properly extends ReachEnvCfg, overrides robot-specific parameters, and registers the expected gym environments. Good adoption of existing abstractions.
Architecture Impact
- Additive only — no changes to shared base classes or APIs
- Blast radius is limited to the new robot config and documentation
- No risk of breaking existing UR10e environments
Implementation Verdict
🟡 Minor issues found — 2 bugs (1 docs build-breaker, 1 missing feature parity), plus minor style observations.
Test Coverage
- ❌ No tests added (checkbox unchecked in PR template). This is acceptable for a new config if manually validated, but integration tests for environment instantiation would strengthen confidence.
CI Status
- ✅
pre-commitpassed - ⏳
license-check, Docker builds, and docs builds are still pending
Findings
See inline comments for details.
...aclab_tasks/manager_based/manipulation/deploy/reach/config/rizon_4s/ros_inference_env_cfg.py
Show resolved
Hide resolved
| "joint4", | ||
| "joint5", | ||
| "joint6", | ||
| "joint7", |
There was a problem hiding this comment.
⚠️ Suggestion: Use DRY pattern for action_scale_joint_space
The UR10e config uses a cleaner pattern:
self.action_scale_joint_space = [self.joint_action_scale] * self.action_spaceInstead of manually listing the scale 7 times. This avoids a subtle bug if action_space is changed but the list length isn't updated.
| "joint7", | |
| self.action_scale_joint_space = [self.joint_action_scale] * self.action_space |
| self.obs_order = ["arm_dof_pos", "arm_dof_vel", "target_pos", "target_quat"] | ||
| self.policy_action_space = "joint" | ||
| self.arm_joint_names = [ | ||
| "joint1", |
There was a problem hiding this comment.
⚠️ Minor: Duplicate policy_action_space assignment
self.policy_action_space = "joint" is set on line 22 and again on line 30. The second assignment is redundant.
| "joint1", | |
| self.arm_joint_names = [ |
.../isaaclab_tasks/manager_based/manipulation/deploy/reach/config/rizon_4s/joint_pos_env_cfg.py
Show resolved
Hide resolved
|
|
||
| .. figure:: ../../_static/policy_deployment/03_reach/reach_train.jpg | ||
| :align: center | ||
| :figwidth: 100% |
There was a problem hiding this comment.
🐛 Bug: Image extension mismatch — broken figure
The added image file is reach_train.png but this directive references reach_train.jpg. Sphinx will not find the file and the figure will be missing from the rendered docs.
| :figwidth: 100% | |
| .. figure:: ../../_static/policy_deployment/03_reach/reach_train.png |
d2e67e2 to
f8f6b6e
Compare
There was a problem hiding this comment.
🤖 Isaac Lab Review Bot — Follow-up #2
Previous image extension bug (.jpg → .png) is fixed ✅
1 new minor docs issue found.
| - ``--num_envs 4096``: Runs 4096 parallel environments for efficient data collection | ||
| - ``--video``: Records videos to monitor training progress | ||
| - ``--video_length 720``: Each video captures exactly one full episode (``episode_length_s / (sim.dt * decimation)`` = ``12.0 / (1/120 * 2)`` = 720 steps) | ||
| - ``--video_interval 72000``: Records a video every 72000 environment steps (~every 100 training iterations). |
There was a problem hiding this comment.
📝 Minor: Incorrect approximation in video interval comment
The comment says "~every 100 training iterations" but with num_steps_per_env = 512:
- 72000 / 512 ≈ 140 iterations, not 100
The number 72000 comes from 720 steps/episode × 100 = 72000, so this should read:
| - ``--video_interval 72000``: Records a video every 72000 environment steps (~every 100 training iterations). | |
| - ``--video_interval 72000``: Records a video every 72000 environment steps (~every 100 episodes). |
3045456 to
cd8b319
Compare
Made-with: Cursor
70abd2b to
c61e102
Compare
...aclab_tasks/manager_based/manipulation/deploy/reach/config/rizon_4s/ros_inference_env_cfg.py
Show resolved
Hide resolved
Co-authored-by: Ashwin Varghese Kuruttukulam <123109010+ashwinvkNV@users.noreply.github.com> Signed-off-by: shauryadNv <shauryad@nvidia.com>
Co-authored-by: isaaclab-review-bot[bot] <270793704+isaaclab-review-bot[bot]@users.noreply.github.com> Signed-off-by: shauryadNv <shauryad@nvidia.com>
There was a problem hiding this comment.
🤖 Isaac Lab Review Bot — Follow-up #3
Previous initial_joint_pos concern is now addressed ✅
1 new bug found: syntax error introduced in the latest push.
| self.joint_action_scale, | ||
| self.joint_action_scale, | ||
| ] | ||
|
|
There was a problem hiding this comment.
🐛 Bug: Duplicate action_scale_joint_space — first assignment missing closing ]
The latest push appears to have appended the new block without removing the original. The first action_scale_joint_space assignment (starting around line 42) is missing its closing bracket ], followed immediately by a second full assignment. This will raise a SyntaxError on import.
Expected: a single assignment. Remove the first (broken) one and keep only:
| self.action_scale_joint_space = [ | |
| self.joint_action_scale, | |
| self.joint_action_scale, | |
| self.joint_action_scale, | |
| self.joint_action_scale, | |
| self.joint_action_scale, | |
| self.joint_action_scale, | |
| self.joint_action_scale, | |
| ] |
Or even better (DRY):
self.action_scale_joint_space = [self.joint_action_scale] * self.action_space|
|
||
| - `Isaac ROS Manipulation Documentation <https://nvidia-isaac-ros.github.io/reference_workflows/isaac_for_manipulation/index.html>`_ | ||
| - Gear Assembly Sim-to-Real Tutorial: :ref:`walkthrough_sim_to_real` | ||
| - Sim-to-Real Policy Transfer for Whole Body Controllers: :ref:`sim2real` |
There was a problem hiding this comment.
the sim2real ref is not defined and causing a doc build error:
docs/source/policy_deployment/04_reach/reach_policy.rst:670: WARNING: undefined label: 'sim2real' [ref.ref]
Is the ref pointing to docs/source/policy_deployment/00_hover/hover_policy.rst?
There was a problem hiding this comment.
Good catch! You're right — the :ref:sim2real`` label is undefined on develop and will cause a doc build error.
I traced it: the .. _sim2real: label is defined in docs/source/experimental-features/newton-physics-integration/sim-to-real.rst, but that file only exists on main, not on develop (the target branch). So the cross-reference is dangling.
It's not pointing to hover_policy.rst — that file only has an external URL reference (.. _README of Sim2Real deployment: ...), not an RST label.
Suggested fix: either (1) remove the sim2real bullet from the Further Resources section since the target page doesn't exist on develop yet, or (2) replace it with a direct external link to the relevant sim-to-real resource (e.g., the HOVER sim2real README or similar). Option 1 is probably cleanest for now — the line can be re-added once sim-to-real.rst lands on develop.
Description
Added support to train a reach policy for the Flexiv Rizon 4s robot. Defined new envs/tasks for this.
Added required robot config for the Flexiv Rizon 4s.
Added documentation for a tutorial on training a reach policy (with both, UR and Rizon).
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there