octomap 1.9.8
Loading...
Searching...
No Matches
octomath::Pose6D Class Reference

This class represents a tree-dimensional pose of an object. More...

#include <Pose6D.h>

Collaboration diagram for octomath::Pose6D:

Public Member Functions

double distance (const Pose6D &other) const
 Translational distance.
Pose6D inv () const
 Inversion.
Pose6Dinv_IP ()
 Inversion.
bool operator!= (const Pose6D &other) const
Pose6D operator* (const Pose6D &p) const
 Concatenation.
const Pose6Doperator*= (const Pose6D &p)
 In place concatenation.
Pose6Doperator= (const Pose6D &other)
bool operator== (const Pose6D &other) const
double pitch () const
 Pose6D ()
 Pose6D (const Pose6D &other)
 Pose6D (const Vector3 &trans, const Quaternion &rot)
 Constructor.
 Pose6D (float x, float y, float z, double roll, double pitch, double yaw)
 Constructor.
std::istream & read (std::istream &s)
 Input operator.
std::istream & readBinary (std::istream &s)
 Binary input operator.
double roll () const
Quaternionrot ()
 Rotational component.
const Quaternionrot () const
 Rotational component.
Vector3trans ()
 Translational component.
const Vector3trans () const
 Translational component.
Vector3 transform (const Vector3 &v) const
 Transformation of a vector.
double transLength () const
 Translational length.
std::ostream & write (std::ostream &s) const
 Output operator.
std::ostream & writeBinary (std::ostream &s) const
 Binary output operator.
float & x ()
const float & x () const
float & y ()
const float & y () const
double yaw () const
float & z ()
const float & z () const
 ~Pose6D ()

Protected Attributes

Quaternion rotation
Vector3 translation

Detailed Description

This class represents a tree-dimensional pose of an object.

The tree-dimensional pose is represented by a three-dimensional translation vector representing the position of the object and a Quaternion representing the attitude of the object

Constructor & Destructor Documentation

◆ Pose6D() [1/4]

octomath::Pose6D::Pose6D ( )

◆ ~Pose6D()

octomath::Pose6D::~Pose6D ( )

◆ Pose6D() [2/4]

octomath::Pose6D::Pose6D ( const Vector3 & trans,
const Quaternion & rot )

Constructor.

Constructs a pose from given translation and rotation.

References rot(), rotation, trans(), and translation.

◆ Pose6D() [3/4]

octomath::Pose6D::Pose6D ( float x,
float y,
float z,
double roll,
double pitch,
double yaw )

Constructor.

Constructs a pose from a translation represented by its x, y, z-values and a rotation represented by its Tait-Bryan angles roll, pitch, and yaw

References pitch(), roll(), rotation, translation, x(), y(), yaw(), and z().

◆ Pose6D() [4/4]

octomath::Pose6D::Pose6D ( const Pose6D & other)

References Pose6D(), rot(), rotation, trans(), and translation.

Member Function Documentation

◆ distance()

double octomath::Pose6D::distance ( const Pose6D & other) const

Translational distance.

Returns
the translational (euclidian) distance to p

References Pose6D(), x(), y(), and z().

◆ inv()

Pose6D octomath::Pose6D::inv ( ) const

Inversion.

Inverts the coordinate transformation represented by this pose

Returns
a copy of this pose inverted

References octomath::Quaternion::inv(), octomath::Quaternion::normalized(), Pose6D(), rot(), octomath::Quaternion::rotate(), and trans().

Referenced by octomap::ScanGraph::addEdge(), octomap::ScanGraph::crop(), octomap::OccupancyOcTreeBase< NODE >::insertPointCloud(), and main().

◆ inv_IP()

Pose6D & octomath::Pose6D::inv_IP ( )

Inversion.

Inverts the coordinate transformation represented by this pose

Returns
a reference to this pose

References octomath::Quaternion::inv(), octomath::Quaternion::normalized(), Pose6D(), rot(), octomath::Quaternion::rotate(), and trans().

◆ operator!=()

bool octomath::Pose6D::operator!= ( const Pose6D & other) const

References Pose6D().

◆ operator*()

