myoconverter.xml.path_points.MovingPathPoint

Contains the MovingPathPoint parser.

@author: Aleksi Ikkala

Module Contents

Classes

MovingPathPoint

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

class myoconverter.xml.path_points.MovingPathPoint.MovingPathPoint[source]

Bases: myoconverter.xml.parsers.IParser

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

parse(xml, tendon, force_name, dependencies=None, **kwargs)[source]

This function handles the actual parsing and converting.

Parameters:
  • xml – OpenSim MovingPathPoint XML element

  • tendon – MuJoCo tendon/spatial XML element

  • force_name – Name of the actuator this path point belongs to

  • dependencies – A dict containing joint-wise dependency info (used by ConditionalPathPoints)

  • kwargs – Optional keyword arguments

Returns:

None

_add_joint(new_body, name, joint, polycoef, range, axis)[source]

Add (imaginary) joint to MuJoCo XML file.

Parameters:
  • new_body – MuJoCo body XML element

  • name – Name of joint

  • joint – Name of independent joint

  • polycoef – Quartic function to describe how this joint moves wrt to joint

  • range – Range of movement

  • axis – Axis of joint

Returns:

None

_small_range(vec)[source]

Check whether the range is very small.

Parameters:

vec – Two element vector describing a range

Returns:

Boolean indicating whether the range is very small – less than one millimeter (< 0.001)