RobWorkProject  24.8.23-
Pose6D< T > Class Template Reference

A Pose6D $$\mathbf{x}\in \mathbb{R}^6$$ describes a position and orientation in 3-dimensions. More...

#include <Pose6D.hpp>

## Public Member Functions

Pose6D ()
Creates an "identity" Pose6D. Position is zero vector and orientation is zero vector.

Pose6D (T x, T y, T z, T kx, T ky, T kz)
Creates a Pose6D from 6 parameters. 3 defining the position and 3 defining the EAA orientation. More...

Pose6D (const rw::math::Vector3D< T > &v3d, const EAA< T > &eaa)
Creates a Pose6D from a Vector3D and a EAA. More...

Pose6D (const rw::math::Transform3D< T > &t3d)
Creates a Pose6D from a Transform3D. More...

get (size_t i) const
Returns the $$i$$'th element in the pose. More...

const rw::math::Vector3D< T > & getPos () const
Get the position. More...

rw::math::Vector3D< T > & getPos ()
Get the position. More...

const EAA< T > & getEAA () const
Get the orientation. More...

EAA< T > & getEAA ()
Get the orientation. More...

operator() (size_t i) const
Returns the $$i$$'th element in the pose. More...

T & operator() (size_t i)
Returns the $$i$$'th element in the pose. More...

operator[] (size_t i) const
Returns the $$i$$'th element in the pose. More...

T & operator[] (size_t i)
Returns the $$i$$'th element in the pose. More...

const rw::math::Transform3D< T > toTransform3D () const
Converts the Pose6D into the corresponding Transform3D. More...

## Related Functions

(Note that these are not member functions.)

template<>
void write (const rw::math::Pose6D< double > &sobject, rw::common::OutputArchive &oarchive, const std::string &id)

template<>
void write (const rw::math::Pose6D< float > &sobject, rw::common::OutputArchive &oarchive, const std::string &id)

template<>
void read (rw::math::Pose6D< double > &sobject, rw::common::InputArchive &iarchive, const std::string &id)

template<>
void read (rw::math::Pose6D< float > &sobject, rw::common::InputArchive &iarchive, const std::string &id)

## Detailed Description

### template<class T = double> class rw::math::Pose6D< T >

A Pose6D $$\mathbf{x}\in \mathbb{R}^6$$ describes a position and orientation in 3-dimensions.

$${\mathbf{x}} = \left[ \begin{array}{c} x \\ y \\ z \\ \theta k_x \\ \theta k_y \\ \theta k_z \end{array} \right]$$

where $$(x,y,z)$$ is the 3d position and $$(\theta k_x, \theta k_y, \theta k_z)$$ describes the orientation in equal angle axis (EAA) format.

## ◆ Pose6D() [1/3]

 Pose6D ( T x, T y, T z, T kx, T ky, T kz )
inline

Creates a Pose6D from 6 parameters. 3 defining the position and 3 defining the EAA orientation.

Parameters
 x [in] The position in the $$x$$ axis y [in] The position in the $$y$$ axis z [in] The position in the $$z$$ axis kx [in] $$\theta k_x$$ ky [in] $$\theta k_y$$ kz [in] $$\theta k_z$$

## ◆ Pose6D() [2/3]

 Pose6D ( const rw::math::Vector3D< T > & v3d, const EAA< T > & eaa )
inline

Creates a Pose6D from a Vector3D and a EAA.

Parameters
 v3d [in] Vector3D describing the 3D position of the Pose6D eaa [in] EAA describing the rotational component of the Pose6D.

## ◆ Pose6D() [3/3]

 Pose6D ( const rw::math::Transform3D< T > & t3d )
inlineexplicit

Creates a Pose6D from a Transform3D.

Parameters
 t3d [in] A Transform3D

## ◆ get()

 T get ( size_t i ) const
inline

Returns the $$i$$'th element in the pose.

$$i\in\{0,1,2\}$$ corresponds to $$\{x,y,z\}$$ respectively. $$i\in\{3,4,5\}$$ corresponds to the equivalent angle axis.

Parameters
 i [in] index to return
