Skip to content

fix: correct misleading comments and docs in BinaryJointAction - #4679

Merged
StafaH merged 8 commits into
isaac-sim:developfrom
alltheseas:fix/binary-joint-action-comment-convention
Sep 20, 2026
Merged

StafaH merged 8 commits into
isaac-sim:developfrom
alltheseas:fix/binary-joint-action-comment-convention

Conversation

@alltheseas

@alltheseas alltheseas commented Feb 21, 2026 •

Copy link
Copy Markdown
Contributor

Description

Clarify the established binary-action convention without changing behavior:

  • True and non-negative floating-point actions select the configured open command.
  • False and negative floating-point actions select the configured close command.
  • Rename the internal selection mask to close_mask so its meaning cannot be confused with the input action.
  • Apply the same clarification to both joint-based and surface-gripper binary actions, which share this contract.
  • Correct the documented zero boundary: zero opens because the close condition is strictly < 0.

The runtime convention is intentionally preserved. Reversing the boolean mapping would break existing policies and downstream integrations that follow the documented True/positive = open contract.

The earlier resolve_matching_names change is no longer part of this PR. Both affected string helpers were fixed comprehensively by #5546.

Fixes #4670

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

Release backport

  • Backport this pull request to the active release/3.0.0 branch after it merges into develop

This clarification applies to the same implementation on release/3.0.0; please backport it so the supported 3.0 documentation and source comments do not retain the ambiguous convention or incorrect zero boundary.

Validation

  • Exercised both action terms with boolean and floating-point inputs, including True, False, positive, zero, and negative values.
  • uv run isaaclab -f
  • uv run python tools/changelog/cli.py check develop
  • uv run --isolated --extra dev -- make -C docs current-docs

Checklist

  • I have read and understood the contribution guidelines.
  • I have run the pre-commit checks.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added a changelog fragment under source/isaaclab/changelog.d/.
  • The contributor is listed in CONTRIBUTORS.md.

The docstring for `resolve_matching_names` incorrectly described the
behavior of the `preserve_order` parameter — the descriptions for
True and False were swapped.

Fixes isaac-sim#4493

Signed-off-by: alltheseas <[email protected]>
The inline comments in process_actions stated "true: close, false:
open" which describes the binary_mask variable but reads as describing
the action convention, contradicting actual behavior.

Also fix class docstring: "positive" -> "non-negative" for float
actions, since zero maps to open (the mask uses < 0, not <= 0).

Fixes isaac-sim#4670

Signed-off-by: alltheseas <[email protected]>
@alltheseas
alltheseas requested a review from ooctipus as a code owner February 21, 2026 07:24
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Feb 21, 2026
@greptile-apps

greptile-apps Bot commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes misleading documentation in two areas:

  1. BinaryJointAction: Updated class docstring from "positive values" to "non-negative values" for float open actions, matching the actual implementation (action >= 0 maps to open). Clarified inline comments to describe action-to-command mapping from the user's perspective rather than the internal binary_mask variable.

  2. resolve_matching_names: Fixed inverted docstring that incorrectly described the preserve_order parameter behavior - the documentation now correctly states that preserve_order=False (default) follows list order, while preserve_order=True follows regex key order.

Both changes are documentation-only with no behavioral impact. The code logic remains unchanged and functions correctly.

Confidence Score: 5/5

  • This PR is completely safe to merge with zero risk
  • Documentation-only changes with no code behavior modifications - the updates correct misleading comments and docstrings to accurately match existing implementation logic
  • No files require special attention

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/envs/mdp/actions/binary_joint_actions.py Corrected misleading docstring and inline comments to accurately describe action-to-command mapping behavior
source/isaaclab/isaaclab/utils/string.py Fixed inverted docstring describing preserve_order parameter behavior with clearer examples

Last reviewed commit: 3e0f702

@greptile-apps greptile-apps Bot 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.

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@ooctipus

ooctipus commented Mar 5, 2026

Copy link
Copy Markdown
Collaborator

HI @alltheseas thanks for your PR, though I am still a bit unclear what is the confusion? the doc does reads correct to me, binary mask evaluate to True if its 0 or less than 0, and False if its greater than 0.

then all true(<=0) is map to close, and all false(>0) is mapped to open

