urdf

package
v0.36.0-rc0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2024 License: AGPL-3.0 Imports: 11 Imported by: 1

Documentation

Overview

Package urdf provides functions which enable *.urdf files to be used within RDK

Index

Constants

View Source
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL