forked from rock-simulation/simulation-orogen-mars
-
Notifications
You must be signed in to change notification settings - Fork 1
/
objectDetectionTypes.hpp
71 lines (58 loc) · 1.52 KB
/
objectDetectionTypes.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
#ifndef MARS_OBJECT_DETECTION_TYPES_HH
#define MARS_OBJECT_DETECTION_TYPES_HH
#include <vector>
#include <string>
#include <base/Pose.hpp>
#include <base/Time.hpp>
// TODO 1 #include <mars/interfaces/snmesh.h>
namespace mars
{
struct Header {
base::Time stamp;
unsigned int seq = 0;
std::string frame_id = "1";
};
struct PoseWithCovariance{
base::Pose pose;
float covariance[36] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
};
struct ObjectHypothesisWithPose {
long int id;
float score = 1.0;
std::string type;
PoseWithCovariance pose;
};
struct BoundingBox3D {
base::Pose center;
base::Vector3d size;
};
struct PointCloud {
Header header;
unsigned int width;
std::vector<base::Vector3d> points;
std::vector<base::Vector4d> colors;
/* TODO 1
void init(interfaces:::snmesh mesh) {
for (mesh.vertices)
}
*/
};
struct Detection3D {
Header header;
ObjectHypothesisWithPose results[1];
BoundingBox3D bbox;
PointCloud source_cloud;
};
struct Detection3DArray {
Header header;
std::vector<Detection3D> detections;
Detection3DArray(unsigned int size) : detections(size) {};
Detection3DArray() : detections(10) {};
};
}
#endif