Repository navigation
Conversation
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.
Greptile SummaryThis PR separates motor velocity limits from solver velocity clamps for implicit actuators. The main changes are:
Confidence Score: 4/5The changed actuator initialization path needs a fix for partial dict velocity limits before merging.
source/isaaclab/isaaclab/actuators/actuator_pd.py; changelog entry Important Files Changed
Reviews (1): Last reviewed commit: "Decouple motor velocity limit from solve..." | Re-trigger Greptile |
| if cfg.velocity_limit_sim is not None and cfg.velocity_limit is None: | ||
| cfg.velocity_limit = cfg.velocity_limit_sim |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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
left a comment
There was a problem hiding this comment.
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). |
There was a problem hiding this comment.
Suggest renaming it to "joint" velocity. Motor velocity limit typically refers to the actual motor before the gear box.
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
What about the case when velocity_limit is not None but velocity_limit_sim is None?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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; |
Mayankm96
left a comment
There was a problem hiding this comment.
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.
|
Addressed the review in 55d3d5c:
Locally verified: 164 actuator unit tests + 16 newton + 16 physx velocity-limit tests pass. |
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.
all concerns, suggestions, warnings addressed
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.
# 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 -->
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`
# 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 -->
# 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
Description
Actuator configs have two velocity-limit fields that mean different things, and implicit actuators currently refuse to use them together:
velocity_limitis silently ignored (with a deprecation warning), and setting both raises aValueError.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 (PhysXmaxJointVelocity). 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_simset → 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, andvelocity_limitalone is now honored in the data buffers instead of ignored with a warning.Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatchangelog.d