Unverified Commit 72035785 authored by Mayank Mittal's avatar Mayank Mittal Committed by GitHub

Fixes ground color and setting of ground transformation (#224)

# Description

This MR fixes the color of the ground in Orbit. It is now black since we
like that color more.

It also fixes the setting of the translation of the ground plane.
Earlier, it was taking z height from the configuration. Instead, now it
expects to get the full translation as an argument to its function. This
is needed to make it consistent with interactive scene designing API.

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)

## Screenshot


![new_ground](https://github.com/isaac-orbit/orbit/assets/12863862/8e729cb4-875f-476f-aa32-39cab38ad925)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./orbit.sh --format`
- [ ] 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
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
parent 552f162c
[package] [package]
# Note: Semantic Versioning is used: https://semver.org/ # Note: Semantic Versioning is used: https://semver.org/
version = "0.9.27" version = "0.9.28"
# Description # Description
title = "ORBIT framework for Robot Learning" title = "ORBIT framework for Robot Learning"
......
Changelog Changelog
--------- ---------
0.9.28 (2023-11-01)
~~~~~~~~~~~~~~~~~~~
Changed
^^^^^^^
* Changed the way the :func:`omni.isaac.orbit.sim.spawners.from_files.spawn_ground_plane` function sets the
height of the ground. Earlier, it was reading the height from the configuration object. Now, it expects the
desired transformation as inputs to the function. This makes it consistent with the other spawner functions.
0.9.27 (2023-10-31) 0.9.27 (2023-10-31)
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
......
...@@ -46,8 +46,10 @@ def spawn_from_usd( ...@@ -46,8 +46,10 @@ def spawn_from_usd(
prim_path: The prim path or pattern to spawn the asset at. If the prim path is a regex pattern, prim_path: The prim path or pattern to spawn the asset at. If the prim path is a regex pattern,
then the asset is spawned at all the matching prim paths. then the asset is spawned at all the matching prim paths.
cfg: The configuration instance. cfg: The configuration instance.
translation: The translation to apply to the prim w.r.t. its parent prim. Defaults to None. translation: The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which
orientation: The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None. case the translation specified in the USD file is used.
orientation: The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None,
in which case the orientation specified in the USD file is used.
Returns: Returns:
The prim of the spawned asset. The prim of the spawned asset.
...@@ -119,8 +121,10 @@ def spawn_from_urdf( ...@@ -119,8 +121,10 @@ def spawn_from_urdf(
prim_path: The prim path or pattern to spawn the asset at. If the prim path is a regex pattern, prim_path: The prim path or pattern to spawn the asset at. If the prim path is a regex pattern,
then the asset is spawned at all the matching prim paths. then the asset is spawned at all the matching prim paths.
cfg: The configuration instance. cfg: The configuration instance.
translation: The translation to apply to the prim w.r.t. its parent prim. Defaults to None. translation: The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which
orientation: The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None. case the translation specified in the generated USD file is used.
orientation: The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None,
in which case the orientation specified in the generated USD file is used.
Returns: Returns:
The prim of the spawned asset. The prim of the spawned asset.
...@@ -166,7 +170,12 @@ def spawn_from_urdf( ...@@ -166,7 +170,12 @@ def spawn_from_urdf(
return prim_utils.get_prim_at_path(prim_path) return prim_utils.get_prim_at_path(prim_path)
def spawn_ground_plane(prim_path: str, cfg: from_files_cfg.GroundPlaneCfg, **kwargs) -> Usd.Prim: def spawn_ground_plane(
prim_path: str,
cfg: from_files_cfg.GroundPlaneCfg,
translation: tuple[float, float, float] | None = None,
orientation: tuple[float, float, float, float] | None = None,
) -> Usd.Prim:
"""Spawns a ground plane into the scene. """Spawns a ground plane into the scene.
This function loads the USD file containing the grid plane asset from Isaac Sim. It may This function loads the USD file containing the grid plane asset from Isaac Sim. It may
...@@ -180,6 +189,10 @@ def spawn_ground_plane(prim_path: str, cfg: from_files_cfg.GroundPlaneCfg, **kwa ...@@ -180,6 +189,10 @@ def spawn_ground_plane(prim_path: str, cfg: from_files_cfg.GroundPlaneCfg, **kwa
Args: Args:
prim_path: The path to spawn the asset at. prim_path: The path to spawn the asset at.
cfg: The configuration instance. cfg: The configuration instance.
translation: The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which
case the translation specified in the USD file is used.
orientation: The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None,
in which case the orientation specified in the USD file is used.
Returns: Returns:
The prim of the spawned asset. The prim of the spawned asset.
...@@ -189,7 +202,7 @@ def spawn_ground_plane(prim_path: str, cfg: from_files_cfg.GroundPlaneCfg, **kwa ...@@ -189,7 +202,7 @@ def spawn_ground_plane(prim_path: str, cfg: from_files_cfg.GroundPlaneCfg, **kwa
""" """
# Spawn Ground-plane # Spawn Ground-plane
if not prim_utils.is_prim_path_valid(prim_path): if not prim_utils.is_prim_path_valid(prim_path):
prim_utils.create_prim(prim_path, usd_path=cfg.usd_path, translation=(0.0, 0.0, cfg.height)) prim_utils.create_prim(prim_path, usd_path=cfg.usd_path, translation=translation, orientation=orientation)
else: else:
raise ValueError(f"A prim already exists at path: '{prim_path}'.") raise ValueError(f"A prim already exists at path: '{prim_path}'.")
...@@ -231,10 +244,13 @@ def spawn_ground_plane(prim_path: str, cfg: from_files_cfg.GroundPlaneCfg, **kwa ...@@ -231,10 +244,13 @@ def spawn_ground_plane(prim_path: str, cfg: from_files_cfg.GroundPlaneCfg, **kwa
omni.kit.commands.execute( omni.kit.commands.execute(
"ChangePropertyCommand", "ChangePropertyCommand",
prop_path=Sdf.Path(prop_path), prop_path=Sdf.Path(prop_path),
value=Gf.Vec3d(*cfg.color), value=Gf.Vec3f(*cfg.color),
prev=None, prev=None,
type_to_create_if_not_exist=Sdf.ValueTypeNames.Color3f, type_to_create_if_not_exist=Sdf.ValueTypeNames.Color3f,
) )
# Remove the light from the ground plane
# It isn't bright enough and messes up with the user's lighting settings
omni.kit.commands.execute("ToggleVisibilitySelectedPrims", selected_paths=[f"{prim_path}/SphereLight"])
# return the prim # return the prim
return prim_utils.get_prim_at_path(prim_path) return prim_utils.get_prim_at_path(prim_path)
...@@ -95,14 +95,15 @@ class GroundPlaneCfg(SpawnerCfg): ...@@ -95,14 +95,15 @@ class GroundPlaneCfg(SpawnerCfg):
usd_path: str = f"{ISAAC_NUCLEUS_DIR}/Environments/Grid/default_environment.usd" usd_path: str = f"{ISAAC_NUCLEUS_DIR}/Environments/Grid/default_environment.usd"
"""Path to the USD file to spawn asset from. Defaults to the grid-world ground plane.""" """Path to the USD file to spawn asset from. Defaults to the grid-world ground plane."""
height: float = 0.0
"""The height of the ground plane. Defaults to 0.0.""" color: tuple[float, float, float] | None = (0.0, 0.0, 0.0)
color: tuple[float, float, float] | None = (0.065, 0.0725, 0.080) """The color of the ground plane. Defaults to (0.0, 0.0, 0.0).
"""The color of the ground plane. Defaults to (0.065, 0.0725, 0.080).
If None, then the color remains unchanged. If None, then the color remains unchanged.
""" """
size: tuple[float, float] = (100.0, 100.0) size: tuple[float, float] = (100.0, 100.0)
"""The size of the ground plane. Defaults to 100 m x 100 m.""" """The size of the ground plane. Defaults to 100 m x 100 m."""
physics_material: materials.RigidBodyMaterialCfg = materials.RigidBodyMaterialCfg() physics_material: materials.RigidBodyMaterialCfg = materials.RigidBodyMaterialCfg()
"""Physics material properties. Defaults to the default rigid body material.""" """Physics material properties. Defaults to the default rigid body material."""
...@@ -37,8 +37,9 @@ def spawn_light( ...@@ -37,8 +37,9 @@ def spawn_light(
prim_path: The prim path or pattern to spawn the asset at. If the prim path is a regex pattern, prim_path: The prim path or pattern to spawn the asset at. If the prim path is a regex pattern,
then the asset is spawned at all the matching prim paths. then the asset is spawned at all the matching prim paths.
cfg: The configuration for the light source. cfg: The configuration for the light source.
translation: The translation of the prim. Defaults to None. translation: The translation of the prim. Defaults to None, in which case this is set to the origin.
orientation: The orientation of the prim as ``(w, x, y, z)``. Defaults to None. orientation: The orientation of the prim as ``(w, x, y, z)``. Defaults to None, in which case this
is set to identity.
Raises: Raises:
ValueError: When a prim already exists at the specified prim path. ValueError: When a prim already exists at the specified prim path.
......
...@@ -68,8 +68,10 @@ def spawn_camera( ...@@ -68,8 +68,10 @@ def spawn_camera(
prim_path: The prim path or pattern to spawn the asset at. If the prim path is a regex pattern, prim_path: The prim path or pattern to spawn the asset at. If the prim path is a regex pattern,
then the asset is spawned at all the matching prim paths. then the asset is spawned at all the matching prim paths.
cfg: The configuration instance. cfg: The configuration instance.
translation: The translation to apply to the prim w.r.t. its parent prim. Defaults to None. translation: The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case
orientation: The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None. this is set to the origin.
orientation: The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None,
in which case this is set to identity.
Returns: Returns:
The created prim. The created prim.
......
...@@ -37,8 +37,10 @@ def spawn_sphere( ...@@ -37,8 +37,10 @@ def spawn_sphere(
prim_path: The prim path or pattern to spawn the asset at. If the prim path is a regex pattern, prim_path: The prim path or pattern to spawn the asset at. If the prim path is a regex pattern,
then the asset is spawned at all the matching prim paths. then the asset is spawned at all the matching prim paths.
cfg: The configuration instance. cfg: The configuration instance.
translation: The translation to apply to the prim w.r.t. its parent prim. Defaults to None. translation: The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case
orientation: The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None. this is set to the origin.
orientation: The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None,
in which case this is set to identity.
Returns: Returns:
The created prim. The created prim.
...@@ -77,8 +79,10 @@ def spawn_cuboid( ...@@ -77,8 +79,10 @@ def spawn_cuboid(
prim_path: The prim path or pattern to spawn the asset at. If the prim path is a regex pattern, prim_path: The prim path or pattern to spawn the asset at. If the prim path is a regex pattern,
then the asset is spawned at all the matching prim paths. then the asset is spawned at all the matching prim paths.
cfg: The configuration instance. cfg: The configuration instance.
translation: The translation to apply to the prim w.r.t. its parent prim. Defaults to None. translation: The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case
orientation: The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None. this is set to the origin.
orientation: The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None,
in which case this is set to identity.
Returns: Returns:
The created prim. The created prim.
...@@ -116,8 +120,10 @@ def spawn_cylinder( ...@@ -116,8 +120,10 @@ def spawn_cylinder(
prim_path: The prim path or pattern to spawn the asset at. If the prim path is a regex pattern, prim_path: The prim path or pattern to spawn the asset at. If the prim path is a regex pattern,
then the asset is spawned at all the matching prim paths. then the asset is spawned at all the matching prim paths.
cfg: The configuration instance. cfg: The configuration instance.
translation: The translation to apply to the prim w.r.t. its parent prim. Defaults to None. translation: The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case
orientation: The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None. this is set to the origin.
orientation: The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None,
in which case this is set to identity.
Returns: Returns:
The created prim. The created prim.
...@@ -152,8 +158,10 @@ def spawn_capsule( ...@@ -152,8 +158,10 @@ def spawn_capsule(
prim_path: The prim path or pattern to spawn the asset at. If the prim path is a regex pattern, prim_path: The prim path or pattern to spawn the asset at. If the prim path is a regex pattern,
then the asset is spawned at all the matching prim paths. then the asset is spawned at all the matching prim paths.
cfg: The configuration instance. cfg: The configuration instance.
translation: The translation to apply to the prim w.r.t. its parent prim. Defaults to None. translation: The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case
orientation: The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None. this is set to the origin.
orientation: The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None,
in which case this is set to identity.
Returns: Returns:
The created prim. The created prim.
...@@ -188,8 +196,10 @@ def spawn_cone( ...@@ -188,8 +196,10 @@ def spawn_cone(
prim_path: The prim path or pattern to spawn the asset at. If the prim path is a regex pattern, prim_path: The prim path or pattern to spawn the asset at. If the prim path is a regex pattern,
then the asset is spawned at all the matching prim paths. then the asset is spawned at all the matching prim paths.
cfg: The configuration instance. cfg: The configuration instance.
translation: The translation to apply to the prim w.r.t. its parent prim. Defaults to None. translation: The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case
orientation: The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None. this is set to the origin.
orientation: The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None,
in which case this is set to identity.
Returns: Returns:
The created prim. The created prim.
...@@ -237,9 +247,11 @@ def _spawn_geom_from_prim_type( ...@@ -237,9 +247,11 @@ def _spawn_geom_from_prim_type(
cfg: The config containing the properties to apply. cfg: The config containing the properties to apply.
prim_type: The type of prim to create. prim_type: The type of prim to create.
attributes: The attributes to apply to the prim. attributes: The attributes to apply to the prim.
translation: The translation to apply to the prim w.r.t. its parent prim. Defaults to None. translation: The translation to apply to the prim w.r.t. its parent prim. Defaults to None, in which case
orientation: The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None. this is set to the origin.
scale: The scale to apply to the prim. Defaults to None. orientation: The orientation in (w, x, y, z) to apply to the prim w.r.t. its parent prim. Defaults to None,
in which case this is set to identity.
scale: The scale to apply to the prim. Defaults to None, in which case this is set to identity.
Raises: Raises:
ValueError: If a prim already exists at the given path. ValueError: If a prim already exists at the given path.
......
...@@ -79,10 +79,6 @@ def main(): ...@@ -79,10 +79,6 @@ def main():
# Set main camera # Set main camera
set_camera_view([2.5, 2.5, 2.5], [0.0, 0.0, 0.0]) set_camera_view([2.5, 2.5, 2.5], [0.0, 0.0, 0.0])
# Enable flatcache which avoids passing data over to USD structure
# this speeds up the read-write operation of GPU buffers
if world.get_physics_context().use_gpu_pipeline:
world.get_physics_context().enable_flatcache(True)
# Enable hydra scene-graph instancing # Enable hydra scene-graph instancing
# this is needed to visualize the scene when flatcache is enabled # this is needed to visualize the scene when flatcache is enabled
set_carb_setting(world._settings, "/persistent/omnihydra/useSceneGraphInstancing", True) set_carb_setting(world._settings, "/persistent/omnihydra/useSceneGraphInstancing", True)
......
...@@ -40,6 +40,7 @@ def get_checkpoint_path(log_path: str, run_dir: str = "*", checkpoint: str = Non ...@@ -40,6 +40,7 @@ def get_checkpoint_path(log_path: str, run_dir: str = "*", checkpoint: str = Non
try: try:
# find all runs in the directory # find all runs in the directory
runs = [os.path.join(log_path, run) for run in os.scandir(log_path)] runs = [os.path.join(log_path, run) for run in os.scandir(log_path)]
runs = [run for run in runs if os.path.isdir(run)]
# sort by date to handle change of month # sort by date to handle change of month
runs = sorted(runs, key=os.path.getmtime) runs = sorted(runs, key=os.path.getmtime)
# create last run file path # create last run file path
......
...@@ -63,14 +63,11 @@ def main(): ...@@ -63,14 +63,11 @@ def main():
# Spawn things into stage # Spawn things into stage
# Ground-plane # Ground-plane
cfg = sim_utils.GroundPlaneCfg(height=-1.05) cfg = sim_utils.GroundPlaneCfg()
cfg.func("/World/defaultGroundPlane", cfg) cfg.func("/World/defaultGroundPlane", cfg, translation=(0.0, 0.0, -1.05))
# Lights-1 # Lights
cfg = sim_utils.SphereLightCfg(intensity=600.0, color=(0.75, 0.75, 0.75), radius=2.5) cfg = sim_utils.DistantLightCfg(intensity=3000.0, color=(0.75, 0.75, 0.75))
cfg.func("/World/Light/greyLight", cfg, translation=(4.5, 3.5, 10.0)) cfg.func("/World/Light", cfg)
# Lights-2
cfg = sim_utils.SphereLightCfg(intensity=600.0, color=(1.0, 1.0, 1.0), radius=2.5)
cfg.func("/World/Light/whiteSphere", cfg, translation=(-4.5, 3.5, 10.0))
# Table # Table
cfg = sim_utils.UsdFileCfg(usd_path=f"{ISAAC_NUCLEUS_DIR}/Props/Mounts/SeattleLabTable/table_instanceable.usd") cfg = sim_utils.UsdFileCfg(usd_path=f"{ISAAC_NUCLEUS_DIR}/Props/Mounts/SeattleLabTable/table_instanceable.usd")
......
...@@ -65,12 +65,10 @@ def design_scene(): ...@@ -65,12 +65,10 @@ def design_scene():
# Ground-plane # Ground-plane
cfg = sim_utils.GroundPlaneCfg() cfg = sim_utils.GroundPlaneCfg()
cfg.func("/World/defaultGroundPlane", cfg) cfg.func("/World/defaultGroundPlane", cfg)
# Lights-1 # Lights
cfg = sim_utils.SphereLightCfg(intensity=600.0, color=(0.75, 0.75, 0.75), radius=2.5) cfg = sim_utils.DistantLightCfg(intensity=3000.0, color=(0.75, 0.75, 0.75))
cfg.func("/World/Light/greyLight", cfg, translation=(4.5, 3.5, 10.0)) cfg.func("/World/Light", cfg)
# Lights-2
cfg = sim_utils.SphereLightCfg(intensity=600.0, color=(1.0, 1.0, 1.0), radius=2.5)
cfg.func("/World/Light/whiteSphere", cfg, translation=(-4.5, 3.5, 10.0))
# Xform to hold objects # Xform to hold objects
prim_utils.create_prim("/World/Objects", "Xform") prim_utils.create_prim("/World/Objects", "Xform")
# Random objects # Random objects
......
...@@ -64,14 +64,11 @@ def main(): ...@@ -64,14 +64,11 @@ def main():
# Spawn things into stage # Spawn things into stage
# Ground-plane # Ground-plane
cfg = sim_utils.GroundPlaneCfg(height=-1.05) cfg = sim_utils.GroundPlaneCfg()
cfg.func("/World/defaultGroundPlane", cfg) cfg.func("/World/defaultGroundPlane", cfg, translation=(0.0, 0.0, -1.05))
# Lights-1 # Lights
cfg = sim_utils.SphereLightCfg(intensity=600.0, color=(0.75, 0.75, 0.75), radius=2.5) cfg = sim_utils.DistantLightCfg(intensity=3000.0, color=(0.75, 0.75, 0.75))
cfg.func("/World/Light/greyLight", cfg, translation=(4.5, 3.5, 10.0)) cfg.func("/World/Light", cfg)
# Lights-2
cfg = sim_utils.SphereLightCfg(intensity=600.0, color=(1.0, 1.0, 1.0), radius=2.5)
cfg.func("/World/Light/whiteSphere", cfg, translation=(-4.5, 3.5, 10.0))
# Table # Table
cfg = sim_utils.UsdFileCfg(usd_path=f"{ISAAC_NUCLEUS_DIR}/Props/Mounts/SeattleLabTable/table_instanceable.usd") cfg = sim_utils.UsdFileCfg(usd_path=f"{ISAAC_NUCLEUS_DIR}/Props/Mounts/SeattleLabTable/table_instanceable.usd")
cfg.func("/World/envs/env_0/Table", cfg) cfg.func("/World/envs/env_0/Table", cfg)
......
...@@ -47,12 +47,9 @@ def main(): ...@@ -47,12 +47,9 @@ def main():
# Ground-plane # Ground-plane
cfg = sim_utils.GroundPlaneCfg() cfg = sim_utils.GroundPlaneCfg()
cfg.func("/World/defaultGroundPlane", cfg) cfg.func("/World/defaultGroundPlane", cfg)
# Lights-1 # Lights
cfg = sim_utils.SphereLightCfg(intensity=600.0, color=(0.75, 0.75, 0.75), radius=2.5) cfg = sim_utils.DistantLightCfg(intensity=3000.0, color=(0.75, 0.75, 0.75))
cfg.func("/World/Light/greyLight", cfg, translation=(4.5, 3.5, 10.0)) cfg.func("/World/Light", cfg)
# Lights-2
cfg = sim_utils.SphereLightCfg(intensity=600.0, color=(1.0, 1.0, 1.0), radius=2.5)
cfg.func("/World/Light/whiteSphere", cfg, translation=(-4.5, 3.5, 10.0))
# Play the simulator # Play the simulator
sim.reset() sim.reset()
......
...@@ -67,14 +67,11 @@ def main(): ...@@ -67,14 +67,11 @@ def main():
# Spawn things into stage # Spawn things into stage
# Ground-plane # Ground-plane
cfg = sim_utils.GroundPlaneCfg(height=-1.05) cfg = sim_utils.GroundPlaneCfg()
cfg.func("/World/defaultGroundPlane", cfg) cfg.func("/World/defaultGroundPlane", cfg, translation=(0.0, 0.0, -1.05))
# Lights-1 # Lights
cfg = sim_utils.SphereLightCfg(intensity=600.0, color=(0.75, 0.75, 0.75), radius=2.5) cfg = sim_utils.DistantLightCfg(intensity=3000.0, color=(0.75, 0.75, 0.75))
cfg.func("/World/Light/greyLight", cfg, translation=(4.5, 3.5, 10.0)) cfg.func("/World/Light", cfg)
# Lights-2
cfg = sim_utils.SphereLightCfg(intensity=600.0, color=(1.0, 1.0, 1.0), radius=2.5)
cfg.func("/World/Light/whiteSphere", cfg, translation=(-4.5, 3.5, 10.0))
# Table # Table
cfg = sim_utils.UsdFileCfg(usd_path=f"{ISAAC_NUCLEUS_DIR}/Props/Mounts/SeattleLabTable/table_instanceable.usd") cfg = sim_utils.UsdFileCfg(usd_path=f"{ISAAC_NUCLEUS_DIR}/Props/Mounts/SeattleLabTable/table_instanceable.usd")
cfg.func("/World/envs/env_0/Table", cfg) cfg.func("/World/envs/env_0/Table", cfg)
......
...@@ -50,12 +50,9 @@ def main(): ...@@ -50,12 +50,9 @@ def main():
sim.set_camera_view([0.0, 17.0, 12.0], [0.0, 2.0, 0.0]) sim.set_camera_view([0.0, 17.0, 12.0], [0.0, 2.0, 0.0])
# Spawn things into stage # Spawn things into stage
# Lights-1 # Lights
cfg = sim_utils.SphereLightCfg(intensity=600.0, color=(0.75, 0.75, 0.75), radius=2.5) cfg = sim_utils.DistantLightCfg(intensity=3000.0, color=(0.75, 0.75, 0.75))
cfg.func("/World/Light/greyLight", cfg, translation=(4.5, 3.5, 10.0)) cfg.func("/World/Light", cfg)
# Lights-2
cfg = sim_utils.SphereLightCfg(intensity=600.0, color=(1.0, 1.0, 1.0), radius=2.5)
cfg.func("/World/Light/whiteSphere", cfg, translation=(-4.5, 3.5, 10.0))
# Create markers with various different shapes # Create markers with various different shapes
marker_cfg = VisualizationMarkersCfg( marker_cfg = VisualizationMarkersCfg(
......
...@@ -60,12 +60,9 @@ def main(): ...@@ -60,12 +60,9 @@ def main():
# Ground-plane # Ground-plane
cfg = sim_utils.GroundPlaneCfg() cfg = sim_utils.GroundPlaneCfg()
cfg.func("/World/defaultGroundPlane", cfg) cfg.func("/World/defaultGroundPlane", cfg)
# Lights-1 # Lights
cfg = sim_utils.SphereLightCfg(intensity=600.0, color=(0.75, 0.75, 0.75), radius=2.5) cfg = sim_utils.DistantLightCfg(intensity=3000.0, color=(0.75, 0.75, 0.75))
cfg.func("/World/Light/greyLight", cfg, translation=(4.5, 3.5, 10.0)) cfg.func("/World/Light", cfg)
# Lights-2
cfg = sim_utils.SphereLightCfg(intensity=600.0, color=(1.0, 1.0, 1.0), radius=2.5)
cfg.func("/World/Light/whiteSphere", cfg, translation=(-4.5, 3.5, 10.0))
# Robots # Robots
# -- anymal-b # -- anymal-b
......
...@@ -69,12 +69,9 @@ def main(): ...@@ -69,12 +69,9 @@ def main():
# Ground-plane # Ground-plane
cfg = sim_utils.GroundPlaneCfg() cfg = sim_utils.GroundPlaneCfg()
cfg.func("/World/defaultGroundPlane", cfg) cfg.func("/World/defaultGroundPlane", cfg)
# Lights-1 # Lights
cfg = sim_utils.SphereLightCfg(intensity=600.0, color=(0.75, 0.75, 0.75), radius=2.5) cfg = sim_utils.DistantLightCfg(intensity=3000.0, color=(0.75, 0.75, 0.75))
cfg.func("/World/Light/greyLight", cfg, translation=(4.5, 3.5, 10.0)) cfg.func("/World/Light", cfg)
# Lights-2
cfg = sim_utils.SphereLightCfg(intensity=600.0, color=(1.0, 1.0, 1.0), radius=2.5)
cfg.func("/World/Light/whiteSphere", cfg, translation=(-4.5, 3.5, 10.0))
# Robots # Robots
robot_cfg = RIDGEBACK_FRANKA_PANDA_CFG robot_cfg = RIDGEBACK_FRANKA_PANDA_CFG
......
...@@ -75,7 +75,6 @@ class MySceneCfg(InteractiveSceneCfg): ...@@ -75,7 +75,6 @@ class MySceneCfg(InteractiveSceneCfg):
light = AssetBaseCfg( light = AssetBaseCfg(
prim_path="/World/light", prim_path="/World/light",
spawn=sim_utils.DistantLightCfg(intensity=3000.0, color=(0.75, 0.75, 0.75)), spawn=sim_utils.DistantLightCfg(intensity=3000.0, color=(0.75, 0.75, 0.75)),
init_state=AssetBaseCfg.InitialStateCfg(pos=(0.0, 0.0, 500.0)),
) )
......
...@@ -51,7 +51,7 @@ def main(): ...@@ -51,7 +51,7 @@ def main():
# Spawn things into stage # Spawn things into stage
# Ground-plane # Ground-plane
cfg = sim_utils.GroundPlaneCfg(height=0.0) cfg = sim_utils.GroundPlaneCfg()
cfg.func("/World/defaultGroundPlane", cfg) cfg.func("/World/defaultGroundPlane", cfg)
# Lights-1 # Lights-1
cfg = sim_utils.SphereLightCfg(intensity=600.0, color=(0.75, 0.75, 0.75), radius=2.5) cfg = sim_utils.SphereLightCfg(intensity=600.0, color=(0.75, 0.75, 0.75), radius=2.5)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment