Pose Class Reference

Encapsulates a position and rotation in three space. More...

`#include <math/gzmath.hh>`

## Public Member Functions

Pose () GAZEBO_DEPRECATED(8.0)
Default constructors. More...

Pose (const Vector3 &_pos, const Quaternion &_rot) GAZEBO_DEPRECATED(8.0)
Constructor. More...

Pose (double _x, double _y, double _z, double _roll, double _pitch, double _yaw) GAZEBO_DEPRECATED(8.0)
Constructor. More...

Pose (const Pose &_pose) GAZEBO_DEPRECATED(8.0)
Copy constructor. More...

Pose (const ignition::math::Pose3d &_pose) GAZEBO_DEPRECATED(8.0)
Copy constructor for ignition math. More...

virtual ~Pose () GAZEBO_DEPRECATED(8.0)
Destructor. More...

Pose CoordPoseSolve (const Pose &_b) const GAZEBO_DEPRECATED(8.0)
Find the inverse of a pose; i.e., if b = this + a, given b and this, find a. More...

Vector3 CoordPositionAdd (const Vector3 &_pos) const GAZEBO_DEPRECATED(8.0)
Add one point to a vector: result = this + pos. More...

Vector3 CoordPositionAdd (const Pose &_pose) const GAZEBO_DEPRECATED(8.0)
Add one point to another: result = this + pose. More...

Vector3 CoordPositionSub (const Pose &_pose) const GAZEBO_DEPRECATED(8.0)
Subtract one position from another: result = this - pose. More...

Quaternion CoordRotationAdd (const Quaternion &_rot) const GAZEBO_DEPRECATED(8.0)
Add one rotation to another: result = this->rot + rot. More...

Quaternion CoordRotationSub (const Quaternion &_rot) const GAZEBO_DEPRECATED(8.0)
Subtract one rotation from another: result = this->rot - rot. More...

void Correct () GAZEBO_DEPRECATED(8.0)
Fix any nan values. More...

Pose GetInverse () const GAZEBO_DEPRECATED(8.0)
Get the inverse of this pose. More...

ignition::math::Pose3d Ign () const GAZEBO_DEPRECATED(8.0)
Convert this pose to an ignition::math::Pose3d object. More...

bool IsFinite () const GAZEBO_DEPRECATED(8.0)
See if a pose is finite (e.g., not nan) More...

bool operator!= (const Pose &_pose) const GAZEBO_DEPRECATED(8.0)
Inequality operator. More...

Pose operator* (const Pose &_pose) GAZEBO_DEPRECATED(8.0)
Multiplication operator. More...

Pose operator+ (const Pose &_pose) const GAZEBO_DEPRECATED(8.0)
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 Poseoperator+= (const Pose &_pose) GAZEBO_DEPRECATED(8.0)

Pose operator- () const GAZEBO_DEPRECATED(8.0)
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...

Pose operator- (const Pose &_pose) const GAZEBO_DEPRECATED(8.0)
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 Poseoperator-= (const Pose &_pose) GAZEBO_DEPRECATED(8.0)
Subtraction operator. More...

Poseoperator= (const Pose &_pose) GAZEBO_DEPRECATED(8.0)
Equal operator. More...

Poseoperator= (const ignition::math::Pose3d &_pose) GAZEBO_DEPRECATED(8.0)
Equal operator for ignition math. More...

bool operator== (const Pose &_pose) const
Equality operator. More...

void Reset () GAZEBO_DEPRECATED(8.0)
Reset the pose. More...

Pose RotatePositionAboutOrigin (const Quaternion &_rot) const GAZEBO_DEPRECATED(8.0)
Rotate vector part of a pose about the origin. More...

void Round (int _precision) GAZEBO_DEPRECATED(8.0)
Round all values to _precision decimal places. More...

void Set (const Vector3 &_pos, const Quaternion &_rot) GAZEBO_DEPRECATED(8.0)
Set the pose from a Vector3 and a Quaternion. More...

void Set (const Vector3 &_pos, const Vector3 &_rpy) GAZEBO_DEPRECATED(8.0)
Set the pose from pos and rpy vectors. More...

void Set (double _x, double _y, double _z, double _roll, double _pitch, double _yaw) GAZEBO_DEPRECATED(8.0)
Set the pose from a six tuple. More...

## Public Attributes

Vector3 pos
The position. More...

Quaternion rot
The rotation. More...

## Static Public Attributes

static const Pose Zero
math::Pose(0, 0, 0, 0, 0, 0) More...

## Friends

std::ostream & operator<< (std::ostream &_out, const gazebo::math::Pose &_pose) GAZEBO_DEPRECATED(8.0)
Stream insertion operator. More...

std::istream & operator>> (std::istream &_in, gazebo::math::Pose &_pose) GAZEBO_DEPRECATED(8.0)
Stream extraction operator. More...

## Detailed Description

Encapsulates a position and rotation in three space.

## Constructor & Destructor Documentation

 Pose ( )

Default constructors.

Referenced by Pose::operator-().

 Pose ( const Vector3 & _pos, const Quaternion & _rot )

Constructor.

Parameters
 [in] _pos A position [in] _rot A rotation
 Pose ( double _x, double _y, double _z, double _roll, double _pitch, double _yaw )

Constructor.

