![]() |
RobWorkProject
23.9.11-
|
Enables loading in path file specified in the RobWork Path XML format. More...
#include <XMLPathLoader.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... | |
Public Member Functions | |
| XMLPathLoader (const std::string &filename, rw::core::Ptr< rw::models::WorkCell > workcell=NULL, const std::string &schemaFileName="") | |
| Constructs XMLPathLoader and parser filename. More... | |
| XMLPathLoader (std::istream &instream, rw::core::Ptr< rw::models::WorkCell > workcell=NULL, const std::string &schemaFileName="") | |
| Constructs XMLPathLoader and parser input from instream. More... | |
| XMLPathLoader (xercesc::DOMElement *element) | |
| Constructs XMLPathLoader and load in path in element. More... | |
| virtual | ~XMLPathLoader () |
| Destructor. | |
| Type | getType () |
| Returns the type of the path loaded. | |
| rw::trajectory::QPath::Ptr | getQPath () |
| Returns path loaded. More... | |
| rw::trajectory::Vector3DPath::Ptr | getVector3DPath () |
| Returns path loaded. More... | |
| rw::trajectory::Rotation3DPath::Ptr | getRotation3DPath () |
| Returns path loaded. More... | |
| rw::trajectory::Transform3DPath::Ptr | getTransform3DPath () |
| Returns loaded path. More... | |
| rw::trajectory::StatePath::Ptr | getStatePath () |
| Returns loaded path. More... | |
| rw::trajectory::TimedQPath::Ptr | getTimedQPath () |
| Returns loaded path. More... | |
| rw::trajectory::TimedStatePath::Ptr | getTimedStatePath () |
| Returns loaded path. More... | |
Enables loading in path file specified in the RobWork Path XML format.
The XMLPathLoader 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 XMLPathLoader::getType after loading.
If reading in a path fails an exception is thrown
| enum Type |
| XMLPathLoader | ( | const std::string & | filename, |
| rw::core::Ptr< rw::models::WorkCell > | workcell = NULL, |
||
| const std::string & | schemaFileName = "" |
||
| ) |
Constructs XMLPathLoader 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. |
| XMLPathLoader | ( | std::istream & | instream, |
| rw::core::Ptr< rw::models::WorkCell > | workcell = NULL, |
||
| const std::string & | schemaFileName = "" |
||
| ) |
Constructs XMLPathLoader 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. |
| XMLPathLoader | ( | xercesc::DOMElement * | element | ) |
Constructs XMLPathLoader 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.