Skip to content
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

Adds APIs for spawning deformable meshes #613

Merged
merged 42 commits into from
Jul 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
f3ec164
initial commit
Mayankm96 Jul 1, 2024
31e49cb
adds deformable schema
Mayankm96 Jul 1, 2024
1718962
adds material binding
Mayankm96 Jul 1, 2024
6422130
fixes to run code
Mayankm96 Jul 1, 2024
97bc8e6
makes the example nicer
Mayankm96 Jul 1, 2024
4fca0a5
fixes function usage
Mayankm96 Jul 1, 2024
490540a
adds thorougher docstrings
Mayankm96 Jul 2, 2024
71e6bf0
adds collider api
Mayankm96 Jul 2, 2024
6ab3822
changes rest offset to be zero
Mayankm96 Jul 2, 2024
2ac2e3b
random poisson
Mayankm96 Jul 2, 2024
3bd3225
runs formatter
Mayankm96 Jul 2, 2024
3348dbd
fixes spawn prims docs
Mayankm96 Jul 2, 2024
85edb3b
adds demo mention
Mayankm96 Jul 2, 2024
a59c371
adds api docs
Mayankm96 Jul 2, 2024
cfb2ad4
fix all code links
Mayankm96 Jul 2, 2024
67cc50e
puts note at the right place
Mayankm96 Jul 2, 2024
39f21c8
adds link to geom mesh
Mayankm96 Jul 2, 2024
9b2ebfa
fixes docs
Mayankm96 Jul 2, 2024
9081117
Merge branch 'main' into feature/deformable-spawn
Mayankm96 Jul 2, 2024
292f5b8
fixes ordering of code
Mayankm96 Jul 2, 2024
7021172
adds more docs for clarity
Mayankm96 Jul 2, 2024
b0062dc
adds some more docs
Mayankm96 Jul 2, 2024
c6a0a2f
fixes for removing the mass api
Mayankm96 Jul 2, 2024
edd1594
fixes to demo script to showcase cloning
Mayankm96 Jul 2, 2024
dfae7b4
fix instructions
Mayankm96 Jul 2, 2024
cf2d2d4
adjusts camera view for nice view
Mayankm96 Jul 2, 2024
16fb522
readds mass props
Mayankm96 Jul 3, 2024
26e3ef6
Merge branch 'main' into feature/deformable-spawn
Dhoeller19 Jul 4, 2024
0c45449
fix orbit references
Mayankm96 Jul 4, 2024
80239d9
Merge branch 'main' into feature/deformable-spawn
Mayankm96 Jul 5, 2024
7d6d359
adds rigid body props to mesh
Mayankm96 Jul 5, 2024
357d6c3
adds check for material specification
Mayankm96 Jul 5, 2024
7416247
fixes todo link
Mayankm96 Jul 5, 2024
346627d
adds proper collision approx for meshes
Mayankm96 Jul 5, 2024
75bd974
adds a check mesh script
Mayankm96 Jul 5, 2024
733d8e7
Merge branch 'main' into feature/deformable-spawn
Mayankm96 Jul 5, 2024
8d7ee08
Update source/extensions/omni.isaac.lab/omni/isaac/lab/sim/spawners/m…
Dhoeller19 Jul 12, 2024
3fdf9b2
Update source/extensions/omni.isaac.lab/omni/isaac/lab/sim/spawners/m…
Dhoeller19 Jul 12, 2024
97b99cb
Update source/extensions/omni.isaac.lab/omni/isaac/lab/sim/spawners/m…
Dhoeller19 Jul 12, 2024
2063af9
Merge branch 'main' into feature/deformable-spawn
Mayankm96 Jul 13, 2024
987b6c2
updates changelog
Mayankm96 Jul 13, 2024
93b25c3
add danger notice
Mayankm96 Jul 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/source/api/lab/omni.isaac.lab.sim.schemas.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
MassPropertiesCfg
JointDrivePropertiesCfg
FixedTendonPropertiesCfg
DeformableBodyPropertiesCfg

.. rubric:: Functions

