myoconverter.xml.joints.Joint

Contains a higher level Joint parser.

@author: Aleksi Ikkala

Module Contents

Classes

Joint

A parent class to handle common parsing tasks for joints, like locking joints.

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

Bases: myoconverter.xml.parsers.IParser

A parent class to handle common parsing tasks for joints, like locking joints.

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

Joint-specific parsers must implement this method.

Child classes must implement this method. This is called from the ‘parse’ method below. Add any calculations / conversions that weren’t included in the default calculations / conversions below.

Parameters:
  • xml – OpenSim joint actuator 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

parse(xml, socket_parent_frame, socket_child_frame, pointer, root_body)[source]

This function handles general parsing and converting of joints.

Parameters:
  • xml – OpenSim joint actuator 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

  • root_body – A list of MuJoCo XML joints, a list of joint parameters

Returns:

None