myoconverter.xml.path_wraps.PathWrapSet
Contains the PathWrapSet parser.
@author: Aleksi Ikkala
Module Contents
Classes
This class parses and converts the OpenSim PathWrapSet XML element to MuJoCo. |
- class myoconverter.xml.path_wraps.PathWrapSet.PathWrapSet[source]
Bases:
myoconverter.xml.parsers.IParserThis class parses and converts the OpenSim PathWrapSet XML element to MuJoCo.
This class parses a whole PathWrapSet, unlike other parsers that parse individual objects of sets. This is because a single tendon may have multiple path wraps (over different wrapping objects), but we can wrap the MuJoCo tendon only wrt one wrapping object at a time. Hence, we wrap the MuJoCo tendon over the wrapping object that is closest.
In this parser the estimation of wrapping sites is very much based on heuristics. We calculate distances between tendons (or segments of tendons) and all applicable wrapping objects, and decide the wrapping sites based on those distances – if a segment (two consecutive sites) is close enough to a wrapping object, we add a wrapping site between those sites. Works only with stationary sites. Also, relies on the assumption that wrapping objects are always close to the tendons (distances are estimated when MuJoCo model is in default pose).