RobWorkProject
24.12.4-
|
Enables loading in path file specified in the RobWork Path XML format. More...
#include <DOMPathLoader.hpp>
Classes | |
class | Initializer |
Utility class which initializes local static variables. More... | |
Public Types | |
enum | Type { QType = 0 , Vector3DType , Rotation3DType , Transform3DType , StateType , TimedQType , TimedStateType } |
Enumeration specifying which type of path, that has been loaded. More... | |
Static Public Member Functions | |
static const std::string & | idQPath () |
Identifier for rw::trajectory::QPath in the XML format. More... | |
static const std::string & | idV3DPath () |
Identifier for rw::trajectory::Vector3DPath in the XML format. More... | |
static const std::string & | idR3DPath () |
Identifier for rw::trajectory::Rotation3DPath in the XML format. More... | |
static const std::string & | idT3DPath () |
Identifier for rw::trajectory::Transform3DPath in the XML format. More... | |
static const std::string & | idStatePath () |
Identifier for rw::trajectory::StatePath in the XML format. More... | |
static const std::string & | idTimedQPath () |
Identifier for rw::trajectory::TimedQPath in the XML format. More... | |
static const std::string & | idTimedState () |
Identifier for rw::trajectory::TimedState in the XML format. More... | |
static const std::string & | idTimedQ () |
Identifier for rw::trajectory::TimedQ in the XML format. More... | |
static const std::string & | idTimedStatePath () |
Identifier for rw::trajectory::TimedStatePath in the XML format. More... | |
static const std::string & | idTime () |
Identifier for time attribute used for rw::trajectory::TimedQPath and rw::trajectory::TimedStatePath in the XML format. More... | |
Enables loading in path file specified in the RobWork Path XML format.
The DOMPathLoader loads in a file containing a path specified according to the rwxml_path.xsd schema. The XML-file can be parsed either with or without schema verification. The schema can either be specified in the XML-file or given as argument to the constructor.
A path can contain either rw::math::Q, rw::math::Vector3D, rw::math::Rotation3D or rw::math::Transform3D elements. If the type of the path in the file in unknown it can be determined using the DOMPathLoader::getType after loading.
If reading in a path fails an exception is thrown
enum Type |
DOMPathLoader | ( | const std::string & | filename, |
rw::core::Ptr< rw::models::WorkCell > | workcell = NULL , |
||
const std::string & | schemaFileName = "" |
||
) |
Constructs DOMPathLoader and parser filename.
It is possible to specify whether to use the default schema which is the default behavior. If a schema is specified in the XML-file or no schema should be used set useDefaultSchema to false.
If reading in the path fails an exception is thrown
filename | [in] The file to load |
workcell | documentation missing ! |
schemaFileName | [in] Name of the schema to use. If empty it will use the schema specified in the XML-file if available. |
DOMPathLoader | ( | std::istream & | instream, |
rw::core::Ptr< rw::models::WorkCell > | workcell = NULL , |
||
const std::string & | schemaFileName = "" |
||
) |
Constructs DOMPathLoader and parser input from instream.
It is possible to specify whether to use the default schema which is the default behavior. If a schema is specified in the XML-file or no schema should be used set useDefaultSchema to false.
Throw rw::core::Exception if reading the path fails
instream | [in] The input stream to read from |
workcell | documentation missing ! |
schemaFileName | [in] Name of the schema to use. If empty it will use the schema specified in the XML-file if available. |
DOMPathLoader | ( | rw::core::Ptr< rw::core::DOMElem > | element | ) |
Constructs DOMPathLoader and load in path in element.
No validation is applied hence the syntax of the element is assumed correct.
If loading the path fails an exception is thrown
element | [in] DOMElement representing the path |
rw::trajectory::QPath::Ptr getQPath | ( | ) |
Returns path loaded.
If the loaded path is not of type QPath a rw::core::Exception is thrown.
rw::trajectory::Rotation3DPath::Ptr getRotation3DPath | ( | ) |
Returns path loaded.
If the loaded path is not of type Rotation3DPath a rw::core::Exception is thrown.
rw::trajectory::StatePath::Ptr getStatePath | ( | ) |
Returns loaded path.
If the loaded path is not of type StatePath a rw::core::Exception is thrown.
rw::trajectory::TimedQPath::Ptr getTimedQPath | ( | ) |
Returns loaded path.
If the loaded path is not of type TimedQPath a rw::core::Exception is thrown.
rw::trajectory::TimedStatePath::Ptr getTimedStatePath | ( | ) |
Returns loaded path.
If the loaded path is not of type TimedStatePath a rw::core::Exception is thrown.
rw::trajectory::Transform3DPath::Ptr getTransform3DPath | ( | ) |
Returns loaded path.
If the loaded path is not of type Transform3DPatha rw::core::Exception is thrown.
rw::trajectory::Vector3DPath::Ptr getVector3DPath | ( | ) |
Returns path loaded.
If the loaded path is not of type Vector3DPath a rw::core::Exception is thrown.
|
static |
Identifier for rw::trajectory::QPath in the XML format.
|
static |
Identifier for rw::trajectory::Rotation3DPath in the XML format.
|
static |
Identifier for rw::trajectory::StatePath in the XML format.
|
static |
Identifier for rw::trajectory::Transform3DPath in the XML format.
|
static |
Identifier for time attribute used for rw::trajectory::TimedQPath and rw::trajectory::TimedStatePath in the XML format.
|
static |
Identifier for rw::trajectory::TimedQ in the XML format.
|
static |
Identifier for rw::trajectory::TimedQPath in the XML format.
|
static |
Identifier for rw::trajectory::TimedState in the XML format.
|
static |
Identifier for rw::trajectory::TimedStatePath in the XML format.
|
static |
Identifier for rw::trajectory::Vector3DPath in the XML format.