]> rtime.felk.cvut.cz Git - eurobot/public.git/blobdiff - src/robomon/RobomonAtlantis.h
robomon: Add button for strategy switching.
[eurobot/public.git] / src / robomon / RobomonAtlantis.h
index 0b6592b198645f3569b0d60445a34e430e4e4f55..f62fe99c9b7d28bd683abd43a54d9990ff9bd307 100644 (file)
@@ -19,6 +19,7 @@
 #include "PlaygroundScene.h"
 #include "playgroundview.h"
 #include "Robot.h"
+#include "Map.h"
 #include <roboorte_robottype.h>
 #include "trail.h"
 #include "hokuyoscan.h"
@@ -37,6 +38,7 @@ class QDial;
 class QSlider;
 class QProgressBar;
 class QFont;
+class QImage;
 
 class RobomonAtlantis : public QWidget
 {
@@ -55,15 +57,16 @@ signals:
        void motionStatusReceivedSignal();
        void actualPositionReceivedSignal();
        void powerVoltageReceivedSignal();
-       
+
 public slots:
        void showMap(bool show);
        void useOpenGL(bool use);
        void showTrails(bool show);
+       void showShapeDetect(bool show);
        void resetTrails();
 private slots:
        /************************************************************
-        * GUI actions 
+        * GUI actions
         ************************************************************/
        void setVoltage33(int state);
        void setVoltage50(int state);
@@ -78,9 +81,11 @@ private slots:
        void changeObstacle(QPointF position);
        void sendStart(int plug);
        void setTeamColor(int plug);
+        void changeStrategy_1();
+        void changeStrategy_0();
 
        /************************************************************
-        * ORTE 
+        * ORTE
         ************************************************************/
        void motionStatusReceived();
        void actualPositionReceived();
@@ -107,6 +112,7 @@ private:
 
        void createRobots();
        void createActions();
+       void createMap();
 
        QVBoxLayout *leftLayout;
        QVBoxLayout *rightLayout;
@@ -142,7 +148,7 @@ private:
 /*     QSlider *rightMotorSlider; */
 /*     QCheckBox *bothMotorsCheckBox; */
 /*     QPushButton *stopMotorsPushButton; */
-       QDial *vidle;
+       //QDial *vidle;
 
        /* power management */
        QCheckBox *voltage33CheckBox;
@@ -160,12 +166,15 @@ private:
        QLabel *fsm_motion_state;
        QCheckBox *startPlug;
        QCheckBox *colorChoser;
+        QPushButton *strategyButton;
 public:
        /* robot */
        Robot *robotRefPos;
        Robot *robotEstPosBest;
        Robot *robotEstPosIndepOdo;
        Robot *robotEstPosOdo;
+
+       Map *mapImage;
 private:
        Trail *trailRefPos;
        Trail *trailEstPosBest;
@@ -182,17 +191,18 @@ private:
        void openSharedMemory();
        bool sharedMemoryOpened;
        QTimer *mapTimer;
-       
+
        /* obstacle simulation */
        double distanceToWallHokuyo(int beamnum);
        double distanceToObstacleHokuyo(int beamnum, Point obstacle, double obstacleSize);
+       double distanceToCircularObstacleHokuyo(int beamnum, Point center, double diameter);
        int simulationEnabled;
 
        QTimer *obstacleSimulationTimer;
        Point simulatedObstacle;
 
        /************************************************************
-        * ORTE 
+        * ORTE
         ************************************************************/
        void createOrte();