-
Notifications
You must be signed in to change notification settings - Fork 0
/
data_generator.h
59 lines (49 loc) · 1.42 KB
/
data_generator.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
59
#include <cstdlib>
#include <cmath>
#include <vector>
#include <tuple>
#include <map>
#include <algorithm>
#include <random>
#include <eigen3/Eigen/Dense>
#include <eigen3/Eigen/Geometry>
using namespace std;
using namespace Eigen;
class DataGenerator
{
public:
DataGenerator();
void update();
double getTime();
Vector3d getPoint(int i);
Vector3d getAP(int i);
vector<Vector3d> getCloud();
Vector3d getPosition();
Matrix3d getRotation();
Vector3d getVelocity();
Vector3d getAngularVelocity();
Vector3d getLinearAcceleration();
vector<pair<int, Vector3d>> getImage();
static int const NUMBER_OF_CAMERA = 2;
//static int const NUMBER_OF_AP = 1;
static int const NUM_POINTS = 500;
static int const MAX_BOX = 10;
static int const FREQ = 500;
static int const IMU_PER_IMG = 50;
static int const IMU_PER_WIFI = 5;
static int const MAX_TIME = 10;
static int const FOV = 90;
private:
int pts[NUM_POINTS * 3];
double t;
map<int, int> before_feature_id[NUMBER_OF_CAMERA];
map<int, int> current_feature_id[NUMBER_OF_CAMERA];
int current_id;
Matrix3d Ric[NUMBER_OF_CAMERA];
Vector3d Tic[NUMBER_OF_CAMERA];
//Vector3d ap[NUMBER_OF_AP];
Matrix3d acc_cov, gyr_cov;
Matrix2d pts_cov;
default_random_engine generator;
normal_distribution<double> distribution;
};