Loading...
Searching...
No Matches
ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T > Class Template Reference

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)
 

Detailed Description

template<typename T>
class ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >

Encapsulates a position and rotation in three space.

Constructor & Destructor Documentation

◆ Pose3() [1/5]

◆ Pose3() [2/5]

template<typename T >
ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Pose3 ( const Vector3< T > & _pos,
const Quaternion< T > & _rot )
inline

Constructor.

Parameters
[in]_posA position
[in]_rotA rotation

◆ Pose3() [3/5]

template<typename T >
ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Pose3 ( T _x,
T _y,
T _z,
T _roll,
T _pitch,
T _yaw )
inline

Constructor.

Parameters
[in]_xx position in meters.
[in]_yy position in meters.
[in]_zz position in meters.
[in]_rollRoll (rotation about X-axis) in radians.
[in]_pitchPitch (rotation about y-axis) in radians.
[in]_yawYaw (rotation about z-axis) in radians.

◆ Pose3() [4/5]

template<typename T >
ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Pose3 ( T _x,
T _y,
T _z,
T _qw,
T _qx,
T _qy,
T _qz )
inline

Constructor.

Parameters
[in]_xx position in meters.
[in]_yy position in meters.
[in]_zz position in meters.
[in]_qwQuaternion w value.
[in]_qxQuaternion x value.
[in]_qyQuaternion y value.
[in]_qzQuaternion z value.

◆ Pose3() [5/5]

template<typename T >
ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Pose3 ( const Pose3< T > & _pose)
inline

Copy constructor.

Parameters
[in]_posePose3<T> to copy

◆ ~Pose3()

template<typename T >
virtual ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::~Pose3 ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ CoordPoseSolve()

template<typename T >
Pose3< T > ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::CoordPoseSolve ( const Pose3< T > & _b) const
inline

◆ CoordPositionAdd() [1/2]

template<typename T >
Vector3< T > ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::CoordPositionAdd ( const Pose3< T > & _pose) const
inline

Add one point to another: result = this + pose.

Parameters
[in]_poseThe Pose3<T> to add
Returns
The resulting position

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().

◆ CoordPositionAdd() [2/2]

◆ CoordPositionSub()

◆ CoordRotationAdd()

template<typename T >
Quaternion< T > ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::CoordRotationAdd ( const Quaternion< T > & _rot) const
inline

Add one rotation to another: result = this->q + rot.

Parameters
[in]_rotRotation to add
Returns
The resulting rotation

Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator+(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator+=().

◆ CoordRotationSub()

template<typename T >
Quaternion< T > ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::CoordRotationSub ( const Quaternion< T > & _rot) const
inline

◆ Correct()

template<typename T >
void ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Correct ( )
inline

Fix any nan values.

◆ Inverse()

template<typename T >
Pose3< T > ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Inverse ( ) const
inline

Get the inverse of this pose.

Returns
the inverse pose

References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Pose3().

◆ IsFinite()

template<typename T >
bool ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::IsFinite ( ) const
inline

See if a pose is finite (e.g., not nan)

◆ operator!=()

template<typename T >
bool ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator!= ( const Pose3< T > & _pose) const
inline

Inequality operator.

Parameters
[in]_posePose3<T> for comparison
Returns
True if not equal

◆ operator*()

template<typename T >
Pose3< T > ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator* ( const Pose3< T > & _pose) const
inline

◆ operator+()

template<typename T >
Pose3< T > ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator+ ( const Pose3< T > & _pose) const
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.

Parameters
[in]_posePose3<T> to add to this pose
Returns
The resulting pose

References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::CoordPositionAdd(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::CoordRotationAdd().

◆ operator+=()

template<typename T >
const Pose3< T > & ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator+= ( const Pose3< T > & _pose)
inline

Add-Equals operator.

Parameters
[in]_posePose3<T> to add to this pose
Returns
The resulting pose

References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::CoordPositionAdd(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::CoordRotationAdd().

◆ operator-() [1/2]

template<typename T >
Pose3< T > ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator- ( ) const
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.

Returns
The resulting pose

References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Pose3().

◆ operator-() [2/2]

template<typename T >
Pose3< T > ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator- ( const Pose3< T > & _pose) const
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.

Parameters
[in]_posePose3<T> to subtract from this one
Returns
The resulting pose

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().

◆ operator-=()

template<typename T >
const Pose3< T > & ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator-= ( const Pose3< T > & _pose)
inline

Subtraction operator.

Parameters
[in]_posePose3<T> to subtract from this one
Returns
The resulting pose

References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::CoordPositionSub(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::CoordRotationSub().

◆ operator=()

template<typename T >
Pose3< T > & ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator= ( const Pose3< T > & _pose)
inline

Equal operator.

Parameters
[in]_posePose3<T> to copy

◆ operator==()

template<typename T >
bool ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::operator== ( const Pose3< T > & _pose) const
inline

Equality operator.

Parameters
[in]_posePose3<T> for comparison
Returns
True if equal

◆ Pos() [1/2]

template<typename T >
Vector3< T > & ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Pos ( )
inline

Get a mutable reference to the position.

Returns
Origin of the pose.

◆ Pos() [2/2]

template<typename T >
const Vector3< T > & ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Pos ( ) const
inline

Get the position.

Returns
Origin of the pose.

Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Matrix4< T >::Matrix4().

◆ Reset()

◆ Rot() [1/2]

template<typename T >
Quaternion< T > & ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Rot ( )
inline

Get a mutuable reference to the rotation.

Returns
Quaternion representation of the rotation.

◆ Rot() [2/2]

template<typename T >
const Quaternion< T > & ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Rot ( ) const
inline

Get the rotation.

Returns
Quaternion representation of the rotation.

◆ RotatePositionAboutOrigin()

◆ Round()

template<typename T >
void ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Round ( int _precision)
inline

Round all values to _precision decimal places.

Parameters
[in]_precision

◆ Set() [1/3]

template<typename T >
void ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Set ( const Vector3< T > & _pos,
const Quaternion< T > & _rot )
inline

Set the pose from a Vector3 and a Quaternion<T>

Parameters
[in]_posThe position.
[in]_rotThe rotation.

◆ Set() [2/3]

template<typename T >
void ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Set ( const Vector3< T > & _pos,
const Vector3< T > & _rpy )
inline

Set the pose from pos and rpy vectors.

Parameters
[in]_posThe position.
[in]_rpyThe rotation expressed as Euler angles.

◆ Set() [3/3]

template<typename T >
void ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Set ( T _x,
T _y,
T _z,
T _roll,
T _pitch,
T _yaw )
inline

Set the pose from a six tuple.

Parameters
[in]_xx position in meters.
[in]_yy position in meters.
[in]_zz position in meters.
[in]_rollRoll (rotation about X-axis) in radians.
[in]_pitchPitch (rotation about y-axis) in radians.
[in]_yawPitch (rotation about z-axis) in radians.

Member Data Documentation

◆ Zero

template<typename T >
const Pose3< T > ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Pose3< T >::Zero
static

math::Pose3<T>(0, 0, 0, 0, 0, 0)


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