Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions docs/pages/concepts/environment/environment_definition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -358,13 +358,12 @@ in ``params`` → ``OpenableObjectReference`` (and ``object_type: articulation``
otherwise → ``ObjectReference``. Python: you pick. Use the plain class for a door
and you get a door with nothing to open.

**Object set members.** YAML constructs set members with no constructor args, so
they cannot carry a ``usd_path``. SimReady assets fail at load time and cannot be
set members. Python ``PerEnvironmentObject`` takes live instances — SimReady is fine:

.. code-block:: python

PerEnvironmentObject(name="bottles", objects=[simready_bottle, ycb_bottle])
**Per-environment objects.** Declare concrete assets under ``objects`` and
``PerEnvironmentObject`` entries under ``per_environment_objects``. Each member
of an entry's ``objects`` list accepts its own ``params``, including a SimReady
``usd_path`` or scale. Relations and tasks reference the entry's ``id`` regardless
of which asset an environment receives. See :doc:`../scene/concept_object_variants`
for Python and YAML examples. ``object_sets`` is no longer a graph field.

How to spawn an environment
---------------------------
Expand Down
24 changes: 13 additions & 11 deletions docs/pages/concepts/scene/concept_object_variants.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,26 @@ Declare the alternatives

.. tab-item:: YAML

The YAML schema still uses ``object_sets`` and constructs a
``PerEnvironmentObject`` for each entry:
Declare ordinary assets under ``objects`` and ``PerEnvironmentObject``
entries under ``per_environment_objects``:

.. code-block:: yaml

objects:
- id: bowl
registry_name: bowl_ycb_robolab
object_sets:
per_environment_objects:
- id: fruit
members:
- banana_ycb_robolab
- orange_01_fruits_veggies_robolab
random_choice: false

Relations and tasks reference ``fruit``. ``random_choice: false`` selects
sequential assignment; ``true`` selects random assignment. Members use
their library defaults; per-member constructor parameters are not supported.
objects:
- registry_name: banana_ycb_robolab
- registry_name: orange_01_fruits_veggies_robolab
params:
scale: [0.8, 0.8, 0.8]
assign_to_environments: sequential

Relations and tasks reference ``fruit``. Entry-level ``params`` configure
its initial pose; member ``params`` configure individual assets, including
scale or a SimReady ``usd_path``. The former ``object_sets`` section is rejected.

Assign assets to environments
-----------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ on the table.

The scene is *heterogeneous* because each parallel environment spawns a
different fruit, while the embodiment, background scene, spatial relationships
and task stay the same. The fruit is declared as an **object set**: a group of
interchangeable assets under a single id, distributed one member per
and task stay the same. The fruit is declared as a ``PerEnvironmentObject``:
interchangeable assets under a single id, distributed one asset per
environment. Running with ``--num_envs 1`` shows a single fruit, so raise
``--num_envs`` to see the variation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ The agent runs in two modes:
Use it for scripted or batch generation.

Describe the object to pick up as a category rather than as a single asset, and
say that it varies across environments. That is the cue for the agent to emit an
``object_sets`` entry instead of a fixed ``objects`` entry.
say that it varies across environments. That is the cue for the agent to emit a
``per_environment_objects`` entry whose ``objects`` list names the alternatives.

.. tab-set::

Expand All @@ -34,8 +34,8 @@ say that it varies across environments. That is the cue for the agent to emit an
Each environment should get a different fruit.

The returned YAML is loaded into the editor and assets are rendered on the right side of the editor.
An object set is drawn as a single node, with a thumbnail per member, so you can
check the whole set at a glance.
A per-environment object is drawn as a single node, with a thumbnail per member, so you can
check all alternatives at a glance.

.. figure:: ../../../../images/agentic_environment_generation/tabletop_agentic_env_fruits_gui.png
:width: 100%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Review the spec before building the environment. The agent infers it from the pr
LLM, so what comes back is non-deterministic: the same prompt can return a different spec on
the next run, and a spec that validates can still be mistaken in its choices. See
:doc:`../../../concepts/agentic_environment_generation/model_selection` for more details.
For an object set, check that the members are the assets you expected as those are added based on semantic similarity by the agent.
For a ``PerEnvironmentObject``, check that the alternatives match the assets you intended.

Understanding the YAML
^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -23,24 +23,24 @@ The generated spec has one block per part of the environment graph:
id: maple_table
registry_name: maple_table_robolab
params: {}
objects: # one entry per fixed asset in the scene
objects: # concrete assets used in every environment
- id: bowl # the placement destination
registry_name: bowl_ycb_robolab
params: {}
object_sets: # the heterogeneous object
per_environment_objects: # assets that can differ between environments
- id: fruit
members: # every environment spawns one of these
- apple_01_objaverse_robolab
- apple_02_objaverse_robolab
- avocado01_fruits_veggies_robolab
- lemon_01_fruits_veggies_robolab
- lemon_02_fruits_veggies_robolab
- lime01_fruits_veggies_robolab
- orange_01_fruits_veggies_robolab
- orange_02_fruits_veggies_robolab
- pomegranate01_fruits_veggies_robolab
- lychee01_fruits_veggies_robolab
random_choice: true # each env samples its member independently
objects: # every environment spawns one of these
- registry_name: apple_01_objaverse_robolab
- registry_name: apple_02_objaverse_robolab
- registry_name: avocado01_fruits_veggies_robolab
- registry_name: lemon_01_fruits_veggies_robolab
- registry_name: lemon_02_fruits_veggies_robolab
- registry_name: lime01_fruits_veggies_robolab
- registry_name: orange_01_fruits_veggies_robolab
- registry_name: orange_02_fruits_veggies_robolab
- registry_name: pomegranate01_fruits_veggies_robolab
- registry_name: lychee01_fruits_veggies_robolab
assign_to_environments: random # each env samples independently
params: {}
relations: # spatial constraints solved at build time
- kind: is_anchor
Expand All @@ -51,7 +51,7 @@ The generated spec has one block per part of the environment graph:
reference: maple_table
params: {}
- kind: 'on'
subject: fruit # a set is referenced by id, like an object
subject: fruit # the object role is referenced by id
reference: maple_table
params: {}
task:
Expand All @@ -61,51 +61,53 @@ The generated spec has one block per part of the environment graph:
subtasks:
- kind: PickAndPlaceTask
params:
pick_up_object: fruit # the set id, so the task follows whichever member spawned
pick_up_object: fruit # the object id, whichever member spawned
destination_location: bowl
background_scene: maple_table

An object set is referenced by its ``id`` exactly like an object — in the
A ``PerEnvironmentObject`` is referenced by its ``id`` in the
``relations`` that place it and in the ``task`` params that name the target. The
rest of the graph is written once and stays valid whichever member an
environment spawns.

For more details on the Env Spec, see
:doc:`Environment Definition <../../../concepts/environment/environment_definition>`.

Editing the object set
^^^^^^^^^^^^^^^^^^^^^^
Editing per-environment objects
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Widening or narrowing the variation is a one-block edit — ``members`` and
``random_choice`` — that leaves the relations and the task untouched. For the
asset concept behind object sets, see
Edit a ``per_environment_objects`` entry's ``objects`` list and
``assign_to_environments`` to change which assets appear across environments.
The relations and task continue to refer to the same ``id``.
For the ``PerEnvironmentObject`` concept, see
:doc:`../../../concepts/scene/concept_object_variants`.

#. Add or remove a member to change which assets the environments draw from.
Members are registered rigid-object names from the Arena asset catalog:
#. Add or remove an ``objects`` member to change which assets the environments draw from.
Members name registered rigid objects from the Arena asset catalog:

.. code-block:: yaml

per_environment_objects:
- id: fruit
members:
- apple_01_objaverse_robolab
- banana_ycb_robolab
random_choice: true
objects:
- registry_name: apple_01_objaverse_robolab
- registry_name: banana_ycb_robolab
assign_to_environments: random
params: {}

#. Set ``random_choice`` to choose how members map to environments. With ``true`` each environment samples its
member independently; with ``false``, it follows the declared member order across environments.
#. Set ``assign_to_environments`` to choose how members map to environments.
``random`` samples independently, with possible repeats; ``sequential`` cycles
through the declared order. Assignment stays fixed across resets.

.. code-block:: yaml

random_choice: false
assign_to_environments: sequential


.. note::

A SimReady searched asset cannot be an object-set member, because a member
has nowhere to carry the ``usd_path`` it needs. Use it as an entry under
``objects`` instead, as in :doc:`../tabletop_pnp_composite_task/index`.
Each member accepts its own ``params``. A searched SimReady asset uses
``registry_name: simready_usd_object`` with its ``usd_path`` under ``params``.

Applying your edits
^^^^^^^^^^^^^^^^^^^
Expand All @@ -123,7 +125,7 @@ Applying your edits
#. Click **Save to <env_name>.yaml** to write the spec to ``<env_name>.yaml`` in the output directory.

Set the number of parallel environments in the sim preview controls to more than
one to see the members spread across environments.
one to see the assets distributed across environments.

See :doc:`../../../concepts/agentic_environment_generation/gui_runner` for the full UI walkthrough.

Expand Down
14 changes: 9 additions & 5 deletions docs/pages/references/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ Release Notes
Unreleased
----------

- Replaced the Python ``RigidObjectSet`` API with ``PerEnvironmentObject``.
``assign_to_environments="sequential"`` cycles through the declared objects;
``"random"`` samples independently. Python environment selection now uses
``--object_variants`` instead of ``--object_set``. YAML still accepts
``object_sets`` and translates its ``random_choice`` setting.
- Replaced ``RigidObjectSet`` with ``PerEnvironmentObject``, backed by Isaac Lab native
multi-asset spawning. ``Object`` continues to use one asset across environments.
Scene assignment is shared with placement, per-variant scale stays native, and
USD hierarchy preparation is isolated from scene objects.
- Environment YAML now separates concrete ``objects`` from
``per_environment_objects``. Each per-environment entry declares an ``objects``
list with constructor parameters for each member, including SimReady USD paths.
The ``object_sets`` field has been removed. Python environment selection now
uses ``--object_variants`` instead of ``--object_set``.

v0.3.1
-------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def build_asset_catalogue(registry: AssetRegistry | None = None) -> AssetCatalog
catalogue.backgrounds.append({"name": name, "tags": [t for t in tags if t != "background"]})
# Only assets existed in the catalogue are exposed.
elif "object" in tags:
# Exposed so the agent can honour type constraints, e.g. object-set members must be rigid.
# Exposed so the agent can require rigid members for per-environment objects.
object_type = getattr(cls, "object_type", None)
catalogue.objects.append({
"name": name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,37 +155,19 @@ def generate_spec(
if resolved is None:
return None, spec.to_dict()
spec = resolved
unusable = self._add_simready_usd_path_to_searched_objects(spec)
if unusable is not None:
self._traces.append(unusable)
return None, spec.to_dict()
self._add_simready_usd_path_to_searched_objects(spec)
return spec, None

def _add_simready_usd_path_to_searched_objects(self, spec: ArenaEnvGraphSpec) -> str | None:
"""Point the spec's searched objects at the generic SimReady asset, USD path in params.

A search name only exists in the process that searched, so a spec keeping it loads nowhere else.

Args:
spec: Generated spec, rewritten in place.

Returns:
An error message, or None when every searched object was rewritten.
"""
# TODO(xinjieyao, 2026-08-03): Lift this once ObjectSetSpec.members can carry a usd_path.
for object_set in spec.object_sets or []:
searched_members = [name for name in object_set.members if name in self._simready_usd_paths]
if searched_members:
return (
f"Object set '{object_set.id}' has searched SimReady members {searched_members}."
" Members have nowhere to carry a usd_path; use them as objects instead."
)
for obj in spec.objects:
usd_path = self._simready_usd_paths.get(obj.registry_name)
def _add_simready_usd_path_to_searched_objects(self, spec: ArenaEnvGraphSpec) -> None:
"""Replace searched names with portable SimReady references in both object sections."""
object_sources = list(spec.objects)
for obj in spec.per_environment_objects:
object_sources.extend(obj.objects)
for source in object_sources:
usd_path = self._simready_usd_paths.get(source.registry_name)
if usd_path is not None:
obj.registry_name = SIMREADY_USD_OBJECT_REGISTRY_NAME
obj.params = {**obj.params, "usd_path": usd_path}
return None
source.registry_name = SIMREADY_USD_OBJECT_REGISTRY_NAME
source.params = {**source.params, "usd_path": usd_path}

def _extend_catalogue_with_simready(self, prompt: str, asset_catalog: AssetCatalogue) -> AssetCatalogue:
"""Search SimReady for the objects the catalog misses, and add what it finds to the catalog.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ def _system_prompt() -> str:
- Follow the per-field ``description`` strings in the schema.
- REQUIRED: leave ``placer_params`` and ``cli_override_specs`` null.
- Use only exact names from the catalog for ``registry_name``:
EMBODIMENTS for ``embodiment``, BACKGROUNDS for ``background``, and OBJECTS for ``objects``.
EMBODIMENTS for ``embodiment``, BACKGROUNDS for ``background``, and OBJECTS for
``objects`` and members of ``per_environment_objects``.
- Do NOT hallucinate asset names — every ``registry_name`` must appear verbatim in the catalog.
If the prompt includes the exact registry name, use it.
If no reasonable match can be found, return empty string.
Expand All @@ -154,8 +155,12 @@ def _system_prompt() -> str:
variance of that family in EMBODIMENTS, pick the one with the default tag.
- For multiple instances of the same registry asset, use semantic (left/right) or numerical (1/2/3)
suffixes in ``id``.
- Use ``object_sets`` only when one object varies across environments; list its variants as ``members``.
Every member must be an OBJECTS entry marked ``type=rigid``.
- Put objects using the same asset in every environment under ``objects``, each with a ``registry_name``.
- When an object varies across environments, declare it under ``per_environment_objects`` with a shared
``id`` and an ``objects`` list. Each member has its own ``registry_name`` and optional ``params``;
every member must be an OBJECTS entry marked ``type=rigid``.
``assign_to_environments`` is "sequential" by default; use "random" for independent sampling.
Relations and task params reference the parent ``id``, not individual members.
- An ``object_reference`` names a prim inside the background. Add one for every surface or appliance
the prompt names that the background merely contains — the floor the robot stands on, a counter top,
a sink, a fridge, a microwave. Name it after the appliance or surface itself, never after the moving
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,13 @@ def collect_agent_ready_validation_trace(
traces.append(f"Embodiment registry_name {spec.embodiment.registry_name!r} is not in the EMBODIMENTS catalog")
if spec.background.registry_name not in asset_names["BACKGROUNDS"]:
traces.append(f"Background registry_name {spec.background.registry_name!r} is not in the BACKGROUNDS catalog")
# Each movable object must resolve to a known OBJECTS entry.
for obj in spec.objects:
if obj.registry_name not in asset_names["OBJECTS"]:
traces.append(f"Object {obj.id!r} registry_name {obj.registry_name!r} is not in the OBJECTS catalog")
# Object-set members are registry names too; validate each one the same way.
for object_set in spec.object_sets or []:
for member in object_set.members:
if member not in asset_names["OBJECTS"]:
traces.append(
f"Object set {object_set.id!r} member registry_name {member!r} is not in the OBJECTS catalog"
)
# Fixed objects and every alternative must appear in the OBJECTS catalogue.
object_sources = [(obj.id, obj) for obj in spec.objects]
for obj in spec.per_environment_objects:
object_sources.extend((obj.id, member) for member in obj.objects)
for object_id, source in object_sources:
if source.registry_name not in asset_names["OBJECTS"]:
traces.append(f"Object {object_id!r} registry_name {source.registry_name!r} is not in the OBJECTS catalog")

# Check each subtask kind and its params against the task catalogue.
task_entries = {entry.name: entry for entry in task_catalog.tasks}
Expand Down
Loading