Commit 8398ed57 authored by Mayank Mittal's avatar Mayank Mittal

adds flag for replicate_physics in SimCfg

parent d450ac94
Changelog
---------
0.1.2 (2023-01-19)
~~~~~~~~~~~~~~~~~~
Fixed
^^^^^
* Added the flag ``replicate_physics`` to the :class:`SimCfg` class.
* Increased the default value of ``gpu_found_lost_pairs_capacity`` in :class:`PhysxCfg` class
0.1.1 (2023-01-18)
~~~~~~~~~~~~~~~~~~
......
......@@ -146,7 +146,11 @@ class IsaacEnv(gym.Env):
global_prim_paths = list()
# clone the scenes into the namespace "/World/envs" based on template namespace
self.envs_prim_paths = cloner.generate_paths(self.env_ns + "/env", self.num_envs)
self.envs_positions = cloner.clone(source_prim_path=self.template_env_ns, prim_paths=self.envs_prim_paths)
self.envs_positions = cloner.clone(
source_prim_path=self.template_env_ns,
prim_paths=self.envs_prim_paths,
replicate_physics=self.cfg.sim.replicate_physics,
)
# convert environment positions to torch tensor
self.envs_positions = torch.tensor(self.envs_positions, dtype=torch.float, device=self.device)
# filter collisions within each environment instance
......
......@@ -102,8 +102,8 @@ class PhysxCfg:
gpu_max_rigid_patch_count: int = 80 * 1024 * 2
"""Size of the rigid contact patch stream buffer allocated in pinned host memory. Default is 80 * 2 ** 11."""
gpu_found_lost_pairs_capacity: int = 1024 * 2
"""Capacity of found and lost buffers allocated in GPU global memory. Default is 2 ** 11.
gpu_found_lost_pairs_capacity: int = 1024 * 1024 * 2
"""Capacity of found and lost buffers allocated in GPU global memory. Default is 2 ** 21.
This is used for the found/lost pair reports in the BP.
"""
......@@ -158,6 +158,13 @@ class SimCfg:
can also provide some performance speed-up.
"""
replicate_physics: bool = True
"""Enable/disable replication of physics schemas when using the Cloner APIs. Default is False.
Note: In Isaac Sim 2022.2.0, domain randomization of material properties is not supported when
``replicate_physics`` is set to True.
"""
use_flatcache: bool = True # output from simulation to flat cache
"""Enable/disable reading of physics buffers directly. Default is True.
......
......@@ -181,7 +181,9 @@ class VelocityEnvCfg(IsaacEnvCfg):
env: EnvCfg = EnvCfg(num_envs=4096, env_spacing=2.5, episode_length_s=20.0)
viewer: ViewerCfg = ViewerCfg()
# Physics settings
sim: SimCfg = SimCfg(dt=0.005, substeps=4)
# disable replicate physics to use physics domain randomization
# TODO: This is a temporary fix. Should be resolved in the future.
sim: SimCfg = SimCfg(dt=0.005, substeps=4, replicate_physics=False)
# Scene Settings
terrain: TerrainCfg = TerrainCfg()
......
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