-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathLieGroup.h
58 lines (45 loc) · 1.94 KB
/
LieGroup.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef SUMMERCAMP_LIEGROUP_H
#define SUMMERCAMP_LIEGROUP_H
#include <Eigen/Dense>
namespace summercamp {
class LieGroup{
public:
typedef Eigen::Vector3d Vector3d;
typedef Eigen::Matrix<double,6,1> Vector6d;
typedef Eigen::Matrix3d Matrix3d;
typedef Eigen::Matrix<double,3,4> Matrix34d;
typedef Eigen::Matrix<double,4,4> Matrix4d;
typedef Eigen::Matrix<double,3,6> Matrix36d;
// Please return the camera to world transformation T_wc
// P_w=T_wc*P_c
static Matrix4d lookAt(Vector3d translation, // this means the position of the camera
Vector3d lookAtPoint, // this means the z axis direction
Vector3d up) // this means the -y axis direction
{
return Matrix4d();
}
// Coordinates: IMU, Camera, World
// T_cw : world to left camera
// T_ic : left camera to imu
// Please return the IMU to world transformation T_wi
static Matrix4d transfomMulti(Matrix4d Tcw,Matrix4d Tic);
// Given a rotation matrix R, please return the lie algebra log(R)
static Vector3d log(Matrix3d R);
// Given the rotation lie algebra so3, please return the rotation matrix R
static Matrix3d exp(Vector3d so3);
// Given a transform matrix T, please return the lie algebra log(T)
static Vector6d log(Eigen::Matrix4d T);
// Given the transform lie algebra se3, please return the transform matrix T
static Matrix4d exp(Vector6d se3);
// Given rotation lie algebra \xi , 3d point p,
// please return \frac{\partial{exp(\xi)*p}}{\partial{p}}
static Matrix3d jacobianP(Vector3d xi,Vector3d p);
// Given rotation R, 3d point p, sub to: R=exp(\xi)
// please return \frac{\partial{R*p}}{\partial{\xi}}
static Matrix3d jacobianR(Matrix3d R,Vector3d p);
// Given SE3 T, 3d point p, sub to : T=exp(\xi)
// please return \frac{\partial{T*p}}{\partial{\xi}}
static Matrix36d jacobianT(Matrix4d T,Vector3d p);
};
}
#endif