Browse Source

aruco rajouté + script pour compiler et installer opencv avec le support aruco

Sébastien DI MERCURIO 2 years ago
parent
commit
2ef33f2e59
31 changed files with 1465 additions and 933 deletions
  1. 88
    0
      software/install-opencv.sh
  2. 71
    136
      software/monitor/monitor/Client.cs
  3. 80
    48
      software/monitor/monitor/MonitorUI.cs
  4. 207
    185
      software/monitor/monitor/gtk-gui/MainWindow.cs
  5. 78
    50
      software/monitor/monitor/gtk-gui/gui.stetic
  6. BIN
      software/monitor/monitor/monitor
  7. 5
    0
      software/raspberry/superviseur-robot/.dep.inc
  8. BIN
      software/raspberry/superviseur-robot/dist/Debug__Pthread_/GNU-Linux/superviseur-robot
  9. BIN
      software/raspberry/superviseur-robot/dist/Debug__Pthread__RPI/GNU-Linux/superviseur-robot
  10. 34
    3
      software/raspberry/superviseur-robot/lib/camera.cpp
  11. 9
    1
      software/raspberry/superviseur-robot/lib/camera.h
  12. 1
    1
      software/raspberry/superviseur-robot/lib/commonitor.cpp
  13. 83
    95
      software/raspberry/superviseur-robot/lib/img.cpp
  14. 12
    11
      software/raspberry/superviseur-robot/lib/img.h
  15. 30
    30
      software/raspberry/superviseur-robot/nbproject/Makefile-Debug.mk
  16. 27
    27
      software/raspberry/superviseur-robot/nbproject/Makefile-Debug__Pthread_.mk
  17. 131
    0
      software/raspberry/superviseur-robot/nbproject/Makefile-Debug__Pthread__RPI.mk
  18. 30
    30
      software/raspberry/superviseur-robot/nbproject/Makefile-Debug__RPI_.mk
  19. 30
    30
      software/raspberry/superviseur-robot/nbproject/Makefile-Release.mk
  20. 1
    1
      software/raspberry/superviseur-robot/nbproject/Makefile-impl.mk
  21. 8
    0
      software/raspberry/superviseur-robot/nbproject/Makefile-variables.mk
  22. 76
    0
      software/raspberry/superviseur-robot/nbproject/Package-Debug__Pthread__RPI.bash
  23. 167
    168
      software/raspberry/superviseur-robot/nbproject/configurations.xml
  24. 1
    0
      software/raspberry/superviseur-robot/nbproject/private/Makefile-variables.mk
  25. 37
    2
      software/raspberry/superviseur-robot/nbproject/private/configurations.xml
  26. 3
    0
      software/raspberry/superviseur-robot/nbproject/private/downloads-10.105.1.13-pi-22
  27. 1
    0
      software/raspberry/superviseur-robot/nbproject/private/private.xml
  28. 86
    25
      software/raspberry/superviseur-robot/nbproject/private/timestamps-10.105.1.13-pi-22
  29. 5
    1
      software/raspberry/superviseur-robot/nbproject/project.xml
  30. 159
    89
      software/raspberry/superviseur-robot/tasks_pthread.cpp
  31. 5
    0
      software/raspberry/superviseur-robot/tasks_pthread.h

+ 88
- 0
software/install-opencv.sh View File

@@ -0,0 +1,88 @@
1
+#!/bin/bash
2
+
3
+######################################
4
+# INSTALL OPENCV ON UBUNTU OR DEBIAN #
5
+######################################
6
+
7
+# |          THIS SCRIPT IS TESTED CORRECTLY ON          |
8
+# |------------------------------------------------------|
9
+# | OS               | OpenCV       | Test | Last test   |
10
+# |------------------|--------------|------|-------------|
11
+# | Ubuntu 18.04 LTS | OpenCV 3.4.2 | OK   | 18 Jul 2018 |
12
+# | Debian 9.5       | OpenCV 3.4.2 | OK   | 18 Jul 2018 |
13
+# |----------------------------------------------------- |
14
+# | Debian 9.0       | OpenCV 3.2.0 | OK   | 25 Jun 2017 |
15
+# | Debian 8.8       | OpenCV 3.2.0 | OK   | 20 May 2017 |
16
+# | Ubuntu 16.04 LTS | OpenCV 3.2.0 | OK   | 20 May 2017 |
17
+
18
+
19
+# VERSION TO BE INSTALLED
20
+
21
+OPENCV_VERSION='3.4.2'
22
+
23
+
24
+# 1. KEEP UBUNTU OR DEBIAN UP TO DATE
25
+
26
+sudo apt-get -y update
27
+# sudo apt-get -y upgrade       # Uncomment this line to install the newest versions of all packages currently installed
28
+# sudo apt-get -y dist-upgrade  # Uncomment this line to, in addition to 'upgrade', handles changing dependencies with new versions of packages
29
+# sudo apt-get -y autoremove    # Uncomment this line to remove packages that are now no longer needed
30
+
31
+
32
+# 2. INSTALL THE DEPENDENCIES
33
+
34
+# Build tools:
35
+sudo apt-get install -y build-essential cmake
36
+
37
+# GUI (if you want to use GTK instead of Qt, replace 'qt5-default' with 'libgtkglext1-dev' and remove '-DWITH_QT=ON' option in CMake):
38
+#sudo apt-get install -y qt5-default libvtk6-dev
39
+sudo apt-get install -y libgtkglext1-dev
40
+
41
+# Media I/O:
42
+sudo apt-get install -y zlib1g-dev libjpeg-dev libwebp-dev libpng-dev libtiff5-dev libjasper-dev libopenexr-dev libgdal-dev
43
+
44
+# Video I/O:
45
+sudo apt-get install -y libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev yasm libopencore-amrnb-dev libopencore-amrwb-dev libv4l-dev libxine2-dev
46
+
47
+# Parallelism and linear algebra libraries:
48
+sudo apt-get install -y libtbb-dev libeigen3-dev
49
+
50
+# Python:
51
+sudo apt-get install -y python-dev python-tk python-numpy python3-dev python3-tk python3-numpy
52
+
53
+# Java:
54
+sudo apt-get install -y ant default-jdk
55
+
56
+# Documentation:
57
+sudo apt-get install -y doxygen
58
+
59
+
60
+# 3. INSTALL THE LIBRARY
61
+
62
+sudo apt-get install -y unzip wget
63
+wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip
64
+
65
+unzip ${OPENCV_VERSION}.zip
66
+rm ${OPENCV_VERSION}.zip
67
+mv opencv-${OPENCV_VERSION} OpenCV
68
+
69
+# 3.5 Add Aruco
70
+# Get opencv_contrib from github
71
+# Copy aruco directory from <opencv_contrib>/modules to <opencv>/modules
72
+wget https://github.com/opencv/opencv_contrib/archive/${OPENCV_VERSION}.zip
73
+mv ${OPENCV_VERSION}.zip opencv_contrib-${OPENCV_VERSION}.zip
74
+unzip opencv_contrib-${OPENCV_VERSION}.zip
75
+
76
+cd OpenCV
77
+mkdir build
78
+cd build
79
+# cmake -DWITH_QT=ON -DWITH_OPENGL=ON -DFORCE_VTK=ON -DWITH_TBB=ON -DWITH_GDAL=ON -DWITH_XINE=ON -DBUILD_EXAMPLES=ON -DENABLE_PRECOMPILED_HEADERS=OFF ..
80
+cmake -DWITH_OPENGL=ON -DFORCE_VTK=ON -DWITH_TBB=ON -DWITH_GDAL=ON -DWITH_XINE=ON -DBUILD_EXAMPLES=ON -DENABLE_PRECOMPILED_HEADERS=ON -D INSTALL_C_EXAMPLES=ON -D BUILD_JAVA=OFF -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-${OPENCV_VERSION}/modules -DBUILD_aruco=ON ..
81
+make -j5
82
+sudo make install
83
+sudo ldconfig
84
+
85
+
86
+# 4. EXECUTE SOME OPENCV EXAMPLES AND COMPILE A DEMONSTRATION
87
+
88
+# To complete this step, please visit 'http://milq.github.io/install-opencv-ubuntu-debian'.

+ 71
- 136
software/monitor/monitor/Client.cs View File

@@ -35,7 +35,7 @@ namespace monitor
35 35
         /// <summary>
36 36
         /// Default server name
37 37
         /// </summary>
38
-        public const string defaultIP = "localhost";
38
+        public const string defaultIP = "10.105.1.13";
39 39
 
40 40
         /// <summary>
41 41
         /// Default server port number
@@ -55,7 +55,7 @@ namespace monitor
55 55
         /// <summary>
56 56
         /// Size of internal buffer used when reading data from server
57 57
         /// </summary>
58
-        private const int BufferMaxSize = 512;
58
+        private const int BufferMaxSize = 8*1024;
59 59
 
60 60
         /// <summary>
61 61
         /// Internal buffer used when reading data from server
@@ -66,7 +66,7 @@ namespace monitor
66 66
         /// buffer containing received message from TCP server
67 67
         /// Used to concatenate internal buffers into one
68 68
         /// </summary>
69
-        private static byte[] receiveBuffer;
69
+        //private static byte[] receiveBuffer;
70 70
 
71 71
         //private static int initialReceiveBufferIndex = 0;
72 72
 
@@ -84,11 +84,6 @@ namespace monitor
84 84
         public static ReadEvent readEvent = null;
85 85
 
86 86
         /// <summary>
87
-        /// Thread used in reception
88
-        /// </summary>
89
-        private static Thread readThread;
90
-
91
-        /// <summary>
92 87
         /// Open connection to server "host", on default port number.
93 88
         /// </summary>
94 89
         /// <returns>true if connection succeded, false otherwise</returns>
@@ -159,131 +154,11 @@ namespace monitor
159 154
         /// <summary>
160 155
         /// Callback call by stream.BeginRead after reception of newLength data
161 156
         /// </summary>
162
-        //private static void ReadCallback()
163
-        //{
164
-        //    char character;
165
-        //    int data;
166
-        //    byte[] buffer=new byte[4096];
167
-        //    int lengthRead;
168
-
169
-        //    while (client.Connected)
170
-        //    {
171
-        //        try
172
-        //        {
173
-        //            //data = stream.ReadByte();
174
-        //            lengthRead = stream.Read(buffer, 0, buffer.Length);
175
-        //        }
176
-        //        catch (ObjectDisposedException)
177
-        //        {
178
-        //            Console.WriteLine("Connection to server dropped (object disposed)!");
179
-        //            return;
180
-        //        }
181
-        //        catch (System.IO.IOException)
182
-        //        {
183
-        //            Console.WriteLine("Connection to server dropped (other error)");
184
-        //            return;
185
-        //        }
186
-
187
-        //        if (lengthRead > 0) // a data was read
188
-        //        {
189
-        //            //character = (char)data;
190
-        //            var str = System.Text.Encoding.Default.GetString(buffer);
191
-        //            int indexOf = str.IndexOf('\n');
192
-
193
-        //            //if (character != '\n')
194
-        //            if (indexOf == -1) // \n doesn't exists
195
-        //            {
196
-        //                message.Append(str);
197
-
198
-        //                //if (receiveBuffer == null) receiveBuffer = new byte[1];
199
-        //                //else Array.Resize<byte>(ref receiveBuffer, receiveBuffer.Length + 1); // resize currrent buffer
200
-
201
-        //                //receiveBuffer[receiveBuffer.Length - 1] = (byte)data;
202
-        //            }
203
-        //            else // end of string found
204
-        //            {
205
-        //                message.Append((str.Substring(0,indexOf)));
206
-        //                readEvent?.Invoke(message.ToString(), receiveBuffer);
207
-
208
-        //                message.Clear();
209
-        //                receiveBuffer = null;
210
-        //            }
211
-        //        }
212
-        //    }
213
-        //}
214
-
215
-        /// <summary>
216
-        /// Callback call by stream.BeginRead after reception of newLength data
217
-        /// </summary>
218 157
         /// <param name="ar">Not sure of what is it, but needed for terminate reading</param>
219
-        //private static void ReadCallback(IAsyncResult ar)
220
-        //{
221
-        //    if (client.Connected)
222
-        //    {
223
-        //        int bytesRead;
224
-
225
-        //        try
226
-        //        {
227
-        //            // Termintae read operation, and get number of byte stored in buffer
228
-        //            bytesRead = stream.EndRead(ar);
229
-        //        }
230
-        //        catch (ObjectDisposedException e)
231
-        //        {
232
-        //            Console.WriteLine("Connection to server dropped: " + e.ToString());
233
-        //            return;
234
-        //        }
235
-
236
-        //        newLength = 1;
237
-
238
-        //        // if number of byte read is not 0, concatenate string and buffer
239
-        //        if (bytesRead > 0)
240
-        //        {
241
-        //            packetCounter++;
242
-
243
-        //            if (packetCounter >= 3)
244
-        //            {
245
-        //                //Console.WriteLine("Supplementary packet " + packetCounter);
246
-        //            }
247
-
248
-        //            // Append new data to current string (expecting data are ascii)
249
-        //            message.Append(Encoding.ASCII.GetString(buffer, 0, bytesRead));
250
-
251
-        //            // Similarly, append received bytes to current buffer 
252
-        //            if (receiveBuffer == null) receiveBuffer = new byte[bytesRead];
253
-        //            else Array.Resize<byte>(ref receiveBuffer, initialReceiveBufferIndex + bytesRead); // resize currrent buffer
254
-
255
-        //            System.Buffer.BlockCopy(buffer, 0, receiveBuffer, initialReceiveBufferIndex, bytesRead); // and add received data
256
-        //            initialReceiveBufferIndex = receiveBuffer.Length; // move last index of current buffer
257
-        //        }
258
-
259
-        //        // if it remains received data, prepare for a new reading (get another buffer to append to current one)
260
-        //        if (client.Available > 0)
261
-        //        {
262
-        //            newLength = client.Available;
263
-        //            if (newLength > BufferMaxSize) newLength = BufferMaxSize;
264
-        //            else newLength = client.Available;
265
-        //        }
266
-        //        else
267
-        //        {
268
-        //            // no more data to read, buffer and string can be send to upper level
269
-        //            readEvent?.Invoke(message.ToString(), receiveBuffer);
270
-
271
-        //            message.Clear();
272
-        //            receiveBuffer = null;
273
-        //            initialReceiveBufferIndex = 0;
274
-        //            packetCounter = 0;
275
-        //        }
276
-
277
-        //        // Prepare for reading new data
278
-        //        if (newLength> BufferMaxSize) newLength = BufferMaxSize;
279
-        //        if (newLength <= 0) newLength = 1;
280
-        //        stream.BeginRead(buffer, 0, newLength, new AsyncCallback(ReadCallback), message);
281
-        //    }
282
-        //}
283
-
284 158
         private static void ReadCallback(IAsyncResult ar)
285 159
         {
286 160
             int newLength = 1;
161
+            int index = -1;
287 162
 
288 163
             if (client.Connected)
289 164
             {
@@ -299,39 +174,99 @@ namespace monitor
299 174
                     Console.WriteLine("Connection to server dropped: " + e.ToString());
300 175
                     return;
301 176
                 }
177
+                catch (System.IO.IOException e)
178
+                {
179
+                    Console.WriteLine("Connection to server dropped: " + e.ToString());
180
+                    return;
181
+                }
302 182
 
303
-                //newLength = 1;
183
+                newLength = 1;
184
+                index = -1;
304 185
 
305 186
                 // if number of byte read is not 0, concatenate string and buffer
306 187
                 if (bytesRead > 0)
307 188
                 {
189
+                    //Console.WriteLine("Receive " + bytesRead + " data");
190
+
308 191
                     // Append new data to current string (expecting data are ascii)
309 192
                     message.Append(Encoding.ASCII.GetString(buffer, 0, bytesRead));
193
+                    index = SearchCarriageReturn(buffer, bytesRead);
310 194
                 }
311 195
 
312 196
                 // if it remains received data, prepare for a new reading (get another buffer to append to current one)
313
-                if (client.Available > 0)
197
+                if (index == -1)
314 198
                 {
315
-                    newLength = client.Available;
316
-                    if (newLength > BufferMaxSize) newLength = BufferMaxSize;
317
-                    else newLength = client.Available;
199
+                    if (client.Available > 0)
200
+                    {
201
+                        newLength = client.Available;
202
+                        if (newLength > BufferMaxSize) newLength = BufferMaxSize;
203
+                        else newLength = client.Available;
204
+                    }
318 205
                 }
319 206
                 else
320 207
                 {
208
+                    string s = message.ToString();
209
+
210
+                    //Console.WriteLine("Message received (" + s.Length + ")");
321 211
                     // no more data to read, buffer and string can be send to upper level
322
-                    readEvent?.Invoke(message.ToString());
212
+                    readEvent?.Invoke(s);
323 213
 
324 214
                     message.Clear();
215
+
216
+                    if (index != bytesRead - 1)
217
+                    {
218
+                        //Console.WriteLine("Index not at end (" + index + "/" + bytesRead + ")");
219
+                        //Console.WriteLine("1=" + (char)buffer[index + 1] + " 2=" + (char)buffer[index + 2]);
220
+
221
+                        byte[] trailing=new byte[BufferMaxSize];
222
+
223
+                        Array.Copy(buffer, index + 1, trailing, 0, bytesRead - index - 1);
224
+                        message.Append(Encoding.ASCII.GetString(trailing, 0, bytesRead - index - 1));
225
+                    }
325 226
                 }
326 227
 
327 228
                 // Prepare for reading new data
328 229
                 if (newLength> BufferMaxSize) newLength = BufferMaxSize;
329 230
                 if (newLength <= 0) newLength = 1;
330
-                stream.BeginRead(buffer, 0, newLength, new AsyncCallback(ReadCallback), message);
231
+
232
+                try
233
+                {
234
+                    stream.BeginRead(buffer, 0, newLength, new AsyncCallback(ReadCallback), message);
235
+                }
236
+                catch (ObjectDisposedException e)
237
+                {
238
+                    Console.WriteLine("Connection to server dropped: " + e.ToString());
239
+                    return;
240
+                }
241
+                catch (System.IO.IOException e)
242
+                {
243
+                    Console.WriteLine("Connection to server dropped: " + e.ToString());
244
+                    return;
245
+                }
331 246
             }
332 247
         }
333 248
 
334 249
         /// <summary>
250
+        /// Searchs the carriage return.
251
+        /// </summary>
252
+        /// <returns>Index of carriage return, if present, -1 otherwise.</returns>
253
+        /// <param name="buf">Buffer of byte</param>
254
+        /// <param name="length">Length of buffer</param>
255
+        private static int SearchCarriageReturn(byte[] buf, int length)
256
+        {
257
+            int index = -1;
258
+            int i = 0;
259
+
260
+            for (i = 0; i < length; i++)
261
+            {
262
+                if (buf[i] == (byte)'\n') break;
263
+            }
264
+
265
+            if (i!= length) index = i;
266
+            return index;
267
+        }
268
+
269
+        /// <summary>
335 270
         /// Write a string to server
336 271
         /// </summary>
337 272
         /// <returns>Nothing</returns>

+ 80
- 48
software/monitor/monitor/MonitorUI.cs View File

@@ -26,6 +26,7 @@ using Gdk;
26 26
 using Cairo;
27 27
 
28 28
 using monitor;
29
+using System.Timers;
29 30
 
30 31
 /// <summary>
31 32
 /// Main part of the program, behavior of main window
@@ -69,6 +70,13 @@ public partial class MainWindow : Gtk.Window
69 70
 
70 71
     private int imageReceivedCounter = 0;
71 72
     private int badImageReceivedCounter = 0;
73
+    private int imageFPS = 0;
74
+    private int imageFPScounter = 0;
75
+
76
+    /// <summary>
77
+    /// Timer for FPS request
78
+    /// </summary>
79
+    private System.Timers.Timer fpsTimer;
72 80
 
73 81
     /// <summary>
74 82
     /// Initializes a new instance of the <see cref="MainWindow"/> class.
@@ -83,6 +91,10 @@ public partial class MainWindow : Gtk.Window
83 91
         batteryTimer = new System.Timers.Timer(10000.0);
84 92
         batteryTimer.Elapsed += OnBatteryTimerElapsed;
85 93
 
94
+        // create new timer for FPS , every 1s
95
+        fpsTimer = new System.Timers.Timer(1000.0);
96
+        fpsTimer.Elapsed += OnFpsTimerElapsed;
97
+
86 98
         // Customize controls
87 99
         AdjustControls();
88 100
     }
@@ -126,6 +138,8 @@ public partial class MainWindow : Gtk.Window
126 138
 
127 139
                 checkButtonCameraOn.Active = false;
128 140
                 checkButtonRobotPosition.Active = false;
141
+                checkButtonFPS.Active = false;
142
+
129 143
                 if (cmdManager != null) cmdManager.Close();
130 144
 
131 145
                 batteryTimer.Stop();
@@ -165,6 +179,7 @@ public partial class MainWindow : Gtk.Window
165 179
 
166 180
                 checkButtonCameraOn.Active = false;
167 181
                 checkButtonRobotPosition.Active = false;
182
+                checkButtonFPS.Active = false;
168 183
 
169 184
                 systemState = SystemState.NotConnected;
170 185
 
@@ -183,11 +198,9 @@ public partial class MainWindow : Gtk.Window
183 198
     /// <param name="message">Message</param>
184 199
     private void MessagePopup(MessageType type, ButtonsType buttons, string title, string message)
185 200
     {
186
-        MessageDialog md = new MessageDialog(this, DialogFlags.DestroyWithParent, type, buttons, message)
187
-        {
188
-            Title = title
189
-        };
201
+        MessageDialog md = new MessageDialog(this, DialogFlags.DestroyWithParent, type, buttons, message);
190 202
 
203
+        md.Title = title;
191 204
         md.Run();
192 205
         md.Destroy();
193 206
     }
@@ -206,15 +219,11 @@ public partial class MainWindow : Gtk.Window
206 219
         a.RetVal = true;
207 220
     }
208 221
 
209
-    //private byte[] imageComplete;
210
-    //private byte[] imageInProgress;
211
-
212 222
     /// <summary>
213 223
     /// Callback called when new message is received from server
214 224
     /// </summary>
215 225
     /// <param name="header">Header of message</param>
216 226
     /// <param name="data">Data of message</param>
217
-    /// <param name="buffer">Raw buffer corresponding of received message</param>
218 227
     public void OnCommandReceivedEvent(string header, string data)
219 228
     {
220 229
         if (header == null)
@@ -237,33 +246,11 @@ public partial class MainWindow : Gtk.Window
237 246
 #if DEBUG
238 247
             // print message content
239 248
             if (header.Length > 4)
249
+            {
240 250
                 Console.WriteLine("Bad header(" + header.Length + ")");
241
-            //else
242
-            //    Console.WriteLine("Received header (" + header.Length + "): " + header);
243
-            //if (header.ToUpper() != DestijlCommandList.HeaderStmImage)
244
-            //{
245
-            //    if (data != null) Console.WriteLine("Received data (" + data.Length + "): " + data);
246
-            //}
251
+            }
247 252
 #endif
248
-            // Image management
249
-            //if (header == DestijlCommandList.CAMERA_IMAGE)
250
-            //{
251
-            //    imageComplete = imageInProgress;
252
-            //    //TODO: Decoder le base64 pour recuperer le JPG
253
-            //    imageInProgress = buffer;
254
-            //}
255
-            //else
256
-            //{
257
-            //    if (imageInProgress == null) imageInProgress = buffer;
258
-            //    else
259
-            //    {
260
-            //        Array.Resize<byte>(ref imageInProgress, imageInProgress.Length + buffer.Length);
261
-            //        System.Buffer.BlockCopy(buffer, 0, imageInProgress, imageInProgress.Length - buffer.Length, buffer.Length);
262
-            //    }
263
-            //}
264
-
265
-            // depending on message received (based on header)
266
-            // launch correponding action
253
+            // Depending on message received (based on header), launch correponding action
267 254
             header = header.ToUpper();
268 255
 
269 256
             if (header == DestijlCommandList.ROBOT_BATTERY_LEVEL)
@@ -293,20 +280,23 @@ public partial class MainWindow : Gtk.Window
293 280
             }
294 281
             else if (header == DestijlCommandList.CAMERA_IMAGE)
295 282
             {
296
-                // if message is an image, convert it to a pixbuf
297
-                // that can be displayed
298
-                //if (imageComplete != null)
299
-                //{
300
-                //TODO: Decoder le base64 et convertir en JPG
301
-                byte[] image = Convert.FromBase64String(data);
302
-                //byte[] image = new byte[imageComplete.Length - 4];
303
-                //System.Buffer.BlockCopy(imageComplete, 4, image, 0, image.Length);
304
-
305 283
                 imageReceivedCounter++;
306 284
 
285
+                byte[] image = new byte[2];
286
+                try
287
+                {
288
+                    image = Convert.FromBase64String(data);
289
+                }
290
+                catch (FormatException)
291
+                {
292
+                    badImageReceivedCounter++;
293
+                    Console.WriteLine("Unable to convert from base64 ");
294
+                }
295
+
307 296
                 try
308 297
                 {
309 298
                     drawingareaCameraPixbuf = new Pixbuf(image);
299
+                    imageFPScounter++;
310 300
 
311 301
                     Gtk.Application.Invoke(delegate
312 302
                     {
@@ -326,10 +316,7 @@ public partial class MainWindow : Gtk.Window
326 316
             }
327 317
             else if (header == DestijlCommandList.CAMERA_POSITION)
328 318
             {
329
-                //Console.WriteLine("Pos data: " + data);
330
-
331 319
                 position = DestijlCommandManager.DecodePosition(data);
332
-                //Console.WriteLine("decoded position: " + position.ToString());
333 320
 
334 321
                 Gtk.Application.Invoke(delegate
335 322
                 {
@@ -728,6 +715,23 @@ public partial class MainWindow : Gtk.Window
728 715
             ((IDisposable)cr.GetTarget()).Dispose();
729 716
             ((IDisposable)cr).Dispose();
730 717
         }
718
+
719
+        if (checkButtonFPS.Active) {
720
+            Cairo.Context cr = Gdk.CairoHelper.Create(area.GdkWindow);
721
+            Cairo.Color textFontColor = new Cairo.Color(0.8, 0, 0);
722
+
723
+            cr.SelectFontFace("Cantarell", FontSlant.Normal, FontWeight.Bold);
724
+            cr.SetSourceColor(textFontColor);
725
+            cr.SetFontSize(16);
726
+
727
+            string text = "FPS= " + imageFPS.ToString() ;
728
+            TextExtents te = cr.TextExtents(text);
729
+            cr.MoveTo( 10,10 + te.Height);
730
+            cr.ShowText(text);
731
+
732
+            ((IDisposable)cr.GetTarget()).Dispose();
733
+            ((IDisposable)cr).Dispose();
734
+        }
731 735
     }
732 736
 
733 737
     /// <summary>
@@ -738,9 +742,8 @@ public partial class MainWindow : Gtk.Window
738 742
         DestijlCommandManager.CommandStatus status;
739 743
         MessageDialog md = new MessageDialog(this, DialogFlags.DestroyWithParent,
740 744
                                              MessageType.Question, ButtonsType.YesNo, "Arena is correct ?");
741
-        {
742
-            Title = "Check arena";
743
-        };
745
+
746
+        md.Title = "Check arena";
744 747
 
745 748
         ResponseType result = (ResponseType)md.Run();
746 749
         md.Destroy();
@@ -781,4 +784,33 @@ public partial class MainWindow : Gtk.Window
781 784
         // show popup and wait for user to say if arena is ok or not 
782 785
         DetectArena();
783 786
     }
787
+
788
+    protected void OnCheckButtonFPSToggled(object sender, EventArgs e)
789
+    {
790
+        if (checkButtonFPS.Active) { // User ask for FPS
791
+            imageFPS = 0;
792
+            imageFPScounter = 0;
793
+
794
+            fpsTimer.Start();
795
+        }
796
+        else { // stop computing FPS
797
+            fpsTimer.Stop();
798
+
799
+            Gtk.Application.Invoke(delegate
800
+            {
801
+                drawingAreaCamera.QueueDraw();
802
+            });
803
+        }
804
+    }
805
+
806
+    private void OnFpsTimerElapsed(object sender, ElapsedEventArgs e)
807
+    {
808
+        imageFPS = imageFPScounter;
809
+        imageFPScounter = 0;
810
+
811
+        Gtk.Application.Invoke(delegate
812
+        {
813
+            drawingAreaCamera.QueueDraw();
814
+        });
815
+    }
784 816
 }

+ 207
- 185
software/monitor/monitor/gtk-gui/MainWindow.cs View File

@@ -21,14 +21,18 @@ public partial class MainWindow
21 21
 
22 22
 	private global::Gtk.VBox boxCamera;
23 23
 
24
+	private global::Gtk.HBox hbox2;
25
+
24 26
 	private global::Gtk.Alignment alignment1;
25 27
 
26
-	private global::Gtk.HBox hbox2;
28
+	private global::Gtk.HBox hbox5;
27 29
 
28 30
 	private global::Gtk.CheckButton checkButtonCameraOn;
29 31
 
30 32
 	private global::Gtk.CheckButton checkButtonRobotPosition;
31 33
 
34
+	private global::Gtk.CheckButton checkButtonFPS;
35
+
32 36
 	private global::Gtk.Button buttonAskArena;
33 37
 
34 38
 	private global::Gtk.DrawingArea drawingAreaCamera;
@@ -170,33 +174,51 @@ public partial class MainWindow
170 174
 		this.boxCamera.Name = "boxCamera";
171 175
 		this.boxCamera.Spacing = 6;
172 176
 		// Container child boxCamera.Gtk.Box+BoxChild
173
-		this.alignment1 = new global::Gtk.Alignment(0F, 0.5F, 0F, 1F);
174
-		this.alignment1.Name = "alignment1";
175
-		this.alignment1.BorderWidth = ((uint)(6));
176
-		// Container child alignment1.Gtk.Container+ContainerChild
177 177
 		this.hbox2 = new global::Gtk.HBox();
178 178
 		this.hbox2.Name = "hbox2";
179 179
 		this.hbox2.Spacing = 6;
180 180
 		// Container child hbox2.Gtk.Box+BoxChild
181
+		this.alignment1 = new global::Gtk.Alignment(0F, 0.5F, 0F, 1F);
182
+		this.alignment1.Name = "alignment1";
183
+		this.alignment1.BorderWidth = ((uint)(6));
184
+		// Container child alignment1.Gtk.Container+ContainerChild
185
+		this.hbox5 = new global::Gtk.HBox();
186
+		this.hbox5.Name = "hbox5";
187
+		this.hbox5.Spacing = 6;
188
+		// Container child hbox5.Gtk.Box+BoxChild
181 189
 		this.checkButtonCameraOn = new global::Gtk.CheckButton();
182 190
 		this.checkButtonCameraOn.CanFocus = true;
183 191
 		this.checkButtonCameraOn.Name = "checkButtonCameraOn";
184 192
 		this.checkButtonCameraOn.Label = global::Mono.Unix.Catalog.GetString("Camera On");
185 193
 		this.checkButtonCameraOn.DrawIndicator = true;
186 194
 		this.checkButtonCameraOn.UseUnderline = true;
187
-		this.hbox2.Add(this.checkButtonCameraOn);
188
-		global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.checkButtonCameraOn]));
195
+		this.hbox5.Add(this.checkButtonCameraOn);
196
+		global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox5[this.checkButtonCameraOn]));
189 197
 		w3.Position = 0;
190
-		// Container child hbox2.Gtk.Box+BoxChild
198
+		// Container child hbox5.Gtk.Box+BoxChild
191 199
 		this.checkButtonRobotPosition = new global::Gtk.CheckButton();
192 200
 		this.checkButtonRobotPosition.CanFocus = true;
193 201
 		this.checkButtonRobotPosition.Name = "checkButtonRobotPosition";
194
-		this.checkButtonRobotPosition.Label = global::Mono.Unix.Catalog.GetString("Robot Position");
202
+		this.checkButtonRobotPosition.Label = global::Mono.Unix.Catalog.GetString("Show Position");
195 203
 		this.checkButtonRobotPosition.DrawIndicator = true;
196 204
 		this.checkButtonRobotPosition.UseUnderline = true;
197
-		this.hbox2.Add(this.checkButtonRobotPosition);
198
-		global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.checkButtonRobotPosition]));
205
+		this.hbox5.Add(this.checkButtonRobotPosition);
206
+		global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox5[this.checkButtonRobotPosition]));
199 207
 		w4.Position = 1;
208
+		// Container child hbox5.Gtk.Box+BoxChild
209
+		this.checkButtonFPS = new global::Gtk.CheckButton();
210
+		this.checkButtonFPS.CanFocus = true;
211
+		this.checkButtonFPS.Name = "checkButtonFPS";
212
+		this.checkButtonFPS.Label = global::Mono.Unix.Catalog.GetString("Show FPS");
213
+		this.checkButtonFPS.DrawIndicator = true;
214
+		this.checkButtonFPS.UseUnderline = true;
215
+		this.hbox5.Add(this.checkButtonFPS);
216
+		global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox5[this.checkButtonFPS]));
217
+		w5.Position = 2;
218
+		this.alignment1.Add(this.hbox5);
219
+		this.hbox2.Add(this.alignment1);
220
+		global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.alignment1]));
221
+		w7.Position = 0;
200 222
 		// Container child hbox2.Gtk.Box+BoxChild
201 223
 		this.buttonAskArena = new global::Gtk.Button();
202 224
 		this.buttonAskArena.CanFocus = true;
@@ -204,26 +226,24 @@ public partial class MainWindow
204 226
 		this.buttonAskArena.UseUnderline = true;
205 227
 		this.buttonAskArena.Label = global::Mono.Unix.Catalog.GetString("Ask Arena...");
206 228
 		this.hbox2.Add(this.buttonAskArena);
207
-		global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.buttonAskArena]));
208
-		w5.PackType = ((global::Gtk.PackType)(1));
209
-		w5.Position = 2;
210
-		w5.Expand = false;
211
-		w5.Fill = false;
212
-		this.alignment1.Add(this.hbox2);
213
-		this.boxCamera.Add(this.alignment1);
214
-		global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.boxCamera[this.alignment1]));
215
-		w7.Position = 0;
216
-		w7.Expand = false;
217
-		w7.Fill = false;
229
+		global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.buttonAskArena]));
230
+		w8.Position = 2;
231
+		w8.Expand = false;
232
+		w8.Fill = false;
233
+		this.boxCamera.Add(this.hbox2);
234
+		global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.boxCamera[this.hbox2]));
235
+		w9.Position = 0;
236
+		w9.Expand = false;
237
+		w9.Fill = false;
218 238
 		// Container child boxCamera.Gtk.Box+BoxChild
219 239
 		this.drawingAreaCamera = new global::Gtk.DrawingArea();
220 240
 		this.drawingAreaCamera.Name = "drawingAreaCamera";
221 241
 		this.boxCamera.Add(this.drawingAreaCamera);
222
-		global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.boxCamera[this.drawingAreaCamera]));
223
-		w8.Position = 1;
242
+		global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.boxCamera[this.drawingAreaCamera]));
243
+		w10.Position = 1;
224 244
 		this.hbox1.Add(this.boxCamera);
225
-		global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.boxCamera]));
226
-		w9.Position = 0;
245
+		global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.boxCamera]));
246
+		w11.Position = 0;
227 247
 		// Container child hbox1.Gtk.Box+BoxChild
228 248
 		this.hbox3 = new global::Gtk.HBox();
229 249
 		this.hbox3.Name = "hbox3";
@@ -232,10 +252,10 @@ public partial class MainWindow
232 252
 		this.vseparator1 = new global::Gtk.VSeparator();
233 253
 		this.vseparator1.Name = "vseparator1";
234 254
 		this.hbox3.Add(this.vseparator1);
235
-		global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.vseparator1]));
236
-		w10.Position = 0;
237
-		w10.Expand = false;
238
-		w10.Fill = false;
255
+		global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.vseparator1]));
256
+		w12.Position = 0;
257
+		w12.Expand = false;
258
+		w12.Fill = false;
239 259
 		// Container child hbox3.Gtk.Box+BoxChild
240 260
 		this.alignment3 = new global::Gtk.Alignment(1F, 0F, 0F, 0F);
241 261
 		this.alignment3.Name = "alignment3";
@@ -255,10 +275,10 @@ public partial class MainWindow
255 275
 		this.labelServer.LabelProp = global::Mono.Unix.Catalog.GetString("<b><u>Server connection</u></b>");
256 276
 		this.labelServer.UseMarkup = true;
257 277
 		this.vbox10.Add(this.labelServer);
258
-		global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox10[this.labelServer]));
259
-		w11.Position = 0;
260
-		w11.Expand = false;
261
-		w11.Fill = false;
278
+		global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox10[this.labelServer]));
279
+		w13.Position = 0;
280
+		w13.Expand = false;
281
+		w13.Fill = false;
262 282
 		// Container child vbox10.Gtk.Box+BoxChild
263 283
 		this.gtkAlignmentServer = new global::Gtk.Alignment(0F, 0F, 1F, 1F);
264 284
 		this.gtkAlignmentServer.Name = "gtkAlignmentServer";
@@ -279,10 +299,10 @@ public partial class MainWindow
279 299
 		this.entryServerName.IsEditable = true;
280 300
 		this.entryServerName.InvisibleChar = '●';
281 301
 		this.table1.Add(this.entryServerName);
282
-		global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table1[this.entryServerName]));
283
-		w12.LeftAttach = ((uint)(1));
284
-		w12.RightAttach = ((uint)(2));
285
-		w12.YOptions = ((global::Gtk.AttachOptions)(4));
302
+		global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table1[this.entryServerName]));
303
+		w14.LeftAttach = ((uint)(1));
304
+		w14.RightAttach = ((uint)(2));
305
+		w14.YOptions = ((global::Gtk.AttachOptions)(4));
286 306
 		// Container child table1.Gtk.Table+TableChild
287 307
 		this.entryServerPort = new global::Gtk.Entry();
288 308
 		this.entryServerPort.CanFocus = true;
@@ -290,12 +310,12 @@ public partial class MainWindow
290 310
 		this.entryServerPort.IsEditable = true;
291 311
 		this.entryServerPort.InvisibleChar = '●';
292 312
 		this.table1.Add(this.entryServerPort);
293
-		global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table1[this.entryServerPort]));
294
-		w13.TopAttach = ((uint)(1));
295
-		w13.BottomAttach = ((uint)(2));
296
-		w13.LeftAttach = ((uint)(1));
297
-		w13.RightAttach = ((uint)(2));
298
-		w13.YOptions = ((global::Gtk.AttachOptions)(4));
313
+		global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table1[this.entryServerPort]));
314
+		w15.TopAttach = ((uint)(1));
315
+		w15.BottomAttach = ((uint)(2));
316
+		w15.LeftAttach = ((uint)(1));
317
+		w15.RightAttach = ((uint)(2));
318
+		w15.YOptions = ((global::Gtk.AttachOptions)(4));
299 319
 		// Container child table1.Gtk.Table+TableChild
300 320
 		this.entryTimeout = new global::Gtk.Entry();
301 321
 		this.entryTimeout.CanFocus = true;
@@ -303,12 +323,12 @@ public partial class MainWindow
303 323
 		this.entryTimeout.IsEditable = true;
304 324
 		this.entryTimeout.InvisibleChar = '●';
305 325
 		this.table1.Add(this.entryTimeout);
306
-		global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table1[this.entryTimeout]));
307
-		w14.TopAttach = ((uint)(2));
308
-		w14.BottomAttach = ((uint)(3));
309
-		w14.LeftAttach = ((uint)(1));
310
-		w14.RightAttach = ((uint)(2));
311
-		w14.YOptions = ((global::Gtk.AttachOptions)(4));
326
+		global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table1[this.entryTimeout]));
327
+		w16.TopAttach = ((uint)(2));
328
+		w16.BottomAttach = ((uint)(3));
329
+		w16.LeftAttach = ((uint)(1));
330
+		w16.RightAttach = ((uint)(2));
331
+		w16.YOptions = ((global::Gtk.AttachOptions)(4));
312 332
 		// Container child table1.Gtk.Table+TableChild
313 333
 		this.label1 = new global::Gtk.Label();
314 334
 		this.label1.Name = "label1";
@@ -316,9 +336,9 @@ public partial class MainWindow
316 336
 		this.label1.LabelProp = global::Mono.Unix.Catalog.GetString("Server name:");
317 337
 		this.label1.Justify = ((global::Gtk.Justification)(1));
318 338
 		this.table1.Add(this.label1);
319
-		global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table1[this.label1]));
320
-		w15.XOptions = ((global::Gtk.AttachOptions)(4));
321
-		w15.YOptions = ((global::Gtk.AttachOptions)(4));
339
+		global::Gtk.Table.TableChild w17 = ((global::Gtk.Table.TableChild)(this.table1[this.label1]));
340
+		w17.XOptions = ((global::Gtk.AttachOptions)(4));
341
+		w17.YOptions = ((global::Gtk.AttachOptions)(4));
322 342
 		// Container child table1.Gtk.Table+TableChild
323 343
 		this.label2 = new global::Gtk.Label();
324 344
 		this.label2.Name = "label2";
@@ -326,26 +346,26 @@ public partial class MainWindow
326 346
 		this.label2.LabelProp = global::Mono.Unix.Catalog.GetString("Server port:");
327 347
 		this.label2.Justify = ((global::Gtk.Justification)(1));
328 348
 		this.table1.Add(this.label2);
329
-		global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table1[this.label2]));
330
-		w16.TopAttach = ((uint)(1));
331
-		w16.BottomAttach = ((uint)(2));
332
-		w16.XOptions = ((global::Gtk.AttachOptions)(4));
333
-		w16.YOptions = ((global::Gtk.AttachOptions)(4));
349
+		global::Gtk.Table.TableChild w18 = ((global::Gtk.Table.TableChild)(this.table1[this.label2]));
350
+		w18.TopAttach = ((uint)(1));
351
+		w18.BottomAttach = ((uint)(2));
352
+		w18.XOptions = ((global::Gtk.AttachOptions)(4));
353
+		w18.YOptions = ((global::Gtk.AttachOptions)(4));
334 354
 		// Container child table1.Gtk.Table+TableChild
335 355
 		this.label5 = new global::Gtk.Label();
336 356
 		this.label5.Name = "label5";
337 357
 		this.label5.LabelProp = global::Mono.Unix.Catalog.GetString("Timeout (ms):");
338 358
 		this.table1.Add(this.label5);
339
-		global::Gtk.Table.TableChild w17 = ((global::Gtk.Table.TableChild)(this.table1[this.label5]));
340
-		w17.TopAttach = ((uint)(2));
341
-		w17.BottomAttach = ((uint)(3));
342
-		w17.XOptions = ((global::Gtk.AttachOptions)(4));
343
-		w17.YOptions = ((global::Gtk.AttachOptions)(4));
359
+		global::Gtk.Table.TableChild w19 = ((global::Gtk.Table.TableChild)(this.table1[this.label5]));
360
+		w19.TopAttach = ((uint)(2));
361
+		w19.BottomAttach = ((uint)(3));
362
+		w19.XOptions = ((global::Gtk.AttachOptions)(4));
363
+		w19.YOptions = ((global::Gtk.AttachOptions)(4));
344 364
 		this.vbox6.Add(this.table1);
345
-		global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox6[this.table1]));
346
-		w18.Position = 0;
347
-		w18.Expand = false;
348
-		w18.Fill = false;
365
+		global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox6[this.table1]));
366
+		w20.Position = 0;
367
+		w20.Expand = false;
368
+		w20.Fill = false;
349 369
 		// Container child vbox6.Gtk.Box+BoxChild
350 370
 		this.buttonServerConnection = new global::Gtk.Button();
351 371
 		this.buttonServerConnection.CanFocus = true;
@@ -353,30 +373,30 @@ public partial class MainWindow
353 373
 		this.buttonServerConnection.UseUnderline = true;
354 374
 		this.buttonServerConnection.Label = global::Mono.Unix.Catalog.GetString("Connect");
355 375
 		this.vbox6.Add(this.buttonServerConnection);
356
-		global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.vbox6[this.buttonServerConnection]));
357
-		w19.PackType = ((global::Gtk.PackType)(1));
358
-		w19.Position = 1;
359
-		w19.Expand = false;
360
-		w19.Fill = false;
361
-		this.gtkAlignmentServer.Add(this.vbox6);
362
-		this.vbox10.Add(this.gtkAlignmentServer);
363
-		global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox10[this.gtkAlignmentServer]));
376
+		global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox6[this.buttonServerConnection]));
377
+		w21.PackType = ((global::Gtk.PackType)(1));
364 378
 		w21.Position = 1;
365 379
 		w21.Expand = false;
366 380
 		w21.Fill = false;
381
+		this.gtkAlignmentServer.Add(this.vbox6);
382
+		this.vbox10.Add(this.gtkAlignmentServer);
383
+		global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.vbox10[this.gtkAlignmentServer]));
384
+		w23.Position = 1;
385
+		w23.Expand = false;
386
+		w23.Fill = false;
367 387
 		this.vbox5.Add(this.vbox10);
368
-		global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox10]));
369
-		w22.Position = 0;
370
-		w22.Expand = false;
371
-		w22.Fill = false;
388
+		global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox10]));
389
+		w24.Position = 0;
390
+		w24.Expand = false;
391
+		w24.Fill = false;
372 392
 		// Container child vbox5.Gtk.Box+BoxChild
373 393
 		this.hseparator1 = new global::Gtk.HSeparator();
374 394
 		this.hseparator1.Name = "hseparator1";
