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

The KilobotTracker class. More...

#include <kilobottracker_copy.h>

Inheritance diagram for KilobotTracker:

Public Slots

void LOOPstartstop (int stage)
 startLoop This slot is the target of the timeout on the QTimer tick, and fetches warped images from the thread buffers and stitches them
void LOOPiterate ()
 iterateTracker Use the existing feature matches to stitch the images and track the kilobots
void SETUPloadCalibration ()
 loadCalibration Load the calibration matrices from an OpenCV FileStorage format
bool RUNcapture ()
void SETUPfindKilobots ()
 findKilobots Find the locations of Kilobots in the stitched image
void identifyKilobots ()
 identifyKilobots Find out what IDs the Kilobots have
void updateCropPoints (QRect cropRect)
QSize getImageSize ()
void drawCircle (QPointF pos, float r, QColor col, int thickness=2, std::string text="", bool transparent=false)
void drawLine (std::vector< cv::Point > pos, QColor col, int thickness=2, std::string text="", bool transparent=false)
void clearDrawings ()
void drawCircleOnRecordedImage (QPointF pos, float r, QColor col, int thickness=2, std::string text="")
void clearDrawingsOnRecordedImage ()
void saveImage (QString file)
void saveVideoFrames (QString file, unsigned int numofframes)
void setSourceType (bool val)
void setKbMin (int val)
void setKbMax (int val)
void setCannyThresh (int val)
void setHoughAcc (int val)
void setKbLMin (int val)
void setKbLMax (int val)
void setLEDCannyThresh (int val)
void setLEDHoughAcc (int val)
void setLowRLED (int val)
void setLowGLED (int val)
void setLowBLED (int val)
void setHiRLED (int val)
void setHiGLED (int val)
void setHiBLED (int val)
void setHeightXSlider (int val)
void setHeightYSlider (int val)
void manuallyassignID (QPoint position)
void setVideoDir (QString dir)
 setVideoDir
void updateKilobotStates ()
void getInitialKilobotStates ()
void setTrackingType (int t_type)
void updateExperimentBroadcastingState (bool BroadcastingState)
void showIds (bool toggle)
 showIds
void detectred (bool toggle)
void detectgreen (bool toggle)
void detectblue (bool toggle)
void manualIDassignment (bool toggle)
void enableRuntimeIdentification (bool toggle)
void maxIDtoTry (QString maxIdStr)
void setManualID (QString manID)
void setFlipangle (double angle)
void RefreshDisplayedImage ()
 RefreshDisplayedImage Refresh the displayed image on the GUI.
void LOOPstartstop (int stage)
 startLoop This slot is the target of the timeout on the QTimer tick, and fetches warped images from the thread buffers and stitches them
void LOOPiterate ()
 iterateTracker Use the existing feature matches to stitch the images and track the kilobots
void SETUPloadCalibration ()
 loadCalibration Load the calibration matrices from an OpenCV FileStorage format
bool RUNcapture ()
void SETUPfindKilobots ()
 findKilobots Find the locations of Kilobots in the stitched image
void identifyKilobots ()
 identifyKilobots Find out what IDs the Kilobots have
void updateCropPoints (QRect cropRect)
QSize getImageSize ()
void drawCircle (QPointF pos, float r, QColor col, int thickness=2, std::string text="", bool transparent=false)
void drawLine (std::vector< cv::Point > pos, QColor col, int thickness=2, std::string text="", bool transparent=false)
void clearDrawings ()
void drawCircleOnRecordedImage (QPointF pos, float r, QColor col, int thickness=2, std::string text="")
void clearDrawingsOnRecordedImage ()
void saveImage (QString file)
void saveVideoFrames (QString file, unsigned int numofframes)
void setSourceType (bool val)
void setKbMin (int val)
void setKbMax (int val)
void setCannyThresh (int val)
void setHoughAcc (int val)
void setKbLMin (int val)
void setKbLMax (int val)
void setLEDCannyThresh (int val)
void setLEDHoughAcc (int val)
void setLowRLED (int val)
void setLowGLED (int val)
void setLowBLED (int val)
void setHiRLED (int val)
void setHiGLED (int val)
void setHiBLED (int val)
void setHeightXSlider (int val)
void setHeightYSlider (int val)
void manuallyassignID (QPoint position)
void setVideoDir (QString dir)
 setVideoDir
