A generic xml reader for motions in the mmm dataformat.
More...
#include <MotionReaderXML.h>
|
std::vector< std::filesystem::path > | getMotionPathsFromDirectory (const std::filesystem::path &directoryPath, bool recursive=true, const std::string ®ex=std::string(), unsigned int startIndex=0, bool printLog=false) |
|
std::vector< MotionRecordingPtr > | loadAllMotionRecordingsFromDirectory (const std::filesystem::path &directoryPath, bool recursive=false, unsigned int threads=1, const std::string ®ex="", int maxNumber=-1, unsigned int startIndex=0, bool printLog=false) |
|
std::vector< MotionRecordingPtr > | loadAllMotionRecordingsFromPaths (const std::vector< std::filesystem::path > &paths, unsigned int threads=1, int maxNumber=-1, bool printLog=false) |
|
MotionPtr | loadMotion (const std::string &xml, const std::string &motionName, bool xmlIsPath=true) |
|
MotionRecordingPtr | loadMotionRecording (const std::string &xml, bool xmlIsPath=true) |
|
| MotionReaderXML (bool convertLegacyMotions=true, bool mmmOnly=false, const std::vector< std::filesystem::path > &additionalLibPaths=std::vector< std::filesystem::path >(), bool loadUnknownSensors=true, bool ignoreStandardLibPaths=false) |
|
| MotionReaderXML (const std::map< std::string, std::shared_ptr< SensorFactory > > &sensorFactories, bool convertLegacyMotions=true, bool mmmOnly=false, bool loadUnknownSensors=true) |
|
void | setHandleMissingModelFile (const std::function< void(std::filesystem::path &)> &handleMissingModelFile) |
|
|
static std::filesystem::path | getStandardLibPath () |
|
|
static const std::string | VERSION = "2.0" |
|
|
void | error (const std::string &msg) |
|
MotionPtr | loadMotion (simox::xml::RapidXMLWrapperNodePtr motionNode, const std::filesystem::path &motionFilePath) |
|
MotionPtr | loadMotion (simox::xml::RapidXMLWrapperNodePtr motionNode, const std::string &version, const std::filesystem::path filePath) |
|
|
std::map< std::string, std::shared_ptr< SensorFactory > > | sensorFactories |
|
|
static const std::string | ERROR_MESSAGE = "Could not load motion file! " |
|
A generic xml reader for motions in the mmm dataformat.
◆ MotionReaderXML() [1/2]
MMM::MotionReaderXML::MotionReaderXML |
( |
bool |
convertLegacyMotions = true , |
|
|
bool |
mmmOnly = false , |
|
|
const std::vector< std::filesystem::path > & |
additionalLibPaths = std::vector<std::filesystem::path>() , |
|
|
bool |
loadUnknownSensors = true , |
|
|
bool |
ignoreStandardLibPaths = false |
|
) |
| |
- Parameters
-
additionalLibPaths | Paths to sensor plug-in folders. No need to include the standard folder. |
ignoreStandardLibPaths | Just use the given additional library Paths. |
mmmOnly | Only load motions with mmm reference model (mmm.xml) |
◆ MotionReaderXML() [2/2]
MMM::MotionReaderXML::MotionReaderXML |
( |
const std::map< std::string, std::shared_ptr< SensorFactory > > & |
sensorFactories, |
|
|
bool |
convertLegacyMotions = true , |
|
|
bool |
mmmOnly = false , |
|
|
bool |
loadUnknownSensors = true |
|
) |
| |
- Parameters
-
sensorFactories | The sensor factory plug-ins. |
mmmOnly | Only load motions with mmm reference model (mmm.xml) |
◆ loadMotion()
MotionPtr MMM::MotionReaderXML::loadMotion |
( |
const std::string & |
xml, |
|
|
const std::string & |
motionName, |
|
|
bool |
xmlIsPath = true |
|
) |
| |
Load a specific motion from an mmm dataformat xml document.
- Parameters
-
xml | An xml string or a path to an xml document. |
motionName | The name of the motion to load from the xml document. |
xmlIsPath | Xml parameter is a path or string. |
- Exceptions
-
XMLFormatException | When the mmm data format is not applicable. |
◆ loadMotionRecording()
MotionRecordingPtr MMM::MotionReaderXML::loadMotionRecording |
( |
const std::string & |
xml, |
|
|
bool |
xmlIsPath = true |
|
) |
| |
Load all motions from an mmm dataformat xml document.
- Parameters
-
xml | An xml string or a path to an xml document. |
xmlIsPath | Xml parameter is a path or string. |
- Exceptions
-
XMLFormatException | When the mmm data format is not applicable. |
The documentation for this class was generated from the following files:
- /builds/sw/mmm/core/MMM/Motion/MotionReaderXML.h
- /builds/sw/mmm/core/MMM/Motion/MotionReaderXML.cpp