375 395
 		this.vbox5.Add(this.hseparator1);
376
-		global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.hseparator1]));
377
-		w23.Position = 1;
378
-		w23.Expand = false;
379
-		w23.Fill = false;
396
+		global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.hseparator1]));
397
+		w25.Position = 1;
398
+		w25.Expand = false;
399
+		w25.Fill = false;
380 400
 		// Container child vbox5.Gtk.Box+BoxChild
381 401
 		this.vbox11 = new global::Gtk.VBox();
382 402
 		this.vbox11.Name = "vbox11";
@@ -388,10 +408,10 @@ public partial class MainWindow
388 408
 		this.labelRobot.LabelProp = global::Mono.Unix.Catalog.GetString("<b><u>Robot Activation</u></b>");
389 409
 		this.labelRobot.UseMarkup = true;
390 410
 		this.vbox11.Add(this.labelRobot);
391
-		global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.vbox11[this.labelRobot]));
392
-		w24.Position = 0;
393
-		w24.Expand = false;
394
-		w24.Fill = false;
411
+		global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.vbox11[this.labelRobot]));
412
+		w26.Position = 0;
413
+		w26.Expand = false;
414
+		w26.Fill = false;
395 415
 		// Container child vbox11.Gtk.Box+BoxChild
396 416
 		this.alignment9 = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
397 417
 		this.alignment9.Name = "alignment9";
@@ -418,8 +438,8 @@ public partial class MainWindow
418 438
 		this.radioButtonWithWatchdog.UseUnderline = true;
419 439
 		this.radioButtonWithWatchdog.Group = new global::GLib.SList(global::System.IntPtr.Zero);
420 440
 		this.hbox4.Add(this.radioButtonWithWatchdog);
421
-		global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.radioButtonWithWatchdog]));
422
-		w25.Position = 0;
441
+		global::Gtk.Box.BoxChild w27 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.radioButtonWithWatchdog]));
442
+		w27.Position = 0;
423 443
 		// Container child hbox4.Gtk.Box+BoxChild
424 444
 		this.radioButtonWithoutWatchdog = new global::Gtk.RadioButton(global::Mono.Unix.Catalog.GetString("without watchdog"));
425 445
 		this.radioButtonWithoutWatchdog.CanFocus = true;
@@ -428,14 +448,14 @@ public partial class MainWindow
428 448
 		this.radioButtonWithoutWatchdog.UseUnderline = true;
429 449
 		this.radioButtonWithoutWatchdog.Group = this.radioButtonWithWatchdog.Group;
430 450
 		this.hbox4.Add(this.radioButtonWithoutWatchdog);
431
-		global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.radioButtonWithoutWatchdog]));
432
-		w26.Position = 1;
451
+		global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.radioButtonWithoutWatchdog]));
452
+		w28.Position = 1;
433 453
 		this.alignment6.Add(this.hbox4);
434 454
 		this.vbox8.Add(this.alignment6);
435
-		global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(this.vbox8[this.alignment6]));
436
-		w28.Position = 0;
437
-		w28.Expand = false;
438
-		w28.Fill = false;
455
+		global::Gtk.Box.BoxChild w30 = ((global::Gtk.Box.BoxChild)(this.vbox8[this.alignment6]));
456
+		w30.Position = 0;
457
+		w30.Expand = false;
458
+		w30.Fill = false;
439 459
 		// Container child vbox8.Gtk.Box+BoxChild
440 460
 		this.alignment5 = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
441 461
 		this.alignment5.Name = "alignment5";
@@ -451,30 +471,30 @@ public partial class MainWindow
451 471
 		this.alignment7.Add(this.buttonRobotActivation);
452 472
 		this.alignment5.Add(this.alignment7);
453 473
 		this.vbox8.Add(this.alignment5);
454
-		global::Gtk.Box.BoxChild w31 = ((global::Gtk.Box.BoxChild)(this.vbox8[this.alignment5]));
455
-		w31.Position = 1;
456
-		w31.Expand = false;
457
-		w31.Fill = false;
474
+		global::Gtk.Box.BoxChild w33 = ((global::Gtk.Box.BoxChild)(this.vbox8[this.alignment5]));
475
+		w33.Position = 1;
476
+		w33.Expand = false;
477
+		w33.Fill = false;
458 478
 		this.gtkAlignmentRobot.Add(this.vbox8);
459 479
 		this.alignment9.Add(this.gtkAlignmentRobot);
460 480
 		this.vbox11.Add(this.alignment9);
461
-		global::Gtk.Box.BoxChild w34 = ((global::Gtk.Box.BoxChild)(this.vbox11[this.alignment9]));
462
-		w34.Position = 1;
463
-		w34.Expand = false;
464
-		w34.Fill = false;
481
+		global::Gtk.Box.BoxChild w36 = ((global::Gtk.Box.BoxChild)(this.vbox11[this.alignment9]));
482
+		w36.Position = 1;
483
+		w36.Expand = false;
484
+		w36.Fill = false;
465 485
 		this.vbox5.Add(this.vbox11);
466
-		global::Gtk.Box.BoxChild w35 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox11]));
467
-		w35.Position = 2;
468
-		w35.Expand = false;
469
-		w35.Fill = false;
486
+		global::Gtk.Box.BoxChild w37 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox11]));
487
+		w37.Position = 2;
488
+		w37.Expand = false;
489
+		w37.Fill = false;
470 490
 		// Container child vbox5.Gtk.Box+BoxChild
471 491
 		this.hseparator2 = new global::Gtk.HSeparator();
472 492
 		this.hseparator2.Name = "hseparator2";
473 493
 		this.vbox5.Add(this.hseparator2);
474
-		global::Gtk.Box.BoxChild w36 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.hseparator2]));
475
-		w36.Position = 3;
476
-		w36.Expand = false;
477
-		w36.Fill = false;
494
+		global::Gtk.Box.BoxChild w38 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.hseparator2]));
495
+		w38.Position = 3;
496
+		w38.Expand = false;
497
+		w38.Fill = false;
478 498
 		// Container child vbox5.Gtk.Box+BoxChild
479 499
 		this.vbox12 = new global::Gtk.VBox();
480 500
 		this.vbox12.Name = "vbox12";
@@ -486,10 +506,10 @@ public partial class MainWindow
486 506
 		this.labelRobotControl.LabelProp = global::Mono.Unix.Catalog.GetString("<b><u>Robot Controls and Status</u></b>");
487 507
 		this.labelRobotControl.UseMarkup = true;
488 508
 		this.vbox12.Add(this.labelRobotControl);
489
-		global::Gtk.Box.BoxChild w37 = ((global::Gtk.Box.BoxChild)(this.vbox12[this.labelRobotControl]));
490
-		w37.Position = 0;
491
-		w37.Expand = false;
492
-		w37.Fill = false;
509
+		global::Gtk.Box.BoxChild w39 = ((global::Gtk.Box.BoxChild)(this.vbox12[this.labelRobotControl]));
510
+		w39.Position = 0;
511
+		w39.Expand = false;
512
+		w39.Fill = false;
493 513
 		// Container child vbox12.Gtk.Box+BoxChild
494 514
 		this.gtkAlignmentRobotControl = new global::Gtk.Alignment(0F, 0F, 1F, 1F);
495 515
 		this.gtkAlignmentRobotControl.Name = "gtkAlignmentRobotControl";
@@ -511,67 +531,67 @@ public partial class MainWindow
511 531
 		this.buttonDown.CanFocus = true;
512 532
 		this.buttonDown.Name = "buttonDown";
513 533
 		this.buttonDown.UseUnderline = true;
514
-		global::Gtk.Image w38 = new global::Gtk.Image();
515
-		w38.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-down-symbolic.symbolic.png");
516
-		this.buttonDown.Image = w38;
534
+		global::Gtk.Image w40 = new global::Gtk.Image();
535
+		w40.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-down-symbolic.symbolic.png");
536
+		this.buttonDown.Image = w40;
517 537
 		this.table4.Add(this.buttonDown);
518
-		global::Gtk.Table.TableChild w39 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonDown]));
519
-		w39.TopAttach = ((uint)(2));
520
-		w39.BottomAttach = ((uint)(3));
521
-		w39.LeftAttach = ((uint)(1));
522
-		w39.RightAttach = ((uint)(2));
523
-		w39.XOptions = ((global::Gtk.AttachOptions)(4));
524
-		w39.YOptions = ((global::Gtk.AttachOptions)(4));
538
+		global::Gtk.Table.TableChild w41 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonDown]));
539
+		w41.TopAttach = ((uint)(2));
540
+		w41.BottomAttach = ((uint)(3));
541
+		w41.LeftAttach = ((uint)(1));
542
+		w41.RightAttach = ((uint)(2));
543
+		w41.XOptions = ((global::Gtk.AttachOptions)(4));
544
+		w41.YOptions = ((global::Gtk.AttachOptions)(4));
525 545
 		// Container child table4.Gtk.Table+TableChild
526 546
 		this.buttonForward = new global::Gtk.Button();
527 547
 		this.buttonForward.CanFocus = true;
528 548
 		this.buttonForward.Name = "buttonForward";
529 549
 		this.buttonForward.UseUnderline = true;
530
-		global::Gtk.Image w40 = new global::Gtk.Image();
531
-		w40.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-up-symbolic.symbolic.png");
532
-		this.buttonForward.Image = w40;
550
+		global::Gtk.Image w42 = new global::Gtk.Image();
551
+		w42.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-up-symbolic.symbolic.png");
552
+		this.buttonForward.Image = w42;
533 553
 		this.table4.Add(this.buttonForward);
534
-		global::Gtk.Table.TableChild w41 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonForward]));
535
-		w41.LeftAttach = ((uint)(1));
536
-		w41.RightAttach = ((uint)(2));
537
-		w41.XOptions = ((global::Gtk.AttachOptions)(4));
538
-		w41.YOptions = ((global::Gtk.AttachOptions)(4));
554
+		global::Gtk.Table.TableChild w43 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonForward]));
555
+		w43.LeftAttach = ((uint)(1));
556
+		w43.RightAttach = ((uint)(2));
557
+		w43.XOptions = ((global::Gtk.AttachOptions)(4));
558
+		w43.YOptions = ((global::Gtk.AttachOptions)(4));
539 559
 		// Container child table4.Gtk.Table+TableChild
540 560
 		this.buttonLeft = new global::Gtk.Button();
541 561
 		this.buttonLeft.CanFocus = true;
542 562
 		this.buttonLeft.Name = "buttonLeft";
543 563
 		this.buttonLeft.UseUnderline = true;
544
-		global::Gtk.Image w42 = new global::Gtk.Image();
545
-		w42.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-start-symbolic.symbolic.png");
546
-		this.buttonLeft.Image = w42;
564
+		global::Gtk.Image w44 = new global::Gtk.Image();
565
+		w44.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-start-symbolic.symbolic.png");
566
+		this.buttonLeft.Image = w44;
547 567
 		this.table4.Add(this.buttonLeft);
548
-		global::Gtk.Table.TableChild w43 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonLeft]));
549
-		w43.TopAttach = ((uint)(1));
550
-		w43.BottomAttach = ((uint)(2));
551
-		w43.XOptions = ((global::Gtk.AttachOptions)(4));
552
-		w43.YOptions = ((global::Gtk.AttachOptions)(4));
568
+		global::Gtk.Table.TableChild w45 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonLeft]));
569
+		w45.TopAttach = ((uint)(1));
570
+		w45.BottomAttach = ((uint)(2));
571
+		w45.XOptions = ((global::Gtk.AttachOptions)(4));
572
+		w45.YOptions = ((global::Gtk.AttachOptions)(4));
553 573
 		// Container child table4.Gtk.Table+TableChild
554 574
 		this.buttonRight = new global::Gtk.Button();
555 575
 		this.buttonRight.CanFocus = true;
556 576
 		this.buttonRight.Name = "buttonRight";
557 577
 		this.buttonRight.UseUnderline = true;
558
-		global::Gtk.Image w44 = new global::Gtk.Image();
559
-		w44.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-end-symbolic.symbolic.png");
560
-		this.buttonRight.Image = w44;
578
+		global::Gtk.Image w46 = new global::Gtk.Image();
579
+		w46.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-end-symbolic.symbolic.png");
580
+		this.buttonRight.Image = w46;
561 581
 		this.table4.Add(this.buttonRight);
562
-		global::Gtk.Table.TableChild w45 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonRight]));
563
-		w45.TopAttach = ((uint)(1));
564
-		w45.BottomAttach = ((uint)(2));
565
-		w45.LeftAttach = ((uint)(2));
566
-		w45.RightAttach = ((uint)(3));
567
-		w45.XOptions = ((global::Gtk.AttachOptions)(4));
568
-		w45.YOptions = ((global::Gtk.AttachOptions)(4));
582
+		global::Gtk.Table.TableChild w47 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonRight]));
583
+		w47.TopAttach = ((uint)(1));
584
+		w47.BottomAttach = ((uint)(2));
585
+		w47.LeftAttach = ((uint)(2));
586
+		w47.RightAttach = ((uint)(3));
587
+		w47.XOptions = ((global::Gtk.AttachOptions)(4));
588
+		w47.YOptions = ((global::Gtk.AttachOptions)(4));
569 589
 		this.alignment8.Add(this.table4);
570 590
 		this.vbox9.Add(this.alignment8);
571
-		global::Gtk.Box.BoxChild w47 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.alignment8]));
572
-		w47.Position = 0;
573
-		w47.Expand = false;
574
-		w47.Fill = false;
591
+		global::Gtk.Box.BoxChild w49 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.alignment8]));
592
+		w49.Position = 0;
593
+		w49.Expand = false;
594
+		w49.Fill = false;
575 595
 		// Container child vbox9.Gtk.Box+BoxChild
576 596
 		this.table3 = new global::Gtk.Table(((uint)(1)), ((uint)(2)), false);
577 597
 		this.table3.Name = "table3";
@@ -584,10 +604,10 @@ public partial class MainWindow
584 604
 		this.label3.LabelProp = global::Mono.Unix.Catalog.GetString("Battery level:");
585 605
 		this.label3.Justify = ((global::Gtk.Justification)(1));
586 606
 		this.table3.Add(this.label3);
587
-		global::Gtk.Table.TableChild w48 = ((global::Gtk.Table.TableChild)(this.table3[this.label3]));
588
-		w48.YPadding = ((uint)(10));
589
-		w48.XOptions = ((global::Gtk.AttachOptions)(4));
590
-		w48.YOptions = ((global::Gtk.AttachOptions)(4));
607
+		global::Gtk.Table.TableChild w50 = ((global::Gtk.Table.TableChild)(this.table3[this.label3]));
608
+		w50.YPadding = ((uint)(10));
609
+		w50.XOptions = ((global::Gtk.AttachOptions)(4));
610
+		w50.YOptions = ((global::Gtk.AttachOptions)(4));
591 611
 		// Container child table3.Gtk.Table+TableChild
592 612
 		this.labelBatteryLevel = new global::Gtk.Label();
593 613
 		this.labelBatteryLevel.Name = "labelBatteryLevel";
@@ -595,48 +615,49 @@ public partial class MainWindow
595 615
 		this.labelBatteryLevel.Xalign = 0F;
596 616
 		this.labelBatteryLevel.LabelProp = global::Mono.Unix.Catalog.GetString("Unknown");
597 617
 		this.table3.Add(this.labelBatteryLevel);
