robot_descriptions
raw JSON → 2.0.0 verified Sat May 09 auth: no python
Import open-source robot descriptions (URDF, MJCF, etc.) as Python modules. Provides a registry of 150+ robots with caching and loaders for various frameworks. Current version: 2.0.0 (requires Python >=3.10). Active development with frequent releases adding new descriptions.
pip install robot-descriptions Common errors
error ImportError: No module named 'robot_descriptions' ↓
cause The package is not installed or installed in a different environment.
fix
Run
pip install robot-descriptions in your active environment. error ModuleNotFoundError: No module named 'yourdfpy' ↓
cause The default URDF loader (yourdfpy) is missing, but you are trying to load a URDF description.
fix
Install yourdfpy:
pip install yourdfpy error ValueError: Unknown description: 'some_name' ↓
cause The description name does not exist in the registry (case-sensitive).
fix
Use
robot_descriptions.list_descriptions() to see available names. Warnings
breaking v2.0.0 changed the `Description` dataclass signature. Old code accessing `.name` or `.repository` as plain strings may break; now they are typed fields. Also, the `load_description` function now returns a loader callable, not the robot object directly. ↓
fix Update imports: use `from robot_descriptions import load_description` and call `load_fn()` to get the robot. For custom loaders, adjust to new `Description` fields (check `info` attribute).
deprecated The `load_robot` function (if any) is deprecated; use `load_description` instead. ↓
fix Replace `load_robot(...)` with `load_description(...)` and call the result.
gotcha Some descriptions require additional dependencies like `xacro` or `yourdfpy`. If you get an ImportError when loading, install the missing package. ↓
fix Install required loaders: `pip install yourdfpy xacro mujoco` as needed.
Imports
- robot_descriptions wrong
from robot_descriptions import <wrong_submodule>correctimport robot_descriptions - load_description wrong
from robot_descriptions.loaders import load_descriptioncorrectfrom robot_descriptions import load_description
Quickstart
import robot_descriptions
from robot_descriptions import load_description
# List available descriptions (returns list of Description objects)
descriptions = robot_descriptions.list_descriptions()
print(f"Available: {len(descriptions)} descriptions")
# Load a specific description by name (e.g., 'panda_mj_description')
load_fn = load_description('panda_mj_description')
# load_fn() returns a (robot, model, ...) tuple depending on loader
# For MuJoCo:
import mujoco
mj_model = load_fn() # returns mujoco.MjModel
print(f"Robot name: {mj_model.name}")
# For URDF:
# from robot_descriptions import panda_urdf_description
# load_fn = load_description('panda_urdf_description')
# robot = load_fn() # returns yourdfpy.URDF