void updateKilobotStates ()
void getInitialKilobotStates ()
void setTrackingType (int t_type)
void updateExperimentBroadcastingState (bool BroadcastingState)
void showIds (bool toggle)
 showIds
void detectred (bool toggle)
void detectgreen (bool toggle)
void detectblue (bool toggle)
void manualIDassignment (bool toggle)
void enableRuntimeIdentification (bool toggle)
void maxIDtoTry (QString maxIdStr)
void setManualID (QString manID)
void setFlipangle (double angle)
void RefreshDisplayedImage ()
 RefreshDisplayedImage Refresh the displayed image on the GUI.

Signals

void errorMessage (QString)
 errorMessage Qt signal to update the UI message QLabel
void setStitchedImage (QPixmap)
void capturedImage (cv::Mat)
void identifyKilo (uint8_t)
void broadcastMessage (kilobot_broadcast)
void clearMsgQueue ()
void startExperiment (bool)
void stopExperiment ()
void toggleExpButton (int)
void activateExpButtons (int)
void setRuntimeIdentificationLock (bool)
void kiloList (QVector< Kilobot * >)
void circlesToDrawSig (QVector< drawnCircle >)
void errorMessage (QString)
 errorMessage Qt signal to update the UI message QLabel
void setStitchedImage (QPixmap)
void capturedImage (cv::Mat)
void identifyKilo (uint8_t)
void broadcastMessage (kilobot_broadcast)
void clearMsgQueue ()
void startExperiment (bool)
void stopExperiment ()
void toggleExpButton (int)
void activateExpButtons (int)
void setRuntimeIdentificationLock (bool)
void kiloList (QVector< Kilobot * >)
void circlesToDrawSig (QVector< drawnCircle >)

Public Member Functions

 KilobotTracker (QPoint smallImageSize=QPoint(300, 300), QObject *parent=0)
 KilobotTracker (QPoint smallImageSize=QPoint(300, 300), QObject *parent=0)

Public Attributes

KilobotExperimentexpt
int dummyVar2000 = 1000
int kbMinSize = 8
int kbMaxSize = 12
int houghAcc = 13
int cannyThresh = 90
int kbLEDMinSize = kbMinSize/7
int kbLEDMaxSize = kbMinSize*10/7
int LEDhoughAcc = houghAcc
int LEDcannyThresh = cannyThresh
int maxIDtoCheck = 100
uint manualID
int height_x_adj = 10
int height_y_adj = 10
float redLThreshold = 0.75
float redHThreshold = 0.0
float greenLThreshold = 0.56
float greenHThreshold = 0.75
float blueLThreshold = 0.65
float blueHThreshold = 0.0
QList< Vec3f > detectedCircles
bool debugBool = false
float morfiTrack_maxDisplacement = 12.0
float EFWL = 2.0
float smooth_fact = 0.5
bool drawDebugBool = false

Detailed Description

The KilobotTracker class.

This class contains the code that tracks Kilobots in the live camera or offline video feeds.

Member Function Documentation

◆ LOOPiterate

void KilobotTracker::LOOPiterate ( )
slot

iterateTracker Use the existing feature matches to stitch the images and track the kilobots

determine if executing the runtime-identification (RTI)

◆ LOOPstartstop

void KilobotTracker::LOOPstartstop ( int stage)
slot

startLoop This slot is the target of the timeout on the QTimer tick, and fetches warped images from the thread buffers and stitches them

@Salah: check if the compensator and blender is ever used

◆ setVideoDir [1/2]

void KilobotTracker::setVideoDir ( QString dir)
inlineslot

setVideoDir

Parameters
dirSet the path to video files for tracking

◆ setVideoDir [2/2]

void KilobotTracker::setVideoDir ( QString dir)
inlineslot

setVideoDir

Parameters
dirSet the path to video files for tracking

◆ showIds [1/2]

void KilobotTracker::showIds ( bool toggle)
inlineslot

showIds

Parameters
toggle

Accessor to allow drawing of KiloBot IDs

◆ showIds [2/2]

void KilobotTracker::showIds ( bool toggle)
inlineslot

showIds

Parameters
toggle

Accessor to allow drawing of KiloBot IDs


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