598
-		global::Gtk.Table.TableChild w49 = ((global::Gtk.Table.TableChild)(this.table3[this.labelBatteryLevel]));
599
-		w49.LeftAttach = ((uint)(1));
600
-		w49.RightAttach = ((uint)(2));
601
-		w49.YOptions = ((global::Gtk.AttachOptions)(4));
618
+		global::Gtk.Table.TableChild w51 = ((global::Gtk.Table.TableChild)(this.table3[this.labelBatteryLevel]));
619
+		w51.LeftAttach = ((uint)(1));
620
+		w51.RightAttach = ((uint)(2));
621
+		w51.YOptions = ((global::Gtk.AttachOptions)(4));
602 622
 		this.vbox9.Add(this.table3);
603
-		global::Gtk.Box.BoxChild w50 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.table3]));
604
-		w50.Position = 2;
605
-		w50.Expand = false;
606
-		w50.Fill = false;
623
+		global::Gtk.Box.BoxChild w52 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.table3]));
624
+		w52.Position = 2;
625
+		w52.Expand = false;
626
+		w52.Fill = false;
607 627
 		// Container child vbox9.Gtk.Box+BoxChild
608 628
 		this.checkButtonGetBattery = new global::Gtk.CheckButton();
609 629
 		this.checkButtonGetBattery.CanFocus = true;
610 630
 		this.checkButtonGetBattery.Name = "checkButtonGetBattery";
611 631
 		this.checkButtonGetBattery.Label = global::Mono.Unix.Catalog.GetString("Get battery level");
632
+		this.checkButtonGetBattery.Active = true;
612 633
 		this.checkButtonGetBattery.DrawIndicator = true;
613 634
 		this.checkButtonGetBattery.UseUnderline = true;
614 635
 		this.vbox9.Add(this.checkButtonGetBattery);
615
-		global::Gtk.Box.BoxChild w51 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.checkButtonGetBattery]));
616
-		w51.Position = 3;
617
-		w51.Expand = false;
618
-		w51.Fill = false;
636
+		global::Gtk.Box.BoxChild w53 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.checkButtonGetBattery]));
637
+		w53.Position = 3;
638
+		w53.Expand = false;
639
+		w53.Fill = false;
619 640
 		this.gtkAlignmentRobotControl.Add(this.vbox9);
620 641
 		this.vbox12.Add(this.gtkAlignmentRobotControl);
621
-		global::Gtk.Box.BoxChild w53 = ((global::Gtk.Box.BoxChild)(this.vbox12[this.gtkAlignmentRobotControl]));
622
-		w53.Position = 1;
642
+		global::Gtk.Box.BoxChild w55 = ((global::Gtk.Box.BoxChild)(this.vbox12[this.gtkAlignmentRobotControl]));
643
+		w55.Position = 1;
623 644
 		this.vbox5.Add(this.vbox12);
624
-		global::Gtk.Box.BoxChild w54 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox12]));
625
-		w54.Position = 4;
645
+		global::Gtk.Box.BoxChild w56 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox12]));
646
+		w56.Position = 4;
626 647
 		this.alignment3.Add(this.vbox5);
627 648
 		this.hbox3.Add(this.alignment3);
628
-		global::Gtk.Box.BoxChild w56 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.alignment3]));
629
-		w56.Position = 1;
630
-		w56.Expand = false;
631
-		w56.Fill = false;
649
+		global::Gtk.Box.BoxChild w58 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.alignment3]));
650
+		w58.Position = 1;
651
+		w58.Expand = false;
652
+		w58.Fill = false;
632 653
 		this.hbox1.Add(this.hbox3);
633
-		global::Gtk.Box.BoxChild w57 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.hbox3]));
634
-		w57.Position = 1;
635
-		w57.Expand = false;
636
-		w57.Fill = false;
654
+		global::Gtk.Box.BoxChild w59 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.hbox3]));
655
+		w59.Position = 1;
656
+		w59.Expand = false;
657
+		w59.Fill = false;
637 658
 		this.vbox1.Add(this.hbox1);
638
-		global::Gtk.Box.BoxChild w58 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
639
-		w58.Position = 1;
659
+		global::Gtk.Box.BoxChild w60 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
660
+		w60.Position = 1;
640 661
 		this.Add(this.vbox1);
641 662
 		if ((this.Child != null))
642 663
 		{
@@ -650,6 +671,7 @@ public partial class MainWindow
650 671
 		this.ShowLogWindowAction.Activated += new global::System.EventHandler(this.OnShowLogWindowActionActivated);
651 672
 		this.checkButtonCameraOn.Clicked += new global::System.EventHandler(this.OnCheckButtonCameraOnClicked);
652 673
 		this.checkButtonRobotPosition.Clicked += new global::System.EventHandler(this.OnCheckButtonRobotPositionClicked);
674
+		this.checkButtonFPS.Toggled += new global::System.EventHandler(this.OnCheckButtonFPSToggled);
653 675
 		this.buttonAskArena.Clicked += new global::System.EventHandler(this.OnButtonAskArenaClicked);
654 676
 		this.drawingAreaCamera.ExposeEvent += new global::Gtk.ExposeEventHandler(this.OnDrawingAreaCameraExposeEvent);
655 677
 		this.buttonServerConnection.Clicked += new global::System.EventHandler(this.OnButtonServerConnectionClicked);

+ 78
- 50
software/monitor/monitor/gtk-gui/gui.stetic View File

@@ -74,68 +74,95 @@
74 74
                 <property name="MemberName" />
75 75
                 <property name="Spacing">6</property>
76 76
                 <child>
77
-                  <widget class="Gtk.Alignment" id="alignment1">
77
+                  <widget class="Gtk.HBox" id="hbox2">
78 78
                     <property name="MemberName" />
79
-                    <property name="Xscale">0</property>
80
-                    <property name="Xalign">0</property>
81
-                    <property name="BorderWidth">6</property>
79
+                    <property name="Spacing">6</property>
82 80
                     <child>
83
-                      <widget class="Gtk.HBox" id="hbox2">
81
+                      <widget class="Gtk.Alignment" id="alignment1">
84 82
                         <property name="MemberName" />
85
-                        <property name="Spacing">6</property>
86
-                        <child>
87
-                          <widget class="Gtk.CheckButton" id="checkButtonCameraOn">
88
-                            <property name="MemberName" />
89
-                            <property name="CanFocus">True</property>
90
-                            <property name="Label" translatable="yes">Camera On</property>
91
-                            <property name="DrawIndicator">True</property>
92
-                            <property name="HasLabel">True</property>
93
-                            <property name="UseUnderline">True</property>
94
-                            <signal name="Clicked" handler="OnCheckButtonCameraOnClicked" />
95
-                          </widget>
96
-                          <packing>
97
-                            <property name="Position">0</property>
98
-                            <property name="AutoSize">True</property>
99
-                          </packing>
100
-                        </child>
101
-                        <child>
102
-                          <widget class="Gtk.CheckButton" id="checkButtonRobotPosition">
103
-                            <property name="MemberName" />
104
-                            <property name="CanFocus">True</property>
105
-                            <property name="Label" translatable="yes">Robot Position</property>
106
-                            <property name="DrawIndicator">True</property>
107
-                            <property name="HasLabel">True</property>
108
-                            <property name="UseUnderline">True</property>
109
-                            <signal name="Clicked" handler="OnCheckButtonRobotPositionClicked" />
110
-                          </widget>
111
-                          <packing>
112
-                            <property name="Position">1</property>
113
-                            <property name="AutoSize">True</property>
114
-                          </packing>
115
-                        </child>
83
+                        <property name="Xscale">0</property>
84
+                        <property name="Xalign">0</property>
85
+                        <property name="BorderWidth">6</property>
116 86
                         <child>
117
-                          <widget class="Gtk.Button" id="buttonAskArena">
87
+                          <widget class="Gtk.HBox" id="hbox5">
118 88
                             <property name="MemberName" />
119
-                            <property name="CanFocus">True</property>
120
-                            <property name="Type">TextOnly</property>
121
-                            <property name="Label" translatable="yes">Ask Arena...</property>
122
-                            <property name="UseUnderline">True</property>
123
-                            <signal name="Clicked" handler="OnButtonAskArenaClicked" />
89
+                            <property name="Spacing">6</property>
90
+                            <child>
91
+                              <widget class="Gtk.CheckButton" id="checkButtonCameraOn">
92
+                                <property name="MemberName" />
93
+                                <property name="CanFocus">True</property>
94
+                                <property name="Label" translatable="yes">Camera On</property>
95
+                                <property name="DrawIndicator">True</property>
96
+                                <property name="HasLabel">True</property>
97
+                                <property name="UseUnderline">True</property>
98
+                                <signal name="Clicked" handler="OnCheckButtonCameraOnClicked" />
99
+                              </widget>
100
+                              <packing>
101
+                                <property name="Position">0</property>
102
+                                <property name="AutoSize">True</property>
103
+                              </packing>
104
+                            </child>
105
+                            <child>
106
+                              <widget class="Gtk.CheckButton" id="checkButtonRobotPosition">
107
+                                <property name="MemberName" />
108
+                                <property name="CanFocus">True</property>
109
+                                <property name="Label" translatable="yes">Show Position</property>
110
+                                <property name="DrawIndicator">True</property>
111
+                                <property name="HasLabel">True</property>
112
+                                <property name="UseUnderline">True</property>
113
+                                <signal name="Clicked" handler="OnCheckButtonRobotPositionClicked" />
114
+                              </widget>
115
+                              <packing>
116
+                                <property name="Position">1</property>
117
+                                <property name="AutoSize">True</property>
118
+                              </packing>
119
+                            </child>
120
+                            <child>
121
+                              <widget class="Gtk.CheckButton" id="checkButtonFPS">
122
+                                <property name="MemberName" />
123
+                                <property name="CanFocus">True</property>
124
+                                <property name="Label" translatable="yes">Show FPS</property>
125
+                                <property name="DrawIndicator">True</property>
126
+                                <property name="HasLabel">True</property>
127
+                                <property name="UseUnderline">True</property>
128
+                                <signal name="Toggled" handler="OnCheckButtonFPSToggled" />
129
+                              </widget>
130
+                              <packing>
131
+                                <property name="Position">2</property>
132
+                                <property name="AutoSize">True</property>
133
+                              </packing>
134
+                            </child>
124 135
                           </widget>
125
-                          <packing>
126
-                            <property name="PackType">End</property>
127
-                            <property name="Position">2</property>
128
-                            <property name="AutoSize">True</property>
129
-                            <property name="Expand">False</property>
130
-                            <property name="Fill">False</property>
131
-                          </packing>
132 136
                         </child>
133 137
                       </widget>
138
+                      <packing>
139
+                        <property name="Position">0</property>
140
+                        <property name="AutoSize">True</property>
141
+                      </packing>
142
+                    </child>
143
+                    <child>
144
+                      <placeholder />
145
+                    </child>
146
+                    <child>
147
+                      <widget class="Gtk.Button" id="buttonAskArena">
148
+                        <property name="MemberName" />
149
+                        <property name="CanFocus">True</property>
150
+                        <property name="Type">TextOnly</property>
151
+                        <property name="Label" translatable="yes">Ask Arena...</property>
152
+                        <property name="UseUnderline">True</property>
153
+                        <signal name="Clicked" handler="OnButtonAskArenaClicked" />
154
+                      </widget>
155
+                      <packing>
156
+                        <property name="Position">2</property>
157
+                        <property name="AutoSize">True</property>
158
+                        <property name="Expand">False</property>
159
+                        <property name="Fill">False</property>
160
+                      </packing>
134 161
                     </child>
135 162
                   </widget>
136 163
                   <packing>
137 164
                     <property name="Position">0</property>
138
-                    <property name="AutoSize">False</property>
165
+                    <property name="AutoSize">True</property>
139 166
                     <property name="Expand">False</property>
140 167
                     <property name="Fill">False</property>
141 168
                   </packing>
@@ -758,6 +785,7 @@
758 785
                                         <property name="MemberName" />
759 786
                                         <property name="CanFocus">True</property>
760 787
                                         <property name="Label" translatable="yes">Get battery level</property>
788
+                                        <property name="Active">True</property>
761 789
                                         <property name="DrawIndicator">True</property>
762 790
                                         <property name="HasLabel">True</property>
763 791
                                         <property name="UseUnderline">True</property>

BIN
software/monitor/monitor/monitor View File


+ 5
- 0
software/raspberry/superviseur-robot/.dep.inc View File

@@ -0,0 +1,5 @@
1
+# This code depends on make tool being used
2
+DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES} ${TESTOBJECTFILES}))
3
+ifneq (${DEPFILES},)
4
+include ${DEPFILES}
5
+endif

BIN
software/raspberry/superviseur-robot/dist/Debug__Pthread_/GNU-Linux/superviseur-robot View File


BIN
software/raspberry/superviseur-robot/dist/Debug__Pthread__RPI/GNU-Linux/superviseur-robot View File


+ 34
- 3
software/raspberry/superviseur-robot/lib/camera.cpp View File

@@ -17,18 +17,42 @@
17 17
 
18 18
 #include "camera.h"
19 19
 #include "img.h"
20
+#include <unistd.h>
20 21
 
21 22
 using namespace cv;
22 23
 
23
-Camera::Camera(int size) {
24
+Camera::Camera(int size, int fps) {
24 25
     this->SetSize(size);
26
+#ifndef __FOR_PC__
25 27
     this->cap.set(CV_CAP_PROP_FORMAT, CV_8UC3);
26 28
     this->cap.set(CV_CAP_PROP_FRAME_WIDTH,width);
27 29
     this->cap.set(CV_CAP_PROP_FRAME_HEIGHT,height);
30
+    this->cap.set(CV_CAP_PROP_FPS, fps);
31
+#endif /* __FOR_PC__ */
28 32
 }
29 33
 
30 34
 bool Camera::Open() {
31
-    this->cap.open(0);
35
+    bool status = false;
36
+    
37
+#ifdef __FOR_PC__
38
+    if (this->cap.open(0)) {
39
+        //this->cap.set(CV_CAP_PROP_FORMAT, CV_8UC3);
40
+        this->cap.set(CV_CAP_PROP_FRAME_WIDTH,width);
41
+        this->cap.set(CV_CAP_PROP_FRAME_HEIGHT,height);
42
+        
43
+        status =true;
44
+     }
45
+#else
46
+    if (this->cap.open()) {
47
+        cout<<"Camera warmup 2sec"<<endl<<flush;
48
+        sleep(2);
49
+        cout<<"Start capture"<<endl<<flush;
50
+    
51
+        status =true;
52
+    }
53
+#endif /* __FOR_PC__ */
54
+    
55
+    return status;
32 56
 }
33 57
 
34 58
 void Camera::Close() {
@@ -58,15 +82,22 @@ void Camera::SetSize(int size) {
58 82
         default:
59 83
             this->width = 480;
60 84
             this->height = 360;
61
-
62 85
     }
63 86
 }
64 87
 
65 88
 Img Camera::Grab() {
66 89
     ImageMat frame;
67 90
     
91
+#ifdef __FOR_PC__
68 92
     cap >> frame;
69 93
     Img capture = Img(frame);
94
+#else
95
+    cap.grab();
96
+    cap.retrieve (frame);
97
+    cvtColor(frame,frame,CV_BGR2RGB);
98
+    
99
+    Img capture = Img(frame);
100
+#endif /* __FOR_PC__ */
70 101
     
71 102
     return capture;
72 103
 }

+ 9
- 1
software/raspberry/superviseur-robot/lib/camera.h View File

@@ -21,13 +21,16 @@
21 21
 #include <opencv2/highgui/highgui.hpp>
22 22
 #include <opencv2/imgproc/imgproc.hpp>
23 23
 
24
+#ifndef __FOR_PC__
25
+#include "raspicam/raspicam_cv.h"
26
+#endif /* __FOR_PC__ */
24 27
 #include "img.h"
25 28
 
26 29
 enum captureSize {xs, sm, md, lg};
27 30
 
28 31
 class Camera {
29 32
 public:
30
-    Camera(int size);
33
+    Camera(int size, int fps);
31 34
 
32 35
     bool Open();
33 36
     void Close();
@@ -41,7 +44,12 @@ public:
41 44
     Img Grab();
42 45
     
43 46
 private:
47
+#ifdef __FOR_PC__
44 48
     cv::VideoCapture cap;
49
+#else
50
+    raspicam::RaspiCam_Cv cap;
51
+#endif /*  __FOR_PC__ */   
52
+   
45 53
     int size = sm;
46 54
     int width;
47 55
     int height;

+ 1
- 1
software/raspberry/superviseur-robot/lib/commonitor.cpp View File

@@ -243,7 +243,7 @@ string ComMonitor::MessageToString(Message *msg) {
243 243
             image=((MessageImg*) msg)->GetImage();
244 244
             jpeg = image->ToJpg();
245 245
             
246
-            cout << "Jpeg size: " << to_string(jpeg.size())<<endl<<flush;
246
+            //cout << "Jpeg size: " << to_string(jpeg.size())<<endl<<flush;
247 247
             
248 248
             s = base64_encode(jpeg.data(), jpeg.size());
249 249
             str.append(LABEL_MONITOR_CAMERA_IMAGE + LABEL_SEPARATOR_CHAR + s);

+ 83
- 95
software/raspberry/superviseur-robot/lib/img.cpp View File

@@ -18,7 +18,7 @@
18 18
 #include "img.h"
19 19
 
20 20
 bool Arena::IsEmpty() {
21
-    if ((this->arena.height==0) || (this->arena.width==0)) return true;
21
+    if ((this->arena.height == 0) || (this->arena.width == 0)) return true;
22 22
     else return false;
23 23
 }
24 24
 
@@ -27,61 +27,64 @@ Img::Img(ImageMat imgMatrice) {
27 27
 }
28 28
 
29 29
 string Img::ToString() {
30
-    return "Image size: "+to_string(this->img.cols)+"x"+to_string(this->img.rows)+" (dim="+to_string(this->img.dims)+")";
30
+    return "Image size: " + to_string(this->img.cols) + "x" + to_string(this->img.rows) + " (dim=" + to_string(this->img.dims) + ")";
31 31
 }
32 32
 
33 33
 Img* Img::Copy() {
34 34
     return new Img(this->img);
35 35
 }
36
-    
36
+
37 37
 float Img::CalculAngle(Position robot) {
38 38
     float a = robot.direction.x - robot.center.x;
39
-    float b = robot.direction.y - robot.center.y ;
40
-    float angle = atan2(b,a);
41
-    return angle * 180.f/M_PI;
39
+    float b = robot.direction.y - robot.center.y;
40
+    float angle = atan2(b, a);
41
+    return angle * 180.f / M_PI;
42 42
 }
43 43
 
44 44
 float Img::CalculAngle2(cv::Point2f pt1, cv::Point2f pt2) {
45 45
     float a = pt1.x - pt2.x;
46
-    float b = pt1.y - pt2.y ;
47
-    float angle = atan2(b,a);
48
-    return angle * 180.f/M_PI;
46
+    float b = pt1.y - pt2.y;
47
+    float angle = atan2(b, a);
48
+    return angle * 180.f / M_PI;
49 49
 }
50 50
 
51 51
 #ifdef __WITH_ARUCO__ 
52
-cv::Point2f Img::find_aruco_center(std::vector<cv::Point2f> aruco) {
53
-    return ((aruco[0] + aruco[2])/2);
52
+
53
+cv::Point2f Img::FindArucoCenter(std::vector<cv::Point2f> aruco) {
54
+    return ((aruco[0] + aruco[2]) / 2);
54 55
 }
55 56
 
56
-cv::Point2f Img::find_aruco_direction(std::vector<cv::Point2f> aruco) {
57
-    return ((aruco[0]+aruco[1])/2);;
57
+cv::Point2f Img::FindArucoDirection(std::vector<cv::Point2f> aruco) {
58
+    return ((aruco[0] + aruco[1]) / 2);
58 59
 }
59 60
 
60
-std::list<Position> Img::search_aruco(Arena monArene) {
61
+std::list<Position> Img::SearchAruco(Arena arena) {
61 62
     ImageMat imgTraitment;
62 63
     std::list<Position> positionList;
63 64
     cv::Point2f areneCoor;
64 65
     std::vector<int> ids;
65 66
     std::vector<std::vector<cv::Point2f> > corners;
66
-    if(monArene.empty())
67
-        imgTraitment=this->img.clone();
68
-    else{
69
-        imgTraitment = cropArena(monArene);
70
-        areneCoor.x = monArene.x;
71
-        areneCoor.y = monArene.y;
67
+    
68
+    if (arena.IsEmpty())
69
+        imgTraitment = this->img.clone();
70
+    else {
71
+        imgTraitment = CropArena(arena);
72
+        areneCoor.x = arena.arena.x;
73
+        areneCoor.y = arena.arena.y;
72 74
     }
73
-    cv::detectMarkers(imgTraitment,dictionary, corners, ids);
74
-    if(ids.size()>0){
75
-        for(int i = 0 ; i < ids.size() ; i++){
75
+    
76
+    cv::aruco::detectMarkers(imgTraitment, dictionary, corners, ids);
77
+    if (ids.size() > 0) {
78
+        for (int i = 0; i < ids.size(); i++) {
76 79
             Position newPos;
77
-            newPos.center = find_aruco_center(corners[i]);
78
-            newPos.direction = find_aruco_direction(corners[i]);
80
+            newPos.center = FindArucoCenter(corners[i]);
81
+            newPos.direction = FindArucoDirection(corners[i]);
79 82
             newPos.robotId = ids[i];
80
-            if(!monArene.empty()){
83
+            if (!arena.IsEmpty()) {
81 84
                 newPos.direction += areneCoor;
82 85
                 newPos.center += areneCoor;
83 86
             }
84
-            newPos.angle = calculAngle2(newPos.center, newPos.direction);
87
+            newPos.angle = CalculAngle2(newPos.center, newPos.direction);
85 88
             positionList.push_back(newPos);
86 89
         }
87 90
     }
@@ -91,92 +94,79 @@ std::list<Position> Img::search_aruco(Arena monArene) {
91 94
 
92 95
 float Img::EuclideanDistance(cv::Point2f p, cv::Point2f q) {
93 96
     cv::Point diff = p - q;
94
-    return cv::sqrt(diff.x*diff.x + diff.y*diff.y);
97
+    return cv::sqrt(diff.x * diff.x + diff.y * diff.y);
95 98
 }
96 99
 
97 100
 Jpg Img::ToJpg() {
98 101
     Jpg imgJpg;
99
-    cv::imencode(".jpg",this->img,imgJpg);
102
+    cv::imencode(".jpg", this->img, imgJpg);
100 103
     return imgJpg;
101 104
 }
102 105
 
103
-//string Img::ToBase64() {
104
-//    string imgBase64;
105
-//    Jpg imgJpg = toJpg();
106
-//    
107
-//    /* faire la convertion Jpg vers base 64 */
108
-//    return imgBase64;
109
-//}
110
-
111
-std::list<Position> Img::SearchRobot(Arena monArene) {
106
+std::list<Position> Img::SearchRobot(Arena arena) {
112 107
 
113 108
     std::list<Position> robotsFind;
114
-    std::vector<std::vector<cv::Point2f> > contours;
115
-    std::vector<cv::Point2f> approx;
109
+    std::vector<std::vector<cv::Point> > contours;
110
+    std::vector<cv::Point> approx;
116 111
     std::vector<cv::Vec4i> hierarchy;
117 112
 
118 113
     ImageMat imgTraitment;
119 114
 
120
-    if(monArene.IsEmpty())
121
-        imgTraitment=this->img.clone();
122
-    else
123
-        imgTraitment = CropArena(monArene);
124
-
125
-    cvtColor(imgTraitment,imgTraitment,CV_RGB2GRAY);
126
-    threshold(imgTraitment,imgTraitment,128,255,CV_THRESH_BINARY);
127
-    findContours(imgTraitment, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, cv::Point2f(0, 0));
115
+    if (arena.IsEmpty()) {
116
+        imgTraitment = this->img.clone();
117
+    } else {
118
+        imgTraitment = this->img(arena.arena);
119
+    }
128 120
 
129
-    for(unsigned int i = 0;i < contours.size();i++)
130
-    {
131
-        cv::approxPolyDP(ImageMat(contours[i]), approx, cv::arcLength(ImageMat(contours[i]), true)*0.17, true);
132
-        if(approx.size() == 3 && fabs(cv::contourArea(contours[i])) > 200 && fabs(cv::contourArea(contours[i])) < 700)
133
-        {
121
+    cvtColor(imgTraitment, imgTraitment, CV_RGB2GRAY);
122
+    threshold(imgTraitment, imgTraitment, 128, 255, CV_THRESH_BINARY);
123
+    findContours(imgTraitment, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, cv::Point(0, 0));
134 124
 
135
-            cv::Point2f a,b,c;
136
-            cv::Point2f center;
125
+    for (unsigned int i = 0; i < contours.size(); i++) {
126
+        ImageMat m(contours[i]);
127
+        cv::approxPolyDP(m, approx, cv::arcLength(ImageMat(contours[i]), true)*0.17, true);
137 128
 
129
+        if (approx.size() == 3 && fabs(cv::contourArea(contours[i])) > 200 && fabs(cv::contourArea(contours[i])) < 700) {
130
+            cv::Point a, b, c;
131
+            cv::Point center;
138 132
 
139 133
             a = approx[0];
140 134
             b = approx[1];
141 135
             c = approx[2];
142 136
 
143
-
144
-            if(!monArene.IsEmpty()) // ajout de l'offset de l'arène
145
-            {
146
-                a.x += monArene.arena.x;
147
-                a.y += monArene.arena.y;
148
-                b.x += monArene.arena.x;
149
-                b.y += monArene.arena.y;
150
-                c.x += monArene.arena.x;
151
-                c.y += monArene.arena.y;
137
+            if (!arena.IsEmpty()) { // ajout de l'offset de l'arène
138
+                a.x += arena.arena.x;
139
+                a.y += arena.arena.y;
140
+                b.x += arena.arena.x;
141
+                b.y += arena.arena.y;
142
+                c.x += arena.arena.x;
143
+                c.y += arena.arena.y;
152 144
             }
153 145
 
154
-            center.x = (a.x + b.x + c.x)/3;
155
-            center.y = (a.y + b.y + c.y)/3;
146
+            center.x = (a.x + b.x + c.x) / 3;
147
+            center.y = (a.y + b.y + c.y) / 3;
156 148
             Position newPos;
157
-            newPos.center=center;
158
-
159
-            if(EuclideanDistance(center,b) > EuclideanDistance(center,a) && EuclideanDistance(center,b) > EuclideanDistance(center,c) )
160
-            {
149
+            newPos.center = center;
161 150
 
162
-                newPos.direction=b;
151
+            if (EuclideanDistance(center, b) > EuclideanDistance(center, a) && EuclideanDistance(center, b) > EuclideanDistance(center, c)) {
152
+                newPos.direction = b;
163 153
                 //line(img,center,b,Scalar(0,125,0),2,8,0);
164
-            }
165
-            else if(EuclideanDistance(center,a) > EuclideanDistance(center,c))
166
-            {
167
-                newPos.direction=a;
168
-                //line(img,center,a,Scalar(0,125,0),2,8,0);
154
+            } else if (EuclideanDistance(center, a) > EuclideanDistance(center, c)) {
169 155
 
170
-            }
171
-            else
172
-            {
173
-                newPos.direction=c;
156
+                newPos.direction = a;
157
+                //line(img,center,a,Scalar(0,125,0),2,8,0);
158
+            } else {
159
+                newPos.direction = c;
174 160
                 //line(img,center,c,Scalar(0,125,0),2,8,0);
175 161
             }
176
-            newPos.angle=CalculAngle(newPos);
162
+
163
+            newPos.angle = CalculAngle(newPos);
164
+            newPos.robotId = -1; // dumb identifier
165
+
177 166
             robotsFind.push_back(newPos);
178 167
         }
179 168
     }
169
+
180 170
     return robotsFind;
181 171
 }
182 172
 
@@ -186,16 +176,14 @@ Arena Img::SearchArena() {
186 176
     std::vector<cv::Vec4i> hierarchy;
187 177
 
188 178
     ImageMat imageTrt;
189
-    cv::cvtColor(this->img,imageTrt,CV_RGB2GRAY); // conversion en niveau de gris
190
-    cv::threshold(imageTrt,imageTrt,128,255,CV_THRESH_BINARY); // Threshold les éléments les plus clair
191
-    cv::Canny(imageTrt, imageTrt, 100,200,3); // detection d'angle
179
+    cv::cvtColor(this->img, imageTrt, CV_RGB2GRAY); // conversion en niveau de gris
180
+    cv::threshold(imageTrt, imageTrt, 128, 255, CV_THRESH_BINARY); // Threshold les éléments les plus clair
181
+    cv::Canny(imageTrt, imageTrt, 100, 200, 3); // detection d'angle
192 182
 
193 183
     findContours(imageTrt, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, cv::Point(0, 0));
194
-    for(unsigned int i = 0; i < contours.size();i++)
195
-    {
184
+    for (unsigned int i = 0; i < contours.size(); i++) {
196 185
         approxPolyDP(ImageMat(contours[i]), approx, cv::arcLength(ImageMat(contours[i]), true)*0.1, true);
197
-        if(approx.size()==4 && fabs(cv::contourArea(contours[i])) > 100000)
198
-        {
186
+        if (approx.size() == 4 && fabs(cv::contourArea(contours[i])) > 100000) {
199 187
             Arena rectangle;
200 188
             rectangle.arena = cv::boundingRect(ImageMat(contours[i]));
201 189
             return rectangle;
@@ -205,22 +193,22 @@ Arena Img::SearchArena() {
205 193
 }
206 194
 
207 195
 int Img::DrawRobot(Position robot) {
208
-    cv::arrowedLine(this->img, (cv::Point2f)robot.center, (cv::Point2f)robot.direction, cv::Scalar(0,0,255),3,8,0);
196
+    cv::arrowedLine(this->img, (cv::Point2f)robot.center, (cv::Point2f)robot.direction, cv::Scalar(0, 0, 255), 3, 8, 0);
209 197
     return 0;
210 198
 }
211 199
 
212 200
 int Img::DrawAllRobots(std::list<Position> robots) {
213
-    for(Position robot  : robots){
214
-        cv::arrowedLine(this->img, (cv::Point2f)robot.center, (cv::Point2f)robot.direction, cv::Scalar(0,0,255),3,8,0);
201
+    for (Position robot : robots) {
202
+        cv::arrowedLine(this->img, (cv::Point2f)robot.center, (cv::Point2f)robot.direction, cv::Scalar(0, 0, 255), 3, 8, 0);
215 203
     }
216 204
     return robots.size();
217 205
 }
218 206
 
219
-int Img::DrawArena(Arena areneToDraw) {
220
-    cv::rectangle(this->img,areneToDraw.arena.tl(),areneToDraw.arena.br(),cv::Scalar(0,0,125),2,8,0);
207
+int Img::DrawArena(Arena arenaToDraw) {
208
+    cv::rectangle(this->img, arenaToDraw.arena.tl(), arenaToDraw.arena.br(), cv::Scalar(0, 0, 125), 2, 8, 0);
221 209
     return 0;
222 210
 }
223 211
 
224
-ImageMat Img::CropArena(Arena arene) {
225
-    return this->img(arene.arena);
212
+ImageMat Img::CropArena(Arena arena) {
213
+    return this->img(arena.arena);
226 214
 }

+ 12
- 11
software/raspberry/superviseur-robot/lib/img.h View File

@@ -29,7 +29,9 @@
29 29
 #ifdef __WITH_ARUCO__
30 30
 #include <opencv2/aruco/dictionary.hpp>
31 31
 #include <opencv2/aruco/charuco.hpp>
32
+//#include <opencv2/aruco.hpp>
32 33
 #include <opencv2/core/mat.hpp>
34
+
33 35
 #endif // __WITH_ARUCO__
34 36
 
35 37
 #define ARENA_NOT_DETECTED -1
@@ -57,6 +59,8 @@ public:
57 59
 
58 60
 class Img {
59 61
 public:
62
+    ImageMat img;
63
+    
60 64
     Img(ImageMat imgMatrice);
61 65
     
62 66
     string ToString();
@@ -67,26 +71,23 @@ public:
67 71
 
68 72
     int DrawRobot(Position robot);
69 73
     int DrawAllRobots(std::list<Position> robots);
70
-    int DrawArena(Arena areneToDraw);
71
-    std::list<Position> SearchRobot(Arena myArena);
72
-    
73
-    
74
+    int DrawArena(Arena arenaToDraw);
75
+    std::list<Position> SearchRobot(Arena arena);
76
+        
74 77
 #ifdef __WITH_ARUCO__    
75
-    list<Position> search_aruco(Arena monArene = NULL);
78
+    list<Position> SearchAruco(Arena arena);
79
+    cv::Ptr<cv::aruco::Dictionary> dictionary;
76 80
 #endif // __WITH_ARUCO__
77 81
 private:
78
-    ImageMat img;
79
-    
80 82
 #ifdef __WITH_ARUCO__
81
-    Ptr<std::Dictionary> dictionary;
82
-    cv::Point2f find_aruco_center(std::vector<cv::Point2f> aruco);
83
-    cv::Point2f find_aruco_direction(std::vector<cv::Point2f> aruco);
83
+    cv::Point2f FindArucoCenter(std::vector<cv::Point2f> aruco);
84
+    cv::Point2f FindArucoDirection(std::vector<cv::Point2f> aruco);
84 85
 #endif // __WITH_ARUCO__
85 86
     
86 87
     float CalculAngle(Position robots);
87 88
     float CalculAngle2(cv::Point2f pt1, cv::Point2f pt2);
88 89
     float EuclideanDistance(cv::Point2f p, cv::Point2f q);
89
-    ImageMat CropArena(Arena arene);
90
+    ImageMat CropArena(Arena arena);
90 91
 };
91 92
 
92 93
 #endif //__IMG_H__

+ 30
- 30
software/raspberry/superviseur-robot/nbproject/Makefile-Debug.mk View File

@@ -35,6 +35,11 @@ OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
35 35
 
36 36
 # Object Files
37 37
 OBJECTFILES= \
38
+	${OBJECTDIR}/lib/base64/base64.o \
39
+	${OBJECTDIR}/lib/camera.o \
40
+	${OBJECTDIR}/lib/commonitor.o \
41
+	${OBJECTDIR}/lib/comrobot.o \
42
+	${OBJECTDIR}/lib/img.o \
38 43
 	${OBJECTDIR}/lib/message.o \
39 44
 	${OBJECTDIR}/lib/messages.o \
40 45
 	${OBJECTDIR}/lib/monitor.o \
@@ -42,11 +47,6 @@ OBJECTFILES= \
42 47
 	${OBJECTDIR}/lib/server.o \
43 48
 	${OBJECTDIR}/main.o \
44 49
 	${OBJECTDIR}/tasks.o \
45
-	${OBJECTDIR}/_ext/a7f31ab4/base64.o \
46
-	${OBJECTDIR}/_ext/6cc0dc4a/camera.o \
47
-	${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o \
48
-	${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o \
49
-	${OBJECTDIR}/_ext/6cc0dc4a/img.o \
50 50
 	${OBJECTDIR}/tasks_pthread.o
51 51
 
52 52
 
@@ -74,6 +74,31 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot: ${OBJECTFILES}
74 74
 	${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
75 75
 	${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot ${OBJECTFILES} ${LDLIBSOPTIONS} -Wl,--no-as-needed -lalchemy -lcopperplate /usr/xenomai/lib/xenomai/bootstrap.o -Wl,--wrap=main -Wl,--dynamic-list=/usr/xenomai/lib/dynlist.ld -L/usr/xenomai/lib -lmercury -lpthread -lrt
76 76
 
77
+${OBJECTDIR}/lib/base64/base64.o: lib/base64/base64.cpp
78
+	${MKDIR} -p ${OBJECTDIR}/lib/base64
79
+	${RM} "$@.d"
80
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/base64/base64.o lib/base64/base64.cpp
81
+
82
+${OBJECTDIR}/lib/camera.o: lib/camera.cpp
83
+	${MKDIR} -p ${OBJECTDIR}/lib
84
+	${RM} "$@.d"
85
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/camera.o lib/camera.cpp
86
+
87
+${OBJECTDIR}/lib/commonitor.o: lib/commonitor.cpp
88
+	${MKDIR} -p ${OBJECTDIR}/lib
89
+	${RM} "$@.d"
90
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/commonitor.o lib/commonitor.cpp
91
+
92
+${OBJECTDIR}/lib/comrobot.o: lib/comrobot.cpp
93
+	${MKDIR} -p ${OBJECTDIR}/lib
94
+	${RM} "$@.d"
95
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/comrobot.o lib/comrobot.cpp
96
+
97
+${OBJECTDIR}/lib/img.o: lib/img.cpp
98
+	${MKDIR} -p ${OBJECTDIR}/lib
99
+	${RM} "$@.d"
100
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/img.o lib/img.cpp
101
+
77 102
 ${OBJECTDIR}/lib/message.o: lib/message.cpp
78 103
 	${MKDIR} -p ${OBJECTDIR}/lib
79 104
 	${RM} "$@.d"
@@ -109,31 +134,6 @@ ${OBJECTDIR}/tasks.o: tasks.cpp
109 134
 	${RM} "$@.d"
110 135
 	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/tasks.o tasks.cpp
111 136
 
112
-${OBJECTDIR}/_ext/a7f31ab4/base64.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp
113
-	${MKDIR} -p ${OBJECTDIR}/_ext/a7f31ab4
114
-	${RM} "$@.d"
115
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/a7f31ab4/base64.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp
116
-
117
-${OBJECTDIR}/_ext/6cc0dc4a/camera.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp
118
-	${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
119
-	${RM} "$@.d"
120
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/6cc0dc4a/camera.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp
121
-
122
-${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp
123
-	${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
124
-	${RM} "$@.d"
125
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp
126
-
127
-${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp
128
-	${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
129
-	${RM} "$@.d"
130
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp
131
-
132
-${OBJECTDIR}/_ext/6cc0dc4a/img.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp
133
-	${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
134
-	${RM} "$@.d"
135
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/6cc0dc4a/img.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp
136
-
137 137
 ${OBJECTDIR}/tasks_pthread.o: tasks_pthread.cpp
138 138
 	${MKDIR} -p ${OBJECTDIR}
139 139
 	${RM} "$@.d"

+ 27
- 27
software/raspberry/superviseur-robot/nbproject/Makefile-Debug__Pthread_.mk View File

@@ -35,13 +35,13 @@ OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
35 35
 
36 36
 # Object Files
37 37
 OBJECTFILES= \
38
+	${OBJECTDIR}/lib/base64/base64.o \
39
+	${OBJECTDIR}/lib/camera.o \
40
+	${OBJECTDIR}/lib/commonitor.o \
41
+	${OBJECTDIR}/lib/comrobot.o \
42
+	${OBJECTDIR}/lib/img.o \
38 43
 	${OBJECTDIR}/lib/messages.o \
39 44
 	${OBJECTDIR}/main.o \
40
-	${OBJECTDIR}/_ext/a7f31ab4/base64.o \
41
-	${OBJECTDIR}/_ext/6cc0dc4a/camera.o \
42
-	${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o \
43
-	${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o \
44
-	${OBJECTDIR}/_ext/6cc0dc4a/img.o \
45 45
 	${OBJECTDIR}/tasks_pthread.o
46 46
 
47 47
 
@@ -69,45 +69,45 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot: ${OBJECTFILES}
69 69
 	${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
70 70
 	${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot ${OBJECTFILES} ${LDLIBSOPTIONS} -lpthread -lrt
71 71
 
72
-${OBJECTDIR}/lib/messages.o: lib/messages.cpp
73
-	${MKDIR} -p ${OBJECTDIR}/lib
72
+${OBJECTDIR}/lib/base64/base64.o: lib/base64/base64.cpp
73
+	${MKDIR} -p ${OBJECTDIR}/lib/base64
74 74
 	${RM} "$@.d"
75
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/messages.o lib/messages.cpp
75
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/base64/base64.o lib/base64/base64.cpp
76 76
 
77
-${OBJECTDIR}/main.o: main.cpp
78
-	${MKDIR} -p ${OBJECTDIR}
77
+${OBJECTDIR}/lib/camera.o: lib/camera.cpp
78
+	${MKDIR} -p ${OBJECTDIR}/lib
79 79
 	${RM} "$@.d"
80
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
80
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/camera.o lib/camera.cpp
81 81
 
82
-${OBJECTDIR}/_ext/a7f31ab4/base64.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp
83
-	${MKDIR} -p ${OBJECTDIR}/_ext/a7f31ab4
82
+${OBJECTDIR}/lib/commonitor.o: lib/commonitor.cpp
83
+	${MKDIR} -p ${OBJECTDIR}/lib
84 84
 	${RM} "$@.d"
85
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/a7f31ab4/base64.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp
85
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/commonitor.o lib/commonitor.cpp
86 86
 
87
-${OBJECTDIR}/_ext/6cc0dc4a/camera.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp
88
-	${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
87
+${OBJECTDIR}/lib/comrobot.o: lib/comrobot.cpp
88
+	${MKDIR} -p ${OBJECTDIR}/lib
89 89
 	${RM} "$@.d"
90
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/6cc0dc4a/camera.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp
90
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/comrobot.o lib/comrobot.cpp
91 91
 
92
-${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp
93
-	${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
92
+${OBJECTDIR}/lib/img.o: lib/img.cpp
93
+	${MKDIR} -p ${OBJECTDIR}/lib
94 94
 	${RM} "$@.d"
95
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp
95
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/img.o lib/img.cpp
96 96
 
97
-${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp
98
-	${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
97
+${OBJECTDIR}/lib/messages.o: lib/messages.cpp
98
+	${MKDIR} -p ${OBJECTDIR}/lib
99 99
 	${RM} "$@.d"
100
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp
100
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/messages.o lib/messages.cpp
101 101
 
102
-${OBJECTDIR}/_ext/6cc0dc4a/img.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp
103
-	${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
102
+${OBJECTDIR}/main.o: main.cpp
103
+	${MKDIR} -p ${OBJECTDIR}
104 104
 	${RM} "$@.d"
105
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/6cc0dc4a/img.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp
105
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
106 106
 
107 107
 ${OBJECTDIR}/tasks_pthread.o: tasks_pthread.cpp
108 108
 	${MKDIR} -p ${OBJECTDIR}
109 109
 	${RM} "$@.d"
110
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/tasks_pthread.o tasks_pthread.cpp
110
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_PTHREAD__ -D__WITH_ARUCO__ -I./ -I./lib `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/tasks_pthread.o tasks_pthread.cpp
111 111
 
112 112
 # Subprojects
113 113
 .build-subprojects:

+ 131
- 0
software/raspberry/superviseur-robot/nbproject/Makefile-Debug__Pthread__RPI.mk View File

@@ -0,0 +1,131 @@
1
+#
2
+# Generated Makefile - do not edit!
3
+#
4
+# Edit the Makefile in the project folder instead (../Makefile). Each target
5
+# has a -pre and a -post target defined where you can add customized code.
6
+#
7
+# This makefile implements configuration specific macros and targets.
8
+
9
+
10
+# Environment
11
+MKDIR=mkdir
12
+CP=cp
13
+GREP=grep
14
+NM=nm
15
+CCADMIN=CCadmin
16
+RANLIB=ranlib
17
+CC=gcc
18
+CCC=g++
19
+CXX=g++
20
+FC=gfortran
21
+AS=as
22
+
23
+# Macros
24
+CND_PLATFORM=GNU-Linux
25
+CND_DLIB_EXT=so
26
+CND_CONF=Debug__Pthread__RPI
27
+CND_DISTDIR=dist
28
+CND_BUILDDIR=build
29
+
30
+# Include project Makefile
31
+include ./Makefile
32
+
33
+# Object Directory
34
+OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
35
+
36
+# Object Files
37
+OBJECTFILES= \
38
+	${OBJECTDIR}/lib/base64/base64.o \
39
+	${OBJECTDIR}/lib/camera.o \
40
+	${OBJECTDIR}/lib/commonitor.o \
41
+	${OBJECTDIR}/lib/comrobot.o \
42
+	${OBJECTDIR}/lib/img.o \
43
+	${OBJECTDIR}/lib/messages.o \
44
+	${OBJECTDIR}/main.o \
45
+	${OBJECTDIR}/tasks_pthread.o
46
+
47
+
48
+# C Compiler Flags
49
+CFLAGS=-I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy
50
+
51
+# CC Compiler Flags
52
+CCFLAGS=-D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -Wno-pmf-conversions -std=gnu++11
53
+CXXFLAGS=-D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -Wno-pmf-conversions -std=gnu++11
54
+
55
+# Fortran Compiler Flags
56
+FFLAGS=
57
+
58
+# Assembler Flags
59
+ASFLAGS=
60
+
61
+# Link Libraries and Options
62
+LDLIBSOPTIONS=`pkg-config --libs opencv` /usr/local/lib/libraspicam_cv.so /usr/local/lib/libraspicam.so  
63
+
64
+# Build Targets
65
+.build-conf: ${BUILD_SUBPROJECTS}
66
+	"${MAKE}"  -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot
67
+
68
+${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot: /usr/local/lib/libraspicam_cv.so
69
+
70
+${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot: /usr/local/lib/libraspicam.so
71
+
72
+${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot: ${OBJECTFILES}
73
+	${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
74
+	${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot ${OBJECTFILES} ${LDLIBSOPTIONS} -lpthread -lrt
75
+
76
+${OBJECTDIR}/lib/base64/base64.o: lib/base64/base64.cpp
77
+	${MKDIR} -p ${OBJECTDIR}/lib/base64
78
+	${RM} "$@.d"
79
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_PTHREAD__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/base64/base64.o lib/base64/base64.cpp
80
+
81
+${OBJECTDIR}/lib/camera.o: lib/camera.cpp
82
+	${MKDIR} -p ${OBJECTDIR}/lib
83
+	${RM} "$@.d"
84
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_PTHREAD__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/camera.o lib/camera.cpp
85
+
86
+${OBJECTDIR}/lib/commonitor.o: lib/commonitor.cpp
87
+	${MKDIR} -p ${OBJECTDIR}/lib
88
+	${RM} "$@.d"
89
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_PTHREAD__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/commonitor.o lib/commonitor.cpp
90
+
91
+${OBJECTDIR}/lib/comrobot.o: lib/comrobot.cpp
92
+	${MKDIR} -p ${OBJECTDIR}/lib
93
+	${RM} "$@.d"
94
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_PTHREAD__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/comrobot.o lib/comrobot.cpp
95
+
96
+${OBJECTDIR}/lib/img.o: lib/img.cpp
97
+	${MKDIR} -p ${OBJECTDIR}/lib
98
+	${RM} "$@.d"
99
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_PTHREAD__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv` -std=c++11  -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/img.o lib/img.cpp
100
+
101
+${OBJECTDIR}/lib/messages.o: lib/messages.cpp
102
+	${MKDIR} -p ${OBJECTDIR}/lib
103
+	${RM} "$@.d"
104
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_PTHREAD__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/messages.o lib/messages.cpp
105
+
106
+${OBJECTDIR}/main.o: main.cpp
107
+	${MKDIR} -p ${OBJECTDIR}
108
+	${RM} "$@.d"
109
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_PTHREAD__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
110
+
111
+${OBJECTDIR}/tasks_pthread.o: tasks_pthread.cpp
112
+	${MKDIR} -p ${OBJECTDIR}
113
+	${RM} "$@.d"
114
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_PTHREAD__ -I./ -I./lib -I./lib/base64 `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/tasks_pthread.o tasks_pthread.cpp
115
+
116
+# Subprojects
117
+.build-subprojects:
118
+
119
+# Clean Targets
120
+.clean-conf: ${CLEAN_SUBPROJECTS}
121
+	${RM} -r ${CND_BUILDDIR}/${CND_CONF}
122
+	${RM} -r ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libraspicam_cv.so ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libraspicam.so
123
+	${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot
124
+
125
+# Subprojects
126
+.clean-subprojects:
127
+
128
+# Enable dependency checking
129
+.dep.inc: .depcheck-impl
130
+
131
+include .dep.inc

+ 30
- 30
software/raspberry/superviseur-robot/nbproject/Makefile-Debug__RPI_.mk View File

@@ -35,7 +35,12 @@ OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
35 35
 
36 36
 # Object Files
37 37
 OBJECTFILES= \
38
+	${OBJECTDIR}/lib/base64/base64.o \
39
+	${OBJECTDIR}/lib/camera.o \
40
+	${OBJECTDIR}/lib/commonitor.o \
41
+	${OBJECTDIR}/lib/comrobot.o \
38 42
 	${OBJECTDIR}/lib/image.o \
43
+	${OBJECTDIR}/lib/img.o \
39 44
 	${OBJECTDIR}/lib/message.o \
40 45
 	${OBJECTDIR}/lib/messages.o \
41 46
 	${OBJECTDIR}/lib/monitor.o \
@@ -43,11 +48,6 @@ OBJECTFILES= \
43 48
 	${OBJECTDIR}/lib/server.o \
44 49
 	${OBJECTDIR}/main.o \
45 50
 	${OBJECTDIR}/tasks.o \
46
-	${OBJECTDIR}/_ext/a7f31ab4/base64.o \
47
-	${OBJECTDIR}/_ext/6cc0dc4a/camera.o \
48
-	${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o \
49
-	${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o \
50
-	${OBJECTDIR}/_ext/6cc0dc4a/img.o \
51 51
 	${OBJECTDIR}/tasks_pthread.o
52 52
 
53 53
 
@@ -75,11 +75,36 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot: ${OBJECTFILES}
75 75
 	${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
76 76
 	${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot ${OBJECTFILES} ${LDLIBSOPTIONS} -Wl,--no-as-needed -lalchemy -lcopperplate /usr/xenomai/lib/xenomai/bootstrap.o -Wl,--wrap=main -Wl,--dynamic-list=/usr/xenomai/lib/dynlist.ld -L/usr/xenomai/lib -lmercury -lpthread -lrt
77 77
 
78
+${OBJECTDIR}/lib/base64/base64.o: lib/base64/base64.cpp
79
+	${MKDIR} -p ${OBJECTDIR}/lib/base64
80
+	${RM} "$@.d"
81
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/base64/base64.o lib/base64/base64.cpp
82
+
83
+${OBJECTDIR}/lib/camera.o: lib/camera.cpp
84
+	${MKDIR} -p ${OBJECTDIR}/lib
85
+	${RM} "$@.d"
86
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/camera.o lib/camera.cpp
87
+
88
+${OBJECTDIR}/lib/commonitor.o: lib/commonitor.cpp
89
+	${MKDIR} -p ${OBJECTDIR}/lib
90
+	${RM} "$@.d"
91
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/commonitor.o lib/commonitor.cpp
92
+
93
+${OBJECTDIR}/lib/comrobot.o: lib/comrobot.cpp
94
+	${MKDIR} -p ${OBJECTDIR}/lib
95
+	${RM} "$@.d"
96
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/comrobot.o lib/comrobot.cpp
97
+
78 98
 ${OBJECTDIR}/lib/image.o: lib/image.cpp
79 99
 	${MKDIR} -p ${OBJECTDIR}/lib
80 100
 	${RM} "$@.d"
81 101
 	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/image.o lib/image.cpp
82 102
 
103
+${OBJECTDIR}/lib/img.o: lib/img.cpp
104
+	${MKDIR} -p ${OBJECTDIR}/lib
105
+	${RM} "$@.d"
106
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/img.o lib/img.cpp
107
+
83 108
 ${OBJECTDIR}/lib/message.o: lib/message.cpp
84 109
 	${MKDIR} -p ${OBJECTDIR}/lib
85 110
 	${RM} "$@.d"
@@ -115,31 +140,6 @@ ${OBJECTDIR}/tasks.o: tasks.cpp
115 140
 	${RM} "$@.d"
116 141
 	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/tasks.o tasks.cpp
117 142
 
118
-${OBJECTDIR}/_ext/a7f31ab4/base64.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp
119
-	${MKDIR} -p ${OBJECTDIR}/_ext/a7f31ab4
120
-	${RM} "$@.d"
121
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/a7f31ab4/base64.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp
122
-
123
-${OBJECTDIR}/_ext/6cc0dc4a/camera.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp
124
-	${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
125
-	${RM} "$@.d"
126
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/6cc0dc4a/camera.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp
127
-
128
-${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp
129
-	${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
130
-	${RM} "$@.d"
131
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp
132
-
133
-${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp
134
-	${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
135
-	${RM} "$@.d"
136
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp
137
-
138
-${OBJECTDIR}/_ext/6cc0dc4a/img.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp
139
-	${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
140
-	${RM} "$@.d"
141
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/6cc0dc4a/img.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp
142
-
143 143
 ${OBJECTDIR}/tasks_pthread.o: tasks_pthread.cpp
144 144
 	${MKDIR} -p ${OBJECTDIR}
145 145
 	${RM} "$@.d"

+ 30
- 30
software/raspberry/superviseur-robot/nbproject/Makefile-Release.mk View File

@@ -35,7 +35,12 @@ OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
35 35
 
36 36
 # Object Files
37 37
 OBJECTFILES= \
38
+	${OBJECTDIR}/lib/base64/base64.o \
39
+	${OBJECTDIR}/lib/camera.o \
40
+	${OBJECTDIR}/lib/commonitor.o \
41
+	${OBJECTDIR}/lib/comrobot.o \
38 42
 	${OBJECTDIR}/lib/image.o \
43
+	${OBJECTDIR}/lib/img.o \
39 44
 	${OBJECTDIR}/lib/message.o \
40 45
 	${OBJECTDIR}/lib/messages.o \
41 46
 	${OBJECTDIR}/lib/monitor.o \
@@ -43,11 +48,6 @@ OBJECTFILES= \
43 48
 	${OBJECTDIR}/lib/server.o \
44 49
 	${OBJECTDIR}/main.o \
45 50
 	${OBJECTDIR}/tasks.o \
46
-	${OBJECTDIR}/_ext/a7f31ab4/base64.o \
47
-	${OBJECTDIR}/_ext/6cc0dc4a/camera.o \
48
-	${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o \
49
-	${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o \
50
-	${OBJECTDIR}/_ext/6cc0dc4a/img.o \
51 51
 	${OBJECTDIR}/tasks_pthread.o
52 52
 
53 53
 
@@ -75,11 +75,36 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot: ${OBJECTFILES}
75 75
 	${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
76 76
 	${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot ${OBJECTFILES} ${LDLIBSOPTIONS}
77 77
 
78
+${OBJECTDIR}/lib/base64/base64.o: lib/base64/base64.cpp
79
+	${MKDIR} -p ${OBJECTDIR}/lib/base64
80
+	${RM} "$@.d"
81
+	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/base64/base64.o lib/base64/base64.cpp
82
+
83
+${OBJECTDIR}/lib/camera.o: lib/camera.cpp
84
+	${MKDIR} -p ${OBJECTDIR}/lib
85
+	${RM} "$@.d"
86
+	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/camera.o lib/camera.cpp
87
+
88
+${OBJECTDIR}/lib/commonitor.o: lib/commonitor.cpp
89
+	${MKDIR} -p ${OBJECTDIR}/lib
90
+	${RM} "$@.d"
91
+	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/commonitor.o lib/commonitor.cpp
92
+
93
+${OBJECTDIR}/lib/comrobot.o: lib/comrobot.cpp
94
+	${MKDIR} -p ${OBJECTDIR}/lib
95
+	${RM} "$@.d"
96
+	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/comrobot.o lib/comrobot.cpp
97
+
78 98
 ${OBJECTDIR}/lib/image.o: lib/image.cpp
79 99
 	${MKDIR} -p ${OBJECTDIR}/lib
80 100
 	${RM} "$@.d"
81 101
 	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/image.o lib/image.cpp
82 102
 
103
+${OBJECTDIR}/lib/img.o: lib/img.cpp
104
+	${MKDIR} -p ${OBJECTDIR}/lib
105
+	${RM} "$@.d"
106
+	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/img.o lib/img.cpp
107
+
83 108
 ${OBJECTDIR}/lib/message.o: lib/message.cpp
84 109
 	${MKDIR} -p ${OBJECTDIR}/lib
85 110
 	${RM} "$@.d"
@@ -115,31 +140,6 @@ ${OBJECTDIR}/tasks.o: tasks.cpp
115 140
 	${RM} "$@.d"
116 141
 	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/tasks.o tasks.cpp
117 142
 
118
-${OBJECTDIR}/_ext/a7f31ab4/base64.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp
119
-	${MKDIR} -p ${OBJECTDIR}/_ext/a7f31ab4
120
-	${RM} "$@.d"
121
-	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/a7f31ab4/base64.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp
122
-
123
-${OBJECTDIR}/_ext/6cc0dc4a/camera.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp
124
-	${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
125
-	${RM} "$@.d"
126
-	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/6cc0dc4a/camera.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp
127
-
128
-${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp
129
-	${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
130
-	${RM} "$@.d"
131
-	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp
132
-
133
-${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp
134
-	${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
135
-	${RM} "$@.d"
136
-	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp
137
-
138
-${OBJECTDIR}/_ext/6cc0dc4a/img.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp
139
-	${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
140
-	${RM} "$@.d"
141
-	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/6cc0dc4a/img.o /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp
142
-
143 143
 ${OBJECTDIR}/tasks_pthread.o: tasks_pthread.cpp
144 144
 	${MKDIR} -p ${OBJECTDIR}
145 145
 	${RM} "$@.d"

+ 1
- 1
software/raspberry/superviseur-robot/nbproject/Makefile-impl.mk View File

@@ -31,7 +31,7 @@ DEFAULTCONF=Debug
31 31
 CONF=${DEFAULTCONF}
32 32
 
33 33
 # All Configurations
34
-ALLCONFS=Debug Release Debug__RPI_ Debug__Pthread_ 
34
+ALLCONFS=Debug Release Debug__RPI_ Debug__Pthread_ Debug__Pthread__RPI 
35 35
 
36 36
 
37 37
 # build

+ 8
- 0
software/raspberry/superviseur-robot/nbproject/Makefile-variables.mk View File

@@ -38,6 +38,14 @@ CND_ARTIFACT_PATH_Debug__Pthread_=dist/Debug__Pthread_/GNU-Linux/superviseur-rob
38 38
 CND_PACKAGE_DIR_Debug__Pthread_=dist/Debug__Pthread_/GNU-Linux/package
39 39
 CND_PACKAGE_NAME_Debug__Pthread_=superviseur-robot.tar
40 40
 CND_PACKAGE_PATH_Debug__Pthread_=dist/Debug__Pthread_/GNU-Linux/package/superviseur-robot.tar
41
+# Debug__Pthread__RPI configuration
42
+CND_PLATFORM_Debug__Pthread__RPI=GNU-Linux
43
+CND_ARTIFACT_DIR_Debug__Pthread__RPI=dist/Debug__Pthread__RPI/GNU-Linux
44
+CND_ARTIFACT_NAME_Debug__Pthread__RPI=superviseur-robot
45
+CND_ARTIFACT_PATH_Debug__Pthread__RPI=dist/Debug__Pthread__RPI/GNU-Linux/superviseur-robot
46
+CND_PACKAGE_DIR_Debug__Pthread__RPI=dist/Debug__Pthread__RPI/GNU-Linux/package
47
+CND_PACKAGE_NAME_Debug__Pthread__RPI=superviseur-robot.tar
48
+CND_PACKAGE_PATH_Debug__Pthread__RPI=dist/Debug__Pthread__RPI/GNU-Linux/package/superviseur-robot.tar
41 49
 #
42 50
 # include compiler specific variables
43 51
 #

+ 76
- 0
software/raspberry/superviseur-robot/nbproject/Package-Debug__Pthread__RPI.bash View File

@@ -0,0 +1,76 @@
1
+#!/bin/bash -x
2
+
3
+#
4
+# Generated - do not edit!
5
+#
6
+
7
+# Macros
8
+TOP=`pwd`
9
+CND_PLATFORM=GNU-Linux
10
+CND_CONF=Debug__Pthread__RPI
11
+CND_DISTDIR=dist
12
+CND_BUILDDIR=build
13
+CND_DLIB_EXT=so
14
+NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
15
+TMPDIRNAME=tmp-packaging
16
+OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot
17
+OUTPUT_BASENAME=superviseur-robot
18
+PACKAGE_TOP_DIR=superviseur-robot/
19
+
20
+# Functions
21
+function checkReturnCode
22
+{
23
+    rc=$?
24
+    if [ $rc != 0 ]
25
+    then
26
+        exit $rc
27
+    fi
28
+}
29
+function makeDirectory
30
+# $1 directory path
31
+# $2 permission (optional)
32
+{
33
+    mkdir -p "$1"