Repository navigation
Conversation
|
There was a problem hiding this comment.
Isaac Lab Review Bot
The FORGE wrench transform and removal of PhysX’s duplicate joint-frame conversion are coherent, but two issues need correction: the shared regression fixture uses the wrong quaternion ordering, invalidating its analytic setup, and the updated FORGE API documentation states the wrong quaternion convention.
- Design and architecture: Keeping PhysX as a thin splitter of the native child-joint-frame wrench and validating both backends through one shared physical fixture is a sound design. However, the fixture’s root orientation is authored with an xyzw-style tuple where Isaac Lab expects wxyz, so it does not currently enforce the intended cross-backend frame contract.
- API: The JointWrenchSensor frame contract and buffer shapes remain unchanged, and the removed PhysX members are private. In
change_FT_frame, the revised docstring incorrectly advertisesquat_xyzweven thoughsubtract_frame_transforms,quat_apply, and the test inputs use Isaac Lab’s wxyz convention; the position arguments should also document units and shapes. - Implementation: The FORGE adjoint calculation is supported by the independent point-force reference test, and directly splitting the native PhysX wrench is consistent with the documented backend contract. The shared fixture’s
(0, 0, 2**-0.5, 2**-0.5)initial rotation is not the intended scalar-first 90-degree Z rotation, so gravity and the expected wrench are expressed along different axes and the fixture cannot validate the stated equilibrium until corrected.
Minor fixes needed. Posted 2 actionable findings inline.
Automated review; human maintainers own approval decisions.
| prim_path="{ENV_REGEX_NS}/Robot", | ||
| spawn=sim_utils.UsdFileCfg(usd_path=usd_path), | ||
| actuators={"joint": ImplicitActuatorCfg(joint_names_expr=[".*"], stiffness=0.0, damping=0.0)}, | ||
| init_state=ArticulationCfg.InitialStateCfg(pos=(0.0, 0.0, 1.0), rot=(0.0, 0.0, 2.0**-0.5, 2.0**-0.5)), |
There was a problem hiding this comment.
🟡 Warning · Implementation — Fixture root quaternion contradicts analytic setup
InitialStateCfg.rot is (w, x, y, z), so (0, 0, 2**-0.5, 2**-0.5) is a 180-degree rotation about (0,1,1) — the xyzw spelling of the intended 90-degree Z rotation. It maps the joint frame's Z onto world +Y, so gravity is along joint -Y, the arm is no longer in static equilibrium about the joint axis, and the comment plus expected force/torque on lines 69-74 no longer describe the fixture. Use the scalar-first Z-rotation quaternion.
| target_frame: Tuple of (quat_xyzw, pos) for target frame. | ||
| source_F: Force in source frame [N]. Shape is (N, 3). | ||
| source_T: Torque in source frame, about the source frame's origin [N·m]. Shape is (N, 3). | ||
| source_frame: Tuple of (quat_xyzw, pos) for source frame, both expressed in a common frame. |
There was a problem hiding this comment.
🔵 Suggestion · Api — Docstring says xyzw, code expects wxyz
The rewritten Args block documents (quat_xyzw, pos), but the quaternions are passed to subtract_frame_transforms and quat_apply, which use Isaac Lab's (w, x, y, z) order, and the new test feeds quat_from_matrix output. Since this change re-documents the contract, label the inputs quat_wxyz and give the positions [m] and their shape so callers cannot silently supply a wrong rotation and lever arm.
Description
Backports #7967 (
37cfd637f6521dd36865f25918c303f120980acd) torelease/3.0.0, following the merged backport batch #7993.Corrects the rotation and torque lever-arm sign in FORGE's wrench transform. Removes the duplicate PhysX joint-frame conversion because the native wrench already uses the child-side joint frame and anchor. Includes the shared physical regression fixture, backend tests, documentation, and changelog fragments.
The source change applies without conflicts. All added and removed lines match #7967; existing release-specific context in the Newton tests, sensor documentation, and development guidelines is preserved.
Validation
uv run --no-sync isaaclab -f, andgit diff --checkpassed.