Skip to main content

Minimal script to convert MuJoCo MJCF robot model files to URDF files usable in ROS

Project description

mjcf_urdf_simple_converter

A minimal and simple script to convert limited elements of MJCF (MuJoCo modeling format) robot model files to URDF. Developed from a need to visualize MJCF robots in ROS environments like Rviz, it only converts a limited subset of the robot model elements to URDF. I do not intend to expand this into a full-fledged transclation script from MJCF to URDF.

usage

from mjcf_urdf_simple_converter import convert
convert("model.xml", "model.urdf")

This converts the model.xml (and any associated MJCF files loaded from within model.xml) to model.urdf. Mesh geoms are also converted to STL files, and saved to converted_*.stl files within the same directory. The converted files can be checked in Rviz, or online tools like https://gkjohnson.github.io/urdf-loaders/javascript/example/bundle/index.html .

what are converted

what are NOT converted

TODOs

  • support multiple geoms in one body

comments

  • A similar tool exists to convert from MJCF to URDF (mjcf2urdf), but the pybullet import that it uses did not work for our case so this tool was created.
  • for converting from URDF to MJCF, the ./compile program bundled with standard MuJoCo installations can be used.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mjcf_urdf_simple_converter-0.1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

mjcf_urdf_simple_converter-0.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file mjcf_urdf_simple_converter-0.1.tar.gz.

File metadata

File hashes

Hashes for mjcf_urdf_simple_converter-0.1.tar.gz
Algorithm Hash digest
SHA256 251088d803c3a528f0b66c9d32339c40ec8d495dd8f73c46bb8a7512010cd012
MD5 92a535c006fe19ff5b59df015e1eac5c
BLAKE2b-256 f74b0b860e2a8a59e1ee6d34fcd533f67ff3ab66d06292d0964f4960a6daef2b

See more details on using hashes here.

File details

Details for the file mjcf_urdf_simple_converter-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mjcf_urdf_simple_converter-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c6198eac53c8d914389759f06ae1bc389f0f4ad00d65d44fce7036bde24760d5
MD5 d3cba5a8a2785abfaf3c3d222f77593b
BLAKE2b-256 80f88703df9391c69ea5f686a9bb10e029ae687248ba1fe7f6c4ba8b7d65bb5e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page