myoconverter.xml.joints.UniversalJoint

Contains the UniversalJoint parser.

@author: Aleksi Ikkala

Module Contents

Classes

UniversalJoint

This class parses and converts the OpenSim UniversalJoint XML element to MuJoCo.

class myoconverter.xml.joints.UniversalJoint.UniversalJoint[source]

Bases: myoconverter.xml.joints.Joint.Joint

This class parses and converts the OpenSim UniversalJoint XML element to MuJoCo.

_parse(xml, socket_parent_frame, socket_child_frame, pointer)[source]

This function handles the actual parsing and converting.

Parameters:
  • xml – OpenSim UniversalJoint XML element

  • socket_parent_frame – Parent frame socket

  • socket_child_frame – Child frame socket

  • pointer – A pointer to the MuJoCo XML file where this joint will be added

Returns:

A list of MuJoCo XML joints, a list of joint parameters

Raises:

RuntimeError: If incorrect number of Coordinates defined for this element