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 Class Reference

Environment logic and utility class for the robot arena. More...

#include <envbrain.h>

Inheritance diagram for EnvBrain:

Public Slots

Environment update and utility slots
void refresh ()
 Periodically refreshes environment state and visualization.
void addNoise ()
 Adds spatial noise to the arena image and updates the visualization.
void resetHeatMap ()
 Resets the heatmap to its initial state.
void updateNoiseProps (int time_interval)
 Updates the noise timer interval based on a slider/time parameter.
void connect_disconnect_add_noise (bool connect_bool)
 Connects or disconnects the timer for adding noise to the environment.
void update_centroid ()
 Updates centroid of robot distribution. (Empty or placeholder)
void update_objects_to_draw ()
 Updates arena objects (e.g. ball, robots) to be drawn.

Public Member Functions

 EnvBrain (WorldModel *wm=nullptr)
 Constructs the EnvBrain object.
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.
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.

Detailed Description

Environment logic and utility class for the robot arena.

Handles collective environment updates, heatmap operations, spatial noise, and geometry generation.

Constructor & Destructor Documentation

◆ EnvBrain()

EnvBrain::EnvBrain ( WorldModel * wm = nullptr)
explicit

Constructs the EnvBrain object.

Parameters
wmPointer to the world model.

Initializes environment logic, heatmaps, ball velocity, and timers for periodic updates.

Parameters
wmPointer to the world model.

Member Function Documentation

◆ addNoise

void EnvBrain::addNoise ( )
slot

Adds spatial noise to the arena image and updates the visualization.

Adds spatial noise to the arena image.

Applies random noise to each tile of the arena image and updates the processed image for visualization.

◆ connect_disconnect_add_noise

void EnvBrain::connect_disconnect_add_noise ( bool connect_bool)
slot

Connects or disconnects the timer for adding noise to the environment.

Parameters
connect_boolIf true, connect; else disconnect.

◆ makeGridPoints()

QList< QPoint > EnvBrain::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.

Generates a grid of points within the arena, helpful for initialization of an experiment.

Parameters
nRowsNumber of rows.
nColsNumber of columns.
dxHorizontal spacing between points.
dyVertical spacing between points.
originTop-left origin for the grid.
Returns
List of grid points.

◆ makeStarPoints()

QList< QPoint > EnvBrain::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.

Generates star-shaped point arrangements centered at a given origin, helpful for initialization of an experiment.

Parameters
nArmsNumber of star arms.
nLayersNumber of layers (distance steps) on each arm.
dDistance between layers.
originCenter of the star.
Returns
List of star points.

◆ refresh

void EnvBrain::refresh ( )
slot

Periodically refreshes environment state and visualization.

Periodically refreshes environment state, heatmap, and visualization objects.

Called on a timer, updates robot positions, heatmap accumulation, centroid, and visualization elements.

◆ resetHeatMap

void EnvBrain::resetHeatMap ( )
slot

Resets the heatmap to its initial state.

Resets the heatmap to an initial (zeroed) state.

◆ update_centroid

void EnvBrain::update_centroid ( )
slot

Updates centroid of robot distribution. (Empty or placeholder)

(Placeholder) Updates centroid of robot distribution. [Empty function]

◆ update_objects_to_draw

void EnvBrain::update_objects_to_draw ( )
slot

Updates arena objects (e.g. ball, robots) to be drawn.

Updates objects (e.g., the ball) to be drawn in the environment.

Handles movement, collision with arena bounds, and collisions with robot circles.

◆ updateNoiseProps

void EnvBrain::updateNoiseProps ( int time_interval)
slot

Updates the noise timer interval based on a slider/time parameter.

Updates the noise timer interval exponentially with respect to a slider/time parameter.

Parameters
time_intervalUser-defined time interval (slider value).

The documentation for this class was generated from the following files: