Encapsulates a position and rotation in three space. More...
#include <ignition/math/Pose3.hh>
Public Member Functions | |
Pose3 () | |
Default constructors. More... | |
Pose3 (const Vector3< T > &_pos, const Quaternion< T > &_rot) | |
Constructor. More... | |
Pose3 (T _x, T _y, T _z, T _roll, T _pitch, T _yaw) | |
Constructor. More... | |
Pose3 (T _x, T _y, T _z, T _qw, T _qx, T _qy, T _qz) | |
Constructor. More... | |
Pose3 (const Pose3< T > &_pose) | |
Copy constructor. More... | |
virtual | ~Pose3 () |
Destructor. More... | |
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. More... | |
Vector3< T > | CoordPositionAdd (const Vector3< T > &_pos) const |
Add one point to a vector: result = this + pos. More... | |
Vector3< T > | CoordPositionAdd (const Pose3< T > &_pose) const |
Add one point to another: result = this + pose. More... | |
Vector3< T > | CoordPositionSub (const Pose3< T > &_pose) const |
Subtract one position from another: result = this - pose. More... | |
Quaternion< T > | CoordRotationAdd (const Quaternion< T > &_rot) const |
Add one rotation to another: result = this->q + rot. More... | |
Quaternion< T > | CoordRotationSub (const Quaternion< T > &_rot) const |
Subtract one rotation from another: result = this->q - rot. More... | |
void | Correct () |
Fix any nan values. More... | |
Pose3< T > | Inverse () const |
Get the inverse of this pose. More... | |
bool | IsFinite () const |
See if a pose is finite (e.g., not nan) More... | |
bool | operator!= (const Pose3< T > &_pose) const |
Inequality operator. More... | |
Pose3< T > | operator* (const Pose3< T > &_pose) |
Multiplication operator. More... | |
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. More... | |
const Pose3< T > & | operator+= (const Pose3< T > &_pose) |
Add-Equals operator. More... | |
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. More... | |
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. More... | |
const Pose3< T > & | operator-= (const Pose3< T > &_pose) |
Subtraction operator. More... | |
Pose3< T > & | operator= (const Pose3< T > &_pose) |
Equal operator. More... | |
bool | operator== (const Pose3< T > &_pose) const |
Equality operator. More... | |
const Vector3< T > & | Pos () const |
Get the position. More... | |
Vector3< T > & | Pos () |
Get a mutable reference to the position. More... | |
void | Reset () |
Reset the pose. More... | |
const Quaternion< T > & | Rot () const |
Get the rotation. More... | |
Quaternion< T > & | Rot () |
Get a mutuable reference to the rotation. More... | |
Pose3< T > | RotatePositionAboutOrigin (const Quaternion< T > &_q) const |
Rotate vector part of a pose about the origin. More... | |
void | Round (int _precision) |
Round all values to _precision decimal places. More... | |
void | Set (const Vector3< T > &_pos, const Quaternion< T > &_rot) |
Set the pose from a Vector3 and a Quaternion<T> More... | |
void | Set (const Vector3< T > &_pos, const Vector3< T > &_rpy) |
Set the pose from pos and rpy vectors. More... | |
void | Set (T _x, T _y, T _z, T _roll, T _pitch, T _yaw) |
Set the pose from a six tuple. More... | |
Static Public Attributes | |
static const Pose3< T > | Zero |
math::Pose3<T>(0, 0, 0, 0, 0, 0) More... | |
Friends | |
std::ostream & | operator<< (std::ostream &_out, const ignition::math::Pose3< T > &_pose) |
Stream insertion operator. More... | |
std::istream & | operator>> (std::istream &_in, ignition::math::Pose3< T > &_pose) |
Stream extraction operator. More... | |
Encapsulates a position and rotation in three space.
|
inline |
Default constructors.
|
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::Quaternion< T >::X(), ignition::math::Quaternion< T >::Y(), and ignition::math::Quaternion< T >::Z().
|
inline |
Add one point to a vector: result = this + pos.
[in] | _pos | Position to add to this pose |
References ignition::math::Vector3< T >::X(), ignition::math::Quaternion< T >::X(), ignition::math::Vector3< T >::Y(), ignition::math::Quaternion< T >::Y(), ignition::math::Vector3< T >::Z(), and ignition::math::Quaternion< T >::Z().
Referenced by ignition::math::Pose3< T >::operator*(), ignition::math::Pose3< T >::operator+(), and ignition::math::Pose3< T >::operator+=().
|
inline |
Add one point to another: result = this + pose.
[in] | _pose | The Pose3<T> to add |
References ignition::math::Quaternion< T >::X(), ignition::math::Quaternion< T >::Y(), and ignition::math::Quaternion< T >::Z().
|
inline |
Subtract one position from another: result = this - pose.
[in] | _pose | Pose3<T> to subtract |
References ignition::math::Quaternion< T >::X(), ignition::math::Quaternion< T >::Y(), and ignition::math::Quaternion< T >::Z().
Referenced by ignition::math::Pose3< T >::operator-(), and ignition::math::Pose3< T >::operator-=().
|
inline |
Add one rotation to another: result = this->q + rot.
[in] | _rot | Rotation to add |
Referenced by ignition::math::Pose3< T >::operator+(), and ignition::math::Pose3< T >::operator+=().
|
inline |
Subtract one rotation from another: result = this->q - rot.
[in] | _rot | The rotation to subtract |
References ignition::math::Quaternion< T >::Inverse(), and ignition::math::Quaternion< T >::Normalize().
Referenced by ignition::math::Pose3< T >::operator-(), and ignition::math::Pose3< T >::operator-=().
|
inline |
Fix any nan values.
|
inline |
Get the inverse of this pose.
|
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::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::Pose3< T >::CoordPositionAdd(), and ignition::math::Pose3< T >::CoordRotationAdd().
|
inline |
Add-Equals operator.
[in] | _pose | Pose3<T> to add to this pose |
References ignition::math::Pose3< T >::CoordPositionAdd(), and ignition::math::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.
|
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::Pose3< T >::CoordPositionSub(), and ignition::math::Pose3< T >::CoordRotationSub().
|
inline |
Subtraction operator.
[in] | _pose | Pose3<T> to subtract from this one |
References ignition::math::Pose3< T >::CoordPositionSub(), and ignition::math::Pose3< T >::CoordRotationSub().
|
inline |
Equal operator.
[in] | _pose | Pose3<T> to copy |
|
inline |
Equality operator.
[in] | _pose | Pose3<T> for comparison |
|
inline |
Get the position.
|
inline |
Get a mutable reference to the position.
|
inline |
Reset the pose.
References ignition::math::Quaternion< T >::Identity.
|
inline |
Get the rotation.
|
inline |
Get a mutuable reference to the rotation.
|
inline |
Rotate vector part of a pose about the origin.
[in] | _rot | rotation |
References ignition::math::Quaternion< T >::W(), ignition::math::Quaternion< T >::X(), ignition::math::Quaternion< T >::Y(), and ignition::math::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. |
|
friend |
Stream insertion operator.
[in] | _out | output stream |
[in] | _pose | pose to output |
|
friend |
Stream extraction operator.
[in] | _in | the input stream |
[in] | _pose | the pose |
|
static |
math::Pose3<T>(0, 0, 0, 0, 0, 0)