timor.utilities.write_urdf

Functions

from_geometry(geometry, which, name[, link_frame])

Takes a Geometry and turns it into a URDF geometry

from_pin_inertia(i[, link_frame])

Takes a pin Inertia and returns a URDF <Inertial> element

Module Contents

timor.utilities.write_urdf.from_geometry(geometry, which, name, link_frame=Transformation.neutral().homogeneous)

Takes a Geometry and turns it into a URDF geometry

Parameters:
  • geometry (timor.Geometry.Geometry) – Geometry instance to transform

  • which (str) – Either <visual> or <collision>, decides which tag is used

  • name (str) – The name of the robot geometry

  • link_frame (numpy.ndarray) – The relative position of the body frame regarding the previous joint. URDF does not know the concept of a distinct body/link frame, so we have to change the positioning accordingly.

Return type:

xml.etree.ElementTree.Element

timor.utilities.write_urdf.from_pin_inertia(i, link_frame=Transformation.neutral())

Takes a pin Inertia and returns a URDF <Inertial> element

Parameters:
  • i (pinocchio.Inertia) – The original inertia data from a body

  • link_frame (numpy.ndarray) – The relative position of the body frame regarding the previous joint. URDF does not know the concept of a distinct body/link frame, so we have to change the positioning accordingly.