{"id":4864,"library":"yourdfpy","title":"yourdfpy","description":"yourdfpy is a Python library designed for simpler and easier loading, manipulation, saving, and visualization of URDF (Universal Robot Description Format) files. It is currently at version 0.0.60 and is actively maintained with frequent micro-releases addressing bug fixes and minor improvements.","status":"active","version":"0.0.60","language":"en","source_language":"en","source_url":"https://github.com/clemense/yourdfpy/","tags":["robotics","urdf","3d","visualization","kinematics","robot-description"],"install":[{"cmd":"pip install yourdfpy","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Core dependency for 3D geometry processing and mesh handling.","package":"trimesh","optional":false},{"reason":"Essential for numerical operations, especially with transformations and joint configurations.","package":"numpy","optional":false},{"reason":"Used as the default backend for interactive 3D visualization.","package":"pyglet","optional":false}],"imports":[{"note":"The primary class for loading and managing URDF models. Direct import is standard.","wrong":"import yourdfpy.URDF","symbol":"URDF","correct":"from yourdfpy import URDF"},{"note":"Function to convert a URDF object to a trimesh.Scene for advanced visualization or manipulation.","symbol":"urdf_to_scene","correct":"from yourdfpy.visualization import urdf_to_scene"}],"quickstart":{"code":"from yourdfpy import URDF, primitives\n\n# Create a simple demo URDF programmatically (e.g., a multi-link chain)\nrobot = primitives.create_urdf(joints=['prismatic', 'revolute', 'fixed'])\n\n# Alternatively, load from a file (replace 'path/to/robot.urdf' with your file)\n# from yourdfpy import URDF\n# robot = URDF.load('path/to/robot.urdf')\n\n# You can update joint configurations\nrobot.update_cfg({'prismatic_0': 0.5, 'revolute_1': 0.785}) # move prismatic joint by 0.5 and revolute by 45 degrees\n\n# Display the robot model in an interactive viewer\nrobot.show()\n\n# Access robot properties\nprint(f\"Robot name: {robot.name}\")\nprint(f\"Number of joints: {len(robot.joint_map)}\")\nprint(f\"Current configuration: {robot.config}\")","lang":"python","description":"This quickstart demonstrates how to load a simple URDF model (either programmatically or from a file), update its joint configuration, and visualize it using the built-in interactive viewer. Ensure you have a graphics environment capable of running pyglet for the `robot.show()` method."},"warnings":[{"fix":"Ensure your environment meets pyglet's graphical requirements. For headless environments, consider using `yourdfpy.visualization.urdf_to_scene` to get a `trimesh.Scene` object and render it with an alternative backend or export to an image.","message":"The interactive visualization (`.show()`) relies on `pyglet`, which may require specific OpenGL drivers or X server configurations, especially in headless environments or on certain operating systems (e.g., WSL, virtual machines).","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure your URDF file and its associated mesh files (e.g., .stl, .obj) are correctly placed relative to each other, or pass an absolute path to the URDF. For complex asset structures, consider implementing a custom `filename_handler` when loading the URDF (e.g., `URDF.load('robot.urdf', filename_handler=my_handler)`).","message":"When loading URDF files with relative paths to meshes or other assets, `yourdfpy` expects the assets to be resolvable relative to the URDF file's location or through a configured filename handler. Incorrect paths are a common source of 'mesh not found' errors.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Monitor release notes for each update. Pay close attention to changes involving numerical calculations (e.g., NumPy array handling, kinematics) and ensure your input data types align with expected arguments, especially for methods like `update_cfg`.","message":"The library is still in its `0.0.x` version series, indicating it's pre-1.0. While API stability is generally good, minor updates (`0.0.x` to `0.0.y`) could still introduce subtle behavior changes or require small adjustments, particularly concerning numerical precision or input data types.","severity":"gotcha","affected_versions":"All 0.0.x versions"},{"fix":"Always verify joint names in your URDF file or via `robot.joint_map.keys()` and ensure these exact strings are used as keys in the configuration dictionary passed to `update_cfg`.","message":"Passing joint configurations for `update_cfg` can be sensitive to the dictionary keys. It expects string keys that exactly match the joint names defined in the URDF. Mismatches will lead to joints not updating as expected.","severity":"gotcha","affected_versions":"All versions (specifically noted in v0.0.60 fix)"}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}