-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tracker.hpp
37 lines (26 loc) · 848 Bytes
/
Tracker.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
#pragma once
#include "apps/eclipseworkspace/facial/TrackerObject.hpp"
#include "apps/eclipseworkspace/facial/UdpClient.hpp"
#include "engine/alice/alice_codelet.hpp"
#include "messages/detections.capnp.h"
#include <vector>
namespace isaac {
class Tracker : public alice::Codelet {
public:
void start() override;
void tick() override;
ISAAC_PROTO_RX(Detections3Proto, enterance_detections);
ISAAC_PROTO_RX(Detections3Proto, exit_detections);
//squared distance thresh, to save a sqrt call
ISAAC_PARAM(double, distance_threshold, 0.01)
ISAAC_PARAM(int, frames_threshold, 3)
private:
udp_client* client;
std::vector<TrackerObject> tracked_objects;
bool DoorState;
int num_people;
int trackObject(Vector3d location);
void removeUntracked();
};
} // namespace isaac
ISAAC_ALICE_REGISTER_CODELET(isaac::Tracker);