Skip to content

Decouple motor velocity limit from solver clamp for implicit actuators - #6481

Merged
ooctipus merged 5 commits into
isaac-sim:developfrom
ooctipus:zhengyuz/actuators/velocity-limit-semantics
Jul 15, 2026
Merged

ooctipus merged 5 commits into
isaac-sim:developfrom
ooctipus:zhengyuz/actuators/velocity-limit-semantics

Conversation

@ooctipus

Copy link
Copy Markdown
Collaborator

Description

Actuator configs have two velocity-limit fields that mean different things, and implicit actuators currently refuse to use them together: velocity_limit is silently ignored (with a deprecation warning), and setting both raises a ValueError.

This PR gives each field one clear job and lets them coexist:

  • velocity_limit — what the motor can actually do (the datasheet number). It fills the articulation data buffers (soft_joint_vel_limits) that velocity-limit terminations, rewards, and observations read. It is not sent to the physics solver.
  • velocity_limit_sim — an artificial hard clamp inside the solver (PhysX maxJointVelocity). Useful as a numerical safety net, but it has no physical counterpart: a real motor limits speed through its torque curve, not by kinematically clamping the joint.

Why this matters: a task that wants to terminate or penalize when a joint exceeds the motor's rated speed needs the datasheet number in the data buffers — but pushing that same number into the solver as a hard clamp changes the physics (the joint can never exceed it, so the termination becomes unreachable and sim-to-sim transfer across engines with different clamp behavior breaks). Keeping the two independent lets configs express "the motor is rated at 2.6 rad/s, terminate above it, but leave the solver clamp at a loose numerical guard."

Backwards compatibility: configurations that set only one of the two fields behave exactly as before (only velocity_limit_sim set → it also fills the data buffers, unchanged). The breaking part is narrow and flagged in the changelog: setting both is now valid instead of an error, and velocity_limit alone is now honored in the data buffers instead of ignored with a warning.

Type of change

  • Breaking change (narrow: removes an error/ignore path on implicit actuators)

Checklist

  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have added my changelog fragment under changelog.d

velocity_limit now describes the motor's rated speed: it feeds the
articulation data buffers (soft_joint_vel_limits, read by velocity-limit
terminations and rewards) and explicit-model effort clipping, and is not
pushed to the solver. velocity_limit_sim remains the solver-level hard
clamp (PhysX maxJointVelocity). A real motor limits speed through its
torque curve rather than a kinematic clamp, so the two are resolved
independently; setting both on an implicit actuator is now valid, and
when only the sim clamp is given it doubles as the motor limit so the
data buffers stay meaningful.
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Jul 13, 2026
@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR separates motor velocity limits from solver velocity clamps for implicit actuators. The main changes are:

  • velocity_limit now feeds articulation data buffers for implicit actuators.
  • velocity_limit_sim remains the PhysX solver clamp.
  • Implicit actuators can now set both fields without an initialization error.
  • Documentation and the changelog describe the new semantics.

Confidence Score: 4/5

The changed actuator initialization path needs a fix for partial dict velocity limits before merging.

  • Scalar and fully specified velocity limits follow the intended split between motor data and solver clamp.
  • Partial velocity_limit dicts can leave unmatched implicit-actuator joints with zero soft velocity limits.
  • The changelog overstates compatibility for configs that only set velocity_limit.

source/isaaclab/isaaclab/actuators/actuator_pd.py; changelog entry

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/actuators/actuator_pd.py Removes the old ignore/error behavior for implicit actuator velocity limits and introduces the new split, with a risk for partial dict motor limits.
source/isaaclab/isaaclab/actuators/actuator_base.py Updates attribute documentation for the motor-limit and solver-clamp distinction.
source/isaaclab/isaaclab/actuators/actuator_base_cfg.py Updates config documentation to describe how velocity_limit and velocity_limit_sim are resolved.
source/isaaclab/changelog.d/zhengyuz-actuators-velocity-limit-semantics.minor.rst Adds a changelog note for the semantic change, but the compatibility statement is too broad.

Reviews (1): Last reviewed commit: "Decouple motor velocity limit from solve..." | Re-trigger Greptile

