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
envbrain.h
Go to the documentation of this file.
1#ifndef ENVBRAIN_H
2#define ENVBRAIN_H
3
10
11#include <QObject>
12#include <QtCore>
13#include <QTimer>
14#include <opencv2/opencv.hpp>
15#include <opencv2/cudaarithm.hpp>
16
17#include "ui/worldmodel.h"
18
24class EnvBrain : public QObject
25{
26 Q_OBJECT
27public:
32 explicit EnvBrain(WorldModel *wm = nullptr);//, QObject *parent);
33
43 QList<QPoint> makeGridPoints(int nRows=1, int nCols=1, int dx=10, int dy=10, QPoint origin=QPoint(0,0));
52 QList<QPoint> makeStarPoints(int nArms=5, int nLayers=10, int d=10, QPoint origin=QPoint(0,0));
53
54private:
55 int listInd = 0, nList = 500;
56 int trace_rad = 10; // [px] radius of the circles as the radius of the trace on heatmap
57 WorldModel* _wm;
58 QTimer _timer, _timerNoise;
59
60
61 cv::Mat heatMap, heatMapOnFrame, circTemp;
62// cv::Mat heatMapGray;
63// cv::cuda::GpuMat heatMapGPU;
64
65
66 // Noise:
67 QImage arenaImage;
68
69
70
71
72public slots:
75
79 void refresh();
83 void addNoise();
87 void resetHeatMap();
92 void updateNoiseProps(int time_interval);
97 void connect_disconnect_add_noise(bool connect_bool);
101 void update_centroid();
106
108
109signals:
110
111};
112
113#endif // ENVBRAIN_H
void connect_disconnect_add_noise(bool connect_bool)
Connects or disconnects the timer for adding noise to the environment.
Definition envbrain.cpp:139
void updateNoiseProps(int time_interval)
Updates the noise timer interval based on a slider/time parameter.
Definition envbrain.cpp:124
void update_centroid()
Updates centroid of robot distribution. (Empty or placeholder)
Definition envbrain.cpp:154
QList< QPoint > makeStarPoints(int nArms=5, int nLayers=10, int d=10, QPoint origin=QPoint(0, 0))
Generates star-shaped point arrangements centered at a given origin.
Definition envbrain.cpp:88
void update_objects_to_draw()
Updates arena objects (e.g. ball, robots) to be drawn.
Definition envbrain.cpp:164
void refresh()
Periodically refreshes environment state and visualization.
Definition envbrain.cpp:261
EnvBrain(WorldModel *wm=nullptr)
Constructs the EnvBrain object.
Definition envbrain.cpp:19
void resetHeatMap()
Resets the heatmap to its initial state.
Definition envbrain.cpp:108
QList< QPoint > makeGridPoints(int nRows=1, int nCols=1, int dx=10, int dy=10, QPoint origin=QPoint(0, 0))
Generates a grid of points within the arena.
Definition envbrain.cpp:65
void addNoise()
Adds spatial noise to the arena image and updates the visualization.
Definition envbrain.cpp:371
Definition worldmodel.h:41