A Python library for loading, visualizing, and interacting with URDF (Unified Robot Description Format) files using PyVista for 3D visualization.
- URDF Loading: Parse and load URDF files with full support for links, joints, materials, and geometries
- Interactive 3D Visualization: View URDF models using PyVista with real-time joint manipulation
- Joint Control: Interactive sliders for all actuated joints with proper limit handling
- Link Coloring: Color-code different links for better visualization
- Forward Kinematics: Real-time updates of robot configuration
- Scene Graph Support: Build visual and collision scene graphs
- Mesh Loading: Support for various 3D mesh formats (STL, OBJ, DAE, etc.)
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ urdf-pyvistapip install -e .- numpy
- trimesh
- pyvista
- lxml
- six
When using robot.show(), the viewer provides:
-
Mouse Controls:
- Left-click + drag: Rotate view
- Right-click + drag: Pan view
- Scroll wheel: Zoom in/out
-
Joint Sliders:
- Interactive sliders for each actuated joint
- Real-time updates of robot pose
- Automatic unit conversion (degrees for revolute joints)
- Reset button to return to zero configuration
-
Keyboard Shortcuts:
- 'r': Reset all joints to zero position
- revolute: Single-axis rotation with limits
- continuous: Single-axis rotation without limits
- prismatic: Single-axis translation with limits
- fixed: No movement (excluded from controls)
- floating: 6-DOF free movement
- planar: 2-DOF planar movement
urdf_pyvista.py # Main URDF parser and viewer
test_urdf_winder.py # Sample loading test (using cartesian winder machine model URDF sample file)
README.md # This file
pyproject.toml # Package configuration
import urdf_pyvista as up
# Load and display a simple robot
robot = up.URDF.load('winder_machine/winder_machine.urdf')
robot.show(color_by_link=True, sliders=True)This project is provided as-is for educational and research purposes.
