![]() |
RobWorkProject
25.2.11-
|
Enables loading in trajectories file specified in the RobWork Trajectory XML format. More...
#include <DOMTrajectoryLoader.hpp>
Classes | |
class | Initializer |
Utility class which initializes local static variables. More... | |
Public Types | |
enum | Type { QType = 0 , Vector3DType , Rotation3DType , Transform3DType } |
Enumeration specifying which type of trajectory, that has been loaded. More... | |
Public Member Functions | |
DOMTrajectoryLoader (const std::string &filename, const std::string &schemaFileName="") | |
Constructs DOMTrajectoryLoader and parser filename. More... | |
DOMTrajectoryLoader (std::istream &instream, const std::string &schemaFileName="") | |
Constract DOMTrajectoryLoader and parser input from instream. More... | |
virtual | ~DOMTrajectoryLoader () |
Destructor. | |
Type | getType () |
Returns the type of the trajectory loaded. | |
rw::trajectory::QTrajectory::Ptr | getQTrajectory () |
Returns trajectory with template type rw::math::Q. More... | |
rw::trajectory::Vector3DTrajectory::Ptr | getVector3DTrajectory () |
Returns trajectory with template type rw::math::Vector3D<> More... | |
rw::trajectory::Rotation3DTrajectory::Ptr | getRotation3DTrajectory () |
Returns trajectory with template type rw::math::Rotation3D<> More... | |
rw::trajectory::Transform3DTrajectory::Ptr | getTransform3DTrajectory () |
Returns trajectory with template type rw::math::Transform3D<> More... | |
Static Public Member Functions | |
static const std::string & | idQTrajectory () |
Identifier for rw::trajectory::Trajectory<rw::math::Q> in the XML format. More... | |
static const std::string & | idV3DTrajectory () |
Identifier for rw::trajectory::Trajectory<rw::math::Vector3D> in the XML format. More... | |
static const std::string & | idR3DTrajectory () |
Identifier for rw::trajectory::Trajectory<rw::math::Rotation3D> in the XML format. More... | |
static const std::string & | idT3DTrajectory () |
Identifier for rw::trajectory::Trajectory<rw::math::Transform3D> in the XML format. More... | |
static const std::string & | idQLinearInterpolator () |
Identifier for rw::trajectory::LinearInterpolator<rw::math::Q> in the XML format. More... | |
static const std::string & | idQCubicSplineInterpolator () |
Identifier for rw::trajectory::CubicSplineInterpolator<rw::math::Q> in the XML format. More... | |
static const std::string & | idV3DLinearInterpolator () |
Identifier for rw::trajectory::LinearInterpolator<rw::math::Vector3D> in the XML format. More... | |
static const std::string & | idV3DCubicSplineInterpolator () |
Identifier for rw::trajectory::CubicSplineInterpolator<rw::math::Vector3D<> > in the XML format. More... | |
static const std::string & | idV3DCircularInterpolator () |
Identifier for rw::trajectory::CircularInterpolator<rw::math::Vector3D<> > in the XML format. More... | |
static const std::string & | idR3DLinearInterpolator () |
Identifier for rw::trajectory::LinearInterpolator<rw::math::Rotation3D<> > in the XML format. More... | |
static const std::string & | idR3DCubicSplineInterpolator () |
Identifier for rw::trajectory::CubicSplineInterpolator<rw::math::Rotation3D<> > in the XML format. More... | |
static const std::string & | idT3DLinearInterpolator () |
Identifier for rw::trajectory::LinearInterpolator<rw::math::Transform3D<> > in the XML format. More... | |
static const std::string & | idT3DCubicSplineInterpolator () |
Identifier for rw::trajectory::CubicSplineInterpolator<rw::math::Transform3D<> > in the XML format. More... | |
static const std::string & | idParabolicBlend () |
Identifier for rw::trajectory::ParabolicBlend in the XML format. More... | |
static const std::string & | idLloydHaywardBlend () |
Identifier for rw::trajectory::LloydHaywardblend in the XML format. More... | |
static const std::string & | idDurationAttribute () |
Identifier for duration specification for interpolators. More... | |
static const std::string & | idStartTimeAttribute () |
Identifier for duration specification for interpolators. More... | |
static const std::string & | idTauAttribute () |
Identifier for the blend time tau used for blends. More... | |
static const std::string & | idKappaAttribute () |
Identifier for the parameter kappa used in LloydHayward blends. More... | |
Enables loading in trajectories file specified in the RobWork Trajectory XML format.
The DOMTrajectoryLoader loads in a file containing a trajectory specified according to the rwxml_trajectory.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 trajectory can contain either rw::math::Q, rw::math::Vector3D, rw::math::Rotation3D or rw::math::Transform3D elements. If the type of the trajectory in the file in unknown it can be determined using the DOMTrajectoryLoader::getType after loading.
If reading in a trajectory fails an exception is thrown
enum Type |
DOMTrajectoryLoader | ( | const std::string & | filename, |
const std::string & | schemaFileName = "" |
||
) |
Constructs DOMTrajectoryLoader 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 trajectory fails an exception is thrown
filename | [in] The file to load |
schemaFileName | [in] Name of the schema to use. If empty it will use the schema specified in the XML-file if available. |
DOMTrajectoryLoader | ( | std::istream & | instream, |
const std::string & | schemaFileName = "" |
||
) |
Constract DOMTrajectoryLoader 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.
If reading in the trajectory fails an exception is thrown
instream | [in] The istream to read from |
schemaFileName | [in] Name of the schema to use. If empty it will use the schema specified in the XML-file if available. |
rw::trajectory::QTrajectory::Ptr getQTrajectory | ( | ) |
Returns trajectory with template type rw::math::Q.
If the loaded path is not of type Transform3DPath it throws an exception.
rw::trajectory::Rotation3DTrajectory::Ptr getRotation3DTrajectory | ( | ) |
Returns trajectory with template type rw::math::Rotation3D<>
If the loaded path is not of type Transform3DPath it throws an exception.
rw::trajectory::Transform3DTrajectory::Ptr getTransform3DTrajectory | ( | ) |
Returns trajectory with template type rw::math::Transform3D<>
If the loaded path is not of type Transform3DPath it throws an exception.
rw::trajectory::Vector3DTrajectory::Ptr getVector3DTrajectory | ( | ) |
Returns trajectory with template type rw::math::Vector3D<>
If the loaded trajectory does not contain this type an exception is thrown.
|
static |
Identifier for duration specification for interpolators.
|
static |
Identifier for the parameter kappa used in LloydHayward blends.
|
static |
Identifier for rw::trajectory::LloydHaywardblend in the XML format.
|
static |
Identifier for rw::trajectory::ParabolicBlend in the XML format.
|
static |
Identifier for rw::trajectory::CubicSplineInterpolator<rw::math::Q> in the XML format.
|
static |
Identifier for rw::trajectory::LinearInterpolator<rw::math::Q> in the XML format.
|
static |
Identifier for rw::trajectory::Trajectory<rw::math::Q> in the XML format.
|
static |
Identifier for rw::trajectory::CubicSplineInterpolator<rw::math::Rotation3D<> > in the XML format.
|
static |
Identifier for rw::trajectory::LinearInterpolator<rw::math::Rotation3D<> > in the XML format.
|
static |
Identifier for rw::trajectory::Trajectory<rw::math::Rotation3D> in the XML format.
|
static |
Identifier for duration specification for interpolators.
|
static |
Identifier for rw::trajectory::CubicSplineInterpolator<rw::math::Transform3D<> > in the XML format.
|
static |
Identifier for rw::trajectory::LinearInterpolator<rw::math::Transform3D<> > in the XML format.
|
static |
Identifier for rw::trajectory::Trajectory<rw::math::Transform3D> in the XML format.
|
static |
Identifier for the blend time tau used for blends.
|
static |
Identifier for rw::trajectory::CircularInterpolator<rw::math::Vector3D<> > in the XML format.
|
static |
Identifier for rw::trajectory::CubicSplineInterpolator<rw::math::Vector3D<> > in the XML format.
|
static |
Identifier for rw::trajectory::LinearInterpolator<rw::math::Vector3D> in the XML format.
|
static |
Identifier for rw::trajectory::Trajectory<rw::math::Vector3D> in the XML format.