10 #include <argos3/core/utility/math/vector3.h>
11 #include <argos3/core/utility/math/quaternion.h>
33 m_cPosition(c_pose.m_cPosition),
34 m_cOrientation(c_pose.m_cOrientation) {
43 m_cPosition(c_position),
44 m_cOrientation(c_orientation) {
54 m_cPosition(f_x, f_y),
55 m_cOrientation(f_th) {
63 {
return m_cPosition;}
70 {
return m_cOrientation;}
77 m_cOrientation += c_offset;
85 m_cPosition = (*this)*c_offset;
94 if(m_cPosition.m_fX != c_pose.m_cPosition.m_fX)
96 if(m_cPosition.m_fY != c_pose.m_cPosition.m_fY)
98 if(m_cOrientation != c_pose.m_cOrientation)
109 if(m_cPosition.m_fX == c_pose.m_cPosition.m_fX)
111 if(m_cPosition.m_fY == c_pose.m_cPosition.m_fY)
113 if(m_cOrientation == c_pose.m_cOrientation)
127 << c_pose.m_cPosition.
GetX() <<
","
128 << c_pose.m_cPosition.
GetY() <<
")\n"
float Real
Collects all ARGoS code.
The namespace containing all the ARGoS related code.
It defines the basic type CRadians, used to store an angle value in radians.
static const Real RADIANS_TO_DEGREES
Constant to convert from radians to degrees.
Real GetValue() const
Returns the value in radians.
CPose2 Inverse() const
Computes the returns the inverse of the current pose.
CPose2(const CVector2 &c_position, const CRadians &c_orientation)
Constructor using input position and angle.
CPose2(const CPose2 &c_pose)
Copy constructor.
const CVector2 & GetPosition() const
Returns the position of the pose.
void Translate(const CVector2 &c_offset)
Translates the current pose by the given vector.
CPose2 operator*(const CPose2 &c_pose) const
Multiplication operator overloading.
CPose2(const Real f_x, const Real f_y, const Real f_th)
Constructor using individual coordinate values and angle.
const CRadians & GetOrientation() const
Returns the orientation of the pose.
bool operator==(const CPose2 &c_pose) const
Equality operator overloading.
CPose2 & operator*=(const CPose2 &c_pose)
Multiplication operator overloading.
CPose2()
Default constructor.
bool operator!=(const CPose2 &c_pose) const
Inequality operator overloading.
friend std::ostream & operator<<(std::ostream &c_os, const CPose2 &c_pose)
Serialize the contents of the 2D Pose onto a stream.
void Rotate(const CRadians &c_offset)
Rotates the current pose by the given offset angle.
Real GetY() const
Returns the y coordinate of this vector.
Real GetX() const
Returns the x coordinate of this vector.