forked from programath/pose_graph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathregress_plane.h
43 lines (32 loc) · 838 Bytes
/
regress_plane.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
#include <iostream>
#include <fstream>
#include <string>
#include <cstring>
#include <map>
#include <vector>
#include <cmath>
#include <iomanip>
#include <Eigen/Dense>
#include <math.h>
typedef struct
{
int id;
std::vector<Eigen::Vector3d> xyz;
} Lane;
typedef struct
{
double timestamp;
Eigen::Vector3d xyz;
Eigen::Matrix3d rot;
} Pose;
class HDMapDataBase {
public:
HDMapDataBase() = delete;
HDMapDataBase(std::string hdmap_path);
void load_lane_from_hdmap(std::string txt_path);
void get_xyz_from_lane(std::vector<Eigen::Vector3d> & xyz);
std::vector<Eigen::Vector3d> find_neighbors(Eigen::Vector3d camera_xyz, double radius);
bool construct_plane_height_constraint(Eigen::Vector3d camera_xyz, double radius, double & height);
private:
std::vector<Lane> lane_dict_;
};