Comment on lines +89 to 90
if cfg.velocity_limit_sim is not None and cfg.velocity_limit is None:
cfg.velocity_limit = cfg.velocity_limit_sim

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Partial Dict Limits Become Zero

When an implicit actuator sets velocity_limit as a dict for only some joints and leaves velocity_limit_sim unset or wider, the changed path now preserves that dict and passes it into the base parser. Unmatched joints can be left at 0.0 instead of falling back to the USD or sim limit, so soft_joint_vel_limits can make those joints immediately out of limit for terminations and rewards.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed real: the dict branch of _parse_joint_parameter zero-fills unmatched joints. Fixed at the velocity-limit call site (unmatched joints fall back to the resolved solver clamp) with a regression test that fails without the fix. Done in 55d3d5c.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correction after a second look: the zero-fill is real but it is the uniform, long-standing dict convention of _parse_joint_parameter for ALL actuator parameters (effort_limit, stiffness, damping, and velocity_limit on explicit actuators alike) — dict keys are regexes expected to cover the actuator group's joints. Special-casing only implicit-actuator velocity_limit made dict semantics inconsistent across actuator types, so the carve-out is reverted in d391411. If per-joint fallback for partial dicts is desirable, it should be changed for all parameters in _parse_joint_parameter in a separate PR.

Comment on lines +10 to +12
clamp. Setting both on an implicit actuator is now valid (previously a ``ValueError``), and
``velocity_limit`` alone is no longer silently ignored with a deprecation warning. Existing
configurations that set only one of the two attributes behave exactly as before.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Velocity-Only Compatibility Is Overstated

The changelog says configs that set only one velocity-limit field behave as before, but velocity_limit-only implicit actuators changed behavior. Before this PR that value was warned about and ignored, while now it is copied into soft_joint_vel_limits, changing velocity-limit terminations and rewards for existing configs that relied on the old ignore path.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected in 55d3d5c: the changelog now states that velocity_limit-only implicit configs change behavior (previously ignored, now feeds the data buffers), that a warning is emitted at construction, and how to keep the old behavior.

@ooctipus ooctipus mentioned this pull request Jul 14, 2026
7 tasks
Setting both velocity_limit and velocity_limit_sim on an implicit
actuator no longer raises: the motor limit feeds the data buffers
while the solver clamp is written to the simulation, and the two are
resolved independently. Update the implicit-actuator unit test and the
Newton/PhysX articulation integration tests to assert the new
behavior instead of the removed ValueError and limit aliasing.

@AntoineRichard AntoineRichard left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general i'm a bit concerned with these changes. This could actively change the way an actuator responds and break things for users. This should me marked as a breaking change. LGTM otherwise


velocity_limit: torch.Tensor
"""The velocity limit for the actuator group. Shape is (num_envs, num_joints).
"""The motor velocity limit for the actuator group [rad/s or m/s]. Shape is (num_envs, num_joints).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest renaming it to "joint" velocity. Motor velocity limit typically refers to the actual motor before the gear box.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to joint velocity terminology throughout (docstrings, cfg attention block, comments, and test wording) in 55d3d5c.

# speed through its torque curve, not a kinematic clamp. The two are
# therefore resolved independently; when only the sim clamp is given, it
# doubles as the motor limit so the data buffers stay meaningful.
if cfg.velocity_limit_sim is not None and cfg.velocity_limit is None:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the case when velocity_limit is not None but velocity_limit_sim is None?

@ooctipus ooctipus Jul 15, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this case there is no solver velocity clamping, and velocity_limit is recorded for as default (soft_limit=1.0 means soft limit equals to the default, same behavior as explicit actuator), the only difference is that implicit actuator does not provide motor level clamping, now I think about it maybe we can ask newton actuator to provide the clamping.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documented this case explicitly in the comment and added the construction-time warning you asked for in the review: only-velocity_limit-set now warns that the value feeds the data buffers (previously ignored) and that velocity_limit_sim is the solver clamp. The solver keeps the USD-authored clamp in this case. Done in 55d3d5c.

