Repository navigation
Add delayed implicit actuator support - #8992
Conversation
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Style consistency (3), Test quality (2). Other reviewed categories look good.
- PR description: The title, scope, and reported validation match the diff; quantify delay-processing overhead with reproducible baseline/candidate revisions, command, workload, hardware, backend, environment count, warmup, step latency, and memory.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: No breaking changes identified.
- Implementation: Implementation looks good.
- Style consistency: The new mixin constructor lacks the required return annotation; add
-> Noneto match the contribution guide. - Test quality: The added kitless tests lack explicit CI routing markers, so kitless selection skips their delay and reset coverage; mark the qualifying cases.
Minor fixes needed. Posted 5 inline findings.
Automated review; human maintainers own approval decisions.
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Style consistency (4), Test quality (2). Other reviewed categories look good.
- PR description: The title and body match the actuator, lifecycle reuse, documentation, and test scope; revision-specific validation is reported, and no measurable performance claim requires benchmark evidence.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: No breaking changes identified.
- Implementation: Implementation looks good.
- Style consistency: The extracted constructor lacks the required return annotation; add
-> Noneand remove redundant prose while placing the implicit-model heading above its actual section. - Test quality: The native-conflict case marks an implicit-only group native rather than constructing mixed execution; add a disjoint native explicit group and mark the kitless cases for CI selection.
Minor fixes needed. Posted 6 inline findings.
Automated review; human maintainers own approval decisions.
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryAdds
No actionable issues were found. This review checked source code; it did not run tests. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Position, velocity, and effort targets] --> B[Shared command history]
B --> C[Targets delayed per environment]
C --> D[Solver-side PD control]
E[Current joint state and gains] --> D
F[Reset selected environments] --> G[Sample delays and clear selected histories]
G --> B
Reviews (1) · Last reviewed commit: "Add delayed implicit actuator support" · Reviewed by Greptile |
|
run-ci |
maxkra15
left a comment
There was a problem hiding this comment.
Initialize lab_actuators_active=False in the existing _recording_backend fixture in test_newton_manager.py. The two captured/eager contact-observable cases and two actuator-callback cases now raise AttributeError here; Docker CI fails for the same reason. A fixture-only addition makes all five selected cases pass locally. Keep the direct production field read, update the fixture, and rerun native CI.
1b88f55 to
f3dc07d
Compare
|
run-ci |
maxkra15
left a comment
There was a problem hiding this comment.
Fixture fix verified:28 collection,5 affected manager and38 native actuator tests pass. The earlier request is addressed. Current task CI still fails the skrl CPU-to-GPU case with Tensor.ptr missing. Rebase onto current main and rerun the affected task job before approval.
|
run-ci |
maxkra15
left a comment
There was a problem hiding this comment.
The fixture fix is in, and the latest Docker run passed the Newton and task suites.
| self._joint_effort_limit = control.joint_effort_limits.torch | ||
|
|
||
|
|
||
| class DelayedImplicitActuator(_DelayedActuator, ImplicitActuator): |
There was a problem hiding this comment.
On OVPhysX the delayed position/velocity targets never reach the solver: submit_commands still sends the raw _joint_pos_target/_joint_vel_target (#7782 moved only effort to _sim), so only effort is delayed; needs fixing before merge.
Suggested edits:
--- a/source/isaaclab_ov/isaaclab_ov/assets/articulation/actuator_control.py
+++ b/source/isaaclab_ov/isaaclab_ov/assets/articulation/actuator_control.py
@@ -141,8 +141,8 @@
if write_effort or write_pos or write_vel:
ordering_kernels.launch_reorder_joint_targets_user_to_backend(
user_effort=user_effort,
- user_pos_target=collection._joint_pos_target,
- user_vel_target=collection._joint_vel_target,
+ user_pos_target=collection._joint_pos_target_sim,
+ user_vel_target=collection._joint_vel_target_sim,
backend_to_user=articulation.data.joint_ordering.backend_to_user,
write_effort=write_effort,
write_pos_target=write_pos,
@@ -159,8 +159,8 @@
vel_target = articulation._joint_vel_target_backend
else:
effort = user_effort
- pos_target = collection._joint_pos_target
- vel_target = collection._joint_vel_target
+ pos_target = collection._joint_pos_target_sim
+ vel_target = collection._joint_vel_target_sim
if write_effort:
articulation._root_view.set_attribute(TT.DOF_ACTUATION_FORCE, effort)
if write_pos:| ): | ||
| raise ValueError( | ||
| "Delayed implicit actuators require Lab command processing. " | ||
| "Disable 'use_newton_actuators' when combining them with native explicit actuators." |
There was a problem hiding this comment.
Mixing doesn't need the scene-wide switch onto the deprecated Lab path: running Lab compute() for just these groups on the native path, submitting their processed targets and keeping Newton stepping per physics step works in a quick prototype; fine as a follow-up.
|
Failing CI test looks related to the change |
maxkra15
left a comment
There was a problem hiding this comment.
The OvPhysX fix is in. The ordering test still seeds the raw targets, so it now submits zeros. Can it seed the processed position and velocity buffers and rerun CI?
|
run-ci |
|
run-ci |
|
@kellyguo11 Fixed in 7577ed08e5. The OVPhysX ordering test still seeded raw position/velocity targets, while submission now reads the processed buffers so delayed targets reach the solver. The test now seeds those processed buffers; its ordering assertions are unchanged. The local articulation contract run passed: 503 passed, 16 skipped, 67 deselected. Full CI is running on the latest head. Docs, pre-commit, and the wheel build have passed; the simulation test jobs are still running. |
Main gained the MDP2 variants of 13 experimental tasks (isaac-sim#9159) and the shared delayed-actuator mixin (isaac-sim#8992). - Delayed actuators: the device-stream delay draw moves into _DelayedActuator, so DelayedPDActuator and DelayedImplicitActuator both draw delays on the device. - Physics capture: the physics and the scene reset leave the graphs where Newton runs an actuator it cannot capture, such as TorchScript networks; MDP2 accepts Newton's own actuators again. - Actions: per-element scale and clip of DirectAction resolve on top of the slot-based action columns, and only direct actions get scale and clip arrays. - Tasks added on main use Quantity(record=True).
Description
Adds
DelayedImplicitActuatorandDelayedImplicitActuatorCfgto model command latency while retaining solver-side implicit PD control, as requested by Hexagon. Position, velocity, and feed-forward effort targets share one delay per environment, sampled uniformly from[min_delay, max_delay]on reset in physics steps. Joint-state feedback and solver gains remain current.The implementation shares the existing delayed PD command-history lifecycle, preserves partial-reset history isolation, and documents startup behavior and configuration. Combining delayed implicit groups with native explicit actuator execution in the same articulation raises an actionable error; use
use_newton_actuators=Falsefor that combination. Separate articulations can mix both execution paths: Newton retains the environment-owned physics loop whenever a Lab actuator model needs per-step updates, preventing delays from growing with policy decimation.Type of change
Validation
Tests reuse existing coverage: the native collection test owns the mixed-group rejection, the existing delayed-PD equivalence test owns explicit-delay compatibility, and the mixed-scene timing regression uses the already-live Newton scene. No additional simulation scene builds are introduced. Independent zero/fixed delay, partial reset, per-environment sampling/channel sharing, and invalid configuration boundaries remain covered.
pytest ... -m kitless).Checklist
uv run isaaclab --formatsource/isaaclab/changelog.d/andsource/isaaclab_newton/changelog.d/, with a minor-version marker for the new actuator APICONTRIBUTORS.mdThe delayed explicit actuator regression exercises the existing Lab-execution deprecation warning. Existing Newton adapter tests also emit PyTorch export/deprecation warnings; the documentation build was warning-free.