Encapsulates a position and rotation in three space. More...
#include <ignition/math/Pose3.hh>
Public Member Functions | |
Pose3 () | |
Default constructors. | |
Pose3 (const Pose3< T > &_pose) | |
Copy constructor. | |
Pose3 (const Vector3< T > &_pos, const Quaternion< T > &_rot) | |
Constructor. | |
Pose3 (T _x, T _y, T _z, T _qw, T _qx, T _qy, T _qz) | |
Constructor. | |
Pose3 (T _x, T _y, T _z, T _roll, T _pitch, T _yaw) | |
Constructor. | |
virtual | ~Pose3 () |
Destructor. | |
Pose3< T > | CoordPoseSolve (const Pose3< T > &_b) const |
Find the inverse of a pose; i.e., if b = this + a, given b and this, find a. | |
Vector3< T > | CoordPositionAdd (const Pose3< T > &_pose) const |
Add one point to another: result = this + pose. | |
Vector3< T > | CoordPositionAdd (const Vector3< T > &_pos) const |
Add one point to a vector: result = this + pos. | |
Vector3< T > | CoordPositionSub (const Pose3< T > &_pose) const |
Subtract one position from another: result = this - pose. | |
Quaternion< T > | CoordRotationAdd (const Quaternion< T > &_rot) const |
Add one rotation to another: result = this->q + rot. | |
Quaternion< T > | CoordRotationSub (const Quaternion< T > &_rot) const |
Subtract one rotation from another: result = this->q - rot. | |
void | Correct () |
Fix any nan values. | |
Pose3< T > | Inverse () const |
Get the inverse of this pose. | |
bool | IsFinite () const |
See if a pose is finite (e.g., not nan) | |
bool | operator!= (const Pose3< T > &_pose) const |
Inequality operator. | |
Pose3< T > | operator* (const Pose3< T > &_pose) const |
Multiplication operator. | |
Pose3< T > | operator+ (const Pose3< T > &_pose) const |
Addition operator A is the transform from O to P specified in frame O B is the transform from P to Q specified in frame P then, B + A is the transform from O to Q specified in frame O. | |
const Pose3< T > & | operator+= (const Pose3< T > &_pose) |
Add-Equals operator. | |
Pose3< T > | operator- () const |
Negation operator A is the transform from O to P in frame O then -A is transform from P to O specified in frame P. | |
Pose3< T > | operator- (const Pose3< T > &_pose) const |
Subtraction operator A is the transform from O to P in frame O B is the transform from O to Q in frame O B - A is the transform from P to Q in frame P. | |
const Pose3< T > & | operator-= (const Pose3< T > &_pose) |
Subtraction operator. | |
Pose3< T > & | operator= (const Pose3< T > &_pose) |
Equal operator. | |
bool | operator== (const Pose3< T > &_pose) const |
Equality operator. | |
Vector3< T > & | Pos () |
Get a mutable reference to the position. | |
const Vector3< T > & | Pos () const |
Get the position. | |
void | Reset () |
Reset the pose. | |
Quaternion< T > & | Rot () |
Get a mutuable reference to the rotation. | |
const Quaternion< T > & | Rot () const |
Get the rotation. | |
Pose3< T > | RotatePositionAboutOrigin (const Quaternion< T > &_q) const |
Rotate vector part of a pose about the origin. | |
void | Round (int _precision) |
Round all values to _precision decimal places. | |
void | Set (const Vector3< T > &_pos, const Quaternion< T > &_rot) |
Set the pose from a Vector3 and a Quaternion<T> | |
void | Set (const Vector3< T > &_pos, const Vector3< T > &_rpy) |
Set the pose from pos and rpy vectors. | |
void | Set (T _x, T _y, T _z, T _roll, T _pitch, T _yaw) |
Set the pose from a six tuple. | |
Static Public Attributes | |
static const Pose3< T > | Zero |
math::Pose3<T>(0, 0, 0, 0, 0, 0) | |
Encapsulates a position and rotation in three space.
|
inline |
Default constructors.
Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Inverse(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator*(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator-(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator-().
|
inline |
Constructor.
[in] | _pos | A position |
[in] | _rot | A rotation |
|
inline |
Constructor.
[in] | _x | x position in meters. |
[in] | _y | y position in meters. |
[in] | _z | z position in meters. |
[in] | _roll | Roll (rotation about X-axis) in radians. |
[in] | _pitch | Pitch (rotation about y-axis) in radians. |
[in] | _yaw | Yaw (rotation about z-axis) in radians. |
|
inline |
Constructor.
[in] | _x | x position in meters. |
[in] | _y | y position in meters. |
[in] | _z | z position in meters. |
[in] | _qw | Quaternion w value. |
[in] | _qx | Quaternion x value. |
[in] | _qy | Quaternion y value. |
[in] | _qz | Quaternion z value. |
|
inline |
Copy constructor.
[in] | _pose | Pose3<T> to copy |
|
inlinevirtual |
Destructor.
|
inline |
Find the inverse of a pose; i.e., if b = this + a, given b and this, find a.
[in] | _b | the other pose |
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::X(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::Y(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::Z().
|
inline |
Add one point to another: result = this + pose.
[in] | _pose | The Pose3<T> to add |
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::X(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::Y(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::Z().
|
inline |
Add one point to a vector: result = this + pos.
[in] | _pos | Position to add to this pose |
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::X(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Vector3< T >::X(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::Y(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Vector3< T >::Y(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::Z(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Vector3< T >::Z().
Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator*(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator+(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator+=().
|
inline |
Subtract one position from another: result = this - pose.
[in] | _pose | Pose3<T> to subtract |
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::X(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::Y(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::Z().
Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator-(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator-=().
|
inline |
Add one rotation to another: result = this->q + rot.
[in] | _rot | Rotation to add |
Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator+(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator+=().
|
inline |
Subtract one rotation from another: result = this->q - rot.
[in] | _rot | The rotation to subtract |
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::Inverse(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::Normalize().
Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator-(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator-=().
|
inline |
Fix any nan values.
|
inline |
Get the inverse of this pose.
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Pose3().
|
inline |
See if a pose is finite (e.g., not nan)
|
inline |
Inequality operator.
[in] | _pose | Pose3<T> for comparison |
|
inline |
Multiplication operator.
[in] | _pose | the other pose |
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Pose3(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::CoordPositionAdd().
|
inline |
Addition operator A is the transform from O to P specified in frame O B is the transform from P to Q specified in frame P then, B + A is the transform from O to Q specified in frame O.
[in] | _pose | Pose3<T> to add to this pose |
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::CoordPositionAdd(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::CoordRotationAdd().
|
inline |
Add-Equals operator.
[in] | _pose | Pose3<T> to add to this pose |
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::CoordPositionAdd(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::CoordRotationAdd().
|
inline |
Negation operator A is the transform from O to P in frame O then -A is transform from P to O specified in frame P.
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Pose3().
|
inline |
Subtraction operator A is the transform from O to P in frame O B is the transform from O to Q in frame O B - A is the transform from P to Q in frame P.
[in] | _pose | Pose3<T> to subtract from this one |
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Pose3(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::CoordPositionSub(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::CoordRotationSub().
|
inline |
Subtraction operator.
[in] | _pose | Pose3<T> to subtract from this one |
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::CoordPositionSub(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::CoordRotationSub().
|
inline |
Equal operator.
[in] | _pose | Pose3<T> to copy |
|
inline |
Equality operator.
[in] | _pose | Pose3<T> for comparison |
|
inline |
Get a mutable reference to the position.
|
inline |
Get the position.
Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Matrix4< T >::Matrix4().
|
inline |
Reset the pose.
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::Identity.
|
inline |
Get a mutuable reference to the rotation.
|
inline |
Get the rotation.
|
inline |
Rotate vector part of a pose about the origin.
[in] | _rot | rotation |
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::W(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::X(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::Y(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Quaternion< T >::Z().
|
inline |
Round all values to _precision decimal places.
[in] | _precision |
|
inline |
Set the pose from a Vector3 and a Quaternion<T>
[in] | _pos | The position. |
[in] | _rot | The rotation. |
|
inline |
Set the pose from pos and rpy vectors.
[in] | _pos | The position. |
[in] | _rpy | The rotation expressed as Euler angles. |
|
inline |
Set the pose from a six tuple.
[in] | _x | x position in meters. |
[in] | _y | y position in meters. |
[in] | _z | z position in meters. |
[in] | _roll | Roll (rotation about X-axis) in radians. |
[in] | _pitch | Pitch (rotation about y-axis) in radians. |
[in] | _yaw | Pitch (rotation about z-axis) in radians. |
|
static |
math::Pose3<T>(0, 0, 0, 0, 0, 0)