Parameters
 [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.
 Pose ( const Pose & _pose )

Copy constructor.

Parameters
 [in] _pose Pose to copy
 Pose ( const ignition::math::Pose3d & _pose )

Copy constructor for ignition math.

Parameters
 [in] _pose Pose to copy
 virtual ~Pose ( )
virtual

Destructor.

## Member Function Documentation

 Pose CoordPoseSolve ( const Pose & _b ) const

Find the inverse of a pose; i.e., if b = this + a, given b and this, find a.

Parameters
 [in] _b the other pose

Referenced by Pose::CoordRotationSub().

 Vector3 CoordPositionAdd ( const Vector3 & _pos ) const

Add one point to a vector: result = this + pos.

Parameters
 [in] _pos Position to add to this pose
Returns
the resulting position

Referenced by Pose::operator-().

 Vector3 CoordPositionAdd ( const Pose & _pose ) const

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

Parameters
 [in] _pose The Pose to add
Returns
The resulting position
 Vector3 CoordPositionSub ( const Pose & _pose ) const
inline

Subtract one position from another: result = this - pose.

Parameters
 [in] _pose Pose to subtract
Returns
The resulting position

Referenced by Pose::operator-().

 Quaternion CoordRotationAdd ( const Quaternion & _rot ) const

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

Parameters
 [in] _rot Rotation to add
Returns
The resulting rotation

Referenced by Pose::CoordPositionSub().

 Quaternion CoordRotationSub ( const Quaternion & _rot ) const
inline

Subtract one rotation from another: result = this->rot - rot.

Parameters
 [in] _rot The rotation to subtract
Returns
The resulting rotation

Referenced by Pose::operator-().

 void Correct ( )
inline

Fix any nan values.

 Pose GetInverse ( ) const

Get the inverse of this pose.

Returns
the inverse pose

Referenced by Pose::Correct().

 ignition::math::Pose3d Ign ( ) const

Convert this pose to an ignition::math::Pose3d object.

Returns
This pose represented as an ignition::math::Pose3d.

Referenced by Pose::CoordRotationSub().

 bool IsFinite ( ) const

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

 bool operator!= ( const Pose & _pose ) const

Inequality operator.

Parameters
 [in] _pose Pose for comparison
Returns
True if not equal

Referenced by Pose::operator-().

 Pose operator* ( const Pose & _pose )

Multiplication operator.

Parameters
 [in] _pose the other pose
Returns
itself

Referenced by Pose::operator-().

 Pose operator+ ( const Pose & _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.

Parameters
 [in] _pose Pose to add to this pose
Returns
The resulting pose

Referenced by Pose::Correct().

 const Pose& operator+= ( const Pose & _pose )

Parameters
 [in] _pose Pose to add to this pose
Returns
The resulting pose

Referenced by Pose::Correct().

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

 Pose operator- ( const Pose & _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] _pose Pose to subtract from this one
Returns
The resulting pose
 const Pose& operator-= ( const Pose & _pose )

Subtraction operator.

Parameters
 [in] _pose Pose to subtract from this one
Returns
The resulting pose

Referenced by Pose::operator-().

 Pose& operator= ( const Pose & _pose )

Equal operator.

Parameters
 [in] _pose Pose to copy

Referenced by Pose::operator-().

 Pose& operator= ( const ignition::math::Pose3d & _pose )

Equal operator for ignition math.

Parameters
 [in] _pose Pose to copy
 bool operator== ( const Pose & _pose ) const

Equality operator.

Parameters
 [in] _pose Pose for comparison
Returns
True if equal Note: not explicitly deprecated on purpose, because gtest catches it

Referenced by Pose::operator-().

 void Reset ( )

Reset the pose.

Referenced by Pose::CoordRotationSub().

 Pose RotatePositionAboutOrigin ( const Quaternion & _rot ) const

Rotate vector part of a pose about the origin.

Parameters
 [in] _rot rotation
Returns
the rotated pose

Referenced by Pose::CoordRotationSub().

 void Round ( int _precision )

Round all values to _precision decimal places.

Parameters
 [in] _precision

Referenced by Pose::CoordRotationSub().

 void Set ( const Vector3 & _pos, const Quaternion & _rot )

Set the pose from a Vector3 and a Quaternion.

Parameters
 [in] _pos The position. [in] _rot The rotation.
 void Set ( const Vector3 & _pos, const Vector3 & _rpy )

Set the pose from pos and rpy vectors.

Parameters
 [in] _pos The position. [in] _rpy The rotation expressed as Euler angles.
 void Set ( double _x, double _y, double _z, double _roll, double _pitch, double _yaw )

Set the pose from a six tuple.

Parameters
 [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.

## Friends And Related Function Documentation

 std::ostream& operator<< ( std::ostream & _out, const gazebo::math::Pose & _pose )
friend

Stream insertion operator.

Parameters
 [in] _out output stream [in] _pose pose to output
Returns
the stream
 std::istream& operator>> ( std::istream & _in, gazebo::math::Pose & _pose )
friend

Stream extraction operator.

Parameters
 [in] _in the input stream [in] _pose the pose
Returns
the stream

## Member Data Documentation

 Vector3 pos

The position.

Referenced by Pose::CoordPositionSub(), and Pose::Correct().

 Quaternion rot
 const Pose Zero
static

math::Pose(0, 0, 0, 0, 0, 0)

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