Documentation ¶
Overview ¶
Package urdf provides functions which enable *.urdf files to be used within RDK
Index ¶
Constants ¶
const Extension string = "urdf"
Extension is the file extension associated with URDF files.
Variables ¶
This section is empty.
Functions ¶
func ParseModelXMLFile ¶
func ParseModelXMLFile(filename, modelName string) (referenceframe.Model, error)
ParseModelXMLFile will read a given file and parse the contained URDF XML data into an equivalent Model.
func UnmarshalModelXML ¶
func UnmarshalModelXML(xmlData []byte, modelName string) (*referenceframe.ModelConfig, error)
UnmarshalModelXML will transfer the given URDF XML data into an equivalent ModelConfig. Direct unmarshaling in the same fashion as ModelJSON is not possible, as URDF data will need to be evaluated to accommodate differences between the two kinematics encoding schemes.
Types ¶
type ModelConfig ¶
type ModelConfig struct { XMLName xml.Name `xml:"robot"` Name string `xml:"name,attr"` Links []link `xml:"link"` Joints []joint `xml:"joint"` }
ModelConfig represents all supported fields in a Universal Robot Description Format (URDF) file.
func NewModelFromWorldState ¶
func NewModelFromWorldState(ws *referenceframe.WorldState, name string) (*ModelConfig, error)
NewModelFromWorldState creates a urdf.Config struct which can be marshalled into xml and will be a valid .urdf file representing the geometries in the given worldstate.