octomap 1.5.0
|
This class represents a tree-dimensional pose of an object. More...
Public Member Functions | |
double | distance (const Pose6D &other) const |
Translational distance. | |
Pose6D | inv () const |
Inversion. | |
Pose6D & | inv_IP () |
Inversion. | |
bool | operator!= (const Pose6D &other) const |
Pose6D | operator* (const Pose6D &p) const |
Concatenation. | |
const Pose6D & | operator*= (const Pose6D &p) |
In place concatenation. | |
Pose6D & | operator= (const Pose6D &other) |
bool | operator== (const Pose6D &other) const |
double | pitch () const |
Pose6D () | |
Pose6D (float x, float y, float z, double roll, double pitch, double yaw) | |
Constructor. | |
Pose6D (const Vector3 &trans, const Quaternion &rot) | |
Constructor. | |
std::istream & | read (std::istream &s) |
Input operator. | |
std::istream & | readBinary (std::istream &s) |
Binary input operator. | |
double | roll () const |
Quaternion & | rot () |
Rotational component. | |
const Quaternion & | rot () const |
Rotational component. | |
Vector3 & | trans () |
Translational component. | |
const Vector3 & | trans () 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. | |
const float & | x () const |
float & | x () |
const float & | y () const |
float & | y () |
double | yaw () const |
const float & | z () const |
float & | z () |
~Pose6D () | |
Protected Attributes | |
Quaternion | rotation |
Vector3 | translation |
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
octomath::Pose6D::Pose6D | ( | ) |
Referenced by operator*().
octomath::Pose6D::~Pose6D | ( | ) |
octomath::Pose6D::Pose6D | ( | const Vector3 & | trans, |
const Quaternion & | rot | ||
) |
Constructor.
Constructs a pose from given translation and rotation.
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
double octomath::Pose6D::distance | ( | const Pose6D & | other | ) | const |
Pose6D octomath::Pose6D::inv | ( | ) | const |
Inversion.
Inverts the coordinate transformation represented by this pose
References octomath::Quaternion::inv(), octomath::Quaternion::normalized(), rot(), octomath::Quaternion::rotate(), and trans().
Referenced by octomap::ScanGraph::addEdge(), octomap::ScanGraph::crop(), octomap::OccupancyOcTreeBase< NODE >::insertScan(), main(), octomap::Pointcloud::transform(), and octomap::Pointcloud::transformAbsolute().
Pose6D & octomath::Pose6D::inv_IP | ( | ) |
Inversion.
Inverts the coordinate transformation represented by this pose
References octomath::Quaternion::inv(), octomath::Quaternion::normalized(), rot(), octomath::Quaternion::rotate(), and trans().
bool octomath::Pose6D::operator!= | ( | const Pose6D & | other | ) | const |
Concatenation.
Concatenates the coordinate transformations represented by this and p.
References octomath::Quaternion::normalized(), Pose6D(), rot(), octomath::Quaternion::rotate(), rotation, and trans().
In place concatenation.
Concatenates p to this Pose6D.
References rot(), octomath::Quaternion::rotate(), rotation, and trans().
References rot(), rotation, trans(), and translation.
bool octomath::Pose6D::operator== | ( | const Pose6D & | other | ) | const |
References rotation, and translation.
double octomath::Pose6D::pitch | ( | ) | const [inline] |
References rotation, and octomath::Quaternion::toEuler().
Referenced by octomap::MapCollection< MAPNODE >::write().
std::istream & octomath::Pose6D::read | ( | std::istream & | s | ) |
Input operator.
Parsing from stream which was written by write().
References octomath::Quaternion::read(), octomath::Vector3::read(), rotation, and translation.
Referenced by octomap::ScanEdge::readASCII().
std::istream & octomath::Pose6D::readBinary | ( | std::istream & | s | ) |
Binary input operator.
Parsing from binary stream which was written by writeBinary().
References octomath::Quaternion::readBinary(), octomath::Vector3::readBinary(), rotation, and translation.
Referenced by octomap::ScanEdge::readBinary(), and octomap::ScanNode::readBinary().
double octomath::Pose6D::roll | ( | ) | const [inline] |
References rotation, and octomath::Quaternion::toEuler().
Referenced by octomap::MapCollection< MAPNODE >::write().
Quaternion& octomath::Pose6D::rot | ( | ) | [inline] |
Rotational component.
References rotation.
Referenced by inv(), inv_IP(), operator*(), operator*=(), octomath::operator<<(), operator=(), octomap::ScanNode::readPoseASCII(), transform(), and octomap::ScanNode::writePoseASCII().
const Quaternion& octomath::Pose6D::rot | ( | ) | const [inline] |
Vector3& octomath::Pose6D::trans | ( | ) | [inline] |
Translational component.
References translation.
Referenced by octomap::OccupancyOcTreeBase< NODE >::insertScan(), inv(), inv_IP(), operator*(), operator*=(), operator=(), octomap::ScanNode::readPoseASCII(), transform(), and octomap::ScanNode::writePoseASCII().
const Vector3& octomath::Pose6D::trans | ( | ) | const [inline] |
Transformation of a vector.
Transforms the vector v by the transformation which is specified by this.
References rot(), octomath::Quaternion::rotate(), and trans().
Referenced by octomap::OccupancyOcTreeBase< NODE >::insertScan(), main(), octomap::Pointcloud::transform(), and octomap::Pointcloud::transformAbsolute().
double octomath::Pose6D::transLength | ( | ) | const |
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, translation, octomath::Quaternion::write(), and octomath::Vector3::write().
Referenced by octomap::ScanEdge::writeASCII().
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, translation, octomath::Quaternion::writeBinary(), and octomath::Vector3::writeBinary().
Referenced by octomap::ScanEdge::writeBinary(), and octomap::ScanNode::writeBinary().
const float& octomath::Pose6D::x | ( | ) | const [inline] |
References translation.
float& octomath::Pose6D::x | ( | ) | [inline] |
References translation.
Referenced by distance(), octomath::operator<<(), transLength(), and octomap::MapCollection< MAPNODE >::write().
float& octomath::Pose6D::y | ( | ) | [inline] |
References translation.
Referenced by distance(), octomath::operator<<(), transLength(), and octomap::MapCollection< MAPNODE >::write().
const float& octomath::Pose6D::y | ( | ) | const [inline] |
References translation.
double octomath::Pose6D::yaw | ( | ) | const [inline] |
References rotation, and octomath::Quaternion::toEuler().
Referenced by main(), and octomap::MapCollection< MAPNODE >::write().
const float& octomath::Pose6D::z | ( | ) | const [inline] |
References translation.
float& octomath::Pose6D::z | ( | ) | [inline] |
References translation.
Referenced by distance(), octomath::operator<<(), transLength(), and octomap::MapCollection< MAPNODE >::write().
Quaternion octomath::Pose6D::rotation [protected] |
Referenced by operator*(), operator*=(), operator=(), operator==(), pitch(), read(), readBinary(), roll(), rot(), write(), writeBinary(), and yaw().
Vector3 octomath::Pose6D::translation [protected] |
Referenced by operator=(), operator==(), read(), readBinary(), trans(), write(), writeBinary(), x(), y(), and z().