isaac-sim / IsaacLab

Unified framework for robot learning built on NVIDIA Isaac Sim
https://isaac-sim.github.io/IsaacLab
Other
1.89k stars 724 forks source link

Incorrect collision boxes after using convert_mesh.py #782

Open pbaist opened 1 month ago

pbaist commented 1 month ago

Hi,

I'm trying to use custom objects for reinforcement learning in Isaac Lab.

Following the instructions at https://isaac-sim.github.io/IsaacLab/source/how-to/import_new_asset.html#id1 I was able to run convert_mesh.py to convert my custom .obj into a .usd file usable by Isaac Lab. However, the resulting .usd exhibits incorrect collisions and nonphysical behavior (see attached video.)

Screencast from 2024年08月02日 16時49分02秒.webm

For reference, the conversion process as done through the Isaac Sim GUI + Add -> Physics -> Rigid Body with Colliders Preset results in a .usd object that behaves correctly in physical simulation, but the resulting .usd is unusable in Isaac Lab.

Any guidance or workarounds for this issue would be appreciated.

Thanks,

Cylanx commented 1 month ago

The same issue occurred when converting .urdf to .usd of my own robot, and i tried to add Colliders Preset also resulting in wrong prim path in Isaac Lab. I find it that the prim path saved by IsaacSim is incompatible with the correct order.

Cylanx commented 1 month ago

The same issue occurred when converting .urdf to .usd of my own robot, and i tried to add Colliders Preset also resulting in wrong prim path in Isaac Lab. I find it that the prim path saved by IsaacSim is incompatible with the correct order.

I've solved the order problem by save flatten as...

pbaist commented 1 month ago

The same issue occurred when converting .urdf to .usd of my own robot, and i tried to add Colliders Preset also resulting in wrong prim path in Isaac Lab. I find it that the prim path saved by IsaacSim is incompatible with the correct order.

I've solved the order problem by save flatten as...

Could you go into more detail? The error I get when using an IsaacSim-converted USD in Isaac Lab is

ValueError: Not all regular expressions are matched! Please check that the regular expressions are correct: 
    Object: []
Available strings: ['customusd']

I tried the "save flattened as" option but I still get the same error.

Mayankm96 commented 1 month ago

Hi @pbaist ,

What time of collision approximation are you setting when using the convert_mesh.py script? You can check the colliders of the asset in the GUI. Please check the video here for that: https://www.youtube.com/watch?v=iurSCfTyoB4

Other thing that you need to ensure is that the default prim of your created USD is on the "asset", i.e. the rigid body prim in this case. If you don't have that, then the APIs have no idea where to find the rigid body asset from. More info on this video: https://www.youtube.com/watch?v=UyqwFWFpQfY

Cylanx commented 1 month ago

The same issue occurred when converting .urdf to .usd of my own robot, and i tried to add Colliders Preset also resulting in wrong prim path in Isaac Lab. I find it that the prim path saved by IsaacSim is incompatible with the correct order.

I've solved the order problem by save flatten as...

Could you go into more detail? The error I get when using an IsaacSim-converted USD in Isaac Lab is

ValueError: Not all regular expressions are matched! Please check that the regular expressions are correct: 
  Object: []
Available strings: ['customusd']

As Mayankm96 said above, you should match your prim path 'customusd' with the regular expressions used in IsaacLab. For example, the legged robot's config sets 'joint_names_expr', and my prim path should be as '/robot/FR_hip_joint' in exported usd file. 屏幕截图 2024-08-06 170954