Skip to content

[Workflow] Fix zero agent and random agent to launch newton visualizer by default - #7518

Merged
StafaH merged 2 commits into
isaac-sim:developfrom
StafaH:fix/zero-agent-newton-visualizer
Sep 3, 2026
Merged

[Workflow] Fix zero agent and random agent to launch newton visualizer by default#7518
StafaH merged 2 commits into
isaac-sim:developfrom
StafaH:fix/zero-agent-newton-visualizer

Conversation

@StafaH

@StafaH StafaH commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Description

The zero and random agents forced the Kit visualizer by default, which launched the Isaac Sim runtime even when a task resolved to Newton physics. This change defaults both checkpoint-free agents to the canonical Newton GL visualizer while preserving explicit --viz overrides.

A regression test covers both agent defaults. An isaaclab_rl changelog fragment documents how to retain the Kit visualizer explicitly.

Fixes # N/A

Type of change

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

Release backport

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

Screenshots

N/A — workflow default change.

Validation

  • uv run --frozen python -m pytest source/isaaclab_rl/test/test_entrypoints.py -q (20 passed, 2 skipped)
  • uv run --frozen python tools/changelog/cli.py check develop
  • uv run --frozen isaaclab -f
  • uv run --frozen isaaclab zero_agent --task Isaac-Cartpole-Direct --num_envs 1 --max_steps 32 physics=newton_mjwarp
  • uv run --frozen isaaclab random_agent --task Isaac-Cartpole-Direct --num_envs 1 --max_steps 32 physics=newton_mjwarp

Both smoke tests initialized NewtonVisualizer and completed without launching Isaac Sim/Kit. In the headless validation shell, the Newton viewer used EGL because DISPLAY was unset.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks
  • I have made corresponding changes to the documentation through the changelog fragment
  • My changes generate no new warnings
  • I have added tests that prove the fix is effective
  • I have added a changelog fragment for every touched package
  • My name already exists in CONTRIBUTORS.md

@StafaH
StafaH requested a review from a team September 3, 2026 05:46
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Sep 3, 2026
@greptile-apps

greptile-apps Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR changes only the zero agent’s default visualizer from Kit to Newton GL, avoiding an unnecessary Isaac Sim runtime for Newton workflows while preserving explicit overrides and the random-agent default.

  • Selects newton_gl for zero-agent invocations and retains kit for random agents.
  • Adds regression coverage for both policy-specific defaults.
  • Documents how to explicitly retain the Kit visualizer.

Confidence Score: 5/5

The PR appears safe to merge with no actionable correctness, security, or compatibility issues identified.

The policy-dependent default is correctly parsed, explicit visualizer selections remain authoritative, and the visualizer implementation includes a non-Newton backend path.

Important Files Changed

Filename Overview
source/isaaclab_rl/isaaclab_rl/entrypoints/simple_agents.py Introduces the intended policy-specific visualizer default while preserving standard explicit CLI override behavior.
source/isaaclab_rl/test/test_entrypoints.py Adds focused regression coverage for the changed zero-agent default and unchanged random-agent default.
source/isaaclab_rl/changelog.d/fix-zero-agent-newton-visualizer.rst Accurately documents the new default and the explicit command needed to retain Kit.

Reviews (1): Last reviewed commit: "Default zero agent to Newton visualizer" | Re-trigger Greptile

@StafaH StafaH changed the title [Workflow] Fix zero agent to launch newton visualizer by default [Workflow] Fix zero agent and random agent to launch newton visualizer by default Sep 3, 2026
@StafaH

StafaH commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

run-ci

@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

The shared parser changes the default visualizer from kit to newton_gl for both zero and random agents, despite the PR’s stated intent to preserve random-agent behavior. The test and changelog currently encode this unintended broader API change.

  • Design and architecture: Using _parse_args to set the CLI default is appropriate, but the unconditional default applies to every policy handled by the shared parser. The existing policy argument should distinguish the zero-agent default unless the broader behavior change is explicitly intended and documented.
  • API: The zero-agent default changes as intended and explicit --viz overrides remain available. However, random_agent also changes its user-facing default, contradicting the stated compatibility scope and the requirement to preserve unaffected behavior.
  • Implementation: The implementation is small and directly tested, but the parametrized test asserts the unintended random-agent change. The default should be conditional on policy, with regression coverage for zero using newton_gl and random retaining kit; the comment and changelog should match that behavior.

Minor fixes needed. Posted 1 actionable finding inline.

Automated review; human maintainers own approval decisions.

# simple agents should open Kit visualizer by default
parser.set_defaults(visualizer=["kit"])
# Keep checkpoint-free agents on the kitless default path.
parser.set_defaults(visualizer=["newton_gl"])

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.

🟡 Warning · Api — Shared default also changes random agent

_parse_args is shared by the zero and random policies, so this unconditional set_defaults also switches random_agent's visualizer from kit to newton_gl, contradicting the stated intent of preserving the random-agent default. Either branch on the already-available policy argument so only zero defaults to newton_gl, or make the broader change explicit in the PR description; also fix the comment, since the previous default was kit, not kitless.

@kellyguo11

Copy link
Copy Markdown
Contributor

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 3, 2026
@StafaH
StafaH merged commit 94c24c0 into isaac-sim:develop Sep 3, 2026
78 of 80 checks passed
@isaaclab-bot

isaaclab-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Backported to release/3.0.0 as c3720fe.

isaaclab-bot Bot pushed a commit that referenced this pull request Sep 3, 2026
…r by default (#7518)

# Description

The zero and random agents forced the Kit visualizer by default, which
launched the Isaac Sim runtime even when a task resolved to Newton
physics. This change defaults both checkpoint-free agents to the
canonical Newton GL visualizer while preserving explicit --viz
overrides.

A regression test covers both agent defaults. An isaaclab_rl changelog
fragment documents how to retain the Kit visualizer explicitly.

Fixes # N/A

## Type of change

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

## Release backport

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

## Screenshots

N/A — workflow default change.

## Validation

- uv run --frozen python -m pytest
source/isaaclab_rl/test/test_entrypoints.py -q (20 passed, 2 skipped)
- uv run --frozen python tools/changelog/cli.py check develop
- uv run --frozen isaaclab -f
- uv run --frozen isaaclab zero_agent --task Isaac-Cartpole-Direct
--num_envs 1 --max_steps 32 physics=newton_mjwarp
- uv run --frozen isaaclab random_agent --task Isaac-Cartpole-Direct
--num_envs 1 --max_steps 32 physics=newton_mjwarp

Both smoke tests initialized NewtonVisualizer and completed without
launching Isaac Sim/Kit. In the headless validation shell, the Newton
viewer used EGL because DISPLAY was unset.

## 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 through the
changelog fragment
- [x] My changes generate no new warnings
- [x] I have added tests that prove the fix is effective
- [x] I have added a changelog fragment for every touched package
- [x] My name already exists in CONTRIBUTORS.md

(cherry picked from commit 94c24c0)
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.

3 participants