Repository navigation
Merge the external environment examples into one - #1782
Conversation
[Low impact] The PR appears safe to merge. SummaryCombines the two external environment examples into
Reviews (1) · Last reviewed commit: "Merge the external environment examples ..." · Reviewed by Greptile |
🤖 Isaac Lab-Arena Review BotSummaryThis PR merges Findings🔵 Improvement: docs/pages/arena_in_your_repo/external_environments.rst:21: The page tells users to copy Test Coverage and CI CostLimitation: 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 VerdictShip 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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
40d7db7 to
ce658f1
Compare
…#1804) (#1828) Cherry-pick #1804 into `release/0.4.0`, so an environment YAML on the release branch can name robots, objects, tasks, and relations that an installed `isaaclab_arena.plugins` package registers (https://nvbugspro.nvidia.com/bug/7173054). #1804 is still open. Its net change is picked as one commit, because its first commits added `python_modules`, which later commits replaced with plugins. Later review changes to #1804 will be picked here too. The second commit is release-only. Release still has `basic.py` and `advanced.py` instead of #1782's `franka_table_environment.py`, so this branch leaves out the decorated example and `franka_table.yaml`, and: - Keeps the release tasks page's `--external_environment_class_path` commands and drops the `main` paragraphs that run `franka_table` by name. - Says how to make a custom task usable from YAML, without pointing to the YAML example that release lacks. - Uses `advanced.py` as the plugin in the tests, which registers `franka_ik_soft`. --------- Signed-off-by: Xinjie Yao <[email protected]>
Merge the two external environment examples,
basic.pyandadvanced.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.pywasadvanced.pywithout 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.pyreplacesbasic.pyandadvanced.py.ExternalFrankaTableEnvironmentbuilds the table scene with the customSuccessAfterNStepsTask, thefranka_ik_softembodiment and two episode recorder terms.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 showsrecord_object_final_heightand no longer says the task goes to theArenaEnvBuilder.test_external_environment.pytests the one example; its two Policy Runner tests become one.author-environmentskill links the new file.isaaclab_arena_examples.external_environments.basic.ExternalFrankaTableEnvironmentandisaaclab_arena_examples.external_environments.advanced.ExternalFrankaTableWithTaskEnvironmentno longer exist. Useisaaclab_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
franka_table_environment.py, the second the task, the embodiment and the end ofbuild(cfg).