argos::CPose2 Class Reference

#include <pose2.h>

Public Member Functions

 ~CPose2 ()
 
 CPose2 ()
 Default constructor. More...
 
 CPose2 (const CPose2 &c_pose)
 Copy constructor. More...
 
 CPose2 (const CVector2 &c_position, const CRadians &c_orientation)
 Constructor using input position and angle. More...
 
 CPose2 (const Real f_x, const Real f_y, const Real f_th)
 Constructor using individual coordinate values and angle. More...
 
const CVector2GetPosition () const
 Returns the position of the pose. More...
 
const CRadiansGetOrientation () const
 Returns the orientation of the pose. More...
 
void Rotate (const CRadians &c_offset)
 Rotates the current pose by the given offset angle. More...
 
void Translate (const CVector2 &c_offset)
 Translates the current pose by the given vector. More...
 
bool operator== (const CPose2 &c_pose) const
 Equality operator overloading. More...
 
bool operator!= (const CPose2 &c_pose) const
 Inequality operator overloading. More...
 
 CPose2 (const CVector3 &c_position, const CQuaternion &c_orientation)
 Constructor using input position and angle. More...
 
CPose2 Inverse () const
 Computes the returns the inverse of the current pose. More...
 
CPose2 operator* (const CPose2 &c_pose) const
 Multiplication operator overloading. More...
 
CVector2 operator* (const CVector2 &c_vec) const
 Multiplication operator overloading. More...
 
CPose2operator*= (const CPose2 &c_pose)
 Multiplication operator overloading. More...
 

Detailed Description

Definition at line 14 of file pose2.h.

Constructor & Destructor Documentation

◆ ~CPose2()

argos::CPose2::~CPose2 ( )
inline

Definition at line 17 of file pose2.h.

◆ CPose2() [1/5]

argos::CPose2::CPose2 ( )
inline

Default constructor.

Definition at line 23 of file pose2.h.

◆ CPose2() [2/5]

argos::CPose2::CPose2 ( const CPose2 c_pose)
inline

Copy constructor.

Parameters
c_poseThe 2D pose to be copied.

Definition at line 32 of file pose2.h.

◆ CPose2() [3/5]

argos::CPose2::CPose2 ( const CVector2 c_position,
const CRadians c_orientation 
)
inline

Constructor using input position and angle.

Parameters
c_positionPosition of the input pose in CVector2 format.
c_orientationOrientation of the input pose in CRadians format.

Definition at line 42 of file pose2.h.

◆ CPose2() [4/5]

argos::CPose2::CPose2 ( const Real  f_x,
const Real  f_y,
const Real  f_th 
)
inline

Constructor using individual coordinate values and angle.

Parameters
f_xX coordinate of the pose.
f_yA-coordinate of the pose.
f_thAngle of 2D the pose.

Definition at line 53 of file pose2.h.

◆ CPose2() [5/5]

argos::CPose2::CPose2 ( const CVector3 c_position,
const CQuaternion c_orientation 
)

Constructor using input position and angle.

Parameters
c_positionPosition of the input pose in CVector3 format.
c_orienatationOrientation of the input pose in CQuaternion format.

Definition at line 12 of file pose2.cpp.

Member Function Documentation

◆ GetOrientation()

const CRadians& argos::CPose2::GetOrientation ( ) const
inline

Returns the orientation of the pose.

Returns
Orientation of the current pose.

Definition at line 69 of file pose2.h.

◆ GetPosition()

const CVector2& argos::CPose2::GetPosition ( ) const
inline

Returns the position of the pose.

Returns
2D position of the pose.

Definition at line 62 of file pose2.h.

◆ Inverse()

CPose2 argos::CPose2::Inverse ( ) const

Computes the returns the inverse of the current pose.

Returns
Inverse of the current pose.

Definition at line 20 of file pose2.cpp.

◆ operator!=()

bool argos::CPose2::operator!= ( const CPose2 c_pose) const
inline

Inequality operator overloading.

Parameters
c_poseInput pose with which the current pose needs to be compared.
Returns
True if the current pose is not equal to the input pose.

Definition at line 108 of file pose2.h.

◆ operator*() [1/2]

CPose2 argos::CPose2::operator* ( const CPose2 c_pose) const

Multiplication operator overloading.

Computes and returns the product of the two poses.

Parameters
c_poseInput pose to be multiplied with the current pose.
Returns
The product of the two poses.

Definition at line 36 of file pose2.cpp.

◆ operator*() [2/2]

CVector2 argos::CPose2::operator* ( const CVector2 c_vec) const

Multiplication operator overloading.

This method can be used to transform any vector with the current pose.

Parameters
c_vecInput vector to be transformed with the current pose.
Returns
The trasformed vector.

Definition at line 52 of file pose2.cpp.

◆ operator*=()

CPose2 & argos::CPose2::operator*= ( const CPose2 c_pose)

Multiplication operator overloading.

Multiplies the current pose with the input pose and stores in the current pose.

Parameters
c_poseinput pose to be multiplied with the current pose.
Returns
Current Pose.

Definition at line 67 of file pose2.cpp.

◆ operator==()

bool argos::CPose2::operator== ( const CPose2 c_pose) const
inline

Equality operator overloading.

Parameters
c_poseInput pose with which the current pose needs to be compared.
Returns
True if the current pose is equal to the input pose.

Definition at line 93 of file pose2.h.

◆ Rotate()

void argos::CPose2::Rotate ( const CRadians c_offset)
inline

Rotates the current pose by the given offset angle.

Parameters
c_offsetOffset by which the pose needs to be rotated.

Definition at line 76 of file pose2.h.

◆ Translate()

void argos::CPose2::Translate ( const CVector2 c_offset)
inline

Translates the current pose by the given vector.

Parameters
c_offsetOffset vector by which the pose needs to be moved.

Definition at line 84 of file pose2.h.