Returns
the $$i$$ in the index of the pose.

## ◆ getEAA() [1/2]

 EAA& getEAA ( )
inline

Get the orientation.

Returns
reference to orientation rotation vector.

## ◆ getEAA() [2/2]

 const EAA& getEAA ( ) const
inline

Get the orientation.

Returns
reference to orientation rotation vector.

## ◆ getPos() [1/2]

 rw::math::Vector3D& getPos ( )
inline

Get the position.

Returns
reference to position vector.

## ◆ getPos() [2/2]

 const rw::math::Vector3D& getPos ( ) const
inline

Get the position.

Returns
reference to position vector.

## ◆ operator()() [1/2]

 T& operator() ( size_t i )
inline

Returns the $$i$$'th element in the pose.

$$i\in\{0,1,2\}$$ corresponds to $$\{x,y,z\}$$ respectively. $$i\in\{3,4,5\}$$ corresponds to the equivalent angle axis.

Parameters
 i [in] index to return
Returns
the $$i$$'th index of the pose.

## ◆ operator()() [2/2]

 T operator() ( size_t i ) const
inline

Returns the $$i$$'th element in the pose.

$$i\in\{0,1,2\}$$ corresponds to $$\{x,y,z\}$$ respectively. $$i\in\{3,4,5\}$$ corresponds to the equivalent angle axis.

Parameters
 i [in] index to return
Returns
the $$i$$'th index of the pose.

## ◆ operator[]() [1/2]

 T& operator[] ( size_t i )
inline

Returns the $$i$$'th element in the pose.

$$i\in\{0,1,2\}$$ corresponds to $$\{x,y,z\}$$ respectively. $$i\in\{3,4,5\}$$ corresponds to the equivalent angle axis.

Parameters
 i [in] index to return
Returns
the $$i$$'th index of the pose.

## ◆ operator[]() [2/2]

 T operator[] ( size_t i ) const
inline

Returns the $$i$$'th element in the pose.

$$i\in\{0,1,2\}$$ corresponds to $$\{x,y,z\}$$ respectively. $$i\in\{3,4,5\}$$ corresponds to the equivalent angle axis.

Parameters
 i [in] index to return
Returns
the $$i$$'th index of the pose.

## ◆ toTransform3D()

 const rw::math::Transform3D toTransform3D ( ) const
inline

Converts the Pose6D into the corresponding Transform3D.

Returns
the corresponding Transform3D

## ◆ read() [1/2]

 void read ( rw::math::Pose6D< double > & sobject, rw::common::InputArchive & iarchive, const std::string & id )
related

Enable read-serialization of class T by overloading this method. Data is read from iarchive and filled into sobject.

Parameters
 sobject [out] the object in which the data should be streamed into iarchive [in] the InputArchive from which to read data. id [in] The id of the serialized sobject.
Note
the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.

## ◆ read() [2/2]

 void read ( rw::math::Pose6D< float > & sobject, rw::common::InputArchive & iarchive, const std::string & id )
related

Enable read-serialization of class T by overloading this method. Data is read from iarchive and filled into sobject.

Parameters
 sobject [out] the object in which the data should be streamed into iarchive [in] the InputArchive from which to read data. id [in] The id of the serialized sobject.
Note
the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.

## ◆ write() [1/2]

 void write ( const rw::math::Pose6D< double > & sobject, rw::common::OutputArchive & oarchive, const std::string & id )
related

Enable write-serialization of class T by overloading this method. Data is written to oarchive from the sobject.

Parameters
 sobject [in] the object from which the data should be streamed. oarchive [out] the OutputArchive in which data should be written. id [in] The id of the serialized sobject.
Note
the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.

## ◆ write() [2/2]

 void write ( const rw::math::Pose6D< float > & sobject, rw::common::OutputArchive & oarchive, const std::string & id )
related

Enable write-serialization of class T by overloading this method. Data is written to oarchive from the sobject.

Parameters
 sobject [in] the object from which the data should be streamed. oarchive [out] the OutputArchive in which data should be written. id [in] The id of the serialized sobject.
Note
the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.

The documentation for this class was generated from the following files: