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

This commit is contained in:
Sébastien DI MERCURIO 2019-01-09 16:32:16 +01:00
parent 8bf6c73dbb
commit 2ef33f2e59
31 changed files with 1472 additions and 940 deletions

88
software/install-opencv.sh Executable file
View file

@ -0,0 +1,88 @@
#!/bin/bash
######################################
# INSTALL OPENCV ON UBUNTU OR DEBIAN #
######################################
# | THIS SCRIPT IS TESTED CORRECTLY ON |
# |------------------------------------------------------|
# | OS | OpenCV | Test | Last test |
# |------------------|--------------|------|-------------|
# | Ubuntu 18.04 LTS | OpenCV 3.4.2 | OK | 18 Jul 2018 |
# | Debian 9.5 | OpenCV 3.4.2 | OK | 18 Jul 2018 |
# |----------------------------------------------------- |
# | Debian 9.0 | OpenCV 3.2.0 | OK | 25 Jun 2017 |
# | Debian 8.8 | OpenCV 3.2.0 | OK | 20 May 2017 |
# | Ubuntu 16.04 LTS | OpenCV 3.2.0 | OK | 20 May 2017 |
# VERSION TO BE INSTALLED
OPENCV_VERSION='3.4.2'
# 1. KEEP UBUNTU OR DEBIAN UP TO DATE
sudo apt-get -y update
# sudo apt-get -y upgrade # Uncomment this line to install the newest versions of all packages currently installed
# sudo apt-get -y dist-upgrade # Uncomment this line to, in addition to 'upgrade', handles changing dependencies with new versions of packages
# sudo apt-get -y autoremove # Uncomment this line to remove packages that are now no longer needed
# 2. INSTALL THE DEPENDENCIES
# Build tools:
sudo apt-get install -y build-essential cmake
# GUI (if you want to use GTK instead of Qt, replace 'qt5-default' with 'libgtkglext1-dev' and remove '-DWITH_QT=ON' option in CMake):
#sudo apt-get install -y qt5-default libvtk6-dev
sudo apt-get install -y libgtkglext1-dev
# Media I/O:
sudo apt-get install -y zlib1g-dev libjpeg-dev libwebp-dev libpng-dev libtiff5-dev libjasper-dev libopenexr-dev libgdal-dev
# Video I/O:
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
# Parallelism and linear algebra libraries:
sudo apt-get install -y libtbb-dev libeigen3-dev
# Python:
sudo apt-get install -y python-dev python-tk python-numpy python3-dev python3-tk python3-numpy
# Java:
sudo apt-get install -y ant default-jdk
# Documentation:
sudo apt-get install -y doxygen
# 3. INSTALL THE LIBRARY
sudo apt-get install -y unzip wget
wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip
unzip ${OPENCV_VERSION}.zip
rm ${OPENCV_VERSION}.zip
mv opencv-${OPENCV_VERSION} OpenCV
# 3.5 Add Aruco
# Get opencv_contrib from github
# Copy aruco directory from <opencv_contrib>/modules to <opencv>/modules
wget https://github.com/opencv/opencv_contrib/archive/${OPENCV_VERSION}.zip
mv ${OPENCV_VERSION}.zip opencv_contrib-${OPENCV_VERSION}.zip
unzip opencv_contrib-${OPENCV_VERSION}.zip
cd OpenCV
mkdir build
cd build
# 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 ..
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 ..
make -j5
sudo make install
sudo ldconfig
# 4. EXECUTE SOME OPENCV EXAMPLES AND COMPILE A DEMONSTRATION
# To complete this step, please visit 'http://milq.github.io/install-opencv-ubuntu-debian'.

View file

@ -35,7 +35,7 @@ namespace monitor
/// <summary>
/// Default server name
/// </summary>
public const string defaultIP = "localhost";
public const string defaultIP = "10.105.1.13";
/// <summary>
/// Default server port number
@ -55,7 +55,7 @@ namespace monitor
/// <summary>
/// Size of internal buffer used when reading data from server
/// </summary>
private const int BufferMaxSize = 512;
private const int BufferMaxSize = 8*1024;
/// <summary>
/// Internal buffer used when reading data from server
@ -66,7 +66,7 @@ namespace monitor
/// buffer containing received message from TCP server
/// Used to concatenate internal buffers into one
/// </summary>
private static byte[] receiveBuffer;
//private static byte[] receiveBuffer;
//private static int initialReceiveBufferIndex = 0;
@ -83,11 +83,6 @@ namespace monitor
public delegate void ReadEvent(string msg);
public static ReadEvent readEvent = null;
/// <summary>
/// Thread used in reception
/// </summary>
private static Thread readThread;
/// <summary>
/// Open connection to server "host", on default port number.
/// </summary>
@ -156,134 +151,14 @@ namespace monitor
if (client != null) client.Close();
}
/// <summary>
/// Callback call by stream.BeginRead after reception of newLength data
/// </summary>
//private static void ReadCallback()
//{
// char character;
// int data;
// byte[] buffer=new byte[4096];
// int lengthRead;
// while (client.Connected)
// {
// try
// {
// //data = stream.ReadByte();
// lengthRead = stream.Read(buffer, 0, buffer.Length);
// }
// catch (ObjectDisposedException)
// {
// Console.WriteLine("Connection to server dropped (object disposed)!");
// return;
// }
// catch (System.IO.IOException)
// {
// Console.WriteLine("Connection to server dropped (other error)");
// return;
// }
// if (lengthRead > 0) // a data was read
// {
// //character = (char)data;
// var str = System.Text.Encoding.Default.GetString(buffer);
// int indexOf = str.IndexOf('\n');
// //if (character != '\n')
// if (indexOf == -1) // \n doesn't exists
// {
// message.Append(str);
// //if (receiveBuffer == null) receiveBuffer = new byte[1];
// //else Array.Resize<byte>(ref receiveBuffer, receiveBuffer.Length + 1); // resize currrent buffer
// //receiveBuffer[receiveBuffer.Length - 1] = (byte)data;
// }
// else // end of string found
// {
// message.Append((str.Substring(0,indexOf)));
// readEvent?.Invoke(message.ToString(), receiveBuffer);
// message.Clear();
// receiveBuffer = null;
// }
// }
// }
//}
/// <summary>
/// Callback call by stream.BeginRead after reception of newLength data
/// </summary>
/// <param name="ar">Not sure of what is it, but needed for terminate reading</param>
//private static void ReadCallback(IAsyncResult ar)
//{
// if (client.Connected)
// {
// int bytesRead;
// try
// {
// // Termintae read operation, and get number of byte stored in buffer
// bytesRead = stream.EndRead(ar);
// }
// catch (ObjectDisposedException e)
// {
// Console.WriteLine("Connection to server dropped: " + e.ToString());
// return;
// }
// newLength = 1;
// // if number of byte read is not 0, concatenate string and buffer
// if (bytesRead > 0)
// {
// packetCounter++;
// if (packetCounter >= 3)
// {
// //Console.WriteLine("Supplementary packet " + packetCounter);
// }
// // Append new data to current string (expecting data are ascii)
// message.Append(Encoding.ASCII.GetString(buffer, 0, bytesRead));
// // Similarly, append received bytes to current buffer
// if (receiveBuffer == null) receiveBuffer = new byte[bytesRead];
// else Array.Resize<byte>(ref receiveBuffer, initialReceiveBufferIndex + bytesRead); // resize currrent buffer
// System.Buffer.BlockCopy(buffer, 0, receiveBuffer, initialReceiveBufferIndex, bytesRead); // and add received data
// initialReceiveBufferIndex = receiveBuffer.Length; // move last index of current buffer
// }
// // if it remains received data, prepare for a new reading (get another buffer to append to current one)
// if (client.Available > 0)
// {
// newLength = client.Available;
// if (newLength > BufferMaxSize) newLength = BufferMaxSize;
// else newLength = client.Available;
// }
// else
// {
// // no more data to read, buffer and string can be send to upper level
// readEvent?.Invoke(message.ToString(), receiveBuffer);
// message.Clear();
// receiveBuffer = null;
// initialReceiveBufferIndex = 0;
// packetCounter = 0;
// }
// // Prepare for reading new data
// if (newLength> BufferMaxSize) newLength = BufferMaxSize;
// if (newLength <= 0) newLength = 1;
// stream.BeginRead(buffer, 0, newLength, new AsyncCallback(ReadCallback), message);
// }
//}
private static void ReadCallback(IAsyncResult ar)
{
int newLength = 1;
int index = -1;
if (client.Connected)
{
@ -299,38 +174,98 @@ namespace monitor
Console.WriteLine("Connection to server dropped: " + e.ToString());
return;
}
catch (System.IO.IOException e)
{
Console.WriteLine("Connection to server dropped: " + e.ToString());
return;
}
//newLength = 1;
newLength = 1;
index = -1;
// if number of byte read is not 0, concatenate string and buffer
if (bytesRead > 0)
{
//Console.WriteLine("Receive " + bytesRead + " data");
// Append new data to current string (expecting data are ascii)
message.Append(Encoding.ASCII.GetString(buffer, 0, bytesRead));
index = SearchCarriageReturn(buffer, bytesRead);
}
// if it remains received data, prepare for a new reading (get another buffer to append to current one)
if (client.Available > 0)
if (index == -1)
{
newLength = client.Available;
if (newLength > BufferMaxSize) newLength = BufferMaxSize;
else newLength = client.Available;
if (client.Available > 0)
{
newLength = client.Available;
if (newLength > BufferMaxSize) newLength = BufferMaxSize;
else newLength = client.Available;
}
}
else
{
string s = message.ToString();
//Console.WriteLine("Message received (" + s.Length + ")");
// no more data to read, buffer and string can be send to upper level
readEvent?.Invoke(message.ToString());
readEvent?.Invoke(s);
message.Clear();
if (index != bytesRead - 1)
{
//Console.WriteLine("Index not at end (" + index + "/" + bytesRead + ")");
//Console.WriteLine("1=" + (char)buffer[index + 1] + " 2=" + (char)buffer[index + 2]);
byte[] trailing=new byte[BufferMaxSize];
Array.Copy(buffer, index + 1, trailing, 0, bytesRead - index - 1);
message.Append(Encoding.ASCII.GetString(trailing, 0, bytesRead - index - 1));
}
}
// Prepare for reading new data
if (newLength> BufferMaxSize) newLength = BufferMaxSize;
if (newLength <= 0) newLength = 1;
stream.BeginRead(buffer, 0, newLength, new AsyncCallback(ReadCallback), message);
try
{
stream.BeginRead(buffer, 0, newLength, new AsyncCallback(ReadCallback), message);
}
catch (ObjectDisposedException e)
{
Console.WriteLine("Connection to server dropped: " + e.ToString());
return;
}
catch (System.IO.IOException e)
{
Console.WriteLine("Connection to server dropped: " + e.ToString());
return;
}
}
}
/// <summary>
/// Searchs the carriage return.
/// </summary>
/// <returns>Index of carriage return, if present, -1 otherwise.</returns>
/// <param name="buf">Buffer of byte</param>
/// <param name="length">Length of buffer</param>
private static int SearchCarriageReturn(byte[] buf, int length)
{
int index = -1;
int i = 0;
for (i = 0; i < length; i++)
{
if (buf[i] == (byte)'\n') break;
}
if (i!= length) index = i;
return index;
}
/// <summary>
/// Write a string to server
/// </summary>

View file

@ -26,6 +26,7 @@ using Gdk;
using Cairo;
using monitor;
using System.Timers;
/// <summary>
/// Main part of the program, behavior of main window
@ -69,6 +70,13 @@ public partial class MainWindow : Gtk.Window
private int imageReceivedCounter = 0;
private int badImageReceivedCounter = 0;
private int imageFPS = 0;
private int imageFPScounter = 0;
/// <summary>
/// Timer for FPS request
/// </summary>
private System.Timers.Timer fpsTimer;
/// <summary>
/// Initializes a new instance of the <see cref="MainWindow"/> class.
@ -83,6 +91,10 @@ public partial class MainWindow : Gtk.Window
batteryTimer = new System.Timers.Timer(10000.0);
batteryTimer.Elapsed += OnBatteryTimerElapsed;
// create new timer for FPS , every 1s
fpsTimer = new System.Timers.Timer(1000.0);
fpsTimer.Elapsed += OnFpsTimerElapsed;
// Customize controls
AdjustControls();
}
@ -126,6 +138,8 @@ public partial class MainWindow : Gtk.Window
checkButtonCameraOn.Active = false;
checkButtonRobotPosition.Active = false;
checkButtonFPS.Active = false;
if (cmdManager != null) cmdManager.Close();
batteryTimer.Stop();
@ -165,6 +179,7 @@ public partial class MainWindow : Gtk.Window
checkButtonCameraOn.Active = false;
checkButtonRobotPosition.Active = false;
checkButtonFPS.Active = false;
systemState = SystemState.NotConnected;
@ -183,11 +198,9 @@ public partial class MainWindow : Gtk.Window
/// <param name="message">Message</param>
private void MessagePopup(MessageType type, ButtonsType buttons, string title, string message)
{
MessageDialog md = new MessageDialog(this, DialogFlags.DestroyWithParent, type, buttons, message)
{
Title = title
};
MessageDialog md = new MessageDialog(this, DialogFlags.DestroyWithParent, type, buttons, message);
md.Title = title;
md.Run();
md.Destroy();
}
@ -206,15 +219,11 @@ public partial class MainWindow : Gtk.Window
a.RetVal = true;
}
//private byte[] imageComplete;
//private byte[] imageInProgress;
/// <summary>
/// Callback called when new message is received from server
/// </summary>
/// <param name="header">Header of message</param>
/// <param name="data">Data of message</param>
/// <param name="buffer">Raw buffer corresponding of received message</param>
public void OnCommandReceivedEvent(string header, string data)
{
if (header == null)
@ -237,33 +246,11 @@ public partial class MainWindow : Gtk.Window
#if DEBUG
// print message content
if (header.Length > 4)
{
Console.WriteLine("Bad header(" + header.Length + ")");
//else
// Console.WriteLine("Received header (" + header.Length + "): " + header);
//if (header.ToUpper() != DestijlCommandList.HeaderStmImage)
//{
// if (data != null) Console.WriteLine("Received data (" + data.Length + "): " + data);
//}
}
#endif
// Image management
//if (header == DestijlCommandList.CAMERA_IMAGE)
//{
// imageComplete = imageInProgress;
// //TODO: Decoder le base64 pour recuperer le JPG
// imageInProgress = buffer;
//}
//else
//{
// if (imageInProgress == null) imageInProgress = buffer;
// else
// {
// Array.Resize<byte>(ref imageInProgress, imageInProgress.Length + buffer.Length);
// System.Buffer.BlockCopy(buffer, 0, imageInProgress, imageInProgress.Length - buffer.Length, buffer.Length);
// }
//}
// depending on message received (based on header)
// launch correponding action
// Depending on message received (based on header), launch correponding action
header = header.ToUpper();
if (header == DestijlCommandList.ROBOT_BATTERY_LEVEL)
@ -293,20 +280,23 @@ public partial class MainWindow : Gtk.Window
}
else if (header == DestijlCommandList.CAMERA_IMAGE)
{
// if message is an image, convert it to a pixbuf
// that can be displayed
//if (imageComplete != null)
//{
//TODO: Decoder le base64 et convertir en JPG
byte[] image = Convert.FromBase64String(data);
//byte[] image = new byte[imageComplete.Length - 4];
//System.Buffer.BlockCopy(imageComplete, 4, image, 0, image.Length);
imageReceivedCounter++;
byte[] image = new byte[2];
try
{
image = Convert.FromBase64String(data);
}
catch (FormatException)
{
badImageReceivedCounter++;
Console.WriteLine("Unable to convert from base64 ");
}
try
{
drawingareaCameraPixbuf = new Pixbuf(image);
imageFPScounter++;
Gtk.Application.Invoke(delegate
{
@ -326,10 +316,7 @@ public partial class MainWindow : Gtk.Window
}
else if (header == DestijlCommandList.CAMERA_POSITION)
{
//Console.WriteLine("Pos data: " + data);
position = DestijlCommandManager.DecodePosition(data);
//Console.WriteLine("decoded position: " + position.ToString());
Gtk.Application.Invoke(delegate
{
@ -728,6 +715,23 @@ public partial class MainWindow : Gtk.Window
((IDisposable)cr.GetTarget()).Dispose();
((IDisposable)cr).Dispose();
}
if (checkButtonFPS.Active) {
Cairo.Context cr = Gdk.CairoHelper.Create(area.GdkWindow);
Cairo.Color textFontColor = new Cairo.Color(0.8, 0, 0);
cr.SelectFontFace("Cantarell", FontSlant.Normal, FontWeight.Bold);
cr.SetSourceColor(textFontColor);
cr.SetFontSize(16);
string text = "FPS= " + imageFPS.ToString() ;
TextExtents te = cr.TextExtents(text);
cr.MoveTo( 10,10 + te.Height);
cr.ShowText(text);
((IDisposable)cr.GetTarget()).Dispose();
((IDisposable)cr).Dispose();
}
}
/// <summary>
@ -738,9 +742,8 @@ public partial class MainWindow : Gtk.Window
DestijlCommandManager.CommandStatus status;
MessageDialog md = new MessageDialog(this, DialogFlags.DestroyWithParent,
MessageType.Question, ButtonsType.YesNo, "Arena is correct ?");
{
Title = "Check arena";
};
md.Title = "Check arena";
ResponseType result = (ResponseType)md.Run();
md.Destroy();
@ -781,4 +784,33 @@ public partial class MainWindow : Gtk.Window
// show popup and wait for user to say if arena is ok or not
DetectArena();
}
protected void OnCheckButtonFPSToggled(object sender, EventArgs e)
{
if (checkButtonFPS.Active) { // User ask for FPS
imageFPS = 0;
imageFPScounter = 0;
fpsTimer.Start();
}
else { // stop computing FPS
fpsTimer.Stop();
Gtk.Application.Invoke(delegate
{
drawingAreaCamera.QueueDraw();
});
}
}
private void OnFpsTimerElapsed(object sender, ElapsedEventArgs e)
{
imageFPS = imageFPScounter;
imageFPScounter = 0;
Gtk.Application.Invoke(delegate
{
drawingAreaCamera.QueueDraw();
});
}
}

View file

@ -21,14 +21,18 @@ public partial class MainWindow
private global::Gtk.VBox boxCamera;
private global::Gtk.HBox hbox2;
private global::Gtk.Alignment alignment1;
private global::Gtk.HBox hbox2;
private global::Gtk.HBox hbox5;
private global::Gtk.CheckButton checkButtonCameraOn;
private global::Gtk.CheckButton checkButtonRobotPosition;
private global::Gtk.CheckButton checkButtonFPS;
private global::Gtk.Button buttonAskArena;
private global::Gtk.DrawingArea drawingAreaCamera;
@ -170,33 +174,51 @@ public partial class MainWindow
this.boxCamera.Name = "boxCamera";
this.boxCamera.Spacing = 6;
// Container child boxCamera.Gtk.Box+BoxChild
this.alignment1 = new global::Gtk.Alignment(0F, 0.5F, 0F, 1F);
this.alignment1.Name = "alignment1";
this.alignment1.BorderWidth = ((uint)(6));
// Container child alignment1.Gtk.Container+ContainerChild
this.hbox2 = new global::Gtk.HBox();
this.hbox2.Name = "hbox2";
this.hbox2.Spacing = 6;
// Container child hbox2.Gtk.Box+BoxChild
this.alignment1 = new global::Gtk.Alignment(0F, 0.5F, 0F, 1F);
this.alignment1.Name = "alignment1";
this.alignment1.BorderWidth = ((uint)(6));
// Container child alignment1.Gtk.Container+ContainerChild
this.hbox5 = new global::Gtk.HBox();
this.hbox5.Name = "hbox5";
this.hbox5.Spacing = 6;
// Container child hbox5.Gtk.Box+BoxChild
this.checkButtonCameraOn = new global::Gtk.CheckButton();
this.checkButtonCameraOn.CanFocus = true;
this.checkButtonCameraOn.Name = "checkButtonCameraOn";
this.checkButtonCameraOn.Label = global::Mono.Unix.Catalog.GetString("Camera On");
this.checkButtonCameraOn.DrawIndicator = true;
this.checkButtonCameraOn.UseUnderline = true;
this.hbox2.Add(this.checkButtonCameraOn);
global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.checkButtonCameraOn]));
this.hbox5.Add(this.checkButtonCameraOn);
global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox5[this.checkButtonCameraOn]));
w3.Position = 0;
// Container child hbox2.Gtk.Box+BoxChild
// Container child hbox5.Gtk.Box+BoxChild
this.checkButtonRobotPosition = new global::Gtk.CheckButton();
this.checkButtonRobotPosition.CanFocus = true;
this.checkButtonRobotPosition.Name = "checkButtonRobotPosition";
this.checkButtonRobotPosition.Label = global::Mono.Unix.Catalog.GetString("Robot Position");
this.checkButtonRobotPosition.Label = global::Mono.Unix.Catalog.GetString("Show Position");
this.checkButtonRobotPosition.DrawIndicator = true;
this.checkButtonRobotPosition.UseUnderline = true;
this.hbox2.Add(this.checkButtonRobotPosition);
global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.checkButtonRobotPosition]));
this.hbox5.Add(this.checkButtonRobotPosition);
global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox5[this.checkButtonRobotPosition]));
w4.Position = 1;
// Container child hbox5.Gtk.Box+BoxChild
this.checkButtonFPS = new global::Gtk.CheckButton();
this.checkButtonFPS.CanFocus = true;
this.checkButtonFPS.Name = "checkButtonFPS";
this.checkButtonFPS.Label = global::Mono.Unix.Catalog.GetString("Show FPS");
this.checkButtonFPS.DrawIndicator = true;
this.checkButtonFPS.UseUnderline = true;
this.hbox5.Add(this.checkButtonFPS);
global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox5[this.checkButtonFPS]));
w5.Position = 2;
this.alignment1.Add(this.hbox5);
this.hbox2.Add(this.alignment1);
global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.alignment1]));
w7.Position = 0;
// Container child hbox2.Gtk.Box+BoxChild
this.buttonAskArena = new global::Gtk.Button();
this.buttonAskArena.CanFocus = true;
@ -204,26 +226,24 @@ public partial class MainWindow
this.buttonAskArena.UseUnderline = true;
this.buttonAskArena.Label = global::Mono.Unix.Catalog.GetString("Ask Arena...");
this.hbox2.Add(this.buttonAskArena);
global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.buttonAskArena]));
w5.PackType = ((global::Gtk.PackType)(1));
w5.Position = 2;
w5.Expand = false;
w5.Fill = false;
this.alignment1.Add(this.hbox2);
this.boxCamera.Add(this.alignment1);
global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.boxCamera[this.alignment1]));
w7.Position = 0;
w7.Expand = false;
w7.Fill = false;
global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.buttonAskArena]));
w8.Position = 2;
w8.Expand = false;
w8.Fill = false;
this.boxCamera.Add(this.hbox2);
global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.boxCamera[this.hbox2]));
w9.Position = 0;
w9.Expand = false;
w9.Fill = false;
// Container child boxCamera.Gtk.Box+BoxChild
this.drawingAreaCamera = new global::Gtk.DrawingArea();
this.drawingAreaCamera.Name = "drawingAreaCamera";
this.boxCamera.Add(this.drawingAreaCamera);
global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.boxCamera[this.drawingAreaCamera]));
w8.Position = 1;
global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.boxCamera[this.drawingAreaCamera]));
w10.Position = 1;
this.hbox1.Add(this.boxCamera);
global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.boxCamera]));
w9.Position = 0;
global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.boxCamera]));
w11.Position = 0;
// Container child hbox1.Gtk.Box+BoxChild
this.hbox3 = new global::Gtk.HBox();
this.hbox3.Name = "hbox3";
@ -232,10 +252,10 @@ public partial class MainWindow
this.vseparator1 = new global::Gtk.VSeparator();
this.vseparator1.Name = "vseparator1";
this.hbox3.Add(this.vseparator1);
global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.vseparator1]));
w10.Position = 0;
w10.Expand = false;
w10.Fill = false;
global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.vseparator1]));
w12.Position = 0;
w12.Expand = false;
w12.Fill = false;
// Container child hbox3.Gtk.Box+BoxChild
this.alignment3 = new global::Gtk.Alignment(1F, 0F, 0F, 0F);
this.alignment3.Name = "alignment3";
@ -255,10 +275,10 @@ public partial class MainWindow
this.labelServer.LabelProp = global::Mono.Unix.Catalog.GetString("<b><u>Server connection</u></b>");
this.labelServer.UseMarkup = true;
this.vbox10.Add(this.labelServer);
global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox10[this.labelServer]));
w11.Position = 0;
w11.Expand = false;
w11.Fill = false;
global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox10[this.labelServer]));
w13.Position = 0;
w13.Expand = false;
w13.Fill = false;
// Container child vbox10.Gtk.Box+BoxChild
this.gtkAlignmentServer = new global::Gtk.Alignment(0F, 0F, 1F, 1F);
this.gtkAlignmentServer.Name = "gtkAlignmentServer";
@ -279,10 +299,10 @@ public partial class MainWindow
this.entryServerName.IsEditable = true;
this.entryServerName.InvisibleChar = '●';
this.table1.Add(this.entryServerName);
global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table1[this.entryServerName]));
w12.LeftAttach = ((uint)(1));
w12.RightAttach = ((uint)(2));
w12.YOptions = ((global::Gtk.AttachOptions)(4));
global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table1[this.entryServerName]));
w14.LeftAttach = ((uint)(1));
w14.RightAttach = ((uint)(2));
w14.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.entryServerPort = new global::Gtk.Entry();
this.entryServerPort.CanFocus = true;
@ -290,12 +310,12 @@ public partial class MainWindow
this.entryServerPort.IsEditable = true;
this.entryServerPort.InvisibleChar = '●';
this.table1.Add(this.entryServerPort);
global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table1[this.entryServerPort]));
w13.TopAttach = ((uint)(1));
w13.BottomAttach = ((uint)(2));
w13.LeftAttach = ((uint)(1));
w13.RightAttach = ((uint)(2));
w13.YOptions = ((global::Gtk.AttachOptions)(4));
global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table1[this.entryServerPort]));
w15.TopAttach = ((uint)(1));
w15.BottomAttach = ((uint)(2));
w15.LeftAttach = ((uint)(1));
w15.RightAttach = ((uint)(2));
w15.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.entryTimeout = new global::Gtk.Entry();
this.entryTimeout.CanFocus = true;
@ -303,12 +323,12 @@ public partial class MainWindow
this.entryTimeout.IsEditable = true;
this.entryTimeout.InvisibleChar = '●';
this.table1.Add(this.entryTimeout);
global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table1[this.entryTimeout]));
w14.TopAttach = ((uint)(2));
w14.BottomAttach = ((uint)(3));
w14.LeftAttach = ((uint)(1));
w14.RightAttach = ((uint)(2));
w14.YOptions = ((global::Gtk.AttachOptions)(4));
global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table1[this.entryTimeout]));
w16.TopAttach = ((uint)(2));
w16.BottomAttach = ((uint)(3));
w16.LeftAttach = ((uint)(1));
w16.RightAttach = ((uint)(2));
w16.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.label1 = new global::Gtk.Label();
this.label1.Name = "label1";
@ -316,9 +336,9 @@ public partial class MainWindow
this.label1.LabelProp = global::Mono.Unix.Catalog.GetString("Server name:");
this.label1.Justify = ((global::Gtk.Justification)(1));
this.table1.Add(this.label1);
global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table1[this.label1]));
w15.XOptions = ((global::Gtk.AttachOptions)(4));
w15.YOptions = ((global::Gtk.AttachOptions)(4));
global::Gtk.Table.TableChild w17 = ((global::Gtk.Table.TableChild)(this.table1[this.label1]));
w17.XOptions = ((global::Gtk.AttachOptions)(4));
w17.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.label2 = new global::Gtk.Label();
this.label2.Name = "label2";
@ -326,26 +346,26 @@ public partial class MainWindow
this.label2.LabelProp = global::Mono.Unix.Catalog.GetString("Server port:");
this.label2.Justify = ((global::Gtk.Justification)(1));
this.table1.Add(this.label2);
global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table1[this.label2]));
w16.TopAttach = ((uint)(1));
w16.BottomAttach = ((uint)(2));
w16.XOptions = ((global::Gtk.AttachOptions)(4));
w16.YOptions = ((global::Gtk.AttachOptions)(4));
global::Gtk.Table.TableChild w18 = ((global::Gtk.Table.TableChild)(this.table1[this.label2]));
w18.TopAttach = ((uint)(1));
w18.BottomAttach = ((uint)(2));
w18.XOptions = ((global::Gtk.AttachOptions)(4));
w18.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.label5 = new global::Gtk.Label();
this.label5.Name = "label5";
this.label5.LabelProp = global::Mono.Unix.Catalog.GetString("Timeout (ms):");
this.table1.Add(this.label5);
global::Gtk.Table.TableChild w17 = ((global::Gtk.Table.TableChild)(this.table1[this.label5]));
w17.TopAttach = ((uint)(2));
w17.BottomAttach = ((uint)(3));
w17.XOptions = ((global::Gtk.AttachOptions)(4));
w17.YOptions = ((global::Gtk.AttachOptions)(4));
global::Gtk.Table.TableChild w19 = ((global::Gtk.Table.TableChild)(this.table1[this.label5]));
w19.TopAttach = ((uint)(2));
w19.BottomAttach = ((uint)(3));
w19.XOptions = ((global::Gtk.AttachOptions)(4));
w19.YOptions = ((global::Gtk.AttachOptions)(4));
this.vbox6.Add(this.table1);
global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox6[this.table1]));
w18.Position = 0;
w18.Expand = false;
w18.Fill = false;
global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox6[this.table1]));
w20.Position = 0;
w20.Expand = false;
w20.Fill = false;
// Container child vbox6.Gtk.Box+BoxChild
this.buttonServerConnection = new global::Gtk.Button();
this.buttonServerConnection.CanFocus = true;
@ -353,30 +373,30 @@ public partial class MainWindow
this.buttonServerConnection.UseUnderline = true;
this.buttonServerConnection.Label = global::Mono.Unix.Catalog.GetString("Connect");
this.vbox6.Add(this.buttonServerConnection);
global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.vbox6[this.buttonServerConnection]));
w19.PackType = ((global::Gtk.PackType)(1));
w19.Position = 1;
w19.Expand = false;
w19.Fill = false;
this.gtkAlignmentServer.Add(this.vbox6);
this.vbox10.Add(this.gtkAlignmentServer);
global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox10[this.gtkAlignmentServer]));
global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox6[this.buttonServerConnection]));
w21.PackType = ((global::Gtk.PackType)(1));
w21.Position = 1;
w21.Expand = false;
w21.Fill = false;
this.gtkAlignmentServer.Add(this.vbox6);
this.vbox10.Add(this.gtkAlignmentServer);
global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.vbox10[this.gtkAlignmentServer]));
w23.Position = 1;
w23.Expand = false;
w23.Fill = false;
this.vbox5.Add(this.vbox10);
global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox10]));
w22.Position = 0;
w22.Expand = false;
w22.Fill = false;
global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox10]));
w24.Position = 0;
w24.Expand = false;
w24.Fill = false;
// Container child vbox5.Gtk.Box+BoxChild
this.hseparator1 = new global::Gtk.HSeparator();
this.hseparator1.Name = "hseparator1";
this.vbox5.Add(this.hseparator1);
global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.hseparator1]));
w23.Position = 1;
w23.Expand = false;
w23.Fill = false;
global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.hseparator1]));
w25.Position = 1;
w25.Expand = false;
w25.Fill = false;
// Container child vbox5.Gtk.Box+BoxChild
this.vbox11 = new global::Gtk.VBox();
this.vbox11.Name = "vbox11";
@ -388,10 +408,10 @@ public partial class MainWindow
this.labelRobot.LabelProp = global::Mono.Unix.Catalog.GetString("<b><u>Robot Activation</u></b>");
this.labelRobot.UseMarkup = true;
this.vbox11.Add(this.labelRobot);
global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.vbox11[this.labelRobot]));
w24.Position = 0;
w24.Expand = false;
w24.Fill = false;
global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.vbox11[this.labelRobot]));
w26.Position = 0;
w26.Expand = false;
w26.Fill = false;
// Container child vbox11.Gtk.Box+BoxChild
this.alignment9 = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
this.alignment9.Name = "alignment9";
@ -418,8 +438,8 @@ public partial class MainWindow
this.radioButtonWithWatchdog.UseUnderline = true;
this.radioButtonWithWatchdog.Group = new global::GLib.SList(global::System.IntPtr.Zero);
this.hbox4.Add(this.radioButtonWithWatchdog);
global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.radioButtonWithWatchdog]));
w25.Position = 0;
global::Gtk.Box.BoxChild w27 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.radioButtonWithWatchdog]));
w27.Position = 0;
// Container child hbox4.Gtk.Box+BoxChild
this.radioButtonWithoutWatchdog = new global::Gtk.RadioButton(global::Mono.Unix.Catalog.GetString("without watchdog"));
this.radioButtonWithoutWatchdog.CanFocus = true;
@ -428,14 +448,14 @@ public partial class MainWindow
this.radioButtonWithoutWatchdog.UseUnderline = true;
this.radioButtonWithoutWatchdog.Group = this.radioButtonWithWatchdog.Group;
this.hbox4.Add(this.radioButtonWithoutWatchdog);
global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.radioButtonWithoutWatchdog]));
w26.Position = 1;
global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.radioButtonWithoutWatchdog]));
w28.Position = 1;
this.alignment6.Add(this.hbox4);
this.vbox8.Add(this.alignment6);
global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(this.vbox8[this.alignment6]));
w28.Position = 0;
w28.Expand = false;
w28.Fill = false;
global::Gtk.Box.BoxChild w30 = ((global::Gtk.Box.BoxChild)(this.vbox8[this.alignment6]));
w30.Position = 0;
w30.Expand = false;
w30.Fill = false;
// Container child vbox8.Gtk.Box+BoxChild
this.alignment5 = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
this.alignment5.Name = "alignment5";
@ -451,30 +471,30 @@ public partial class MainWindow
this.alignment7.Add(this.buttonRobotActivation);
this.alignment5.Add(this.alignment7);
this.vbox8.Add(this.alignment5);
global::Gtk.Box.BoxChild w31 = ((global::Gtk.Box.BoxChild)(this.vbox8[this.alignment5]));
w31.Position = 1;
w31.Expand = false;
w31.Fill = false;
global::Gtk.Box.BoxChild w33 = ((global::Gtk.Box.BoxChild)(this.vbox8[this.alignment5]));
w33.Position = 1;
w33.Expand = false;
w33.Fill = false;
this.gtkAlignmentRobot.Add(this.vbox8);
this.alignment9.Add(this.gtkAlignmentRobot);
this.vbox11.Add(this.alignment9);
global::Gtk.Box.BoxChild w34 = ((global::Gtk.Box.BoxChild)(this.vbox11[this.alignment9]));
w34.Position = 1;
w34.Expand = false;
w34.Fill = false;
global::Gtk.Box.BoxChild w36 = ((global::Gtk.Box.BoxChild)(this.vbox11[this.alignment9]));
w36.Position = 1;
w36.Expand = false;
w36.Fill = false;
this.vbox5.Add(this.vbox11);
global::Gtk.Box.BoxChild w35 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox11]));
w35.Position = 2;
w35.Expand = false;
w35.Fill = false;
global::Gtk.Box.BoxChild w37 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox11]));
w37.Position = 2;
w37.Expand = false;
w37.Fill = false;
// Container child vbox5.Gtk.Box+BoxChild
this.hseparator2 = new global::Gtk.HSeparator();
this.hseparator2.Name = "hseparator2";
this.vbox5.Add(this.hseparator2);
global::Gtk.Box.BoxChild w36 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.hseparator2]));
w36.Position = 3;
w36.Expand = false;
w36.Fill = false;
global::Gtk.Box.BoxChild w38 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.hseparator2]));
w38.Position = 3;
w38.Expand = false;
w38.Fill = false;
// Container child vbox5.Gtk.Box+BoxChild
this.vbox12 = new global::Gtk.VBox();
this.vbox12.Name = "vbox12";
@ -486,10 +506,10 @@ public partial class MainWindow
this.labelRobotControl.LabelProp = global::Mono.Unix.Catalog.GetString("<b><u>Robot Controls and Status</u></b>");
this.labelRobotControl.UseMarkup = true;
this.vbox12.Add(this.labelRobotControl);
global::Gtk.Box.BoxChild w37 = ((global::Gtk.Box.BoxChild)(this.vbox12[this.labelRobotControl]));
w37.Position = 0;
w37.Expand = false;
w37.Fill = false;
global::Gtk.Box.BoxChild w39 = ((global::Gtk.Box.BoxChild)(this.vbox12[this.labelRobotControl]));
w39.Position = 0;
w39.Expand = false;
w39.Fill = false;
// Container child vbox12.Gtk.Box+BoxChild
this.gtkAlignmentRobotControl = new global::Gtk.Alignment(0F, 0F, 1F, 1F);
this.gtkAlignmentRobotControl.Name = "gtkAlignmentRobotControl";
@ -511,67 +531,67 @@ public partial class MainWindow
this.buttonDown.CanFocus = true;
this.buttonDown.Name = "buttonDown";
this.buttonDown.UseUnderline = true;
global::Gtk.Image w38 = new global::Gtk.Image();
w38.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-down-symbolic.symbolic.png");
this.buttonDown.Image = w38;
this.table4.Add(this.buttonDown);
global::Gtk.Table.TableChild w39 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonDown]));
w39.TopAttach = ((uint)(2));
w39.BottomAttach = ((uint)(3));
w39.LeftAttach = ((uint)(1));
w39.RightAttach = ((uint)(2));
w39.XOptions = ((global::Gtk.AttachOptions)(4));
w39.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table4.Gtk.Table+TableChild
this.buttonForward = new global::Gtk.Button();
this.buttonForward.CanFocus = true;
this.buttonForward.Name = "buttonForward";
this.buttonForward.UseUnderline = true;
global::Gtk.Image w40 = new global::Gtk.Image();
w40.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-up-symbolic.symbolic.png");
this.buttonForward.Image = w40;
this.table4.Add(this.buttonForward);
global::Gtk.Table.TableChild w41 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonForward]));
w40.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-down-symbolic.symbolic.png");
this.buttonDown.Image = w40;
this.table4.Add(this.buttonDown);
global::Gtk.Table.TableChild w41 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonDown]));
w41.TopAttach = ((uint)(2));
w41.BottomAttach = ((uint)(3));
w41.LeftAttach = ((uint)(1));
w41.RightAttach = ((uint)(2));
w41.XOptions = ((global::Gtk.AttachOptions)(4));
w41.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table4.Gtk.Table+TableChild
this.buttonForward = new global::Gtk.Button();
this.buttonForward.CanFocus = true;
this.buttonForward.Name = "buttonForward";
this.buttonForward.UseUnderline = true;
global::Gtk.Image w42 = new global::Gtk.Image();
w42.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-up-symbolic.symbolic.png");
this.buttonForward.Image = w42;
this.table4.Add(this.buttonForward);
global::Gtk.Table.TableChild w43 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonForward]));
w43.LeftAttach = ((uint)(1));
w43.RightAttach = ((uint)(2));
w43.XOptions = ((global::Gtk.AttachOptions)(4));
w43.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table4.Gtk.Table+TableChild
this.buttonLeft = new global::Gtk.Button();
this.buttonLeft.CanFocus = true;
this.buttonLeft.Name = "buttonLeft";
this.buttonLeft.UseUnderline = true;
global::Gtk.Image w42 = new global::Gtk.Image();
w42.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-start-symbolic.symbolic.png");
this.buttonLeft.Image = w42;
global::Gtk.Image w44 = new global::Gtk.Image();
w44.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-start-symbolic.symbolic.png");
this.buttonLeft.Image = w44;
this.table4.Add(this.buttonLeft);
global::Gtk.Table.TableChild w43 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonLeft]));
w43.TopAttach = ((uint)(1));
w43.BottomAttach = ((uint)(2));
w43.XOptions = ((global::Gtk.AttachOptions)(4));
w43.YOptions = ((global::Gtk.AttachOptions)(4));
global::Gtk.Table.TableChild w45 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonLeft]));
w45.TopAttach = ((uint)(1));
w45.BottomAttach = ((uint)(2));
w45.XOptions = ((global::Gtk.AttachOptions)(4));
w45.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table4.Gtk.Table+TableChild
this.buttonRight = new global::Gtk.Button();
this.buttonRight.CanFocus = true;
this.buttonRight.Name = "buttonRight";
this.buttonRight.UseUnderline = true;
global::Gtk.Image w44 = new global::Gtk.Image();
w44.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-end-symbolic.symbolic.png");
this.buttonRight.Image = w44;
global::Gtk.Image w46 = new global::Gtk.Image();
w46.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-end-symbolic.symbolic.png");
this.buttonRight.Image = w46;
this.table4.Add(this.buttonRight);
global::Gtk.Table.TableChild w45 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonRight]));
w45.TopAttach = ((uint)(1));
w45.BottomAttach = ((uint)(2));
w45.LeftAttach = ((uint)(2));
w45.RightAttach = ((uint)(3));
w45.XOptions = ((global::Gtk.AttachOptions)(4));
w45.YOptions = ((global::Gtk.AttachOptions)(4));
global::Gtk.Table.TableChild w47 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonRight]));
w47.TopAttach = ((uint)(1));
w47.BottomAttach = ((uint)(2));
w47.LeftAttach = ((uint)(2));
w47.RightAttach = ((uint)(3));
w47.XOptions = ((global::Gtk.AttachOptions)(4));
w47.YOptions = ((global::Gtk.AttachOptions)(4));
this.alignment8.Add(this.table4);
this.vbox9.Add(this.alignment8);
global::Gtk.Box.BoxChild w47 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.alignment8]));
w47.Position = 0;
w47.Expand = false;
w47.Fill = false;
global::Gtk.Box.BoxChild w49 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.alignment8]));
w49.Position = 0;
w49.Expand = false;
w49.Fill = false;
// Container child vbox9.Gtk.Box+BoxChild
this.table3 = new global::Gtk.Table(((uint)(1)), ((uint)(2)), false);
this.table3.Name = "table3";
@ -584,10 +604,10 @@ public partial class MainWindow
this.label3.LabelProp = global::Mono.Unix.Catalog.GetString("Battery level:");
this.label3.Justify = ((global::Gtk.Justification)(1));
this.table3.Add(this.label3);
global::Gtk.Table.TableChild w48 = ((global::Gtk.Table.TableChild)(this.table3[this.label3]));
w48.YPadding = ((uint)(10));
w48.XOptions = ((global::Gtk.AttachOptions)(4));
w48.YOptions = ((global::Gtk.AttachOptions)(4));
global::Gtk.Table.TableChild w50 = ((global::Gtk.Table.TableChild)(this.table3[this.label3]));
w50.YPadding = ((uint)(10));
w50.XOptions = ((global::Gtk.AttachOptions)(4));
w50.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table3.Gtk.Table+TableChild
this.labelBatteryLevel = new global::Gtk.Label();
this.labelBatteryLevel.Name = "labelBatteryLevel";
@ -595,48 +615,49 @@ public partial class MainWindow
this.labelBatteryLevel.Xalign = 0F;
this.labelBatteryLevel.LabelProp = global::Mono.Unix.Catalog.GetString("Unknown");
this.table3.Add(this.labelBatteryLevel);
global::Gtk.Table.TableChild w49 = ((global::Gtk.Table.TableChild)(this.table3[this.labelBatteryLevel]));
w49.LeftAttach = ((uint)(1));
w49.RightAttach = ((uint)(2));
w49.YOptions = ((global::Gtk.AttachOptions)(4));
global::Gtk.Table.TableChild w51 = ((global::Gtk.Table.TableChild)(this.table3[this.labelBatteryLevel]));
w51.LeftAttach = ((uint)(1));
w51.RightAttach = ((uint)(2));
w51.YOptions = ((global::Gtk.AttachOptions)(4));
this.vbox9.Add(this.table3);
global::Gtk.Box.BoxChild w50 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.table3]));
w50.Position = 2;
w50.Expand = false;
w50.Fill = false;
global::Gtk.Box.BoxChild w52 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.table3]));
w52.Position = 2;
w52.Expand = false;
w52.Fill = false;
// Container child vbox9.Gtk.Box+BoxChild
this.checkButtonGetBattery = new global::Gtk.CheckButton();
this.checkButtonGetBattery.CanFocus = true;
this.checkButtonGetBattery.Name = "checkButtonGetBattery";
this.checkButtonGetBattery.Label = global::Mono.Unix.Catalog.GetString("Get battery level");
this.checkButtonGetBattery.Active = true;
this.checkButtonGetBattery.DrawIndicator = true;
this.checkButtonGetBattery.UseUnderline = true;
this.vbox9.Add(this.checkButtonGetBattery);
global::Gtk.Box.BoxChild w51 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.checkButtonGetBattery]));
w51.Position = 3;
w51.Expand = false;
w51.Fill = false;
global::Gtk.Box.BoxChild w53 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.checkButtonGetBattery]));
w53.Position = 3;
w53.Expand = false;
w53.Fill = false;
this.gtkAlignmentRobotControl.Add(this.vbox9);
this.vbox12.Add(this.gtkAlignmentRobotControl);
global::Gtk.Box.BoxChild w53 = ((global::Gtk.Box.BoxChild)(this.vbox12[this.gtkAlignmentRobotControl]));
w53.Position = 1;
global::Gtk.Box.BoxChild w55 = ((global::Gtk.Box.BoxChild)(this.vbox12[this.gtkAlignmentRobotControl]));
w55.Position = 1;
this.vbox5.Add(this.vbox12);
global::Gtk.Box.BoxChild w54 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox12]));
w54.Position = 4;
global::Gtk.Box.BoxChild w56 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox12]));
w56.Position = 4;
this.alignment3.Add(this.vbox5);
this.hbox3.Add(this.alignment3);
global::Gtk.Box.BoxChild w56 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.alignment3]));
w56.Position = 1;
w56.Expand = false;
w56.Fill = false;
this.hbox1.Add(this.hbox3);
global::Gtk.Box.BoxChild w57 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.hbox3]));
w57.Position = 1;
w57.Expand = false;
w57.Fill = false;
this.vbox1.Add(this.hbox1);
global::Gtk.Box.BoxChild w58 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
global::Gtk.Box.BoxChild w58 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.alignment3]));
w58.Position = 1;
w58.Expand = false;
w58.Fill = false;
this.hbox1.Add(this.hbox3);
global::Gtk.Box.BoxChild w59 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.hbox3]));
w59.Position = 1;
w59.Expand = false;
w59.Fill = false;
this.vbox1.Add(this.hbox1);
global::Gtk.Box.BoxChild w60 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
w60.Position = 1;
this.Add(this.vbox1);
if ((this.Child != null))
{
@ -650,6 +671,7 @@ public partial class MainWindow
this.ShowLogWindowAction.Activated += new global::System.EventHandler(this.OnShowLogWindowActionActivated);
this.checkButtonCameraOn.Clicked += new global::System.EventHandler(this.OnCheckButtonCameraOnClicked);
this.checkButtonRobotPosition.Clicked += new global::System.EventHandler(this.OnCheckButtonRobotPositionClicked);
this.checkButtonFPS.Toggled += new global::System.EventHandler(this.OnCheckButtonFPSToggled);
this.buttonAskArena.Clicked += new global::System.EventHandler(this.OnButtonAskArenaClicked);
this.drawingAreaCamera.ExposeEvent += new global::Gtk.ExposeEventHandler(this.OnDrawingAreaCameraExposeEvent);
this.buttonServerConnection.Clicked += new global::System.EventHandler(this.OnButtonServerConnectionClicked);

View file

@ -74,68 +74,95 @@
<property name="MemberName" />
<property name="Spacing">6</property>
<child>
<widget class="Gtk.Alignment" id="alignment1">
<widget class="Gtk.HBox" id="hbox2">
<property name="MemberName" />
<property name="Xscale">0</property>
<property name="Xalign">0</property>
<property name="BorderWidth">6</property>
<property name="Spacing">6</property>
<child>
<widget class="Gtk.HBox" id="hbox2">
<widget class="Gtk.Alignment" id="alignment1">
<property name="MemberName" />
<property name="Spacing">6</property>
<property name="Xscale">0</property>
<property name="Xalign">0</property>
<property name="BorderWidth">6</property>
<child>
<widget class="Gtk.CheckButton" id="checkButtonCameraOn">
<widget class="Gtk.HBox" id="hbox5">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Label" translatable="yes">Camera On</property>
<property name="DrawIndicator">True</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
<signal name="Clicked" handler="OnCheckButtonCameraOnClicked" />
<property name="Spacing">6</property>
<child>
<widget class="Gtk.CheckButton" id="checkButtonCameraOn">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Label" translatable="yes">Camera On</property>
<property name="DrawIndicator">True</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
<signal name="Clicked" handler="OnCheckButtonCameraOnClicked" />
</widget>
<packing>
<property name="Position">0</property>
<property name="AutoSize">True</property>
</packing>
</child>
<child>
<widget class="Gtk.CheckButton" id="checkButtonRobotPosition">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Label" translatable="yes">Show Position</property>
<property name="DrawIndicator">True</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
<signal name="Clicked" handler="OnCheckButtonRobotPositionClicked" />
</widget>
<packing>
<property name="Position">1</property>
<property name="AutoSize">True</property>
</packing>
</child>
<child>
<widget class="Gtk.CheckButton" id="checkButtonFPS">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Label" translatable="yes">Show FPS</property>
<property name="DrawIndicator">True</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
<signal name="Toggled" handler="OnCheckButtonFPSToggled" />
</widget>
<packing>
<property name="Position">2</property>
<property name="AutoSize">True</property>
</packing>
</child>
</widget>
<packing>
<property name="Position">0</property>
<property name="AutoSize">True</property>
</packing>
</child>
<child>
<widget class="Gtk.CheckButton" id="checkButtonRobotPosition">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Label" translatable="yes">Robot Position</property>
<property name="DrawIndicator">True</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
<signal name="Clicked" handler="OnCheckButtonRobotPositionClicked" />
</widget>
<packing>
<property name="Position">1</property>
<property name="AutoSize">True</property>
</packing>
</child>
<child>
<widget class="Gtk.Button" id="buttonAskArena">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Type">TextOnly</property>
<property name="Label" translatable="yes">Ask Arena...</property>
<property name="UseUnderline">True</property>
<signal name="Clicked" handler="OnButtonAskArenaClicked" />
</widget>
<packing>
<property name="PackType">End</property>
<property name="Position">2</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="Position">0</property>
<property name="AutoSize">True</property>
</packing>
</child>
<child>
<placeholder />
</child>
<child>
<widget class="Gtk.Button" id="buttonAskArena">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Type">TextOnly</property>
<property name="Label" translatable="yes">Ask Arena...</property>
<property name="UseUnderline">True</property>
<signal name="Clicked" handler="OnButtonAskArenaClicked" />
</widget>
<packing>
<property name="Position">2</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="Position">0</property>
<property name="AutoSize">False</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
@ -758,6 +785,7 @@
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Label" translatable="yes">Get battery level</property>
<property name="Active">True</property>
<property name="DrawIndicator">True</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>

Binary file not shown.

View file

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

View file

@ -17,18 +17,42 @@
#include "camera.h"
#include "img.h"
#include <unistd.h>
using namespace cv;
Camera::Camera(int size) {
Camera::Camera(int size, int fps) {
this->SetSize(size);
#ifndef __FOR_PC__
this->cap.set(CV_CAP_PROP_FORMAT, CV_8UC3);
this->cap.set(CV_CAP_PROP_FRAME_WIDTH,width);
this->cap.set(CV_CAP_PROP_FRAME_HEIGHT,height);
this->cap.set(CV_CAP_PROP_FPS, fps);
#endif /* __FOR_PC__ */
}
bool Camera::Open() {
this->cap.open(0);
bool status = false;
#ifdef __FOR_PC__
if (this->cap.open(0)) {
//this->cap.set(CV_CAP_PROP_FORMAT, CV_8UC3);
this->cap.set(CV_CAP_PROP_FRAME_WIDTH,width);
this->cap.set(CV_CAP_PROP_FRAME_HEIGHT,height);
status =true;
}
#else
if (this->cap.open()) {
cout<<"Camera warmup 2sec"<<endl<<flush;
sleep(2);
cout<<"Start capture"<<endl<<flush;
status =true;
}
#endif /* __FOR_PC__ */
return status;
}
void Camera::Close() {
@ -58,15 +82,22 @@ void Camera::SetSize(int size) {
default:
this->width = 480;
this->height = 360;
}
}
Img Camera::Grab() {
ImageMat frame;
#ifdef __FOR_PC__
cap >> frame;
Img capture = Img(frame);
#else
cap.grab();
cap.retrieve (frame);
cvtColor(frame,frame,CV_BGR2RGB);
Img capture = Img(frame);
#endif /* __FOR_PC__ */
return capture;
}

View file

@ -21,13 +21,16 @@
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#ifndef __FOR_PC__
#include "raspicam/raspicam_cv.h"
#endif /* __FOR_PC__ */
#include "img.h"
enum captureSize {xs, sm, md, lg};
class Camera {
public:
Camera(int size);
Camera(int size, int fps);
bool Open();
void Close();
@ -41,7 +44,12 @@ public:
Img Grab();
private:
#ifdef __FOR_PC__
cv::VideoCapture cap;
#else
raspicam::RaspiCam_Cv cap;
#endif /* __FOR_PC__ */
int size = sm;
int width;
int height;

View file

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

View file

@ -18,7 +18,7 @@
#include "img.h"
bool Arena::IsEmpty() {
if ((this->arena.height==0) || (this->arena.width==0)) return true;
if ((this->arena.height == 0) || (this->arena.width == 0)) return true;
else return false;
}
@ -27,7 +27,7 @@ Img::Img(ImageMat imgMatrice) {
}
string Img::ToString() {
return "Image size: "+to_string(this->img.cols)+"x"+to_string(this->img.rows)+" (dim="+to_string(this->img.dims)+")";
return "Image size: " + to_string(this->img.cols) + "x" + to_string(this->img.rows) + " (dim=" + to_string(this->img.dims) + ")";
}
Img* Img::Copy() {
@ -36,52 +36,55 @@ Img* Img::Copy() {
float Img::CalculAngle(Position robot) {
float a = robot.direction.x - robot.center.x;
float b = robot.direction.y - robot.center.y ;
float angle = atan2(b,a);
return angle * 180.f/M_PI;
float b = robot.direction.y - robot.center.y;
float angle = atan2(b, a);
return angle * 180.f / M_PI;
}
float Img::CalculAngle2(cv::Point2f pt1, cv::Point2f pt2) {
float a = pt1.x - pt2.x;
float b = pt1.y - pt2.y ;
float angle = atan2(b,a);
return angle * 180.f/M_PI;
float b = pt1.y - pt2.y;
float angle = atan2(b, a);
return angle * 180.f / M_PI;
}
#ifdef __WITH_ARUCO__
cv::Point2f Img::find_aruco_center(std::vector<cv::Point2f> aruco) {
return ((aruco[0] + aruco[2])/2);
cv::Point2f Img::FindArucoCenter(std::vector<cv::Point2f> aruco) {
return ((aruco[0] + aruco[2]) / 2);
}
cv::Point2f Img::find_aruco_direction(std::vector<cv::Point2f> aruco) {
return ((aruco[0]+aruco[1])/2);;
cv::Point2f Img::FindArucoDirection(std::vector<cv::Point2f> aruco) {
return ((aruco[0] + aruco[1]) / 2);
}
std::list<Position> Img::search_aruco(Arena monArene) {
std::list<Position> Img::SearchAruco(Arena arena) {
ImageMat imgTraitment;
std::list<Position> positionList;
cv::Point2f areneCoor;
std::vector<int> ids;
std::vector<std::vector<cv::Point2f> > corners;
if(monArene.empty())
imgTraitment=this->img.clone();
else{
imgTraitment = cropArena(monArene);
areneCoor.x = monArene.x;
areneCoor.y = monArene.y;
if (arena.IsEmpty())
imgTraitment = this->img.clone();
else {
imgTraitment = CropArena(arena);
areneCoor.x = arena.arena.x;
areneCoor.y = arena.arena.y;
}
cv::detectMarkers(imgTraitment,dictionary, corners, ids);
if(ids.size()>0){
for(int i = 0 ; i < ids.size() ; i++){
cv::aruco::detectMarkers(imgTraitment, dictionary, corners, ids);
if (ids.size() > 0) {
for (int i = 0; i < ids.size(); i++) {
Position newPos;
newPos.center = find_aruco_center(corners[i]);
newPos.direction = find_aruco_direction(corners[i]);
newPos.center = FindArucoCenter(corners[i]);
newPos.direction = FindArucoDirection(corners[i]);
newPos.robotId = ids[i];
if(!monArene.empty()){
if (!arena.IsEmpty()) {
newPos.direction += areneCoor;
newPos.center += areneCoor;
}
newPos.angle = calculAngle2(newPos.center, newPos.direction);
newPos.angle = CalculAngle2(newPos.center, newPos.direction);
positionList.push_back(newPos);
}
}
@ -91,92 +94,79 @@ std::list<Position> Img::search_aruco(Arena monArene) {
float Img::EuclideanDistance(cv::Point2f p, cv::Point2f q) {
cv::Point diff = p - q;
return cv::sqrt(diff.x*diff.x + diff.y*diff.y);
return cv::sqrt(diff.x * diff.x + diff.y * diff.y);
}
Jpg Img::ToJpg() {
Jpg imgJpg;
cv::imencode(".jpg",this->img,imgJpg);
cv::imencode(".jpg", this->img, imgJpg);
return imgJpg;
}
//string Img::ToBase64() {
// string imgBase64;
// Jpg imgJpg = toJpg();
//
// /* faire la convertion Jpg vers base 64 */
// return imgBase64;
//}
std::list<Position> Img::SearchRobot(Arena monArene) {
std::list<Position> Img::SearchRobot(Arena arena) {
std::list<Position> robotsFind;
std::vector<std::vector<cv::Point2f> > contours;
std::vector<cv::Point2f> approx;
std::vector<std::vector<cv::Point> > contours;
std::vector<cv::Point> approx;
std::vector<cv::Vec4i> hierarchy;
ImageMat imgTraitment;
if(monArene.IsEmpty())
imgTraitment=this->img.clone();
else
imgTraitment = CropArena(monArene);
if (arena.IsEmpty()) {
imgTraitment = this->img.clone();
} else {
imgTraitment = this->img(arena.arena);
}
cvtColor(imgTraitment,imgTraitment,CV_RGB2GRAY);
threshold(imgTraitment,imgTraitment,128,255,CV_THRESH_BINARY);
findContours(imgTraitment, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, cv::Point2f(0, 0));
cvtColor(imgTraitment, imgTraitment, CV_RGB2GRAY);
threshold(imgTraitment, imgTraitment, 128, 255, CV_THRESH_BINARY);
findContours(imgTraitment, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, cv::Point(0, 0));
for(unsigned int i = 0;i < contours.size();i++)
{
cv::approxPolyDP(ImageMat(contours[i]), approx, cv::arcLength(ImageMat(contours[i]), true)*0.17, true);
if(approx.size() == 3 && fabs(cv::contourArea(contours[i])) > 200 && fabs(cv::contourArea(contours[i])) < 700)
{
cv::Point2f a,b,c;
cv::Point2f center;
for (unsigned int i = 0; i < contours.size(); i++) {
ImageMat m(contours[i]);
cv::approxPolyDP(m, approx, cv::arcLength(ImageMat(contours[i]), true)*0.17, true);
if (approx.size() == 3 && fabs(cv::contourArea(contours[i])) > 200 && fabs(cv::contourArea(contours[i])) < 700) {
cv::Point a, b, c;
cv::Point center;
a = approx[0];
b = approx[1];
c = approx[2];
if(!monArene.IsEmpty()) // ajout de l'offset de l'arène
{
a.x += monArene.arena.x;
a.y += monArene.arena.y;
b.x += monArene.arena.x;
b.y += monArene.arena.y;
c.x += monArene.arena.x;
c.y += monArene.arena.y;
if (!arena.IsEmpty()) { // ajout de l'offset de l'arène
a.x += arena.arena.x;
a.y += arena.arena.y;
b.x += arena.arena.x;
b.y += arena.arena.y;
c.x += arena.arena.x;
c.y += arena.arena.y;
}
center.x = (a.x + b.x + c.x)/3;
center.y = (a.y + b.y + c.y)/3;
center.x = (a.x + b.x + c.x) / 3;
center.y = (a.y + b.y + c.y) / 3;
Position newPos;
newPos.center=center;
newPos.center = center;
if(EuclideanDistance(center,b) > EuclideanDistance(center,a) && EuclideanDistance(center,b) > EuclideanDistance(center,c) )
{
newPos.direction=b;
if (EuclideanDistance(center, b) > EuclideanDistance(center, a) && EuclideanDistance(center, b) > EuclideanDistance(center, c)) {
newPos.direction = b;
//line(img,center,b,Scalar(0,125,0),2,8,0);
}
else if(EuclideanDistance(center,a) > EuclideanDistance(center,c))
{
newPos.direction=a;
//line(img,center,a,Scalar(0,125,0),2,8,0);
} else if (EuclideanDistance(center, a) > EuclideanDistance(center, c)) {
}
else
{
newPos.direction=c;
newPos.direction = a;
//line(img,center,a,Scalar(0,125,0),2,8,0);
} else {
newPos.direction = c;
//line(img,center,c,Scalar(0,125,0),2,8,0);
}
newPos.angle=CalculAngle(newPos);
newPos.angle = CalculAngle(newPos);
newPos.robotId = -1; // dumb identifier
robotsFind.push_back(newPos);
}
}
return robotsFind;
}
@ -186,16 +176,14 @@ Arena Img::SearchArena() {
std::vector<cv::Vec4i> hierarchy;
ImageMat imageTrt;
cv::cvtColor(this->img,imageTrt,CV_RGB2GRAY); // conversion en niveau de gris
cv::threshold(imageTrt,imageTrt,128,255,CV_THRESH_BINARY); // Threshold les éléments les plus clair
cv::Canny(imageTrt, imageTrt, 100,200,3); // detection d'angle
cv::cvtColor(this->img, imageTrt, CV_RGB2GRAY); // conversion en niveau de gris
cv::threshold(imageTrt, imageTrt, 128, 255, CV_THRESH_BINARY); // Threshold les éléments les plus clair
cv::Canny(imageTrt, imageTrt, 100, 200, 3); // detection d'angle
findContours(imageTrt, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, cv::Point(0, 0));
for(unsigned int i = 0; i < contours.size();i++)
{
for (unsigned int i = 0; i < contours.size(); i++) {
approxPolyDP(ImageMat(contours[i]), approx, cv::arcLength(ImageMat(contours[i]), true)*0.1, true);
if(approx.size()==4 && fabs(cv::contourArea(contours[i])) > 100000)
{
if (approx.size() == 4 && fabs(cv::contourArea(contours[i])) > 100000) {
Arena rectangle;
rectangle.arena = cv::boundingRect(ImageMat(contours[i]));
return rectangle;
@ -205,22 +193,22 @@ Arena Img::SearchArena() {
}
int Img::DrawRobot(Position robot) {
cv::arrowedLine(this->img, (cv::Point2f)robot.center, (cv::Point2f)robot.direction, cv::Scalar(0,0,255),3,8,0);
cv::arrowedLine(this->img, (cv::Point2f)robot.center, (cv::Point2f)robot.direction, cv::Scalar(0, 0, 255), 3, 8, 0);
return 0;
}
int Img::DrawAllRobots(std::list<Position> robots) {
for(Position robot : robots){
cv::arrowedLine(this->img, (cv::Point2f)robot.center, (cv::Point2f)robot.direction, cv::Scalar(0,0,255),3,8,0);
for (Position robot : robots) {
cv::arrowedLine(this->img, (cv::Point2f)robot.center, (cv::Point2f)robot.direction, cv::Scalar(0, 0, 255), 3, 8, 0);
}
return robots.size();
}
int Img::DrawArena(Arena areneToDraw) {
cv::rectangle(this->img,areneToDraw.arena.tl(),areneToDraw.arena.br(),cv::Scalar(0,0,125),2,8,0);
int Img::DrawArena(Arena arenaToDraw) {
cv::rectangle(this->img, arenaToDraw.arena.tl(), arenaToDraw.arena.br(), cv::Scalar(0, 0, 125), 2, 8, 0);
return 0;
}
ImageMat Img::CropArena(Arena arene) {
return this->img(arene.arena);
ImageMat Img::CropArena(Arena arena) {
return this->img(arena.arena);
}

View file

@ -29,7 +29,9 @@
#ifdef __WITH_ARUCO__
#include <opencv2/aruco/dictionary.hpp>
#include <opencv2/aruco/charuco.hpp>
//#include <opencv2/aruco.hpp>
#include <opencv2/core/mat.hpp>
#endif // __WITH_ARUCO__
#define ARENA_NOT_DETECTED -1
@ -57,6 +59,8 @@ public:
class Img {
public:
ImageMat img;
Img(ImageMat imgMatrice);
string ToString();
@ -67,26 +71,23 @@ public:
int DrawRobot(Position robot);
int DrawAllRobots(std::list<Position> robots);
int DrawArena(Arena areneToDraw);
std::list<Position> SearchRobot(Arena myArena);
int DrawArena(Arena arenaToDraw);
std::list<Position> SearchRobot(Arena arena);
#ifdef __WITH_ARUCO__
list<Position> search_aruco(Arena monArene = NULL);
list<Position> SearchAruco(Arena arena);
cv::Ptr<cv::aruco::Dictionary> dictionary;
#endif // __WITH_ARUCO__
private:
ImageMat img;
#ifdef __WITH_ARUCO__
Ptr<std::Dictionary> dictionary;
cv::Point2f find_aruco_center(std::vector<cv::Point2f> aruco);
cv::Point2f find_aruco_direction(std::vector<cv::Point2f> aruco);
cv::Point2f FindArucoCenter(std::vector<cv::Point2f> aruco);
cv::Point2f FindArucoDirection(std::vector<cv::Point2f> aruco);
#endif // __WITH_ARUCO__
float CalculAngle(Position robots);
float CalculAngle2(cv::Point2f pt1, cv::Point2f pt2);
float EuclideanDistance(cv::Point2f p, cv::Point2f q);
ImageMat CropArena(Arena arene);
ImageMat CropArena(Arena arena);
};
#endif //__IMG_H__

View file

@ -35,6 +35,11 @@ OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
# Object Files
OBJECTFILES= \
${OBJECTDIR}/lib/base64/base64.o \
${OBJECTDIR}/lib/camera.o \
${OBJECTDIR}/lib/commonitor.o \
${OBJECTDIR}/lib/comrobot.o \
${OBJECTDIR}/lib/img.o \
${OBJECTDIR}/lib/message.o \
${OBJECTDIR}/lib/messages.o \
${OBJECTDIR}/lib/monitor.o \
@ -42,11 +47,6 @@ OBJECTFILES= \
${OBJECTDIR}/lib/server.o \
${OBJECTDIR}/main.o \
${OBJECTDIR}/tasks.o \
${OBJECTDIR}/_ext/a7f31ab4/base64.o \
${OBJECTDIR}/_ext/6cc0dc4a/camera.o \
${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o \
${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o \
${OBJECTDIR}/_ext/6cc0dc4a/img.o \
${OBJECTDIR}/tasks_pthread.o
@ -74,6 +74,31 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot: ${OBJECTFILES}
${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
${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
${OBJECTDIR}/lib/base64/base64.o: lib/base64/base64.cpp
${MKDIR} -p ${OBJECTDIR}/lib/base64
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/camera.o: lib/camera.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/commonitor.o: lib/commonitor.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/comrobot.o: lib/comrobot.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/img.o: lib/img.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/message.o: lib/message.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
@ -109,31 +134,6 @@ ${OBJECTDIR}/tasks.o: tasks.cpp
${RM} "$@.d"
$(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
${OBJECTDIR}/_ext/a7f31ab4/base64.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/a7f31ab4
${RM} "$@.d"
$(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
${OBJECTDIR}/_ext/6cc0dc4a/camera.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
${RM} "$@.d"
$(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
${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
${RM} "$@.d"
$(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
${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
${RM} "$@.d"
$(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
${OBJECTDIR}/_ext/6cc0dc4a/img.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
${RM} "$@.d"
$(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
${OBJECTDIR}/tasks_pthread.o: tasks_pthread.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d"

View file

@ -35,13 +35,13 @@ OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
# Object Files
OBJECTFILES= \
${OBJECTDIR}/lib/base64/base64.o \
${OBJECTDIR}/lib/camera.o \
${OBJECTDIR}/lib/commonitor.o \
${OBJECTDIR}/lib/comrobot.o \
${OBJECTDIR}/lib/img.o \
${OBJECTDIR}/lib/messages.o \
${OBJECTDIR}/main.o \
${OBJECTDIR}/_ext/a7f31ab4/base64.o \
${OBJECTDIR}/_ext/6cc0dc4a/camera.o \
${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o \
${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o \
${OBJECTDIR}/_ext/6cc0dc4a/img.o \
${OBJECTDIR}/tasks_pthread.o
@ -69,45 +69,45 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot: ${OBJECTFILES}
${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot ${OBJECTFILES} ${LDLIBSOPTIONS} -lpthread -lrt
${OBJECTDIR}/lib/base64/base64.o: lib/base64/base64.cpp
${MKDIR} -p ${OBJECTDIR}/lib/base64
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/camera.o: lib/camera.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/commonitor.o: lib/commonitor.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/comrobot.o: lib/comrobot.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/img.o: lib/img.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/messages.o: lib/messages.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(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
$(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
${OBJECTDIR}/main.o: main.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d"
$(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
${OBJECTDIR}/_ext/a7f31ab4/base64.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/a7f31ab4
${RM} "$@.d"
$(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
${OBJECTDIR}/_ext/6cc0dc4a/camera.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
${RM} "$@.d"
$(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
${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
${RM} "$@.d"
$(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
${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
${RM} "$@.d"
$(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
${OBJECTDIR}/_ext/6cc0dc4a/img.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
${RM} "$@.d"
$(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
$(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
${OBJECTDIR}/tasks_pthread.o: tasks_pthread.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d"
$(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
$(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
# Subprojects
.build-subprojects:

View file

@ -0,0 +1,131 @@
#
# Generated Makefile - do not edit!
#
# Edit the Makefile in the project folder instead (../Makefile). Each target
# has a -pre and a -post target defined where you can add customized code.
#
# This makefile implements configuration specific macros and targets.
# Environment
MKDIR=mkdir
CP=cp
GREP=grep
NM=nm
CCADMIN=CCadmin
RANLIB=ranlib
CC=gcc
CCC=g++
CXX=g++
FC=gfortran
AS=as
# Macros
CND_PLATFORM=GNU-Linux
CND_DLIB_EXT=so
CND_CONF=Debug__Pthread__RPI
CND_DISTDIR=dist
CND_BUILDDIR=build
# Include project Makefile
include ./Makefile
# Object Directory
OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
# Object Files
OBJECTFILES= \
${OBJECTDIR}/lib/base64/base64.o \
${OBJECTDIR}/lib/camera.o \
${OBJECTDIR}/lib/commonitor.o \
${OBJECTDIR}/lib/comrobot.o \
${OBJECTDIR}/lib/img.o \
${OBJECTDIR}/lib/messages.o \
${OBJECTDIR}/main.o \
${OBJECTDIR}/tasks_pthread.o
# C Compiler Flags
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
# CC Compiler Flags
CCFLAGS=-D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -Wno-pmf-conversions -std=gnu++11
CXXFLAGS=-D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -Wno-pmf-conversions -std=gnu++11
# Fortran Compiler Flags
FFLAGS=
# Assembler Flags
ASFLAGS=
# Link Libraries and Options
LDLIBSOPTIONS=`pkg-config --libs opencv` /usr/local/lib/libraspicam_cv.so /usr/local/lib/libraspicam.so
# Build Targets
.build-conf: ${BUILD_SUBPROJECTS}
"${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot
${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot: /usr/local/lib/libraspicam_cv.so
${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot: /usr/local/lib/libraspicam.so
${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot: ${OBJECTFILES}
${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot ${OBJECTFILES} ${LDLIBSOPTIONS} -lpthread -lrt
${OBJECTDIR}/lib/base64/base64.o: lib/base64/base64.cpp
${MKDIR} -p ${OBJECTDIR}/lib/base64
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/camera.o: lib/camera.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/commonitor.o: lib/commonitor.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/comrobot.o: lib/comrobot.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/img.o: lib/img.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/messages.o: lib/messages.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(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
${OBJECTDIR}/main.o: main.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d"
$(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
${OBJECTDIR}/tasks_pthread.o: tasks_pthread.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d"
$(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
# Subprojects
.build-subprojects:
# Clean Targets
.clean-conf: ${CLEAN_SUBPROJECTS}
${RM} -r ${CND_BUILDDIR}/${CND_CONF}
${RM} -r ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libraspicam_cv.so ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libraspicam.so
${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot
# Subprojects
.clean-subprojects:
# Enable dependency checking
.dep.inc: .depcheck-impl
include .dep.inc

View file

@ -35,7 +35,12 @@ OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
# Object Files
OBJECTFILES= \
${OBJECTDIR}/lib/base64/base64.o \
${OBJECTDIR}/lib/camera.o \
${OBJECTDIR}/lib/commonitor.o \
${OBJECTDIR}/lib/comrobot.o \
${OBJECTDIR}/lib/image.o \
${OBJECTDIR}/lib/img.o \
${OBJECTDIR}/lib/message.o \
${OBJECTDIR}/lib/messages.o \
${OBJECTDIR}/lib/monitor.o \
@ -43,11 +48,6 @@ OBJECTFILES= \
${OBJECTDIR}/lib/server.o \
${OBJECTDIR}/main.o \
${OBJECTDIR}/tasks.o \
${OBJECTDIR}/_ext/a7f31ab4/base64.o \
${OBJECTDIR}/_ext/6cc0dc4a/camera.o \
${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o \
${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o \
${OBJECTDIR}/_ext/6cc0dc4a/img.o \
${OBJECTDIR}/tasks_pthread.o
@ -75,11 +75,36 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot: ${OBJECTFILES}
${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
${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
${OBJECTDIR}/lib/base64/base64.o: lib/base64/base64.cpp
${MKDIR} -p ${OBJECTDIR}/lib/base64
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/camera.o: lib/camera.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/commonitor.o: lib/commonitor.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/comrobot.o: lib/comrobot.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/image.o: lib/image.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/img.o: lib/img.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(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
${OBJECTDIR}/lib/message.o: lib/message.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
@ -115,31 +140,6 @@ ${OBJECTDIR}/tasks.o: tasks.cpp
${RM} "$@.d"
$(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
${OBJECTDIR}/_ext/a7f31ab4/base64.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/a7f31ab4
${RM} "$@.d"
$(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
${OBJECTDIR}/_ext/6cc0dc4a/camera.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
${RM} "$@.d"
$(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
${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
${RM} "$@.d"
$(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
${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
${RM} "$@.d"
$(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
${OBJECTDIR}/_ext/6cc0dc4a/img.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
${RM} "$@.d"
$(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
${OBJECTDIR}/tasks_pthread.o: tasks_pthread.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d"

View file

@ -35,7 +35,12 @@ OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
# Object Files
OBJECTFILES= \
${OBJECTDIR}/lib/base64/base64.o \
${OBJECTDIR}/lib/camera.o \
${OBJECTDIR}/lib/commonitor.o \
${OBJECTDIR}/lib/comrobot.o \
${OBJECTDIR}/lib/image.o \
${OBJECTDIR}/lib/img.o \
${OBJECTDIR}/lib/message.o \
${OBJECTDIR}/lib/messages.o \
${OBJECTDIR}/lib/monitor.o \
@ -43,11 +48,6 @@ OBJECTFILES= \
${OBJECTDIR}/lib/server.o \
${OBJECTDIR}/main.o \
${OBJECTDIR}/tasks.o \
${OBJECTDIR}/_ext/a7f31ab4/base64.o \
${OBJECTDIR}/_ext/6cc0dc4a/camera.o \
${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o \
${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o \
${OBJECTDIR}/_ext/6cc0dc4a/img.o \
${OBJECTDIR}/tasks_pthread.o
@ -75,11 +75,36 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot: ${OBJECTFILES}
${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot ${OBJECTFILES} ${LDLIBSOPTIONS}
${OBJECTDIR}/lib/base64/base64.o: lib/base64/base64.cpp
${MKDIR} -p ${OBJECTDIR}/lib/base64
${RM} "$@.d"
$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/base64/base64.o lib/base64/base64.cpp
${OBJECTDIR}/lib/camera.o: lib/camera.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/camera.o lib/camera.cpp
${OBJECTDIR}/lib/commonitor.o: lib/commonitor.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/commonitor.o lib/commonitor.cpp
${OBJECTDIR}/lib/comrobot.o: lib/comrobot.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/comrobot.o lib/comrobot.cpp
${OBJECTDIR}/lib/image.o: lib/image.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/image.o lib/image.cpp
${OBJECTDIR}/lib/img.o: lib/img.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/img.o lib/img.cpp
${OBJECTDIR}/lib/message.o: lib/message.cpp
${MKDIR} -p ${OBJECTDIR}/lib
${RM} "$@.d"
@ -115,31 +140,6 @@ ${OBJECTDIR}/tasks.o: tasks.cpp
${RM} "$@.d"
$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/tasks.o tasks.cpp
${OBJECTDIR}/_ext/a7f31ab4/base64.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/a7f31ab4
${RM} "$@.d"
$(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
${OBJECTDIR}/_ext/6cc0dc4a/camera.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
${RM} "$@.d"
$(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
${OBJECTDIR}/_ext/6cc0dc4a/commonitor.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
${RM} "$@.d"
$(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
${OBJECTDIR}/_ext/6cc0dc4a/comrobot.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
${RM} "$@.d"
$(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
${OBJECTDIR}/_ext/6cc0dc4a/img.o: /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/6cc0dc4a
${RM} "$@.d"
$(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
${OBJECTDIR}/tasks_pthread.o: tasks_pthread.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d"

View file

@ -31,7 +31,7 @@ DEFAULTCONF=Debug
CONF=${DEFAULTCONF}
# All Configurations
ALLCONFS=Debug Release Debug__RPI_ Debug__Pthread_
ALLCONFS=Debug Release Debug__RPI_ Debug__Pthread_ Debug__Pthread__RPI
# build

View file

@ -38,6 +38,14 @@ CND_ARTIFACT_PATH_Debug__Pthread_=dist/Debug__Pthread_/GNU-Linux/superviseur-rob
CND_PACKAGE_DIR_Debug__Pthread_=dist/Debug__Pthread_/GNU-Linux/package
CND_PACKAGE_NAME_Debug__Pthread_=superviseur-robot.tar
CND_PACKAGE_PATH_Debug__Pthread_=dist/Debug__Pthread_/GNU-Linux/package/superviseur-robot.tar
# Debug__Pthread__RPI configuration
CND_PLATFORM_Debug__Pthread__RPI=GNU-Linux
CND_ARTIFACT_DIR_Debug__Pthread__RPI=dist/Debug__Pthread__RPI/GNU-Linux
CND_ARTIFACT_NAME_Debug__Pthread__RPI=superviseur-robot
CND_ARTIFACT_PATH_Debug__Pthread__RPI=dist/Debug__Pthread__RPI/GNU-Linux/superviseur-robot
CND_PACKAGE_DIR_Debug__Pthread__RPI=dist/Debug__Pthread__RPI/GNU-Linux/package
CND_PACKAGE_NAME_Debug__Pthread__RPI=superviseur-robot.tar
CND_PACKAGE_PATH_Debug__Pthread__RPI=dist/Debug__Pthread__RPI/GNU-Linux/package/superviseur-robot.tar
#
# include compiler specific variables
#

View file

@ -0,0 +1,76 @@
#!/bin/bash -x
#
# Generated - do not edit!
#
# Macros
TOP=`pwd`
CND_PLATFORM=GNU-Linux
CND_CONF=Debug__Pthread__RPI
CND_DISTDIR=dist
CND_BUILDDIR=build
CND_DLIB_EXT=so
NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
TMPDIRNAME=tmp-packaging
OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot
OUTPUT_BASENAME=superviseur-robot
PACKAGE_TOP_DIR=superviseur-robot/
# Functions
function checkReturnCode
{
rc=$?
if [ $rc != 0 ]
then
exit $rc
fi
}
function makeDirectory
# $1 directory path
# $2 permission (optional)
{
mkdir -p "$1"
checkReturnCode
if [ "$2" != "" ]
then
chmod $2 "$1"
checkReturnCode
fi
}
function copyFileToTmpDir
# $1 from-file path
# $2 to-file path
# $3 permission
{
cp "$1" "$2"
checkReturnCode
if [ "$3" != "" ]
then
chmod $3 "$2"
checkReturnCode
fi
}
# Setup
cd "${TOP}"
mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
rm -rf ${NBTMPDIR}
mkdir -p ${NBTMPDIR}
# Copy files and create directories and links
cd "${TOP}"
makeDirectory "${NBTMPDIR}/superviseur-robot/bin"
copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
# Generate tar file
cd "${TOP}"
rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/superviseur-robot.tar
cd ${NBTMPDIR}
tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/superviseur-robot.tar *
checkReturnCode
# Cleanup
cd "${TOP}"
rm -rf ${NBTMPDIR}

View file

@ -4,10 +4,10 @@
<logicalFolder name="HeaderFiles"
displayName="Header Files"
projectFiles="true">
<itemPath>/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.h</itemPath>
<itemPath>./lib/base64/base64.h</itemPath>
<itemPath>./lib/camera.h</itemPath>
<itemPath>/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.h</itemPath>
<itemPath>/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.h</itemPath>
<itemPath>./lib/commonitor.h</itemPath>
<itemPath>./lib/comrobot.h</itemPath>
<itemPath>./lib/definitions.h</itemPath>
<itemPath>./lib/image.h</itemPath>
<itemPath>./lib/img.h</itemPath>
@ -27,12 +27,12 @@
<logicalFolder name="SourceFiles"
displayName="Source Files"
projectFiles="true">
<itemPath>/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp</itemPath>
<itemPath>/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp</itemPath>
<itemPath>/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp</itemPath>
<itemPath>/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp</itemPath>
<itemPath>./lib/base64/base64.cpp</itemPath>
<itemPath>./lib/camera.cpp</itemPath>
<itemPath>./lib/commonitor.cpp</itemPath>
<itemPath>./lib/comrobot.cpp</itemPath>
<itemPath>./lib/image.cpp</itemPath>
<itemPath>/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp</itemPath>
<itemPath>./lib/img.cpp</itemPath>
<itemPath>./main.cpp</itemPath>
<itemPath>./lib/message.cpp</itemPath>
<itemPath>./lib/messages.cpp</itemPath>
@ -55,7 +55,7 @@
</logicalFolder>
</logicalFolder>
<sourceRootList>
<Elem>/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib</Elem>
<Elem>lib</Elem>
</sourceRootList>
<projectmakefile>./Makefile</projectmakefile>
<confs>
@ -95,12 +95,28 @@
</compileType>
<item path="./gdbsudo.sh" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/base64/base64.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/base64/base64.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/camera.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/camera.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/commonitor.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/commonitor.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/comrobot.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/comrobot.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/definitions.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/image.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/img.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/img.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/message.cpp" ex="false" tool="1" flavor2="0">
@ -129,46 +145,6 @@
</item>
<item path="./tasks.h" ex="false" tool="3" flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp"
ex="false"
tool="1"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.h"
ex="false"
tool="3"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp"
ex="false"
tool="1"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp"
ex="false"
tool="1"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.h"
ex="false"
tool="3"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp"
ex="false"
tool="1"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.h"
ex="false"
tool="3"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp"
ex="false"
tool="1"
flavor2="0">
</item>
<item path="tasks_pthread.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="tasks_pthread.h" ex="false" tool="3" flavor2="0">
@ -196,14 +172,30 @@
</compileType>
<item path="./gdbsudo.sh" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/base64/base64.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/base64/base64.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/camera.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/camera.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/commonitor.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/commonitor.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/comrobot.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/comrobot.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/definitions.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/image.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/image.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/img.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/img.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/message.cpp" ex="false" tool="1" flavor2="0">
@ -232,46 +224,6 @@
</item>
<item path="./tasks.h" ex="false" tool="3" flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp"
ex="false"
tool="1"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.h"
ex="false"
tool="3"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp"
ex="false"
tool="1"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp"
ex="false"
tool="1"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.h"
ex="false"
tool="3"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp"
ex="false"
tool="1"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.h"
ex="false"
tool="3"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp"
ex="false"
tool="1"
flavor2="0">
</item>
<item path="tasks_pthread.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="tasks_pthread.h" ex="false" tool="3" flavor2="0">
@ -316,14 +268,30 @@
</compileType>
<item path="./gdbsudo.sh" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/base64/base64.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/base64/base64.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/camera.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/camera.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/commonitor.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/commonitor.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/comrobot.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/comrobot.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/definitions.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/image.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/image.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/img.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/img.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/message.cpp" ex="false" tool="1" flavor2="0">
@ -352,46 +320,6 @@
</item>
<item path="./tasks.h" ex="false" tool="3" flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp"
ex="false"
tool="1"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.h"
ex="false"
tool="3"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp"
ex="false"
tool="1"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp"
ex="false"
tool="1"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.h"
ex="false"
tool="3"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp"
ex="false"
tool="1"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.h"
ex="false"
tool="3"
flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp"
ex="false"
tool="1"
flavor2="0">
</item>
<item path="tasks_pthread.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="tasks_pthread.h" ex="false" tool="3" flavor2="0">
@ -420,6 +348,7 @@
<preprocessorList>
<Elem>_WITH_TRACE_</Elem>
<Elem>__FOR_PC__</Elem>
<Elem>__WITH_ARUCO__</Elem>
<Elem>__WITH_PTHREAD__</Elem>
</preprocessorList>
</ccTool>
@ -432,14 +361,30 @@
</compileType>
<item path="./gdbsudo.sh" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/base64/base64.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/base64/base64.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/camera.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/camera.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/commonitor.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/commonitor.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/comrobot.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/comrobot.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/definitions.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/image.cpp" ex="true" tool="1" flavor2="9">
</item>
<item path="./lib/image.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/img.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="./lib/img.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/message.cpp" ex="true" tool="1" flavor2="9">
@ -466,45 +411,99 @@
</item>
<item path="./tasks.cpp" ex="true" tool="1" flavor2="9">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp"
ex="false"
tool="1"
flavor2="0">
<item path="tasks_pthread.cpp" ex="false" tool="1" flavor2="9">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.h"
ex="false"
tool="3"
flavor2="0">
<item path="tasks_pthread.h" ex="false" tool="3" flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp"
ex="false"
tool="1"
flavor2="0">
</conf>
<conf name="Debug__Pthread__RPI" type="1">
<toolsSet>
<compilerSet>GNU|GNU</compilerSet>
<dependencyChecking>true</dependencyChecking>
<rebuildPropChanged>false</rebuildPropChanged>
</toolsSet>
<compileType>
<cTool>
<incDir>
<pElem>./</pElem>
<pElem>./lib</pElem>
<pElem>./lib/base64</pElem>
</incDir>
<commandLine>-I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy</commandLine>
</cTool>
<ccTool>
<standard>8</standard>
<incDir>
<pElem>./</pElem>
<pElem>./lib</pElem>
<pElem>./lib/base64</pElem>
</incDir>
<commandLine>-D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -Wno-pmf-conversions -std=gnu++11</commandLine>
<preprocessorList>
<Elem>_WITH_TRACE_</Elem>
<Elem>__WITH_PTHREAD__</Elem>
</preprocessorList>
</ccTool>
<linkerTool>
<linkerLibItems>
<linkerOptionItem>`pkg-config --libs opencv`</linkerOptionItem>
<linkerLibFileItem>/usr/local/lib/libraspicam_cv.so</linkerLibFileItem>
<linkerLibFileItem>/usr/local/lib/libraspicam.so</linkerLibFileItem>
</linkerLibItems>
<commandLine>-lpthread -lrt</commandLine>
</linkerTool>
</compileType>
<item path="./gdbsudo.sh" ex="false" tool="3" flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp"
ex="false"
tool="1"
flavor2="0">
<item path="./lib/base64/base64.cpp" ex="false" tool="1" flavor2="8">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.h"
ex="false"
tool="3"
flavor2="0">
<item path="./lib/base64/base64.h" ex="false" tool="3" flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp"
ex="false"
tool="1"
flavor2="0">
<item path="./lib/camera.cpp" ex="false" tool="1" flavor2="8">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.h"
ex="false"
tool="3"
flavor2="0">
<item path="./lib/camera.h" ex="false" tool="3" flavor2="0">
</item>
<item path="/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp"
ex="false"
tool="1"
flavor2="0">
<item path="./lib/commonitor.cpp" ex="false" tool="1" flavor2="8">
</item>
<item path="./lib/commonitor.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/comrobot.cpp" ex="false" tool="1" flavor2="8">
</item>
<item path="./lib/comrobot.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/definitions.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/image.cpp" ex="true" tool="1" flavor2="9">
</item>
<item path="./lib/image.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/img.cpp" ex="false" tool="1" flavor2="8">
</item>
<item path="./lib/img.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/message.cpp" ex="true" tool="1" flavor2="9">
</item>
<item path="./lib/message.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/messages.cpp" ex="false" tool="1" flavor2="9">
</item>
<item path="./lib/messages.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/monitor.cpp" ex="true" tool="1" flavor2="9">
</item>
<item path="./lib/monitor.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/robot.cpp" ex="true" tool="1" flavor2="9">
</item>
<item path="./lib/robot.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./lib/server.cpp" ex="true" tool="1" flavor2="9">
</item>
<item path="./lib/server.h" ex="false" tool="3" flavor2="0">
</item>
<item path="./main.cpp" ex="false" tool="1" flavor2="9">
</item>
<item path="./tasks.cpp" ex="true" tool="1" flavor2="9">
</item>
<item path="tasks_pthread.cpp" ex="false" tool="1" flavor2="9">
</item>

View file

@ -7,3 +7,4 @@
# Release configuration
# Debug__RPI_ configuration
# Debug__Pthread_ configuration
# Debug__Pthread__RPI configuration

View file

@ -116,8 +116,43 @@
<gdb_interceptlist>
<gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
</gdb_interceptlist>
<gdb_signals>
</gdb_signals>
<gdb_options>
<DebugOptions>
</DebugOptions>
</gdb_options>
<gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/>
</dbx_gdbdebugger>
<nativedebugger version="1">
<engine>gdb</engine>
</nativedebugger>
<runprofile version="9">
<runcommandpicklist>
<runcommandpicklistitem>sudo "${OUTPUT_PATH}"</runcommandpicklistitem>
<runcommandpicklistitem>sudo -E "${OUTPUT_PATH}"</runcommandpicklistitem>
<runcommandpicklistitem>pkexec "${OUTPUT_PATH}"</runcommandpicklistitem>
<runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem>
</runcommandpicklist>
<runcommand>"${OUTPUT_PATH}"</runcommand>
<rundir></rundir>
<buildfirst>true</buildfirst>
<console-type>1</console-type>
<terminal-type>0</terminal-type>
<remove-instrumentation>0</remove-instrumentation>
<environment>
</environment>
</runprofile>
</conf>
<conf name="Debug__Pthread__RPI" type="1">
<toolsSet>
<developmentServer>pi@10.105.1.13:22</developmentServer>
<platform>2</platform>
</toolsSet>
<dbx_gdbdebugger version="1">
<gdb_pathmaps>
</gdb_pathmaps>
<gdb_interceptlist>
<gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
</gdb_interceptlist>
<gdb_options>
<DebugOptions>
</DebugOptions>

View file

@ -0,0 +1,3 @@
#Tue Jan 08 15:35:51 CET 2019
____VERSION=2.0
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/dist/Debug__Pthread__RPI/GNU-Linux/superviseur-robot=1v

View file

@ -10,6 +10,7 @@
<file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/tasks_pthread.h</file>
<file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.h</file>
<file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.h</file>
<file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp</file>
<file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/main.cpp</file>
<file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/messages.h</file>
<file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp</file>

View file

@ -1,32 +1,93 @@
#Tue Nov 13 15:41:05 CET 2018
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/Makefile=c1542100687000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/robot.h=c1542116851000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/CMakeLists.txt=c1541685829000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Package-Debug.bash=c1541685829000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-Debug.mk=c1542104029000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/main.cpp=c1542105162000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/robot.cpp=c1542105020000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/image.h=c1542117446000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/.dep.inc=c1542102478000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Package-Debug__RPI_.bash=c1542029322000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/server.cpp=c1542120059000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/project.properties=c1542103467000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-Debug__RPI_.mk=c1542104029000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-variables.mk=c1542029322000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/message.cpp=c1542105181000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/project.xml=c1542104029000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/private/Makefile-variables.mk=c1542029322000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Package-Release.bash=c1541685829000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/message.h=c1542117282000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/.gitignore=c1541685829000
#Wed Jan 09 09:35:50 CET 2019
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/README.md=c1541685829000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/LICENSE=c1518398687000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/src/uiExample.cpp=c1542120848000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/messages.h=c1546526768000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.h=c1546527039000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-Release.mk=c1542104029000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/image.cpp=c1542104053000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/functions.h=c1542117699000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/functions.cpp=c1542105130000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/monitor.h=c1542120024000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/compile-and-run-test=c1518398687000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/test.cpp=c1518398687000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/server.cpp=c1544778298000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Package-Release.bash=c1544780526000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.h=c1545405815000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/monitor.h=c1544778298000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-Debug__RPI_.mk=c1542104029000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/tasks.cpp=c1545320764000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/server.cpp=c1542120059000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/ProjDestijl.cbp=c1542120848000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/TPRT.Doxyfile=c1544778298000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Makefile-impl.mk=c1546855871000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Package-Debug.bash=c1544780526000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Makefile-variables.mk=c1546855871000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/project.properties=c1544778298000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/.gitignore=c1542120848000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Makefile-Release.mk=c1546856794000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/private/Makefile-variables.mk=c1542029322000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/image.cpp=c1544778298000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/Makefile=c1542100687000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/message.cpp=c1544778298000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/.dep.inc=c1546875478000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/image.h=c1544797217000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/.gitignore=c1541685829000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/definitions.h=c1544778298000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/gdbsudo.sh=c1541685829000
VERSION=1.3
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/server.h=c1542119920000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-impl.mk=c1542029322000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/definitions.h=c1542116893000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/tasks.h=c1545386748000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/image.cpp=c1542104053000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/.gitignore=c1542120848000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.h=c1546940198000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/src/videoExample.cpp=c1542120848000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/functions.h=c1542117699000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Makefile-Debug.mk=c1546856794000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/README.md=c1518398687000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/.dep.inc=c1542102478000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/gdbsudo.sh=c1542120848000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Package-Debug__RPI_.bash=c1544780526000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Package-Debug__RPI_.bash=c1542029322000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp=c1546866048000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/main.cpp=c1542105162000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp=c1545406561000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/robot.h=c1544778298000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Package-Debug__Pthread__RPI.bash=c1546855871000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-Debug.mk=c1542104029000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp=c1518398687000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/.gitignore=c1542120848000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/monitor.cpp=c1542116921000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/project.xml=c1542104029000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/private/Makefile-variables.mk=c1546855871000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/src/serialTest.cpp=c1542120848000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/functions.cpp=c1542105130000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/CMakeLists.txt=c1542120848000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.h=c1518398687000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-impl.mk=c1542029322000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/robot.cpp=c1544778298000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp=c1546940179000
VERSION=1.3
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/CMakeLists.txt=c1541685829000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Makefile-Debug__Pthread__RPI.mk=c1546862281000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-variables.mk=c1542029322000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/robot.cpp=c1542105020000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/src/serverTest.cpp=c1542120848000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Package-Debug__Pthread_.bash=c1545062469000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/server.h=c1544778298000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/.gitignore=c1518398687000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/messages.cpp=c1546526752000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Makefile-Debug__Pthread_.mk=c1546856794000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/src/rtvideoExample.cpp=c1542120848000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/src/serialExample.cpp=c1542120848000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/message.cpp=c1542105181000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/compile_commands.json=c1542120848000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/message.h=c1544778298000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Makefile-Debug__RPI_.mk=c1546856794000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/monitor.cpp=c1544778298000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/project.properties=c1542103467000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Package-Release.bash=c1541685829000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/tasks_pthread.cpp=c1546961625000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/tasks_pthread.h=c1546961074000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/main.cpp=c1546512226000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp=c1546959546000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/project.xml=c1546856299000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/CMakeLists.txt=c1542120848000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Package-Debug.bash=c1541685829000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.h=c1546959623000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/Makefile=c1542100687000
/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/CMakeLists.txt=c1542120848000

View file

@ -10,7 +10,7 @@
<sourceEncoding>UTF-8</sourceEncoding>
<make-dep-projects/>
<sourceRootList>
<sourceRootElem>/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib</sourceRootElem>
<sourceRootElem>lib</sourceRootElem>
</sourceRootList>
<confList>
<confElem>
@ -29,6 +29,10 @@
<name>Debug__Pthread_</name>
<type>1</type>
</confElem>
<confElem>
<name>Debug__Pthread__RPI</name>
<type>1</type>
</confElem>
</confList>
<formatting>
<project-formatting-style>false</project-formatting-style>

View file

@ -52,7 +52,7 @@ void Tasks::Init() {
/* Open com port with STM32 */
cout << "Open serial com (";
status = robot.Open("/dev/ttyUSB0");
status = robot.Open();
cout << status;
cout << ")" << endl;
@ -60,7 +60,7 @@ void Tasks::Init() {
// Open server
status = monitor.Open(SERVER_PORT);
cout << "Open server on port " << SERVER_PORT << " (" << status << ")" << endl;
cout << "Open server on port " << (SERVER_PORT) << " (" << status << ")" << endl;
if (status < 0) throw std::runtime_error {
"Unable to start server on port " + std::to_string(SERVER_PORT)
@ -72,40 +72,60 @@ void Tasks::Init() {
}
void Tasks::Run() {
threadTimer = new thread((void (*)(void*)) & Tasks::TimerTask, this);
threadServer = new thread((void (*)(void*)) & Tasks::ServerTask, this);
threadTimer=new thread((void (*)(void*)) &Tasks::TimerTask,this);
threadServer=new thread((void (*)(void*)) &Tasks::ServerTask,this);
// threadSendToMon=new thread((void (*)(void*)) &Tasks::SendToMonTask,this);
//
// Camera camera=Camera(sm);
// cout << "Try opening camera"<<endl<<flush;
// if (camera.Open()) cout<<"Camera opened successfully"<<endl<<flush;
// else cout<<"Failed to open camera"<<endl<<flush;
//
// counter = 0;
// while (1) {
// Img image=camera.Grab();
//
// counter++;
//
// if (flag == true) {
// cout<< "Image info: "<<image.ToString()<<endl<<flush;
// cout << "FPS = "<<to_string(counter)<<endl<<flush;
// flag=false;
// counter=0;
// }
// }
// msgSend = ComRobot::Ping();
// cout << "Send => " << msgSend->ToString() << endl << flush;
// msgRcv = robot.SendCommand(msgSend, MESSAGE_ANSWER_ACK, 3);
// cout << "Rcv <= " << msgRcv->ToString() << endl << flush;
//
// delete(msgRcv);
//
// msgSend = ComRobot::StartWithoutWD();
// cout << "Send => " << msgSend->ToString() << endl << flush;
// msgRcv = robot.SendCommand(msgSend, MESSAGE_ANSWER_ACK, 3);
// cout << "Rcv <= " << msgRcv->ToString() << endl << flush;
//
// delete(msgRcv);
//
// msgSend = ComRobot::Move(1000);
// cout << "Send => " << msgSend->ToString() << endl << flush;
// msgRcv = robot.SendCommand(msgSend, MESSAGE_ANSWER_ACK, 3);
// cout << "Rcv <= " << msgRcv->ToString() << endl << flush;
//
// delete(msgRcv);
//
// msgSend = ComRobot::GetBattery();
// cout << "Send => " << msgSend->ToString() << endl << flush;
// msgRcv = robot.SendCommand(msgSend, MESSAGE_ROBOT_BATTERY_LEVEL, 3);
// cout << "Rcv <= " << msgRcv->ToString() << endl << flush;
//
// delete(msgRcv);
cout<<"Tasks launched"<<endl<<flush;
// msgSend = ComRobot::Ping();
// cout << "Send => " << msgSend->ToString() << endl << flush;
// msgRcv = robot.SendCommand(msgSend, MESSAGE_ANSWER_ACK, 3);
// cout << "Rcv <= " << msgRcv->ToString() << endl << flush;
//
// delete(msgRcv);
//
// msgSend = ComRobot::StartWithoutWD();
// cout << "Send => " << msgSend->ToString() << endl << flush;
// msgRcv = robot.SendCommand(msgSend, MESSAGE_ANSWER_ACK, 3);
// cout << "Rcv <= " << msgRcv->ToString() << endl << flush;
//
// delete(msgRcv);
//
// msgSend = ComRobot::Move(1000);
// cout << "Send => " << msgSend->ToString() << endl << flush;
// msgRcv = robot.SendCommand(msgSend, MESSAGE_ANSWER_ACK, 3);
// cout << "Rcv <= " << msgRcv->ToString() << endl << flush;
//
// delete(msgRcv);
//
// msgSend = ComRobot::GetBattery();
// cout << "Send => " << msgSend->ToString() << endl << flush;
// msgRcv = robot.SendCommand(msgSend, MESSAGE_ROBOT_BATTERY_LEVEL, 3);
// cout << "Rcv <= " << msgRcv->ToString() << endl << flush;
//
// delete(msgRcv);
cout << "Tasks launched" << endl << flush;
}
void Tasks::Stop() {
@ -116,13 +136,13 @@ void Tasks::Stop() {
void Tasks::ServerTask(void *arg) {
Message *msgRcv;
Message *msgSend;
bool isActive=true;
bool isActive = true;
cout << "Start " << __PRETTY_FUNCTION__ <<endl<<flush;
cout << "Start " << __PRETTY_FUNCTION__ << endl << flush;
while (isActive) {
msgRcv=NULL;
msgSend=NULL;
msgRcv = NULL;
msgSend = NULL;
msgRcv = monitor.Read();
cout << "Rcv <= " << msgRcv->ToString() << endl << flush;
@ -136,26 +156,30 @@ void Tasks::ServerTask(void *arg) {
if (msgRcv->CompareID(MESSAGE_ROBOT_COM_CLOSE)) isActive = false;
if (msgRcv->CompareID(MESSAGE_CAM_OPEN)) {
sendImage=true;
sendImage = true;
msgSend = new Message(MESSAGE_ANSWER_ACK);
}
if (msgRcv->CompareID(MESSAGE_CAM_CLOSE)) {
sendImage=false;
sendImage = false;
msgSend = new Message(MESSAGE_ANSWER_ACK);
}
if (msgRcv->CompareID(MESSAGE_CAM_POSITION_COMPUTE_START)) {
sendPosition=true;
sendPosition = true;
msgSend = new Message(MESSAGE_ANSWER_ACK);
}
if (msgRcv->CompareID(MESSAGE_CAM_POSITION_COMPUTE_STOP)) {
sendPosition=false;
sendPosition = false;
msgSend = new Message(MESSAGE_ANSWER_ACK);
}
if (msgRcv->CompareID(MESSAGE_ROBOT_BATTERY_GET)) msgSend = new MessageBattery(MESSAGE_ROBOT_BATTERY_LEVEL,BATTERY_FULL);
if (msgRcv->CompareID(MESSAGE_ROBOT_BATTERY_GET)) msgSend = new MessageBattery(MESSAGE_ROBOT_BATTERY_LEVEL, BATTERY_FULL);
if (msgRcv->CompareID(MESSAGE_CAM_ASK_ARENA)) showArena = true;
if (msgRcv->CompareID(MESSAGE_CAM_ARENA_CONFIRM)) showArena = false;
if (msgRcv->CompareID(MESSAGE_CAM_ARENA_INFIRM)) showArena = false;
if (msgSend != NULL) monitor.Write(msgSend);
delete(msgRcv);
@ -166,58 +190,104 @@ void Tasks::TimerTask(void* arg) {
struct timespec tim, tim2;
Message *msgSend;
int counter;
int cntFrame = 0;
Position pos;
Arena arena;
tim.tv_sec = 0;
tim.tv_nsec = 50000000; // 50ms (20fps)
cout << "Start " << __PRETTY_FUNCTION__ <<endl<<flush;
cout << "Start " << __PRETTY_FUNCTION__ << endl << flush;
Camera camera=Camera(sm);
cout << "Try opening camera"<<endl<<flush;
if (camera.Open()) cout<<"Camera opened successfully"<<endl<<flush;
else cout<<"Failed to open camera"<<endl<<flush;
Camera camera = Camera(sm, 10);
cout << "Try opening camera" << endl << flush;
if (camera.Open()) cout << "Camera opened successfully" << endl << flush;
else {
cout << "Failed to open camera" << endl << flush;
exit(0);
}
pos.angle = 0.0;
pos.robotId = -1;
pos.center = cv::Point2f(0, 0);
pos.direction = cv::Point2f(0, 0);
while (1) {
//std::this_thread::sleep_for(std::chrono::seconds )
//sleep(1);
if (nanosleep(&tim, &tim2) < 0) {
printf("Nano sleep system call failed \n");
return;
}
// if (nanosleep(&tim, &tim2) < 0) {
// printf("Nano sleep system call failed \n");
// return;
// }
// counter++;
// if (counter>=10) {
// flag=true;
// counter=0;
// }
//mutexTimer.unlock();
if (sendImage==true) {
Img image = camera.Grab(); // 15fps
if (sendPosition == true) {
counter++;
if (counter>=1) {
counter=0;
Img image=camera.Grab();
if (counter >= 1) { // div =15
counter = 0;
cout << image.ToString()<<endl<<flush;
MessageImg *msg=new MessageImg(MESSAGE_CAM_IMAGE, &image);
//if (!arena.IsEmpty()) {
image.dictionary = cv::aruco::getPredefinedDictionary(cv::aruco::PREDEFINED_DICTIONARY_NAME(3));
list<Position> poses = image.SearchAruco(arena);
monitor.Write(msg);
cout << "Image sent"<<endl<<flush;
//std::list<Position> poses = image.SearchRobot(arena);
cout << "Nbr of pos detected: " << to_string(poses.size()) << endl << flush;
if (poses.size() > 0) {
Position firstPos = poses.front();
pos.angle = firstPos.angle;
pos.robotId = firstPos.robotId;
pos.center = firstPos.center;
pos.direction = firstPos.direction;
} else {
// Nothing found
pos.angle = 0.0;
pos.robotId = -1;
pos.center = cv::Point2f(0,0);
pos.direction = cv::Point2f(0,0);
}
MessagePosition *msgp = new MessagePosition(MESSAGE_CAM_POSITION, pos);
monitor.Write(msgp);
cout << "Position sent" << endl << flush;
}
}
if (sendPosition==true) {
Position pos;
pos.angle=0.0;
pos.robotId=1;
pos.center=cv::Point2f(0.5,0.5);
pos.direction=cv::Point2f(1.0,2.5);
if (sendImage == true) {
if (showArena) {
arena = image.SearchArena();
MessagePosition *msgp=new MessagePosition(MESSAGE_CAM_POSITION, pos);
monitor.Write(msgp);
cout << "Position sent"<<endl<<flush;
if (!arena.IsEmpty()) image.DrawArena(arena);
else cout << "Arena not found" << endl << flush;
}
if (sendPosition == true) {
image.DrawRobot(pos);
}
if (!arena.IsEmpty()) image.DrawArena(arena);
MessageImg *msg = new MessageImg(MESSAGE_CAM_IMAGE, &image);
monitor.Write(msg);
cntFrame++;
cout << "cnt: " << to_string(cntFrame) << endl << flush;
}
}
}
void Tasks::SendToMonTask(void* arg) {
cout << "Start " << __PRETTY_FUNCTION__ <<endl<<flush;
cout << "Start " << __PRETTY_FUNCTION__ << endl << flush;
while (1) {

View file

@ -93,6 +93,11 @@ private:
bool sendImage=false;
bool sendPosition=false;
int counter;
bool flag;
bool showArena=false;
thread *threadServer;
thread *threadSendToMon;
thread *threadTimer;