Skip to content

Merge the external environment examples into one - #1782

Merged
cvolkcvolk merged 5 commits into
mainfrom
cvolk/refactor/merge-external-environment-examples
Dec 2, 2026
Merged

cvolkcvolk merged 5 commits into
mainfrom
cvolk/refactor/merge-external-environment-examples

Conversation

@cvolkcvolk

@cvolkcvolk cvolkcvolk commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Merge the two external environment examples, basic.py and advanced.py, into one: isaaclab_arena_examples/external_environments/franka_table_environment.py. Its environment, ExternalFrankaTableEnvironment (franka_table), defines its own task, embodiment and episode recorder terms.

Why this change?

The two examples shared their config and scene line for line: basic.py was advanced.py without the custom task, embodiment and recorder terms. This is the example new users copy when they build on Arena, so it should be one file, not called "advanced", and the environment should not be named after its task (franka_table_with_task).

What changes?

  • franka_table_environment.py replaces basic.py and advanced.py. ExternalFrankaTableEnvironment builds the table scene with the custom SuccessAfterNStepsTask, the franka_ik_soft embodiment and two episode recorder terms.
  • "Defining Environments in Your Repository" shows the config and factory. "Your Own Tasks and Embodiments" shows the task, the embodiment and the end of build(cfg), and points back to the first page for the run command. Both pages are reworded in plain, short sentences; the second page also shows record_object_final_height and no longer says the task goes to the ArenaEnvBuilder.
  • test_external_environment.py tests the one example; its two Policy Runner tests become one.
  • The author-environment skill links the new file.
  • The class paths isaaclab_arena_examples.external_environments.basic.ExternalFrankaTableEnvironment and isaaclab_arena_examples.external_environments.advanced.ExternalFrankaTableWithTaskEnvironment no longer exist. Use isaaclab_arena_examples.external_environments.franka_table_environment.ExternalFrankaTableEnvironment.

#1730 refers to the example classes in external_environments_experiment.yaml; whichever PR merges second updates the path.

Validation

  • Built the docs and checked the rendered code blocks: the first page shows the config and factory of franka_table_environment.py, the second the task, the embodiment and the end of build(cfg).

@greptile-apps

greptile-apps Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

Combines the two external environment examples into franka_table.py, keeping the custom task, embodiment, and episode recorder terms.

  • The Franka table example now uses one name and includes its custom parts.

Reviews (1) · Last reviewed commit: "Merge the external environment examples ..." · Reviewed by Greptile

@arena-review-bot

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

This PR merges basic.py and advanced.py into one example, franka_table.py. Both "Arena in Your Repository" pages and the author-environment skill now point at it, and the two Policy Runner subprocess tests become one. The merge removes duplicated scene setup without losing test coverage, because the remaining subprocess test runs the merged environment. There is one small docs suggestion about the file users are told to copy.

Findings

🔵 Improvement: docs/pages/arena_in_your_repo/external_environments.rst:21: The page tells users to copy franka_table.py as their starting point. That file now includes SuccessAfterNStepsTask, which marks every episode a success after 50 steps. Before this PR, the copied file used NoTask. One sentence telling readers to replace the task would stop a copied environment from reporting a success rate that means nothing (details inline).

Test Coverage and CI Cost

Limitation: when I reviewed, Pre-commit and the other CI jobs on this head were still queued, and I did not build the docs. I can't confirm the test run or the rendered literalinclude blocks.

Verdict

Ship it

basic.py and advanced.py shared their config and scene line for line;
basic.py was advanced.py without the custom task, embodiment and
episode recorder terms. New users copy this example when they build on
Arena, so keep one file, franka_table.py, whose
ExternalFrankaTableEnvironment (franka_table) uses all three. The
environment is no longer named after its task.

The first docs page shows the config and factory, the second the task,
the embodiment and how build(cfg) passes them on. The test covers the
one example.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
SuccessAfterNStepsTask counts every episode that runs 50 steps as a
success. Users copy franka_table.py as a starting point, so say on the
page and next to the task that a copy should use its own task or
NoTask.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
Read the two pages as a newcomer and rewrite them in short, plain
sentences. The task section said the task goes to the ArenaEnvBuilder,
but the factory passes it to IsaacLabArenaEnvironment. The run
instructions now say that config fields become flags, the class path
example uses the page's own class, and the recording section shows
record_object_final_height.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
Built-in environment modules are named <name>_environment.py, so name
the example the same way. The file name, the environment name
franka_table and the class ExternalFrankaTableEnvironment then match.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
The code above and the command below already show the embodiment
name, the environment name and the config flag, so the text only says
where the other parts are explained, why to replace the task, and how
the command is built.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
@cvolkcvolk
cvolkcvolk force-pushed the cvolk/refactor/merge-external-environment-examples branch from 40d7db7 to ce658f1 Compare December 2, 2026 10:32
@cvolkcvolk
cvolkcvolk merged commit 2a06ac4 into main Dec 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants