myoconverter.xml.bodies.Body

Contains the Body parser.

@author: Aleksi Ikkala

Module Contents

Classes

Body

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

class myoconverter.xml.bodies.Body.Body[source]

Bases: myoconverter.xml.parsers.IParser

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

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

This function handles the actual parsing and converting.

Parameters:
  • xml – OpenSim Body XML element

  • socket_parent_frame – Socket parent frame of the Body

  • socket_child_frame – Socket child frame of the Body

  • current_body – Pointer to current body (XML element) in the MuJoCo XML file

  • root_body – Boolean to indicate whether this Body is the root of the whole model / kinematic chain

Returns:

Pointer to next body (XML element) in the MuJoCo XML file