Pose6D octomath::Pose6D::operator* ( const Pose6D & p) const

Concatenation.

Concatenates the coordinate transformations represented by this and p.

Returns
this * p (applies first this, then p)

References octomath::Quaternion::normalized(), Pose6D(), rot(), rotation, and trans().

◆ operator*=()

const Pose6D & octomath::Pose6D::operator*= ( const Pose6D & p)

In place concatenation.

Concatenates p to this Pose6D.

Returns
this which results from first moving by this and afterwards by p

References Pose6D(), rot(), rotation, and trans().

◆ operator=()

Pose6D & octomath::Pose6D::operator= ( const Pose6D & other)

References Pose6D(), rot(), rotation, trans(), and translation.

◆ operator==()

bool octomath::Pose6D::operator== ( const Pose6D & other) const

References Pose6D(), rotation, and translation.

◆ pitch()

double octomath::Pose6D::pitch ( ) const
inline

◆ read()

std::istream & octomath::Pose6D::read ( std::istream & s)

Input operator.

Parsing from stream which was written by write().

References rotation, and translation.

◆ readBinary()

std::istream & octomath::Pose6D::readBinary ( std::istream & s)

Binary input operator.

Parsing from binary stream which was written by writeBinary().

References rotation, and translation.

◆ roll()

double octomath::Pose6D::roll ( ) const
inline

◆ rot() [1/2]

Quaternion & octomath::Pose6D::rot ( )
inline

Rotational component.

Returns
the rotational component of this pose

References rotation.

Referenced by inv(), inv_IP(), operator*(), operator*=(), octomath::operator<<(), operator=(), Pose6D(), Pose6D(), and transform().

◆ rot() [2/2]

const Quaternion & octomath::Pose6D::rot ( ) const
inline

Rotational component.

Returns
the rotational component of this pose

References rotation.

◆ trans() [1/2]

Vector3 & octomath::Pose6D::trans ( )
inline

Translational component.

Returns
the translational component of this pose

References translation.

Referenced by octomap::OccupancyOcTreeBase< NODE >::insertPointCloud(), inv(), inv_IP(), main(), operator*(), operator*=(), operator=(), Pose6D(), Pose6D(), and transform().

◆ trans() [2/2]

const Vector3 & octomath::Pose6D::trans ( ) const
inline

Translational component.

Returns
the translational component of this pose

References translation.

◆ transform()

Vector3 octomath::Pose6D::transform ( const Vector3 & v) const

Transformation of a vector.

Transforms the vector v by the transformation which is specified by this.

Returns
the vector which is translated by the translation of this and afterwards rotated by the rotation of this.

References rot(), octomath::Quaternion::rotate(), and trans().

Referenced by octomap::OccupancyOcTreeBase< NODE >::insertPointCloud(), octomap::OccupancyOcTreeBase< NODE >::insertPointCloud(), main(), and octomap::Pointcloud::transformAbsolute().

◆ transLength()

double octomath::Pose6D::transLength ( ) const

Translational length.

Returns
the translational (euclidian) length of the translation vector of this Pose6D

References x(), y(), and z().

◆ write()

std::ostream & octomath::Pose6D::write ( std::ostream & s) const

Output operator.

Output to stream in a format which can be parsed using read().

References rotation, and translation.

◆ writeBinary()

std::ostream & octomath::Pose6D::writeBinary ( std::ostream & s) const

Binary output operator.

Output to stream in a binary format which can be parsed using readBinary().

References rotation, and translation.

◆ x() [1/2]

float & octomath::Pose6D::x ( )
inline

◆ x() [2/2]

const float & octomath::Pose6D::x ( ) const
inline

References translation.

◆ y() [1/2]

float & octomath::Pose6D::y ( )
inline

◆ y() [2/2]

const float & octomath::Pose6D::y ( ) const
inline

References translation.

◆ yaw()

double octomath::Pose6D::yaw ( ) const
inline

◆ z() [1/2]

float & octomath::Pose6D::z ( )
inline

◆ z() [2/2]

const float & octomath::Pose6D::z ( ) const
inline

References translation.

Field Documentation

◆ rotation

◆ translation

Vector3 octomath::Pose6D::translation
protected

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