https://github.com/hiroishida/mujoco-xml-editor
Utils for editing mujoco xml
https://github.com/hiroishida/mujoco-xml-editor
mujoco mujoco-python
Last synced: 4 months ago
JSON representation
Utils for editing mujoco xml
- Host: GitHub
- URL: https://github.com/hiroishida/mujoco-xml-editor
- Owner: HiroIshida
- License: mit
- Created: 2025-01-21T17:27:30.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-02-03T01:44:35.000Z (11 months ago)
- Last Synced: 2025-03-21T12:48:50.932Z (10 months ago)
- Topics: mujoco, mujoco-python
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## mujoco-xml-utils
Utilities for working with MuJoCo XML files.
Install with:
```bash
sudo apt-get update
sudo apt-get install libspatialindex-dev freeglut3-dev libsuitesparse-dev libblas-dev liblapack-dev
pip install .[examples] -v
```
Write mujoco xml as follows:
```python
hand_xml_path = Path(PACKAGE_PATH) / "2f85.xml"
editor = MujocoXmlEditor.load(hand_xml_path)
mesh_path = ycb_utils.resolve_path("019_pitcher_base")
editor.add_mesh(
mesh_path, "pitcher_base", convex_decomposition=True, pos=[0.3, 0, 0], euler=[0, 0, 2.3704]
)
editor.add_ground()
editor.add_sky()
editor.add_light()
editor.add_mocap("mocap", "base_mount") # base_mount is the root body of the robotiq hand
xmlstr = editor.to_string()
```