isaac-sim / IsaacLab

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

[Question] How to create Physx aggregates? #985

Open locoxsoco opened 1 month ago

locoxsoco commented 1 month ago

Question

In IsaacGymEnvs it is possible to aggregate actors, useful when having multiple actors or a complex single actor in a scene (faster computation, saving GPU memory and minimizing collision errors). Is it possible to do this in Isaac Lab?

Here's an example of how to apply this in IssacGymEnvs.

And here's a deeper documentation about Physx aggregates.

Mayankm96 commented 1 month ago

Checking with the PhysX team on this, but I think this is now handled automatically by the PhysX parser of the USD stage.

locoxsoco commented 1 month ago

I appreciate your support! The reason behind this question is that I'm currently facing an issue while attempting to train a humanoid model with hands in IsaacLab. This model was successfully trained in IsaacGymEnvs, but when I try to run the training in IsaacLab, some agents crash after a few steps, causing the training process to stop entirely (this issue occurs even without applying any actions to the actuators). This crash only occurs once I set enabled_self_collisions=True in ArticulationRootPropertiesCfg

I encountered a similar problem in IsaacGymEnvs, and I managed to resolve it by aggregating the actor using PhysX aggregates (probably because my model enters in the category of complex single actor due to its high number of joints and different body sizes comparing finger phalanx and legs). If the info seems not related to this question, I'll create another one explaining this behaviour in more detail.

I'm commited to help the sim to handle these complex models, so if there is anything I can add to this or other ticket I'll be very happy to contribute.

Mayankm96 commented 1 month ago

We are benchmarking for robots with a large number of links and joints, so doesn't seem like an issue with that specifically. Internally, the stage parser does make aggregates for articulations so that part should be similar to what you did in Isaac Gym.

From the description above, it seems the issue is more with the colliders in the scene than the asset itself. Also, do you have mimic joints and other more complex mechanisms (like tendons)?

locoxsoco commented 1 month ago

Thanks! The model indeed has 16 tendons (8 per hand). The original model also includes 2 equality constraints. However, it seems these constraints weren't preserved when I used the exporting tool to convert the model from MJCF to USD format.

Here are links to both models below if that helps diagnosing the issue:

Original MJCF Model - This is the model used in IsaacGymEnvs. USD Model - This is the model exported for use in IsaacLab.

If the issue is related to the colliders or the conversion process, any insights or suggestions on how to address this would be greatly appreciated. Thank you for your assistance!