Karlsruhe Institute of Technology (KIT) Logo

Master Motor Map

Whole-body human reference model and tools for unifying representations of whole-body human motion

[Legacy] MMM Data Format

The Legacy MMM data format is an obsolete XML-based format for storing model-based motions.

The format has been revised to provide easier extendability by using a plug-in-structure for motion sensor data (see MMM Data Format). It can still be used and also converted to the new format via MMMLegacyMotionConverter*.

Legacy MMM Motion Data Format

The main tag which encapsulates the MMM related motion data is <MMM> ... </MMM>. Within these tags a motion is addressed via the <Motion name='my name'> ... </Motion> XML structure. Inside a motion, several top level XML tags are available by default which can be extended in order to meet custom demands (see [Legacy] MMM Data Format Extension). The top level motion tags cover <Comments>, <JointOrder>, <Model> and <ModelProcessorConfig> tags.

The <Comments> tag

Custom text can be stored within the comments tag. Therefore the text must be encapsulated by <text> </text> tags.
Here is an example:

<Motion name = 'test'>
<Comments>
<text>First line of text</text>
<text>Second line of text</text>
</Comments>
</Motion>

The <Model> tag

The motion can be optionally linked to an MMM Model. Therefore the filename of the MMM Model can be specified here.
Here is an example:

<Motion name = 'test'>
<Model>
<File>/home/dev/models/Winter.xml</File>
</Model>
</Motion>

The <ModelProcessorConfig> tag

The model can be processed in order to change its parameters (see MMM Model Processor). This tag specifies a model processor and serves configuration paramters for it. The type attribute specifies which model processor has to be used. By using the factory layout, the corresponding model processor is automatically selected while loading the motion. Internally the motion loader uses this processor for processing the input model according to the given paramteres. Note that this tag is optional, i.e. without it the original model will be used for further processing.
Here is an example:

<Motion name = 'test'>
<ModelProcessorConfig type='Winter'>
<Height>1.7</Height>
<Mass>75</Mass>
</ModelProcessorConfig>
</Motion>

The <JointOrder> tag

The joint order is specified with the <JointOrder> tag. The joint order is later used to identify which joints are addressed by the MotionData information.
Here is an example:

<Motion name = 'test'>
<JointOrder>
<joint name='BTx_joint'/>
<joint name='BTy_joint'/>
<joint name='BTz_joint'/>
...
</JointOrder>
</Motion>

The <MotionFrames> tag

The motion of an MMM model is defined with the <MotionFrames> tag by specifying <MotionFrame> tags for discrete timesteps. A basic MotionFrame entry is filled with the following information:

Here is an example:

<MMM>
<Motion>
<JointOrder>
...
</JointOrder>
<MotionFrames>
<MotionFrame>
<Timestep>0</Timestep>
<RootPosition>61.6203 -582.555 855.711</RootPosition>
<RootRotation>-0.120688 0.0474702 -0.0781915</RootRotation>
<JointPosition>-0.217267 0.267692 -0.85853 0.718723 -0.795766 0.517872 -0.148897 0 0</JointPosition>
<JointVelocity>0 0 0 0 0 0 0 0 0</JointVelocity>
<JointAcceleration>0 0 0 0 0 0 0 0 0</JointAcceleration>
</MotionFrame>
<MotionFrame>
...
</MotionFrame>
...
</MotionFrames>
</Motion>
</MMM>

Accessing the Legacy MMM Motion Data

The MMMCore library offers several convenient methods to load motion data files. They can be loaded by using the MMM::LegacyMotionReaderXML utility class.

// instaciate a motion reader
MMM::LegacyMotionReaderXMLPtr motionReader(new MMM::LegacyMotionReaderXML());
// get all motion names from file
std::vector<std::string> motions = motionReader->getMotionNames("motion.xml");
// load first motion
if (motions.size()>0)
{
MMM::LegacyMotionPtr motion = motionReader->loadMotion("motion.xml",motions[0]);
// get the associated model (this is the processed model)
MMM::ModelPtr mmmModel = motion->getModel();
// get names of the involved joints
std::vector<std::string> jointNames = motion->getJointNames();
//access first motion frame
MMM::MotionFramePtr motionFrame = motion->getMotionFrame(0);
// access the root pose of this motion frame
Eigen::Matrix4f rootPose = motionFrame->getRootPose();
}
KoroiBot Logo WALK-MAN Logo Xperience Logo SecondHands Logo TimeStorm Logo I-SUPPORT Logo
PACO-PLUS Logo SFB-588 Logo SPP1527 Logo