Expand All @@ -29,6 +30,8 @@
modify_mass_properties
modify_joint_drive_properties
modify_fixed_tendon_properties
define_deformable_body_properties
modify_deformable_body_properties

Articulation Root
-----------------
Expand Down Expand Up @@ -88,3 +91,13 @@ Fixed Tendon
:exclude-members: __init__

.. autofunction:: modify_fixed_tendon_properties

Deformable Body
---------------

.. autoclass:: DeformableBodyPropertiesCfg
:members:
:exclude-members: __init__

.. autofunction:: define_deformable_body_properties
.. autofunction:: modify_deformable_body_properties
68 changes: 68 additions & 0 deletions docs/source/api/lab/omni.isaac.lab.sim.spawners.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
.. autosummary::

shapes
meshes
lights
sensors
from_files
Expand All @@ -19,6 +20,7 @@

SpawnerCfg
RigidObjectSpawnerCfg
DeformableObjectSpawnerCfg

Spawners
--------
Expand All @@ -32,6 +34,11 @@ Spawners
:show-inheritance:
:exclude-members: __init__

.. autoclass:: DeformableObjectSpawnerCfg
:members:
:show-inheritance:
:exclude-members: __init__

Shapes
------

Expand Down Expand Up @@ -87,6 +94,60 @@ Shapes
:show-inheritance:
:exclude-members: __init__, func

Meshes
------

.. automodule:: omni.isaac.lab.sim.spawners.meshes

.. rubric:: Classes

.. autosummary::

MeshCfg
MeshCapsuleCfg
MeshConeCfg
MeshCuboidCfg
MeshCylinderCfg
MeshSphereCfg

.. autoclass:: MeshCfg
:members:
:exclude-members: __init__, func

.. autofunction:: spawn_mesh_capsule

.. autoclass:: MeshCapsuleCfg
:members:
:show-inheritance:
:exclude-members: __init__, func

.. autofunction:: spawn_mesh_cone

.. autoclass:: MeshConeCfg
:members:
:show-inheritance:
:exclude-members: __init__, func

.. autofunction:: spawn_mesh_cuboid

.. autoclass:: MeshCuboidCfg
:members:
:show-inheritance:
:exclude-members: __init__, func

.. autofunction:: spawn_mesh_cylinder

.. autoclass:: MeshCylinderCfg
:members:
:show-inheritance:
:exclude-members: __init__, func

.. autofunction:: spawn_mesh_sphere

.. autoclass:: MeshSphereCfg
:members:
:show-inheritance:
:exclude-members: __init__, func

Lights
------
Expand Down Expand Up @@ -198,6 +259,7 @@ Materials
GlassMdlCfg
PhysicsMaterialCfg
RigidBodyMaterialCfg
DeformableBodyMaterialCfg

Visual Materials
~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -234,3 +296,9 @@ Physical Materials
.. autoclass:: RigidBodyMaterialCfg
:members:
:exclude-members: __init__, func

.. autofunction:: spawn_deformable_body_material

.. autoclass:: DeformableBodyMaterialCfg
:members:
:exclude-members: __init__, func
6 changes: 6 additions & 0 deletions docs/source/setup/sample.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ A few quick showroom scripts to run and checkout:

./isaaclab.sh -p source/standalone/demos/procedural_terrain.py

- Spawn different deformable (soft) bodies and let them fall from a height:

.. code:: bash

./isaaclab.sh -p source/standalone/demos/deformables.py

- Spawn multiple markers that are useful for visualizations:

.. code:: bash
Expand Down
13 changes: 11 additions & 2 deletions docs/source/tutorials/00_sim/spawn_prims.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Let's take a look at the Python script:

.. literalinclude:: ../../../../source/standalone/tutorials/00_sim/spawn_prims.py
:language: python
:emphasize-lines: 40-79, 91-92
:emphasize-lines: 40-88, 100-101
:linenos:


Expand Down Expand Up @@ -134,8 +134,17 @@ default to the default values set by USD Physics.
.. literalinclude:: ../../../../source/standalone/tutorials/00_sim/spawn_prims.py
:language: python
:start-at: # spawn a green cone with colliders and rigid body
:end-before: # spawn a usd file of a table into the scene
:end-before: # spawn a blue cuboid with deformable body

