https://github.com/ami-iit/mujoco-urdf-loader

https://github.com/ami-iit/mujoco-urdf-loader

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.7%) to scientific vocabulary

Keywords from Contributors

automatic-differentiation jax rigid-body-dynamics lie-groups
Last synced: 11 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: ami-iit
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: main
  • Size: 200 KB
Statistics
  • Stars: 13
  • Watchers: 9
  • Forks: 0
  • Open Issues: 3
  • Releases: 0
Created about 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

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:

bash conda env create -f environment.yaml

Activate the environment before proceeding:

bash conda activate mujocoloaderenv

Then, install the package in editable mode:

bash 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:

  • generate_ergoCub_mjcf.py: Generates a complete MJCF model of the ErgoCub robot, including a floating base and position actuators for all joints (excluding hands, see note below).
  • generate_ergoCub_torso.py: Generates an MJCF model of the ErgoCub torso only, excluding the legs. Similar to the full model, it includes position actuators for all joints (excluding hands).
  • generate_ergoCub_hand.py: Generates an MJCF model of a single ErgoCub hand (right hand). This script specifically handles adding position servos only for actuated joints and uses equality constraints to simulate hand linkages (a technique also used in the other models). Additionally, it allows you to modify the thumb orientation.
  • generate_ergoCub_xml.py: Generates the MJCF model of a robot through the URDFtoMuJoCoLoader class, which takes as input the robot urdf, and controlled joints lists informations in the form of URDFtoMuJoCoLoaderCfg. The scripts also loades the model in a wrapper called MujocoWrapper that handles simple calls to get robot's pose and joints quantities.

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:

  • generator.py: Contains general-purpose functions for generating MJCF files, including the load_urdf_into_mjcf function.
  • hands_fcn.py: Contains functions specifically designed to handle hand models, which often require special considerations like linkages, different actuator gains, and joint damping.
  • mjcf_fcn.py: Provides functions for working with existing MJCF files, such as adding actuators and sensors.
  • urdf_fcn.py: Offers functions for manipulating URDF files, including stripping unnecessary parts and finding mesh locations.

Testing

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

Owner

  • Name: Artificial and Mechanical Intelligence
  • Login: ami-iit
  • Kind: organization
  • Location: Italy

GitHub Events

Total
  • Issues event: 1
  • Watch event: 6
  • Delete event: 5
  • Issue comment event: 9
  • Push event: 17
  • Pull request review comment event: 6
  • Pull request event: 10
  • Pull request review event: 12
  • Create event: 3
Last Year
  • Issues event: 1
  • Watch event: 6
  • Delete event: 5
  • Issue comment event: 9
  • Push event: 17
  • Pull request review comment event: 6
  • Pull request event: 10
  • Pull request review event: 12
  • Create event: 3

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 34
  • Total Committers: 4
  • Avg Commits per committer: 8.5
  • Development Distribution Score (DDS): 0.206
Past Year
  • Commits: 32
  • Committers: 3
  • Avg Commits per committer: 10.667
  • Development Distribution Score (DDS): 0.156
Top Committers
Name Email Commits
giulero g****o@g****m 27
Giulio Romualdi g****o 4
Silvio Traversaro s****o@t****t 2
Giovanni Fregonese g****t@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 3
  • Total pull requests: 11
  • Average time to close issues: N/A
  • Average time to close pull requests: 5 days
  • Total issue authors: 2
  • Total pull request authors: 4
  • Average comments per issue: 6.33
  • Average comments per pull request: 1.73
  • Merged pull requests: 8
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 7
  • Average time to close issues: N/A
  • Average time to close pull requests: 8 days
  • Issue authors: 1
  • Pull request authors: 3
  • Average comments per issue: 0.0
  • Average comments per pull request: 2.57
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • giotherobot (2)
  • traversaro (1)
Pull Request Authors
  • Giulero (4)
  • vpunithreddy (4)
  • giotherobot (4)
  • traversaro (2)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

pyproject.toml pypi
  • idyntree *
  • mujoco *
  • resolve-robotics-uri-py *
setup.py pypi
.github/workflows/test-pixi.yaml actions
  • actions/checkout v4 composite
  • prefix-dev/setup-pixi v0.8.1 composite
.github/workflows/update-pixi-lockfile.yaml actions
  • actions/checkout v4 composite
  • peter-evans/create-pull-request v6 composite
  • prefix-dev/setup-pixi v0.8.1 composite
environment.yaml conda
  • mujoco-python
  • mujoco-samples
  • mujoco-simulate
  • pytest
  • resolve-robotics-uri-py