Conversation
…oller Evaluate the task-space impedance, contact-wrench and null-space laws through newton.controllers.ControllerOperationalSpaceModelFree instead of the in-tree Torch implementation, keeping target resolution, the task frame and the gain schedule in Isaac Lab so the public configuration, command and output contracts are unchanged. This mirrors the JointImpedanceController port. The task frame is handed to Newton as the operational frame, so gains, selection axes and targets stay expressed in it rather than being rotated into the root frame first. That removes the root-frame gain, selection-matrix and operational-space mass-matrix buffers, and lets the per-axis gains be stored as vectors instead of diagonal matrices. Measured 2.6-2.8x faster per step than the previous Torch law (0.32 ms vs 0.88 ms at 4096 envs, 7 DoF, on one RTX PRO 6000).
…operational-space-controller
Follow the JointImpedanceController port's rule: a buffer this controller owns and updates in place binds to its Newton input port once, and only a value composed from several sources is written through a port view. The motion gains, the task frame, the desired pose and wrench, the tool state and the null-space target now bind directly, leaving the measured contact wrench as the single per-step write. Warp wrappers around caller tensors are cached per port and rebuilt only when the caller hands over a different tensor, so a caller refilling a persistent buffer pays no wrapper construction. Non-contiguous tensors are never cached, since the wrapper would alias the throwaway copy rather than the caller's storage. Per-step tensor copies drop from ten to two, and the step cost from 0.32 ms to 0.25 ms at 4096 envs (3.5x the previous Torch law, up from 2.8x).
Cache the damping ratio at construction instead of rebuilding it from the config tuple on every set_command, write the resolved targets into persistent buffers rather than allocating a fresh tensor per command, and refresh the measured wrench's moment half per command instead of per step. The public target attributes still read None until commanded, then name their buffer, so the sentinel is unchanged and the Warp binding cache keys stay stable. Zeroing the measured wrench on the uncommanded path must not be skipped: with closed-loop force control a stale moment left behind by a reset is read as Kp * (0 - stale) and drives torque from a command that no longer exists. The reset test now steps once while commanded before resetting, so it exercises that state; without the fix it fails by 3.21.
…operational-space-controller
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Superseded by #7854, which consolidates the three supported controllers on the released Newton API. Ackermann remains a separate draft in #6654.
Summary
OperationalSpaceControllernow evaluates its control laws through Newton instead of an in-treeTorch implementation: 2.6-2.8x faster per step (0.32 ms vs 0.88 ms at 4096 envs) with the
public configuration, command and output contracts unchanged.
Important
Blocked — do not merge or run CI yet. This depends on
newton-physics/newton#4105 (unmerged), plus
three further Newton changes described in §3 that are not yet proposed upstream. Against
develop's pinnednewton[sim]==1.5.1,compute()raisesImportError: cannot import name 'ControllerOperationalSpaceModelFree'. Opened to review theIsaac Lab side of the change only.
Description
Fixes # (issue)
The task-space impedance law, the contact-wrench law and null-space control move to
newton.controllers.ControllerOperationalSpaceModelFree. Target resolution, the task frame and thegain schedule stay in Isaac Lab, mirroring the
JointImpedanceControllerport.1. Frame handling
The task frame is handed to Newton as the operational frame, so gains, selection axes and targets
stay expressed in it instead of being rotated into the root frame first. That retires the
root-frame gain buffers, both selection matrices, the operational-space mass matrix and the cached
joint-space mass-matrix inverse, and lets the per-axis gains be stored as
(num_envs, 6)vectorsrather than diagonal matrices.
_motion_p_gains_task/_motion_d_gains_taskchange shapeaccordingly; the one in-tree consumer (
ExportPatcher) is updated.2. Behavior
No intended behavior change. Verified two ways:
test_operational_space_newton_integration.pyreimplements the previous Torchlaw and compares against it across 14 configurations (absolute/relative pose, open- and
closed-loop wrench, all three decoupling modes, null-space centering, both variable impedance
modes, with and without a task frame). 14/14 on
cpuand oncuda:0.test_operational_space.pyis 18/18, matching the pre-change baselinemeasured in the same container.
3. Required Newton changes
Prototyped locally and measured; not yet proposed upstream. Without them the sim suite is 12/18.
_invert_spd_block_kernel_FLOAT32_EPS * max(|diag|, 1)then divides by that floor, so a near-singularJ M⁻¹ Jᵀinverts to order1/eps. Atcond = 2.4e8the torque error is 349%, which failed 5 tests. Damping only on a second pass, and only when the first hits a degenerate pivot, keeps well-conditioned blocks bit-identical.>=6controlled-DOF guard on that ridgemask_motion_after_inertiaflag4. Known contract narrowing
compute()returns a view of Newton's output port rather than a freshly allocated tensor. Bothin-tree callers copy or consume it immediately; external code holding the reference across steps
would now see it mutate.
float32; the previous Torch law acceptedfloat64.compute()call, sincenum_DoFcomes from the Jacobian, soconfiguration errors surface at the first step rather than at construction.
Type of change
Release backport
developChecklist
pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.mdor my name already exists there