Lastly, we spawn a cuboid ``CuboidDeformable`` which contains deformable body physics properties. Unlike the
rigid body simulation, a deformable body can have relative motion between its vertices. This is useful for simulating
soft bodies like cloth, rubber, or jello. It is important to note that deformable bodies are only supported in
GPU simulation and require a mesh object to be spawned with the deformable body physics properties.

.. literalinclude:: ../../../../source/standalone/tutorials/00_sim/spawn_prims.py
:language: python
:start-at: # spawn a blue cuboid with deformable body
:end-before: # spawn a usd file of a table into the scene

Spawning from another file
--------------------------
Expand Down
2 changes: 1 addition & 1 deletion source/extensions/omni.isaac.lab/config/extension.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

# Note: Semantic Versioning is used: https://semver.org/
version = "0.19.2"
version = "0.19.3"

# Description
title = "Isaac Lab framework for Robot Learning"
Expand Down
15 changes: 14 additions & 1 deletion source/extensions/omni.isaac.lab/docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
Changelog
---------

0.19.3 (2024-07-13)
~~~~~~~~~~~~~~~~~~~

Added
^^^^^

* Added schemas for setting and modifying deformable body properties on a USD prim.
* Added API to spawn a deformable body material in the simulation.
* Added APIs to spawn rigid and deformable meshes of primitive shapes (cone, cylinder, sphere, box, capsule)
in the simulation. This is possible through the :mod:`omni.isaac.lab.sim.spawners.meshes` module.


0.19.2 (2024-07-05)
~~~~~~~~~~~~~~~~~~~

Changed
^^^^^^^

* Modified cloning scheme based on the attribute :attr:`~omni.isaac.lab.scene.InteractiveSceneCfg.replicate_physics` to determine whether environment is homogeneous or heterogeneous.
* Modified cloning scheme based on the attribute :attr:`~omni.isaac.lab.scene.InteractiveSceneCfg.replicate_physics`
to determine whether environment is homogeneous or heterogeneous.


0.19.1 (2024-07-05)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def _convert_asset(self, cfg: MeshConverterCfg):
# Apply collider properties to mesh
if cfg.collision_props is not None:
# -- Collision approximation to mesh
# TODO: https://github.com/isaac-orbit/orbit/issues/163 Move this to a new Schema
# TODO: Move this to a new Schema: https://github.com/isaac-orbit/IsaacLab/issues/163
mesh_collision_api = UsdPhysics.MeshCollisionAPI.Apply(child_mesh_prim)
mesh_collision_api.GetApproximationAttr().Set(cfg.collision_approximation)
# -- Collider properties such as offset, scale, etc.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,21 @@

Locally, the schemas are defined in the following files:

* ``_isaac_sim/kit/extsPhysics/omni.usd.schema.physics/plugins/UsdPhysics/resources/UsdPhysics/schema.usda``
* ``_isaac_sim/kit/extsPhysics/omni.usd.schema.physx/plugins/PhysxSchema/resources/PhysxSchema/schema.usda``
* ``_isaac_sim/extsPhysics/omni.usd.schema.physics/plugins/UsdPhysics/resources/UsdPhysics/schema.usda``
* ``_isaac_sim/extsPhysics/omni.usd.schema.physx/plugins/PhysxSchema/resources/generatedSchema.usda``

"""

from .schemas import (
activate_contact_sensors,
define_articulation_root_properties,
define_collision_properties,
define_deformable_body_properties,
define_mass_properties,
define_rigid_body_properties,
modify_articulation_root_properties,
modify_collision_properties,
modify_deformable_body_properties,
modify_fixed_tendon_properties,
modify_joint_drive_properties,
modify_mass_properties,
Expand All @@ -48,6 +50,7 @@
from .schemas_cfg import (
ArticulationRootPropertiesCfg,
CollisionPropertiesCfg,
DeformableBodyPropertiesCfg,
FixedTendonPropertiesCfg,
JointDrivePropertiesCfg,
MassPropertiesCfg,
Expand Down
Loading
Loading