isaac-sim / OmniIsaacGymEnvs

Reinforcement Learning Environments for Omniverse Isaac Gym
Other
844 stars 217 forks source link

Change parameters of the physics scene #67

Open dhruvkm2402 opened 1 year ago

dhruvkm2402 commented 1 year ago

Hi, I want to change parameters of the physics scene like disabling GPU dynamics, enabling CCD, change the solver to PGS and boradphase type to MBP before launching the training script as it works best for a skid-steered platform. What is the best way to do it?

kellyguo11 commented 1 year ago

Hi there, you can achieve this by using the physics_context object in Isaac Sim: https://docs.omniverse.nvidia.com/py/isaacsim/source/extensions/omni.isaac.core/docs/index.html#module-omni.isaac.core.physics_context. This can be accessed from the task environment through the world object.

dhruvkm2402 commented 1 year ago

Hi @kellyguo11 When I import PhysicsContext and then do PhysicsContext().enable_gpu_dynamics(flag=False) in the set_up_scene function following is the error I get: return pose[indices, 0:3], pose[indices, 3:7][:, [3, 0, 1, 2]] RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu) Exception ignored in: <function _make_registry.._Registry.del at 0x7fcc793a8e60>

What could be the issue?

dhruvkm2402 commented 10 months ago

Hi @kellyguo11 Can you share more information on this? Do I need to set enable_gpu_dynamics to True in order to do the DRL training?