Skip to content

Adds --keyword argument to filter environments in list_envs.py - #3384

Merged
Mayankm96 merged 12 commits into
isaac-sim:mainfrom
louislelay:feat/env-filtering
Dec 28, 2025
Merged

Mayankm96 merged 12 commits into
isaac-sim:mainfrom
louislelay:feat/env-filtering

Conversation

@louislelay

@louislelay louislelay commented Sep 8, 2025 •

Copy link
Copy Markdown
Contributor

Description

This PR introduces an optional --keyword <search_term> argument to the list_envs.py script. It allows filtering the list of environments by keyword, making it easier to quickly find relevant tasks.

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Screenshots

Searching for all Franka envs:

Screenshot from 2025-09-08 13-39-32

Checklist

  • I have run the pre-commit checks 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

@louislelay louislelay changed the title Feat/env filtering Adds --keyword argument to filter environments in list_envs.py Sep 8, 2025
@ooctipus

ooctipus commented Sep 8, 2025

Copy link
Copy Markdown
Collaborator

This is a nice feature!!! Thank you @louislelay

@louislelay

Copy link
Copy Markdown
Contributor Author

Thanks @ooctipus! :)

@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Sep 11, 2025
Comment thread scripts/environments/list_envs.py Resolved
@louislelay
louislelay requested a review from ooctipus October 9, 2025 08:52

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

Greptile Overview

Greptile Summary

This PR adds an optional --keyword argument to the list_envs.py script, enabling users to filter the displayed environments by a search term. The implementation adds argument parsing before AppLauncher initialization and modifies the environment iteration loop to check if the keyword exists in the environment ID. When no keyword is provided, all environments are displayed as before, maintaining backward compatibility. The corresponding documentation has been updated in environments.rst to explain the new filtering option for both Linux and Windows users.

Important Files Changed

Filename Score Overview
scripts/environments/list_envs.py 5/5 Adds --keyword argument parsing and implements filtering logic to show only environments matching the search term
docs/source/overview/environments.rst 5/5 Documents the new --keyword option with usage examples for both Linux and Windows platforms

Confidence score: 5/5

  • This PR is safe to merge with minimal risk
  • Score reflects simple, well-scoped implementation with no breaking changes, proper documentation, and straightforward filtering logic using standard argparse and string matching
  • No files require special attention

Sequence Diagram

sequenceDiagram
    participant User
    participant ArgParser
    participant AppLauncher
    participant Gym
    participant PrettyTable
    
    User->>ArgParser: "Run script with --keyword <search_term>"
    ArgParser->>ArgParser: "Parse --keyword argument"
    ArgParser->>AppLauncher: "Launch headless simulation app"
    AppLauncher->>AppLauncher: "Initialize Isaac Sim"
    User->>Gym: "Access gym.registry.values()"
    loop For each task_spec in registry
        Gym->>Gym: "Check if 'Isaac' in task_spec.id"
        alt Keyword provided
            Gym->>Gym: "Check if keyword in task_spec.id"
            alt Matches filter
                Gym->>PrettyTable: "Add row with task details"
            end
        else No keyword
            Gym->>PrettyTable: "Add row with task details"
        end
    end
    PrettyTable->>User: "Print formatted table of environments"
    AppLauncher->>AppLauncher: "Close simulation app"
Loading

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

# acquire all Isaac environments names
for task_spec in gym.registry.values():
if "Isaac" in task_spec.id:
if "Isaac" in task_spec.id and (args_cli.keyword is None or args_cli.keyword in task_spec.id):

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.

style: Keyword filtering is case-sensitive. Consider using .lower() for case-insensitive matching (e.g., args_cli.keyword.lower() in task_spec.id.lower()) to improve user experience.

.. code:: batch

isaaclab.bat -p scripts\environments\list_envs.py
isaaclab.bat -p scripts\environments\list_envs.py --keyword <search_term>

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.

syntax: Windows uses backslashes for path separators - the --keyword flag needs a space not a backslash before it

@Mayankm96

Copy link
Copy Markdown
Contributor

Thank you for the MR! Slowly for the slow response on our side.

@louislelay

Copy link
Copy Markdown
Contributor Author

No worries @Mayankm96, thanks for merging it!

thiagolages pushed a commit to thiagolages/isaac-lab that referenced this pull request Jan 6, 2026
…-sim#3384)

# Description

This PR introduces an optional `--keyword <search_term>` argument to the
`list_envs.py` script. It allows filtering the list of environments by
keyword, making it easier to quickly find relevant tasks.

## Type of change

- New feature (non-breaking change which adds functionality)
- This change requires a documentation update

## Screenshots

Searching for all Franka envs:

<img width="2494" height="1408" alt="Screenshot from 2025-09-08
13-39-32"
src="https://github.com/user-attachments/assets/763c22e5-0f31-4cc1-9d0d-1930e53453ab"
/>

## Checklist

- [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
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

---------

Signed-off-by: Louis LE LAY <[email protected]>
Co-authored-by: Mayank Mittal <[email protected]>
Co-authored-by: ooctipus <[email protected]>
Edify0991 pushed a commit to Edify0991/IsaacLab that referenced this pull request Jan 14, 2026
…-sim#3384)

# Description

This PR introduces an optional `--keyword <search_term>` argument to the
`list_envs.py` script. It allows filtering the list of environments by
keyword, making it easier to quickly find relevant tasks.

## Type of change

- New feature (non-breaking change which adds functionality)
- This change requires a documentation update

## Screenshots

Searching for all Franka envs:

<img width="2494" height="1408" alt="Screenshot from 2025-09-08
13-39-32"
src="https://github.com/user-attachments/assets/763c22e5-0f31-4cc1-9d0d-1930e53453ab"
/>

## Checklist

- [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
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

---------

Signed-off-by: Louis LE LAY <[email protected]>
Co-authored-by: Mayank Mittal <[email protected]>
Co-authored-by: ooctipus <[email protected]>
nitesh-subedi pushed a commit to nitesh-subedi/IsaacLab that referenced this pull request Feb 5, 2026
…-sim#3384)

# Description

This PR introduces an optional `--keyword <search_term>` argument to the
`list_envs.py` script. It allows filtering the list of environments by
keyword, making it easier to quickly find relevant tasks.

## Type of change

- New feature (non-breaking change which adds functionality)
- This change requires a documentation update

## Screenshots

Searching for all Franka envs:

<img width="2494" height="1408" alt="Screenshot from 2025-09-08
13-39-32"
src="https://github.com/user-attachments/assets/763c22e5-0f31-4cc1-9d0d-1930e53453ab"
/>

## Checklist

- [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
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

---------

Signed-off-by: Louis LE LAY <[email protected]>
Co-authored-by: Mayank Mittal <[email protected]>
Co-authored-by: ooctipus <[email protected]>
csj-275 pushed a commit to csj-275/IsaacLab that referenced this pull request Jul 8, 2026
…-sim#3384)

# Description

This PR introduces an optional `--keyword <search_term>` argument to the
`list_envs.py` script. It allows filtering the list of environments by
keyword, making it easier to quickly find relevant tasks.

## Type of change

- New feature (non-breaking change which adds functionality)
- This change requires a documentation update

## Screenshots

Searching for all Franka envs:

<img width="2494" height="1408" alt="Screenshot from 2025-09-08
13-39-32"
src="https://github.com/user-attachments/assets/763c22e5-0f31-4cc1-9d0d-1930e53453ab"
/>

## Checklist

- [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
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

---------

Signed-off-by: Louis LE LAY <[email protected]>
Co-authored-by: Mayank Mittal <[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

documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants