Fix Franka Reach OSC velocity limit and normalize OSC pose targets - #7624
Fix Franka Reach OSC velocity limit and normalize OSC pose targets#7624maxkra15 wants to merge 2 commits into
Conversation
The Isaac-Reach-Franka-OSC effort actuator copied the deprecated velocity_limit_sim alias instead of joint_velocity_limit, dropping the Menagerie 20/25 rad/s solver clamp. The Menagerie USD authors no joint velocity limit, so the arm ran unbounded and reached ~60 rad/s under saturated efforts, which can destabilize the simulation and surface as NaN rewards. The operational space controller also consumed pose_abs quaternions without normalizing them, so the orientation error scaled with the raw policy output norm. Targets are now normalized with a fallback to the current end-effector orientation, matching DifferentialIKController. The OSC task additionally leaked the diffik_abs preset, which only zeroed the action-magnitude reward weight. The task now resolves the default weight and exposes physics presets only.
Greptile SummaryThe PR stabilizes Franka operational-space reach training by preserving solver velocity limits, normalizing absolute-pose quaternion targets, and removing an inapplicable controller preset from the OSC task.
Confidence Score: 5/5The PR appears safe to merge; the controller, actuator, and preset changes are internally consistent and covered by focused regression tests. No actionable failures remain: omitted task frames are safely canonicalized, quaternion frame semantics are correct, the actuator retains its intended per-joint limits, and OSC preset resolution produces valid runtime configuration. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Policy pose_abs command] --> B[Split pose target]
B --> C{Quaternion normalizable?}
C -->|Yes| D[Normalize target quaternion]
C -->|No, current pose available| E[Convert current EE orientation to task frame]
C -->|No current pose| F[Use identity orientation]
D --> G[Transform desired pose to root frame]
E --> G
F --> G
G --> H[OSC computes joint efforts]
H --> I[Effort actuator]
I --> J[Per-joint solver velocity limits]
Reviews (1): Last reviewed commit: "Fix Franka Reach OSC velocity limit and ..." | Re-trigger Greptile |
There was a problem hiding this comment.
Isaac Lab Review Bot
The OSC quaternion normalization and Franka actuator velocity-limit forwarding are coherent and covered by focused tests. However, the OSC task now rejects the previously accepted presets=diffik_abs input without prior deprecation, despite repository compatibility policy.
- Design and architecture: Normalization is correctly located in the
pose_abscommand path, with fallback orientations transformed into the task frame. Resolving the inherited preset-backed reward value in the OSC configuration removes the irrelevant preset behavior, but the obsolete preset should remain temporarily as a deprecated no-op alias. - API: The controller preserves tensor shape, dtype, device, and quaternion layout while documenting normalization and fallback behavior. The OSC preset surface has an actionable compatibility issue:
presets=diffik_absis removed immediately rather than deprecated first, and the release note does not mark the change as breaking. - Implementation: The quaternion implementation clones the target, handles zero and non-finite norms, and uses correctly broadcast fallback tensors. Velocity-limit propagation and regression coverage are appropriate. Before merge, retain a warning-producing compatibility alias for the removed OSC preset or classify and document the removal as breaking in accordance with repository policy.
Minor fixes needed. Posted 1 actionable finding inline.
Automated review; human maintainers own approval decisions.
Removing the leaked preset outright would break existing command lines without a deprecation path. The OSC task now keeps a diffik_abs variant that resolves to the default action-magnitude weight and emits a FutureWarning during config validation, and the changelog entry moves under Deprecated with the migration note.
|
run-ci |
Description
Follow-up to #7033. The state-based benchmark run hit
ValueError: The rewards returned by the environment contain NaN valuesonIsaac-Reach-Franka-OSC(ovphysx,presets=diffik_abs, one seed of three). Investigating the OSC task and controller turned up three defects that together make the task run far outside its intended envelope:velocity_limit_simalias from the Menagerie actuator config, but that config setsjoint_velocity_limit. The copied value wasNone, and the Menagerie USD authors no joint velocity limit of its own, so the live limit resolved toFLT_MAX(plainIsaac-Reach-Frankakeeps 20 / 25 rad/s). Instrumented training showed the arm reaching ~60 rad/s under saturated 100 N·m efforts with self-collisions enabled, which is the regime where PhysX can blow up into NaN. The actuator now forwardsjoint_velocity_limit; with the fix the peak joint speed in training clamps at 25 rad/s.OperationalSpaceControllerusedpose_absquaternions unnormalized. The policy emits four raw values and the axis-angle error scales with their norm (a norm of 3.6 yields an 11 rad "orientation error"), so the commanded efforts scaled with the raw output too. The controller now normalizes the target and falls back to the current end-effector orientation (or identity) for degenerate quaternions, matchingDifferentialIKController.diffik_absleaked into the OSC task. The OSC action term replaces the parent's arm-controller presets, sopresets=diffik_abson the OSC task only zeroed the action-magnitude reward weight, which is the only regularizer on the raw pose/quaternion outputs. This explains why only thediffik_absrows were affected. The OSC task now resolves the default weight.presets=diffik_absstays accepted as a deprecated no-op alias that emits aFutureWarningat config validation, so existing command lines keep working; the alias will be removed in a future release. Migration: droppresets=diffik_absfromIsaac-Reach-Franka-OSCcommands.The exact NaN event did not reproduce locally (two full seed-43 runs on ovphysx completed cleanly), so the physics blow-up is inferred from the runaway joint velocities rather than caught in the act.
Type of change
diffik_abspreset onIsaac-Reach-Franka-OSC(no-op alias withFutureWarning)Release backport
developValidation
uv run --extra dev python -m pytest source/isaaclab/test/controllers/test_operational_space_features.py— 4 passed (2 new; both fail without the controller fix)uv run --extra dev python -m pytest source/isaaclab_tasks/test/core/test_reach_franka_presets.py— 25 passed (3 new + 3 new preset cases; the new tests fail without the config fix)uv run --extra dev --extra isaacsim python -m pytest source/isaaclab/test/controllers/test_operational_space.py— 18 passedIsaac-Reach-Franka-OSC presets=diffik_abs --max_iterations 1 --num_envs 4through the hydra CLI:FutureWarningemitted at env creation, training runsIsaac-Reach-Franka-OSC physics=ovphysxtraining: no NaN, peak arm joint speed 25.1 rad/s (was ~59 rad/s before)uv run python tools/changelog/cli.py check developanduv run isaaclab -fpassChecklist
pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched package (do not editCHANGELOG.rstor bumpextension.toml— CI handles that)CONTRIBUTORS.mdor my name already exists there