Skip to content

isaac-orbit/urdfpy

 
 

Repository files navigation

Urdfpy

Documentation Status Coverage Status PyPI version

Urdfpy is a simple and easy-to-use library for loading, manipulating, saving, and visualizing URDF files.

Extensive API documentation is provided here.

GIF of Viewer GIF of Viewer

Installation

You can install urdfpy directly from pip.

pip install urdfpy

User Guide

Please see the user guide here for more information.


Changelog

Compared to the public version of this repository, this fork makes the following changes:

  • Makes the joint velocity and effort tags optional. If these tags are missing, then default values are exported into the generated URDF. The default value can be altered through:
import urdfpy

urdfpy.JointLimit._DEFAULT_JOINT_VELOCITY = 80.0
urdfpy.JointLimit._DEFAULT_JOINT_EFFORT = 80.0
  • Makes exporting of the meshes when saving the URDF file option:
import urdfpy

urdfpy.Mesh._EXPORT_MESH = False
  • Adds ability to add the tag for SDF collision to all collision geometries in the URDF. This is used by simulators such as Isaac Gym:
from urdfpy import URDF, SignedDistanceField

# resolution for SDF baking
resolution = 256

robot = URDF.load(input_urdf_file)
# pass all links
for link in robot.links:
    for collision in link.collisions:
        collision.sdf = SignedDistanceField(resolution)
# save the file
output_urdf_file = os.path.join(os.path.dirname(input_urdf_file), output_name)
robot.save(output_urdf_file)

The generated URDF will have the additional tag <sdf>:

<collision>
  <origin xyz="..." rpy="..."/>
  <geometry>
    <mesh filename="..."/>
  </geometry>
  <sdf resolution="256"/>
</collision>

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%