-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patht265.h
More file actions
62 lines (42 loc) · 916 Bytes
/
Copy patht265.h
File metadata and controls
62 lines (42 loc) · 916 Bytes
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
//Defines the class that sends data to the pixhawk over USB
#ifndef T265_H
#define T265_H
#include <cmath>
#include <librealsense2/rs.hpp>
#include <iostream>
#include <unistd.h>
#include <mutex>
#include <thread>
#include "transforms.h"
#include "common.h"
class T265Data{
uint64_t timestamp; //Unix tiime since epoch
float x;
float y;
float z;
float roll;
float pitch;
float yaw;
std::mutex mu;
public:
void setData(float xS,float yS,float zS,float rollS,float pitchS,float yawS, uint64_t &t);
void getData(float &xD,float &yD,float &zD,float &rollD,float &pitchD,float &yawD, uint64_t &t);
};
class T265{
private:
//threading
std::thread readThread;
bool readThreadActive;
std::mutex mutex;
void readPose();
T265Data *data;
public:
T265(T265Data *d);
void startReading();
void stopReading();
~T265(){
stopReading();
data = NULL;
}
};
#endif