Public Member Functions | Public Attributes | Friends
Pose Class Reference

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

#include <Pose.hh>

List of all members.

Public Member Functions

 Pose ()
 Default constructors.
 Pose (const Vector3 &pos, const Quaternion &rot)
 Constructor.
 Pose (const Pose &pose)
 Copy constructor.
virtual ~Pose ()
 Destructor.
void Set (const Vector3 &_pos, const Quaternion &_rot)
bool IsFinite () const
 See if a pose is finite (e.g., not nan)
void Correct ()
 Fix any nan values.
Pose GetInverse () const
 Get the inverse of this pose.
Pose operator+ (const Pose &pose) const
 Addition operator.
const Poseoperator+= (const Pose &pose)
 Add-Equals operator.
Pose operator- (const Pose &_pose) const
 Subtraction operator.
const Poseoperator-= (const Pose &_pose)
 Subtraction operator.
bool operator== (const Pose &_pose) const
 Equality operator.
bool operator!= (const Pose &_pose) const
 Inequality operator.
Pose operator* (const Pose &pose)
 Multiplication operator.
Vector3 CoordPositionAdd (const Vector3 &pos) const
 Add one point to a vector: result = this + pos.
Vector3 CoordPositionAdd (const Pose &pose) const
 Add one point to another: result = this + pose.
Vector3 CoordPositionSub (const Pose &_pose) const
 Subtract one position from another: result = this - pose.
Quaternion CoordRotationAdd (const Quaternion &rot) const
 Add one rotation to another: result = this->rot + rot.
Quaternion CoordRotationSub (const Quaternion &rot) const
 Subtract one rotation from another: result = this->rot - rot.
Pose CoordPoseSolve (const Pose &b) const
 Find the inverse of a pose; i.e., if b = this + a, given b and this, find a.
void Reset ()
 Reset the pose.
Pose RotatePositionAboutOrigin (const Quaternion &rot) const
 Rotate vector part of a pose about the origin.
void Round (int _precision)
 Round all values to _precision decimal places.

Public Attributes

Vector3 pos
 The position.
Quaternion rot
 The rotation.

Friends

std::ostream & operator<< (std::ostream &out, const gazebo::math::Pose &pose)
 Ostream operator.
std::istream & operator>> (std::istream &in, gazebo::math::Pose &pose)

Detailed Description

Encapsulates a position and rotation in three space.


Constructor & Destructor Documentation

Pose ( const Vector3 pos,
const Quaternion rot 
)

Constructor.

Parameters:
posA position
rotA rotation
Pose ( const Pose pose)

Copy constructor.

Parameters:
posePose to copy

Member Function Documentation

Vector3 CoordPositionAdd ( const Vector3 pos) const

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

Parameters:
posPosition to add to this pose
Returns:
The resulting position
Vector3 CoordPositionAdd ( const Pose pose) const

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

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

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

Parameters:
posePose to subtract
Returns:
The resulting position

References Quaternion::GetInverse(), Pose::pos, Pose::rot, Vector3::x, Quaternion::x, Vector3::y, Quaternion::y, Vector3::z, and Quaternion::z.

Referenced by Pose::operator-().

Quaternion CoordRotationAdd ( const Quaternion rot) const

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

Parameters:
rotRotation to add
Returns:
The resulting rotation
Quaternion CoordRotationSub ( const Quaternion rot) const [inline]

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

Parameters:
rotThe rotation to subtract
Returns:
The resulting rotation

References Quaternion::GetInverse(), Quaternion::Normalize(), and Pose::rot.

Referenced by Pose::operator-().

bool operator!= ( const Pose _pose) const

Inequality operator.

Parameters:
_posePose for comparison
Returns:
True if not equal
Pose operator+ ( const Pose pose) const

Addition operator.

Parameters:
posePose to add to this pose
Returns:
The resulting pose
const Pose& operator+= ( const Pose pose)

Add-Equals operator.

Parameters:
posePose to add to this pose
Returns:
The resulting pose
Pose operator- ( const Pose _pose) const [inline]

Subtraction operator.

Parameters:
posePose to subtract from this one
Returns:
The resulting pose

References Pose::CoordPositionSub(), Pose::CoordRotationSub(), Pose::Pose(), and Pose::rot.

const Pose& operator-= ( const Pose _pose)

Subtraction operator.

Parameters:
posePose to subtract from this one
Returns:
The resulting pose
bool operator== ( const Pose _pose) const

Equality operator.

Parameters:
_posePose for comparison
Returns:
True if equal

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const gazebo::math::Pose pose 
) [friend]

Ostream operator.

Parameters:
outOstream
posePose to output
Returns:
the Ostream

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