GCOP
1.0
|
00001 #ifndef GCOP_SE2_H 00002 #define GCOP_SE2_H 00003 00004 #include "group.h" 00005 00006 namespace gcop { 00007 00008 using namespace Eigen; 00009 00010 class SE2 : public Group<3,3> { 00011 public: 00012 00013 SE2(); 00014 00015 static SE2& Instance(); 00016 00017 void inv(Matrix3d &mi, const Matrix3d &m) const; 00018 00019 void hat(Matrix3d &vh, const Vector3d &v) const; 00020 00021 void hatinv(Vector3d &v, const Matrix3d &vh) const; 00022 00023 void Tg(Matrix3d& m, const Matrix3d &g) const; 00024 00025 void Ad(Matrix3d& m, const Matrix3d &g) const; 00026 00027 void ad(Matrix3d &m, const Vector3d &v) const; 00028 00029 void adinv(Vector3d& v, const Matrix3d& m) const; 00030 00031 void exp(Matrix3d &m, const Vector3d &v) const; 00032 00033 void log(Vector3d& v, const Matrix3d& m) const; 00034 00035 void plog(Vector3d& v, const Matrix3d& m) const; 00036 00037 void cay(Matrix3d& g, const Vector3d &v) const; 00038 00039 void cayinv(Vector3d& v, const Matrix3d& m) const; 00040 00041 void dcay(Matrix3d& m, const Vector3d& v) const; 00042 00043 void dcayinv(Matrix3d& m, const Vector3d& v) const; 00044 00045 void q2g(Matrix3d &g, const Vector3d &q) const; 00046 00047 void g2q(Vector3d &q, const Matrix3d &g) const; 00048 00049 double tol; 00050 00051 static RowVector2d r2hat(const Vector2d &a) 00052 { 00053 return RowVector2d(-a[1], a[0]); 00054 } 00055 00056 static double cross2(Vector2d a, Vector2d b) 00057 { 00058 return a[0]*b[1] - a[1]*b[0]; 00059 } 00060 }; 00061 } 00062 00063 #endif