Whole-body human reference model and tools for unifying representations of whole-body human motion
Overview of important available methods in the MMMCore for motion manipulation.
The MMM::MotionReaderXML is used to read motions in the MMM dataformat. If the xml is not matching the MMM dataformat a corresponding exception is thrown.
Here is an example of reading multiple motions from a file:
The MMM::MotionWriterXML is used to write motions in the MMM dataformat.
Here is an example of writing multiple motions:
The method MMM::Motion::getSegmentMotion can be used to create a new motion in a specific time intervall from an already existing motion.
The method MMM::Motion::join can be used to join a motion with another motion's sensors. In this process sensors with the same configurations are also joined (see MMM::Sensor::join), others are just attached. Joining sensors with different measurements at the same specific timestep will result into an error returning a nullptr instead of a joined motion.
Adding new sensors to a motion can be difficult, because the recorded sensor data does not need to be synchronised. If the time difference of a motions' sensors is known the method MMM::Motion::addSensor has the possibility to synchronize the exisiting sensors in the motion and the newly added sensor by shifting their timesteps accordingly, see method MMM::Sensor::shiftMeasurements.
Having multiple different sensors and sensor types in a motion, these existing sensors do not need to specifiy their measurements on the same timestep or even a specific intervall. For example an IMU sensor can have measurements at timestep 0.0, 0.02, 0.06 and 0.1, while an kinematic sensor has his timesteps at 0.0, 0.05 and 0.1. Using the method MMM::Motion::synchronizeSensorMeasurements all these timesteps are interpolated (if possible) on a specific given time intervall. Given the intervall of 0.05 seconds the IMU sensor measurement will be interpolated, that the IMU sensor itself will contain measurements at timestep 0.0, 0.05 and 0.1. This is needed to import a motion into the robot editor.
Sensors contain seansor measurement data at specific timesteps. Therefore two different approaches getting not available sensor measurement data are implemented, see methods MMM::Sensor::getMeasurement: