Adds spawning utilities for different prim creation (#113)
# Description
This MR includes various utility functions for spawning different prims
in the stage. There are five types of prims one usually wants to spawn:
* **from files**: load an XForm prim from URDF/USD files
* **shapes**: create prims using USD API for primitive shapes (capsules,
cuboids, cones, etc.)
* **materials**: create visual or physics-based materials
* **lights**: create different types of light sources
* **sensors**: create prim for sensors using USD API (example: cameras)
The spawning functions spawn a single prim and clone the spawned prim
using a cloner decorator based on the regex resolution of the passed
prim path.
```python
import omni.isaac.orbit.sim as sim_utils
cfg = sim_utils.UsdFileCfg(usd_path=f"{ISAAC_ORBIT_NUCLEUS_DIR}/Robots/FrankaEmika/panda_instanceable.usd")
# spawns single prim
cfg.func("/World/Robot", cfg)
# spawns multile prim
cfg.func("/World/envs/env_.*/Robot", cfg)
```
## Type of change
- New feature (non-breaking change which adds functionality)
- This change requires a documentation update
## Checklist
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./orbit.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
---------
Signed-off-by:
Mayank Mittal <12863862+Mayankm96@users.noreply.github.com>
Co-authored-by:
jsmith-bdai <142246516+jsmith-bdai@users.noreply.github.com>
Showing
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment