Stores a recorded motion with a corresponding virtual model and real measurements.
More...
|
| virtual void | addSensor (SensorPtr sensor, float delta=0.0f, bool checkModel=true) |
| |
|
void | appendMotion (simox::xml::RapidXMLWrapperNodePtr root, const std::filesystem::path &path=std::string()) |
| |
|
void | attach (MotionObserver *obs) |
| |
| MotionPtr | clone (bool cloneSensors=true, const std::string &newName=std::string()) const |
| |
|
simox::xml::RapidXMLWrapperNodePtr | createMotionRoot () |
| |
|
void | detach (MotionObserver *obs) |
| |
|
bool | eraseSensorIfEqual (Sensor &sensor) |
| |
|
int | eraseSensors (const std::string &type) |
| |
|
void | extendKinematic () |
| | Extend kinematic and model pose sensors containing only a single measurement.
|
| |
|
std::vector< std::string > | getActuatedJointNames () |
| |
|
std::map< std::string, std::vector< std::string > > | getActuatedJointNamesBySensorName () |
| |
|
std::map< std::string, SensorMeasurementPtr > | getAllMeasurementsForTimeStep (float timestep) const |
| | Returns a map of the motion's sensor names pointing to their sensor measurement at the given timestep (if present).
|
| |
|
float | getCommonMaxTimestep (const std::set< std::string > &ignoreSensorNames=std::set< std::string >()) const |
| | Returns the common maximum timestep of all sensors' measurements. If no timesteps are found, returns 0.0f.
|
| |
|
float | getCommonMinTimestep (const std::set< std::string > &ignoreSensorNames=std::set< std::string >()) const |
| | Returns the common minimum timestep of all sensors' measurements. If no timesteps are found, returns 0.0f.
|
| |
|
std::map< std::string, float > | getJointAngleMap (float timestep) |
| |
|
Eigen::VectorXf | getJointAngles (float timestep) |
| |
|
std::map< std::string, Eigen::VectorXf > | getJointAnglesBySensorName (float timestep) |
| |
|
float | getMaxTimestep () const |
| | Returns the maximum timestep of all sensors' measurements. If no timesteps are found, returns 0.0f.
|
| |
|
float | getMinTimestep () const |
| | Returns the minimum timestep of all sensors' measurements. If no timesteps are found, returns 0.0f.
|
| |
| ModelPtr | getModel (bool processed=true) const |
| |
|
ModelPtr | getModelCloneWithVisualization (bool processed=true) const |
| |
|
ModelPtr | getModelCloneWithVisualizationThrow (bool processed=true) const |
| |
|
std::string | getModelFileName () const |
| |
|
std::filesystem::path | getModelFilePath () const |
| |
|
std::string | getModelName () const |
| |
| ModelProcessorPtr | getModelProcessor () const |
| |
|
ModelPtr | getModelThrow (bool processed=true) const |
| |
|
MotionType | getMotionType () const |
| |
|
std::string | getName () |
| |
| std::filesystem::path | getOriginFilePath () const |
| |
|
std::vector< SensorPtr > | getPrioritySortedSensorData () const |
| | Get Sensors sorted after their xml priority (descending order).
|
| |
|
bool | getReferencePose (Eigen::Matrix4f &referencePose, int &referenceAxis) |
| |
|
Eigen::Matrix4f | getRootPose (float timestep, bool extend=false) |
| |
|
MotionPtr | getSegmentMotion (float startTimestep, float endTimestep, bool changeTimestep=false) const |
| | get a segmented motion with name 'MOTIONNAME_segmented_STARTTIMESTEPf-ENDTIMESTEPf' according to timesteps.
|
| |
|
MotionPtr | getSegmentMotion (float startTimestep, float endTimestep, std::string segmentMotionName, bool changeTimestep=false) const |
| | get a segmented motion with the given name according to timesteps.
|
| |
|
SensorPtr | getSensor (SensorPtr sensor) const |
| | Returns a sensor in the motion having the same configuration.
|
| |
|
SensorPtr | getSensorByName (const std::string &name) const |
| | Returns the sensor with the given name in the sensor data map.
|
| |
|
template<typename S , typename std::enable_if< std::is_base_of< Sensor, S >::value >::type * = nullptr> |
| std::shared_ptr< S > | getSensorByType () const |
| | Returns the first sensor with the given sensor type (or nullptr) and cast it to a specific subclass sensor.
|
| |
|
SensorPtr | getSensorByType (const std::string &type) const |
| | Returns the first sensor with the given sensor type or nullptr.
|
| |
|
std::map< std::string, SensorPtr > | getSensorData () const |
| | Returns the sensor data as map.
|
| |
|
Sensor * | getSensorIfEqual (Sensor &sensor) |
| |
|
template<typename S , typename std::enable_if< std::is_base_of< Sensor, S >::value >::type * = nullptr> |
| std::vector< std::shared_ptr< S > > | getSensorsByType () const |
| | Returns all sensor with the given sensor type and cast them to the specific subclass sensor. Removes nullptr after cast.
|
| |
|
SensorList | getSensorsByType (const std::string &type) const |
| | Returns all sensor with the given sensor type.
|
| |
|
std::set< std::string > | getSensorTypes () const |
| | Returns all sensor types contained the motion.
|
| |
|
std::vector< float > | getTimesteps () |
| | Returns model pose or motion capture marker timesteps if available.
|
| |
|
simox::xml::RapidXMLWrapperNodePtr | getXML (const std::filesystem::path &path=std::string()) |
| |
|
bool | hasModelProcessor () const |
| | Returns wether the motion contains a model processor.
|
| |
|
bool | hasSameMaxTimestep () const |
| | Returns if the sensors in the motion have the same maximum timestep.
|
| |
|
bool | hasSameMinTimestep () const |
| | Returns if the sensors in the motion have the same minimum timestep.
|
| |
|
bool | hasSensor () const |
| | Returns true if the motion contains any sensor.
|
| |
|
bool | hasSensor (const std::string &type) const |
| | Returns true if the motion contains at least one sensor with the given type.
|
| |
|
void | initializeModel (ModelPtr model, float timestep, bool extend=false, bool update=true) |
| |
|
void | initializeModel (ModelPtr model, float timestep, float delta, bool extend=false, bool update=true) |
| |
|
bool | isMirrorSupported () |
| |
|
bool | isReferenceModelMotion () const |
| | Returns if the motion is based on the mmm reference model decided by the file name (mmm.xml)
|
| |
|
bool | isSubject () const |
| |
|
bool | isSynchronized () const |
| | Returns if the motion is synchronized.
|
| |
|
bool | mirrorMotion (const Eigen::Matrix4f &referencePose, int referenceAxis, bool ignoreNotSupported=false) |
| |
|
| Motion (const std::string &name, ModelPtr originalModel, ModelProcessorPtr modelProcessor=nullptr, const std::filesystem::path &originFilePath=std::string(), const std::filesystem::path &modelFilePath=std::string(), MotionType motionType=MotionType::UNKNOWN) |
| |
|
| Motion (const std::string &name, ModelPtr originalModel, ModelPtr processedModel, ModelProcessorPtr modelProcessor, const std::filesystem::path &originFilePath=std::string(), const std::filesystem::path &modelFilePath=std::string(), MotionType motionType=MotionType::UNKNOWN) |
| |
|
| Motion (const std::string &name, ProcessedModelWrapperPtr model=ProcessedModelWrapperPtr(new ProcessedModelWrapper()), const std::filesystem::path &originFilePath=std::string(), MotionType motionType=MotionType::UNKNOWN) |
| |
|
| Motion (MotionPtr motion) |
| |
| bool | operator< (MotionPtr m) const |
| |
|
bool | processModel (ModelProcessorPtr modelProcessor, ModelPtr optionalModel=nullptr) |
| |
|
bool | replaceSensorIfEqual (SensorPtr sensor) |
| |
|
void | saveXML (const std::filesystem::path &path, bool indent=true) |
| |
|
bool | scaleMotion (float targetHeight, bool shiftMotion, ModelPtr optionalModel=nullptr) |
| |
|
void | setMotionType (const std::string &type) |
| |
|
void | setMotionType (MotionType type) |
| |
| void | setMotionTypeFromModel () |
| |
|
void | setMotionTypeFromModelIfUnknown () |
| |
|
void | setName (const std::string &name) |
| |
| void | shiftMeasurements (float delta) |
| |
|
void | shiftMotion (const Eigen::Vector3f &positionDelta) |
| |
|
void | synchronizeSensorMeasurements (float timeFrequency) |
| | Synchronizes all possible sensormeasurements on a specific time frequency via linear interpolation. Removes all sensors, that are not linear interpolatable.
|
| |
|
void | synchronizeSensorMeasurements (float timeFrequency, float startTimestep, float endTimestep) |
| | Synchronizes all possible sensormeasurements on a specific time frequency via linear interpolation. Removes all sensors, that are not linear interpolatable.
|
| |
|
std::string | toXML (const std::filesystem::path &path=std::string(), bool indent=true) |
| |
Stores a recorded motion with a corresponding virtual model and real measurements.