3. The limits are handled correctly when both sim and non-sim limits are set
1. The solver clamp ``velocity_limit_sim`` is applied to the simulation; when unset, the
USD-authored value is kept
2. The motor limit ``velocity_limit`` is never pushed to the solver and keeps its

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename motor to joint.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed in 55d3d5c (both newton and physx test copies, plus the unit test).

expected_velocity_limit = torch.full_like(newton_vel_limit, sim_limit)
torch.testing.assert_close(newton_vel_limit, expected_velocity_limit)

# the motor limit keeps its configured value and is not pushed to the solver;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename motor to joint.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed in 55d3d5c.

@Mayankm96 Mayankm96 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

velocity_limit — what the motor can actually do (the datasheet number). It fills the articulation data buffers (soft_joint_vel_limits) that velocity-limit terminations, rewards, and observations read. It is not sent to the physics solver.

This seems consistent with how we handle explicit actuators (where velocity limit is the peak velocity limit). I can see in the future, soft_joint_vel_limits shouldn't be a simple factor but could be defined more independently (where velocity limit is the true limits, but soft joint limit is the limit we'd like for safe operation).

Otherwise, looks okay. It may break existing configuration so a behavior change should be notified to the user with a warning.

Rename motor to joint velocity terminology per review. Warn at
construction when an implicit actuator sets only velocity_limit,
since the value was previously ignored and now feeds the data
buffers. Fix joints missing from a partial velocity_limit dict
resolving to zero instead of the solver clamp, with a regression
test. Correct the changelog compatibility claim and add migration
guidance.
@ooctipus

ooctipus commented Jul 15, 2026 •

Copy link
Copy Markdown
Collaborator Author

Addressed the review in 55d3d5c:

  • Renamed motor → joint velocity terminology in docstrings, cfg docs, comments, and tests (@Mayankm96)
  • Added a construction-time warning when an implicit actuator sets only velocity_limit, since that value was previously ignored and now feeds the velocity-limit data buffers (@Mayankm96, @AntoineRichard)
  • The changelog entry is marked Breaking: and now spells out exactly which configurations change behavior and how to migrate

Locally verified: 164 actuator unit tests + 16 newton + 16 physx velocity-limit tests pass.

@ooctipus
ooctipus requested a review from Mayankm96 July 15, 2026 08:04
Partial-dict zero-fill is the uniform convention of
_parse_joint_parameter for all actuator parameters, including
velocity_limit on explicit actuators and effort_limit. Special-casing
only implicit-actuator velocity_limit made dict semantics inconsistent
across actuator types. A general change, if desired, belongs in a
separate PR.
@ooctipus
ooctipus dismissed Mayankm96’s stale review July 15, 2026 18:24

all concerns, suggestions, warnings addressed

@ooctipus
ooctipus merged commit aae232b into isaac-sim:develop Jul 15, 2026
69 of 93 checks passed
ooctipus added a commit to ooctipus/IsaacLab that referenced this pull request Jul 17, 2026
Sync PR isaac-sim#6481 review feedback: rename motor to joint velocity
terminology, warn when an implicit actuator sets only velocity_limit,
and fix partial velocity_limit dicts zeroing unmatched joints.
ooctipus added a commit that referenced this pull request Jul 18, 2026
# Description

Depends on #6481

## Screenshots

Please attach before and after screenshots of the change if applicable.

<!--
Example:

| Before | After |
| ------ | ----- |
| _gif/png before_ | _gif/png after_ |

To upload images to a PR -- simply drag and drop an image while in edit
mode and it should upload the image directly. You can then paste that
source into the above before/after sections.
-->

## Checklist

- [ ] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [ ] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
isaac-sim#6481)

## Description

Actuator configs have two velocity-limit fields that mean different
things, and implicit actuators currently refuse to use them together:
`velocity_limit` is silently ignored (with a deprecation warning), and
setting both raises a `ValueError`.

This PR gives each field one clear job and lets them coexist:

- **`velocity_limit` — what the motor can actually do** (the datasheet
number). It fills the articulation data buffers
(`soft_joint_vel_limits`) that velocity-limit terminations, rewards, and
observations read. It is **not** sent to the physics solver.
- **`velocity_limit_sim` — an artificial hard clamp inside the solver**
(PhysX `maxJointVelocity`). Useful as a numerical safety net, but it has
no physical counterpart: a real motor limits speed through its torque
curve, not by kinematically clamping the joint.

Why this matters: a task that wants to terminate or penalize when a
joint exceeds the motor's rated speed needs the datasheet number in the
data buffers — but pushing that same number into the solver as a hard
clamp changes the physics (the joint can never exceed it, so the
termination becomes unreachable and sim-to-sim transfer across engines
with different clamp behavior breaks). Keeping the two independent lets
configs express "the motor is rated at 2.6 rad/s, terminate above it,
but leave the solver clamp at a loose numerical guard."

Backwards compatibility: configurations that set only one of the two
fields behave exactly as before (only `velocity_limit_sim` set → it also
fills the data buffers, unchanged). The breaking part is narrow and
flagged in the changelog: setting both is now valid instead of an error,
and `velocity_limit` alone is now honored in the data buffers instead of
ignored with a warning.

## Type of change

- Breaking change (narrow: removes an error/ignore path on implicit
actuators)

## Checklist

- [x] I have run the `pre-commit` checks with `./isaaclab.sh --format`
- [x] I have added my changelog fragment under `changelog.d`
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
# Description

Depends on isaac-sim#6481

## Screenshots

Please attach before and after screenshots of the change if applicable.

<!--
Example:

| Before | After |
| ------ | ----- |
| _gif/png before_ | _gif/png after_ |

To upload images to a PR -- simply drag and drop an image while in edit
mode and it should upload the image directly. You can then paste that
source into the above before/after sections.
-->

## Checklist

- [ ] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [ ] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->
kellyguo11 pushed a commit that referenced this pull request Aug 14, 2026
# Description

> [!IMPORTANT]
> **Depends on #7078 — that PR must be merged first.** This branch is
stacked on the effort-limit mirror of #6481, so the diff includes its
single actuator commit. Review the Factory commits on top; after #7078
lands, rebasing will remove the parent commit from this diff.

Adds **`IsaacContrib-Factory-Franka`**, a preset-driven contact-rich
assembly task under `isaaclab_tasks.contrib.nist`.

The task covers 12 NIST taskboard variants:

- M16 nut threading
- round peg insertion at 4, 8, 12, and 16 mm
- rectangular rod insertion at 4, 8, 12, and 16 mm
- small, medium, and large gear meshing

Assembly geometry, reset strategy, curriculum, robot, and physics are
composed through presets rather than separate environment classes. The
task supports explicit `isaacsim_physx` and `newton_mjwarp` presets,
with `physx` retaining automatic backend selection.

## Dependency

#7078 separates the two implicit-actuator effort fields:

- `effort_limit` retains the actuator-facing rated force or torque.
- `effort_limit_sim` controls the physics-solver clamp.

The Factory Franka configuration intentionally authors distinct rated
and solver limits, so it cannot construct on unmodified `develop`.

## Changes

- Added the Factory task, assembly profiles, reset-state generation,
sampling, rewards, observations, terminations, and curriculum.
- Added the 12 task presets and RSL-RL configuration.
- Added explicit Isaac Sim PhysX and Newton physics configuration.
- Kept task assets on uploaded asset paths; no Factory-specific Nucleus
root constant is introduced.
- Bounded precollected reset states in the existing environment smoke
harness so one- and two-environment CI cases remain smoke tests rather
than building the full training bank.

## Type of change

- New feature (non-breaking)

## Validation

- [x] `uv run isaaclab -f`
- [x] Preset decision suite: 19 passed
- [x] Exact Factory two-environment CI smoke case: 1 passed in 35.8
seconds
- [x] Five-iteration `isaacsim_physx` training run completed
- [x] Changelog fragment validation
- [x] No new test files were added while addressing the CI failures
@ooctipus
ooctipus deleted the zhengyuz/actuators/velocity-limit-semantics branch October 14, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants