Skip to content

yvanblanchard/urdf_pyvista

Repository files navigation

URDF PyVista Viewer

A Python library for loading, visualizing, and interacting with URDF (Unified Robot Description Format) files using PyVista for 3D visualization.

alt text

Features

  • 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.)

Installation

From pip

pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ urdf-pyvista

From sources

pip install -e .

Dependencies

  • numpy
  • trimesh
  • pyvista
  • lxml
  • six

Interactive Controls

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

Supported Joint Types

  • 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

File Structure

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

Example

Basic Robot Loading

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)

License

This project is provided as-is for educational and research purposes.

About

URDF Kinematics Loader for PyVista

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages