Conversation
|
Signed-off-by: Qian Lin <qianl@nvidia.com>
Signed-off-by: Qian Lin <qianl@nvidia.com>
66d8258 to
a4f72f1
Compare
|
|
||
| EventTermCfg( | ||
| func=mdp.randomize_rigid_body_scale, | ||
| mode="usd", |
There was a problem hiding this comment.
🔴 mode="usd" isn't a real event mode
EventManager only ever applies prestartup, startup, interval and reset, so a term with mode="usd" is registered and then silently never runs — a reader who copies this gets no scale randomization and no error. Isaac Lab's own test_scale_randomization.py and Arena's g1.py:94 use prestartup. Line 352 needs the same fix ("the pre-play usd event mode"), and it's worth adding that prestartup raises unless the scene sets replicate_physics=False.
| mode="usd", | |
| mode="prestartup", |
| * - **Rigid object-set member** (``RigidObjectSet``). Gives each parallel environment one rigid | ||
| object selected from a candidate set. ``random_choice=False`` cycles through the declared | ||
| order; ``True`` samples independently. The assignment remains fixed across resets. | ||
| - Runtime. |
There was a problem hiding this comment.
🟡 Object-set member looks like build time, not runtime
By this page's own definition ("Runtime means the value can change on reset without rebuilding"), Runtime doesn't fit here: assign_variants_for_envs runs during _solve_relations() inside compose_manager_cfg(), and RigidObjectSet.assign_variants no-ops once the env count matches, so the member never changes on reset. The intro paragraph and this row's own last sentence already say that. Could the cell say build time and note the per-env spread?
| - Runtime. | |
| - Build time; the member differs per parallel env but is fixed across resets. |
| .. toctree:: | ||
| :maxdepth: 1 | ||
|
|
||
| variations/variations |
There was a problem hiding this comment.
🟡 This page's variations table duplicates the page it nests
variations/variations.rst already lists the same eight variations with build/run-time labels in its available-variations table, and already carries the same --list_variations command block and the same build-time vs run-time explanation. Two tables over the same eight rows will drift — the stale CameraIntrinsicsBuildTimeVariation row this PR is deleting is that already happening once. Could the "code snippet to enable it" column be added to the existing table instead, so this page keeps the three-path overview plus the non-variation randomization and links across with ``:ref:available-variations```? That would also make the index.rst` "Variation system" card land on the page that actually describes the variation system.
|
|
||
| EventTermCfg( | ||
| func=mdp.randomize_rigid_body_material, | ||
| mode="reset", |
There was a problem hiding this comment.
🔵 Snippet uses the mode the timing column advises against
The timing cell says PhysX recommends startup (upstream: "recommended to use this function only during the initialization of the environment"), but the snippet a reader copies is mode="reset". Same in the collider-offsets row at line 238. Could both snippets show startup and leave the "Newton supports runtime writes" caveat in the prose cell?
| mode="reset", | |
| mode="startup", |
| - build-time | ||
| - Perturbs a pinhole camera's focal lengths and principal point when the environment is built. | ||
| * - ``CameraIntrinsicsRunTimeVariation`` | ||
| * - ``CameraIntrinsicsVariation`` |
There was a problem hiding this comment.
🔵 "principal point" is stale in the description below
CameraIntrinsicsVariation samples only (d_fx, d_fy) and rewrites the horizontal/vertical apertures; the principal point is never touched — the new page's table gets this right. Since this row is being rewritten anyway, worth trimming line 176 to "Perturbs a pinhole camera's focal lengths on every reset."
🤖 Isaac Lab-Arena Review BotSummaryAdds a single Design, Boundaries & ScopeThe new page re-lists all eight variations, repeats the Findings🔴 🟡 🟡 🔵 🔵 Test CoverageDocs-only; no tests expected. The VerdictMinor fixes needed |
| Supported Randomizations | ||
| ======================== | ||
|
|
||
| Arena has three randomization paths: |
| * **Arena variations** are named, configurable randomizations attached to assets. They can be | ||
| discovered with ``--list_variations``, enabled with Hydra overrides, and their sampled values | ||
| are automatically written to the per-episode ``variations`` record. **Recording is supported.** | ||
| * **Arena-native initial-state and scene randomization** uses Arena placement, pose, object-set, | ||
| task, and embodiment APIs. **Recording is not currently supported.** | ||
| * **Isaac Lab event-based randomization** uses custom event terms merged from the scene, | ||
| embodiment, and task configurations. **Recording is not supported by default**; a custom | ||
| episode recorder term is required. |
There was a problem hiding this comment.
How about categorizing as
- Environment structure
What the environment is: scene, assets, embodiment, task, and object sets. These are defined by the Arena environment spec and generally require rebuilding to change.
- Environment variation
What can change while preserving the same environment definition:
- Build-time variations change values between environment builds.
- Run-time variations change values between episodes or resets.
- Custom extensions
Properties not covered by an existing Arena variation require:
- A custom variation or Isaac Lab event term to change behavior.
- An episode-recorder term if the value must also be recorded.
There was a problem hiding this comment.
Then the page could be introduced as Arena env defines what is built. Env variations define which dimensions arena can resample and record automatically. Others require either a new variation, an IsaacLabevent term or a full env rebuild.
| In the tables, **build time** means the value is selected while | ||
| ``ArenaEnvBuilder.compose_manager_cfg()`` is compiling the environment and remains shared by all | ||
| parallel environments and episodes in that build. **Runtime** means the value can change on reset | ||
| without rebuilding the Arena environment. Object-set assignment happens before scene spawning and |
There was a problem hiding this comment.
remove object_set in this paragraph
| @@ -0,0 +1,382 @@ | |||
| Supported Randomizations | |||
There was a problem hiding this comment.
It still sounds confusing to me when mixing randomization with env spec level changes.
How about naming as ways an Arena env can change?
| * - **Rigid object-set member** (``RigidObjectSet``). Gives each parallel environment one rigid | ||
| object selected from a candidate set. ``random_choice=False`` cycles through the declared | ||
| order; ``True`` samples independently. The assignment remains fixed across resets. | ||
| - Runtime. |
There was a problem hiding this comment.
it selects one per env before spawning, and future reset does not shuffle objects
| pool of layouts satisfying ``On``, ``NextTo``, ``NotNextTo``, ``AtPosition``, | ||
| ``PositionLimitsBox``, and ``PositionLimitsCylindrical``; ``FaceTo`` controls heading. | ||
| ``IsAnchor`` fixes references, and ``random_yaw_init=True`` adds uniform yaw initialization. |
There was a problem hiding this comment.
Can it just refer to the relation doc for detailed types? It's annoying when a new relation type is added, all other explicit references need to be changed.
| ``PositionLimitsBox``, and ``PositionLimitsCylindrical``; ``FaceTo`` controls heading. | ||
| ``IsAnchor`` fixes references, and ``random_yaw_init=True`` adds uniform yaw initialization. | ||
| The same path supports co-placement of an embodiment when relations are attached to it. | ||
| - Runtime; the layout pool are prepared at build time. |
There was a problem hiding this comment.
also they are refilled at runtime if pool is running short
| substitute for recording the actual object-set member, pose, relation layout, or joint-state draw. | ||
|
|
||
|
|
||
| Isaac Lab event-based randomization examples |
There was a problem hiding this comment.
One value for Lab's even term rands is it controls how and when it changes. Arena existing ones are only builttime or runtime
| parallel environments and episodes in that build. **Runtime** means the value can change on reset | ||
| without rebuilding the Arena environment. Object-set assignment happens before scene spawning and | ||
| is fixed for the lifetime of the built environment. | ||
|
|
There was a problem hiding this comment.
Maybe worth to link it domain rand in RL (where the term is used a lot), where it uses runtime event terms to resample properties. I can see why audiences are confused if they come from RL.
| {"mean": 0.0, "std": 0.05} | ||
| ) | ||
| embodiment.set_joint_initial_pos({"panda_joint1": 0.1}) | ||
| * - **Physics material: static/dynamic friction and restitution.** |
There was a problem hiding this comment.
For those that Arena core does not have code examples, can we point to Lab's doc/code?
In case of future Lab API changes, we may miss to catch and update them in our doc.
| * - Randomization type and description | ||
| - Randomization Timing | ||
| - Code snippet to enable it | ||
| * - **Rigid object-set member** (``RigidObjectSet``). Gives each parallel environment one rigid |
There was a problem hiding this comment.
Can we link to the concept page of rigid object set?
Summary
Add a doc for all supported randomizations in Arena