I also see there are update to preserve order that I am not sure the newer version is correct. @greptile for comment.

@greptile-apps

greptile-apps Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

You're right that the old comments accurately describe binary_mask (True→close, False→open). The issue is placement—sitting right after the action line, they read as describing the action convention, which is the opposite.

Following the actual flow:

  • Bool: action=True → binary_mask=False → open_command
  • Float: action >= 0 → binary_mask=False → open_command

The new comments describe this action-to-result mapping, matching the class docstring and eliminating ambiguity about what's being described.

Re: preserve_order - The original docs were backwards. When preserve_order=False (default), results follow list_of_strings order. When True, results follow regex order. The example ([0, 1, 2], ['a', 'b', 'c']) for False confirms the strings are in their original order, not regex order. The update corrects this.

@ooctipus ooctipus 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.

Thanks for making the doc clearer :D

@alltheseas

Copy link
Copy Markdown
Contributor Author

Thanks - please treat my contributions with a risk of hallucinations.

To be clear, the issue/confusion was described in #4670, which is why I submitted the smol PR.

🙏

nv-caelan and others added 3 commits March 7, 2026 20:23
…ck orders (isaac-sim#4875)

# Description

This PR adds 4 new Isaac-Stack-Cube-Franka-IK-Rel-v0 task variants
corresponding to stacking [Red, Green], [Red, Green, Blue], [Blue,
Green], and [Blue, Green, Red]. The objective is to create a test bed
for different success conditions in the same scene.

## Type of change

- New feature (non-breaking change which adds functionality)

## Checklist

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

## Type of change

- Documentation update

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
# Description

Updates Newton docs on main for 3.0 beta changes


## Type of change

- Documentation update


## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] 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
-->
@purewater0901

Copy link
Copy Markdown

@alltheseas Thank you for the PR and for addressing the issue I posted! Is this going to be merged soon?

@isaaclab-review-bot isaaclab-review-bot Bot 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.

🤖 Isaac Lab Review Bot

Summary

This PR fixes misleading comments and docstrings in two files: (1) BinaryJointAction.process_actions where inline comments described the binary_mask variable but read as describing the action convention (inverted meaning), and (2) resolve_matching_names where the preserve_order parameter’s True/False descriptions were swapped. All changes are documentation-only — no behavior change. The fixes are correct and verified against the implementation.

Design Assessment

This is a docs/comments-only fix. The approach — correcting misleading documentation to match existing code behavior — is the right one. The alternative (changing the code to match the old comments) would break all existing users. Design is sound.

Architecture Impact

No cross-module impact — changes are purely to comments and docstrings with no behavioral changes.

Implementation Verdict

Minor fixes needed — Correct approach, 1 issue to address.

Test Coverage

No tests needed — this is a pure documentation fix with zero code behavior change. Existing tests for resolve_matching_names with preserve_order already validate the actual behavior.

CI Status

pre-commit ✅ | license-check ✅ | Build Docs ⏳ pending | test-general ⏳ pending | test-isaaclab-tasks ⏳ pending

No failures. Pending checks are GPU-dependent CI runners, unrelated to this docs-only change.

Findings

🟡 Warning: source/isaaclab/isaaclab/utils/string.py:283-289 — resolve_matching_names_values has the same inverted docstring that this PR didn’t fix

The sibling function resolve_matching_names_values (starting at line ~280) has an identical preserve_order docstring bug: it says preserve_order=True gives "order of provided list of strings" and preserve_order=False gives "order of query regular expressions" — both are backwards, exactly matching the bug you just fixed in resolve_matching_names. The implementation logic is identical between the two functions.

Since you’re already in this file fixing exactly this issue, please apply the same fix to resolve_matching_names_values. Replace lines 284-289 with:

    If the :attr:`preserve_order` is False (default), the ordering of the matched indices and names follows
    the order of the provided list of strings. This means that the ordering is dictated by the order of the
    target strings and not the order of the query regular expressions.

    If the :attr:`preserve_order` is True, the ordering of the matched indices and names follows the order
    of the query regular expressions.

Also update the example text on lines 293-296 with similar clarifying annotations (e.g., - following the order of list_of_strings / - following the order of the regex keys) to match the style used in the resolve_matching_names fix.

([0, 2, 1], ['a', 'c', 'b']) - following the order of the regex keys.

Note:
The function does not sort the indices. It returns the indices in the order they are found.

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.

Good fix here — the preserve_order descriptions were indeed swapped. However, the sibling function resolve_matching_names_values (~line 283) has the exact same inverted docstring and identical reordering logic. Since you're already in this file fixing this exact bug, please apply the same correction to resolve_matching_names_values as well. Its current docstring (lines 284-289) says preserve_order=True follows string order and preserve_order=False follows regex key order — both are backwards.

# Conflicts:
#	docs/source/experimental-features/newton-physics-integration/index.rst
#	docs/source/experimental-features/newton-physics-integration/installation.rst
#	docs/source/experimental-features/newton-physics-integration/isaaclab_newton-beta-2.rst
#	docs/source/experimental-features/newton-physics-integration/training-environments.rst
#	docs/source/experimental-features/newton-physics-integration/visualization.rst
#	source/isaaclab/isaaclab/utils/string.py
#	source/isaaclab_tasks/docs/CHANGELOG.rst
#	source/isaaclab_tasks/isaaclab_tasks/contrib/stack/config/franka/__init__.py
#	source/isaaclab_tasks/isaaclab_tasks/contrib/stack/mdp/terminations.py
#	source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/stack/config/franka/stack_ik_rel_env_cfg.py
@StafaH

StafaH commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 20, 2026
@StafaH

StafaH commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 20, 2026
@StafaH
StafaH merged commit 1fb0997 into isaac-sim:develop Sep 20, 2026
93 of 94 checks passed
isaaclab-bot Bot pushed a commit that referenced this pull request Sep 20, 2026
## Description

Clarify the established binary-action convention without changing
behavior:

- `True` and non-negative floating-point actions select the configured
open command.
- `False` and negative floating-point actions select the configured
close command.
- Rename the internal selection mask to `close_mask` so its meaning
cannot be confused with the input action.
- Apply the same clarification to both joint-based and surface-gripper
binary actions, which share this contract.
- Correct the documented zero boundary: zero opens because the close
condition is strictly `< 0`.

The runtime convention is intentionally preserved. Reversing the boolean
mapping would break existing policies and downstream integrations that
follow the documented `True`/positive = open contract.

The earlier `resolve_matching_names` change is no longer part of this
PR. Both affected string helpers were fixed comprehensively by #5546.

Fixes #4670

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [x] Documentation update

## Release backport

- [x] <!-- backport-active-release --> Backport this pull request to the
active `release/3.0.0` branch after it merges into `develop`

This clarification applies to the same implementation on
`release/3.0.0`; please backport it so the supported 3.0 documentation
and source comments do not retain the ambiguous convention or incorrect
zero boundary.

## Validation

- Exercised both action terms with boolean and floating-point inputs,
including `True`, `False`, positive, zero, and negative values.
- `uv run isaaclab -f`
- `uv run python tools/changelog/cli.py check develop`
- `uv run --isolated --extra dev -- make -C docs current-docs`

## Checklist

- [x] I have read and understood the contribution guidelines.
- [x] I have run the pre-commit checks.
- [x] I have made corresponding changes to the documentation.
- [x] My changes generate no new warnings.
- [x] I have added a changelog fragment under
`source/isaaclab/changelog.d/`.
- [x] The contributor is listed in `CONTRIBUTORS.md`.

---------

Signed-off-by: alltheseas <[email protected]>
Co-authored-by: alltheseas <[email protected]>
Co-authored-by: nv-caelan <[email protected]>
Co-authored-by: Clemens Schwarke <[email protected]>
Co-authored-by: Kelly Guo <[email protected]>
Co-authored-by: ooctipus <[email protected]>
Co-authored-by: Mustafa Haiderbhai <[email protected]>

(cherry picked from commit 1fb0997)
@isaaclab-bot

isaaclab-bot Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Backported to release/3.0.0 as 80157aa.

ooctipus added a commit that referenced this pull request Sep 21, 2026
…7530, #7899) (#7926)

## Description

Backports the two changes merged into `develop` since September 19 that
are still missing from `release/3.0.0`:

| Source PR | Change | Source commit |
| --- | --- | --- |
| #7530 | Validate camera outputs against renderer capabilities before
simulator startup | `31d1c53510490c76841e9c35a329574b357d9900` |
| #7899 | Share native resources by construction cfg and centralize
ownership and teardown | `c90c3a1097a0a669a823b880b1c8d0654d7fd267` |

Includes the original regression tests, API documentation, and changelog
fragments. #7530 applied without changes. #7899 required two conflict
resolutions to retain the release branch's OVRTX mapping API,
documentation, and tests. Of its 62 files, 59 match the merged source
exactly; the other three retain those existing release additions.
Release versions, lockfile entries, compiled changelogs, and
documentation routing are preserved.

## Audit

Checked all **33 PRs** merged from September 19, 2026 00:00
America/Los_Angeles through `develop` commit `c90c3a1097` (September 20,
21:29 Pacific), against release base `75e9c8ce12`. **31 are already
backported; the remaining two are included here.** Git first-parent
history and GitHub's merged PR list agree. Automatic changelog/version
compilation remains branch-specific.

<details>
<summary>31 PRs already recorded in release</summary>

| Source PRs | Existing release commit |
| --- | --- |
| #7777, #7608, #7895, #7872, #7831, #7834, #7838, #7840, #7903, #7674 |
[`ff22c52891`](ff22c52)
|
| #7886 |
[`41bfaee5f0`](41bfaee)
|
| #7042 |
[`970d21ef48`](970d21e)
|
| #7905 |
[`f0563d1f9e`](f0563d1)
|
| #7604 |
[`dca7cfe984`](dca7cfe)
|
| #7610, #7603 |
[`5dd2220243`](5dd2220)
|
| #7839 |
[`b8b93bb96e`](b8b93bb)
|
| #6851 |
[`baa025ad90`](baa025a)
|
| #7250 |
[`f86b33e6b1`](f86b33e)
|
| #7910 |
[`24f7b4842b`](24f7b48)
|
| #7810 |
[`9738e096c8`](9738e09)
|
| #7832 |
[`be270ed88b`](be270ed)
|
| #4679 |
[`80157aa22d`](80157aa)
|
| #7914 |
[`01b59b5a22`](01b59b5)
|
| #7502 |
[`db7db61f60`](db7db61)
|
| #7918 |
[`bca9dba8bb`](bca9dba)
|
| #7919 |
[`ef1514c97c`](ef1514c)
|
| #7922 |
[`7d6979a19e`](7d6979a)
|
| #7923 |
[`a1dd560b98`](a1dd560)
|
| #7924 |
[`892e51dc1d`](892e51d)
|
| #7925 |
[`75e9c8ce12`](75e9c8c)
|

</details>

## Validation

**745 tests passed** on the combined backport:

- Core registry, configclass, replication, camera contracts, and task
presets: 158 passed.
- Newton manager/model/reset and coupling suites: 299 passed.
- OVPhysX/OVRTX lifecycle, scene data, bindings, and material contracts:
141 passed on CPU.
- Clone-plan algebra: 83 passed.
- All 8 OV CUDA cases skipped in the CPU run: 8 passed on GPU.
- OVPhysX ray-caster regression: 1 passed.
- Kit simulation-context and PhysX scene-data tests: 54 passed.
- Newton solver reset integration: 1 passed.

The registry-identity and borrowed-config-field regressions both fail
with the pre-backport implementations and pass with this change.
Backport file-scope validation, source-file comparison, `git diff
--check`, and `uv run isaaclab -f` passed.

Local validation used PyTorch 2.12.0/CUDA 13.0, Isaac Sim 6.0.1.0,
Newton 1.6.0rc1, and an RTX 5090. Existing deprecation/runtime warnings
occurred. Full Docker CI is requested separately against the pinned
environment; local checks do not claim a startup or runtime speedup.

## Checklist

- [x] Read the contribution guidelines and ran formatting/changelog
checks.
- [x] Included source tests, documentation, and changelog fragments.
- [x] Verified regression behavior and preserved release-specific
changes.
- [x] Recorded source commit hashes and audited the requested merge
window.

---------

Co-authored-by: Antoine RICHARD <[email protected]>
Co-authored-by: ooctipus <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report] BinaryJointAction.process_actions: bool-action convention mismatch / confusing comment (True treated as open, False as close)

7 participants