7 #include <argos3/core/utility/math/pose2.h>
13 m_cPosition(c_position[0], c_position[1]) {
16 m_cOrientation = _axis[2]*_angle;
22 cResult.m_cOrientation = -1.0*m_cOrientation;
25 SinCos(cResult.m_cOrientation, fSin, fCos);
27 fSin =
Sin(cResult.m_cOrientation);
28 fCos =
Cos(cResult.m_cOrientation);
30 cResult.m_cPosition.m_fX = -m_cPosition.m_fX*fCos + m_cPosition.m_fY*fSin;
31 cResult.m_cPosition.m_fY = -m_cPosition.m_fX*fSin - m_cPosition.m_fY*fCos;
40 SinCos(cResult.m_cOrientation, fSin, fCos);
42 fSin =
Sin(cResult.m_cOrientation);
43 fCos =
Cos(cResult.m_cOrientation);
45 cResult.m_cPosition.m_fX += c_pose.m_cPosition.m_fX*fCos - c_pose.m_cPosition.m_fY*fSin;
46 cResult.m_cPosition.m_fY += c_pose.m_cPosition.m_fX*fSin + c_pose.m_cPosition.m_fY*fCos;
47 cResult.m_cOrientation += c_pose.m_cOrientation;
56 SinCos(cResult.m_cOrientation, fSin, fCos);
58 fSin =
Sin(cResult.m_cOrientation);
59 fCos =
Cos(cResult.m_cOrientation);
61 cResult.m_cPosition.m_fX += c_vec.m_fX*fCos - c_vec.m_fY*fSin;
62 cResult.m_cPosition.m_fY += c_vec.m_fX*fSin + c_vec.m_fY*fCos;
63 return cResult.m_cPosition;
70 SinCos(m_cOrientation, fSin, fCos);
72 fSin =
Sin(cResult.m_cOrientation);
73 fCos =
Cos(cResult.m_cOrientation);
75 m_cPosition.m_fX += c_pose.m_cPosition.m_fX*fCos - c_pose.m_cPosition.m_fY*fSin;
76 m_cPosition.m_fY += c_pose.m_cPosition.m_fX*fSin + c_pose.m_cPosition.m_fY*fCos;
77 m_cOrientation += c_pose.m_cOrientation;
float Real
Collects all ARGoS code.
The namespace containing all the ARGoS related code.
Real Cos(const CRadians &c_radians)
Computes the cosine of the passed value in radians.
void SinCos(const CRadians &c_radians, Real &f_sin, Real &f_cos)
Computes the sine and cosine of the passed value in radians.
Real Sin(const CRadians &c_radians)
Computes the sine of the passed value in radians.
It defines the basic type CRadians, used to store an angle value in radians.
CPose2 Inverse() const
Computes the returns the inverse of the current pose.
CPose2 operator*(const CPose2 &c_pose) const
Multiplication operator overloading.
CPose2 & operator*=(const CPose2 &c_pose)
Multiplication operator overloading.
CPose2()
Default constructor.
void ToAngleAxis(CRadians &c_angle, CVector3 &c_vector) const