-
Notifications
You must be signed in to change notification settings - Fork 0
/
localizationTypes.hpp
82 lines (64 loc) · 2.11 KB
/
localizationTypes.hpp
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#ifndef LOCALIZATION_TYPES_H
#define LOCALIZATION_TYPES_H
#include <vector>
#include <string>
#include <boost/uuid/uuid.hpp>
#include <base/time.h>
#include <base/eigen.h>
#include <base/samples/RigidBodyState.hpp>
#include <base/samples/Pointcloud.hpp>
namespace localization
{
enum UpdateType
{
EKF, // EKF update
EKF_OB, // EKF with Observability analysis
UKF, //Unscented update
NO_UPDATE //NO UPDATE
};
typedef boost::uuids::uuid samples_uuid;
/** Envire graph types **/
class FeatureMeasurement
{
public:
boost::uuids::uuid index; // Indexes
base::Vector2d point; // Point in camera frame
FeatureMeasurement(){}
FeatureMeasurement(boost::uuids::uuid _index):index(_index){}
FeatureMeasurement(boost::uuids::uuid _index,
base::Vector2d &_point):index(_index), point(_point){}
};
/** Output port type **/
struct FilterInfo
{
base::Time time; //time-stamp
base::Time predict_execution_time;
base::Time update_execution_time;
base::Time add_features_execution_time;
base::Time remove_features_execution_time;
unsigned int number_features_added;
unsigned int number_features_removed;
unsigned int number_outliers;
std::vector< base::samples::RigidBodyState > sensors_rbs; //Rbs with the orientation and position of the contact point
base::MatrixXd Pk; //filter covariance matrix
};
}
namespace visual_stereo
{
typedef boost::uuids::uuid samples_uuid;
/** Input port types **/
struct Feature
{
boost::uuids::uuid index; // Indexes of the points/samples uses to compute the relative measurement
base::Vector3d stereo_point; // 2D stereo point (u_left, u_right, v)
base::Vector3d point_3d; // 3D point (x, y, z)
base::Matrix3d cov_3d; // Covariance of the points/samples uses to compute the relative measurement
};
struct ExteroFeatures
{
base::Time time;
unsigned int img_idx;
std::vector<Feature> features;
};
}
#endif