ami-iit / mujoco-urdf-loader

BSD 3-Clause "New" or "Revised" License
8 stars 0 forks source link

mujoco-urdf-loader

This repository contains a collection of scripts for generating MuJoCo (MJCF) files from Unified Robot Description Format (URDF) files. The scripts are designed to work with the ergoCub robot.

Installation

A conda environment with minimal dependencies can be created using the environment.yaml file:

conda env create -f environment.yaml

Activate the environment before proceeding:

conda activate mujocoloaderenv

Then, install the package in editable mode:

pip install -e .

Note: To run the examples, you need to install ergocub-software to allow resolve_robotics_uri_py to find the original URDF files. This can be done by installing the ergocub-software conda package.

Examples

This repository includes Python scripts that demonstrate how to use the package to generate MJCF files for the ergoCub robot. The following examples are provided:

All examples load the package://ergoCub/robots/ergoCubSN001/model.urdf model, convert it to MJCF format, save the resulting file, and then display the model in a simple MuJoCo viewer window.

Codebase Structure

The codebase is organized into four main Python files:

Testing

A small and incomplete test suite is included and can be run using pytest.