LARS
LARS (Light Augmented Reality System) is an open-source framework for light-based interaction and real-time tracking in multi-robot experiments. Inspired by ARK, LARS extends the augmented reality paradigm to robotic collectives by projecting dynamic visual cues and environments onto the arena, enabling new experimental possibilities for collective robotics research, education, and outreach. LARS features integrated tracking, light projection, and modular experiment control with a user-friendly Qt GUI.
Loading...
Searching...
No Matches
kilobotoverheadcontroller.h
1#ifndef KILOBOTOVERHEADCONTROLLER_H
2#define KILOBOTOVERHEADCONTROLLER_H
3
4#include <QObject>
5#include <assert.h>
6#include <math.h>
7#include "Kilobot/kilobot.h"
8#include <QList>
9#include <QPushButton>
10#include<QTimer>
11
12// Include for communication with the OHC
13#include <stdint.h>
14#include "ohc/serialwin.h"
15#include "ohc/serialconn.h"
16#include "ohc/calibrate.h"
17
18
19
20class KilobotOverheadController : public QObject
21{
22 Q_OBJECT
23public:
24 explicit KilobotOverheadController(QObject *parent = 0);
25 ~KilobotOverheadController();
26
27signals:
28 void errorMessage(QString);
29 void setStopButton(bool);
30 void SignalMsgsQueueState(bool);
31
32public slots:
33 void identifyKilobot(uint8_t id);
34 void broadcastMessage(kilobot_broadcast);
35 void signalKilobot(kilobot_message);
36 void serialUpdateStatus(QString);
37 void showError(QString);
38 void SendMsgsQueueState(bool state){emit SignalMsgsQueueState(state);}
39
40
41 void clearMsgQueue(){this->serial_conn->clearQueue();}
42
43 // connect / disconnect
44 void toggleConnection();
45
46 // access the build in kilobot commands for all kilobots
47 void resetKilobots();
48 void sleepKilobots();
49 void runKilobots();
50 void stopSending();
51 void checkVoltage();
52
53 // program loading
54 void chooseProgramFile();
55 void uploadProgram();
56
57 // timed messages
58 void sendBatch();
59
60 void sendDataMessagePub(uint8_t *payload, uint8_t type);
61
62private:
63
64 // PRIVATE MEMBERS
65
66 int device;
67 bool sending;
68 bool connected;
69
70 SerialConnection *serial_conn;
71
72 QString serial_status;
73
74 QString program_file;
75
76 // PRIVATE METHODS
77
78 void updateStatus();
79
80 void sendMessage(int);
81 void sendDataMessage(uint8_t *, uint8_t);
82
83 QVector < kilobot_message > message_q;
84
85 QTimer timer;
86 QTime lastMsgTime;
87
88};
89
90
91#endif // KILOBOTOVERHEADCONTROLLER_H
Definition serialconn.h:12
Definition kilobot.h:31
Definition kilobot.h:25