URDF
- class compas.files.URDF(xml=None)[source]
Bases:
object
Parse URDF files.
This class abstracts away the underlying XML of the Unified Robot Description Format (URDF) and represents its as an object graph.
- Attributes
xml (
XML
) – Instance of the XML reader/parser class.robot (object) – Root element of the URDF model, i.e. a robot instance.
References
A detailed description of the model is available on the URDF Model wiki. This package parses URDF v1.0 according to the URDF XSD Schema.
Methods
from_file
(source)Parse a URDF file from a file path or file-like object.
from_robot
(robot)from_string
(text)Parse URDF from a string.
read
(source)Parse a URDF file from a file path or file-like object.
to_file
([destination, prettify])Writes the string representation of this URDF instance, including all sub-elements, to the
destination
.to_string
([encoding, prettify])Generate a string representation of this URDF instance, including all sub-elements.
write
([destination, prettify])Writes the string representation of this URDF instance, including all sub-elements, to the
destination
.