-
Notifications
You must be signed in to change notification settings - Fork 828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug Report] Error using MultiAssetSpawnerCfg #1258
Comments
I am getting the same error with the ManagerbasedRL environments too. Here, if I spawn using the following path
], If usd path consists of red, blue, green, and yellow blocks, it works fine. If dex_cube is alone in the list, it works fine too. However, if it consists dex_cube with other blocks it throws the CUDA error. For SM_Mugs it is saying that AttributeError: 'RigidObject' object has no attribute '_external_force_b' which may be unrelated. |
The issue is in reset method in RigidObject.py file. It is caused by how self._external_force_b is indexed with env_ids to set value 0.0. I found a work around to make it work. You can change the lines reset external wrench
to reset external wrench
This makes it work but I have to test if this change has any implications on other functions. Error occurs because env_ids is of shape tensor([3]) and self._external_force_b[env_ids] is of shape tensor[1,1,3]. Hope this helps till the actual solution comes up. For note : @Mayankm96. I am tagging you because I found that you developed this feature from the past issues and I would like to know if this solution would work. Thanks in advance for your inputs. |
Thanks for the reply, it did not work for me. It actually made it worse by throwing the same error even for only blue_block in the list, which was not happening before. Here, the related code and error message: I am trying this method with Omniverse-nucleus objects at the moment:
Error message: ../aten/src/ATen/native/cuda/IndexKernel.cu:92: operator(): block: [0,0,0], thread: [3,0,0] Assertion 2024-10-21 01:51:00 [6,277ms] [Error] [omni.physx.fabric.plugin] CUDA error: device-side assert triggered: ../../../extensions/runtime/source/omni.physx.fabric/plugins/DirectGpuHelper.cpp: 328 |
Describe the bug
I used MultiAssetSpawnerCfg to import objects from usd file. When the environment gets reset in super()._reset_idx(env_ids). there is a following error. This error occurs in reset in directRL environment
Steps to reproduce
Cfg in the interactive sceneCfg
object: RigidObjectCfg = RigidObjectCfg(
prim_path="/World/envs/env_.*/Object",
spawn=sim_utils.MultiAssetSpawnerCfg(
assets_cfg=[
sim_utils.UsdFileCfg(
usd_path=f"{dir_path}/Assets/Objects/USD/object_0.usd",
scale = [1.0, 1.0, 1.0],
),
sim_utils.UsdFileCfg(
usd_path=f"{dir_path}/Assets/Objects/USD/object_1.usd",
scale = [1.0, 1.0, 1.0],
),
sim_utils.UsdFileCfg(
usd_path=f"{dir_path}/Assets/Objects/USD/object_2.usd",
scale = [1.0, 1.0, 1.0],
),
sim_utils.UsdFileCfg(
usd_path=f"{dir_path}/Assets/Objects/USD/object_3.usd",
scale = [1.0, 1.0, 1.0],
)
],
random_choice=True,
rigid_props=sim_utils.RigidBodyPropertiesCfg(
solver_position_iteration_count=4, solver_velocity_iteration_count=0
),
mass_props=sim_utils.MassPropertiesCfg(mass=1.0),
collision_props=sim_utils.CollisionPropertiesCfg(),
),
init_state=RigidObjectCfg.InitialStateCfg(pos=(0.5, 0.0, 0.0), rot=(0.0, -0.0, 0.0, -0.0)),
)
Error code
Exception has occurred: RuntimeError
CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with
TORCH_USE_CUDA_DSA
to enable device-side assertions.File "/media/team_omd/DATA/omniverse/pkg/IsaacLab/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/assets/rigid_object/rigid_object.py", line 104, in reset
self._external_torque_b[env_ids] = 0.0
File "/media/team_omd/DATA/omniverse/pkg/IsaacLab/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/scene/interactive_scene.py", line 351, in reset
rigid_object.reset(env_ids)
File "/media/team_omd/DATA/omniverse/pkg/IsaacLab/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/envs/direct_rl_env.py", line 537, in _reset_idx
self.scene.reset(env_ids)
File "/home/team_omd/Projects/chandra_ma/continual_nbv/NBVPlanning/Environment/NBVEnv.py", line 430, in _reset_idx
super()._reset_idx(env_ids)
File "/media/team_omd/DATA/omniverse/pkg/IsaacLab/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/envs/direct_rl_env.py", line 271, in reset
self._reset_idx(indices)
File "/media/team_omd/DATA/omniverse/pkg/IsaacLab/IsaacLab/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/utils/wrappers/sb3.py", line 207, in reset
obs_dict, _ = self.env.reset()
File "/home/team_omd/Projects/chandra_ma/continual_nbv/NBVPlanning/test.py", line 106, in main
obs = env.reset()
File "/home/team_omd/Projects/chandra_ma/continual_nbv/NBVPlanning/test.py", line 138, in
main()
RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with
TORCH_USE_CUDA_DSA
to enable device-side assertions.System Info
Describe the characteristic of your environment:
Additional context
Checklist
Acceptance Criteria
Add the criteria for which this task is considered done. If not known at issue creation time, you can add this once the issue is assigned.
The text was updated successfully, but these errors were encountered: