Browse Source

Reorganisation de qq fichier

Demande #42: Migrer le code sous xenomai
Sébastien DI MERCURIO 2 years ago
parent
commit
a97e849155
100 changed files with 157 additions and 376 deletions
  1. 4
    10
      README.md
  2. 0
    0
      hardware/meca/0605-LED_Verde.STEP
  3. 0
    0
      hardware/meca/Batterie.ipt
  4. 0
    0
      hardware/meca/Bloc roue.iam
  5. 0
    0
      hardware/meca/Chargeur/1593K PCB.dwg
  6. 0
    0
      hardware/meca/Chargeur/1593K PCB.igs
  7. 0
    0
      hardware/meca/Chargeur/1593K PCB.ipt
  8. 0
    0
      hardware/meca/Chargeur/1593K PCB.stl
  9. 0
    0
      hardware/meca/Chargeur/1593K PCB.stp
  10. 0
    0
      hardware/meca/Chargeur/Chargeur.iam
  11. 0
    0
      hardware/meca/Chargeur/Chargeur_Dumber.ipj
  12. 0
    0
      hardware/meca/Chargeur/Hammond/1593K.igs
  13. 0
    0
      hardware/meca/Chargeur/Hammond/1593K.stp
  14. 0
    0
      hardware/meca/Dumber 2015-2.ipj
  15. 0
    0
      hardware/meca/Dumber 2015.ipj
  16. 0
    0
      hardware/meca/Export/capot.stl
  17. 0
    0
      hardware/meca/Export/capot.stp
  18. 0
    0
      hardware/meca/Export/pied.stl
  19. 0
    0
      hardware/meca/Export/pied.stp
  20. 0
    0
      hardware/meca/Platine encodeur.ipt
  21. 0
    0
      hardware/meca/Pneu.ipt
  22. 0
    0
      hardware/meca/Push Button Switch.STEP
  23. 0
    0
      hardware/meca/Robot.iam
  24. 0
    0
      hardware/meca/Robot.pdf
  25. 0
    0
      hardware/meca/Roue.ipt
  26. 0
    0
      hardware/meca/USB_Mini_B_SMD_buchse.STEP
  27. 0
    0
      hardware/meca/XBee Chip.STEP
  28. 0
    0
      hardware/meca/axe.ipt
  29. 0
    0
      hardware/meca/capot.ipt
  30. 0
    0
      hardware/meca/connecteur 10.ipt
  31. 0
    0
      hardware/meca/connecteur 6.ipt
  32. 0
    0
      hardware/meca/fixation moteur.ipt
  33. 0
    0
      hardware/meca/headers/2.54_base.SLDPRT
  34. 0
    0
      hardware/meca/headers/2.54_straight-header.SLDASM
  35. 0
    0
      hardware/meca/headers/2.54_straight-pin.SLDPRT
  36. 0
    0
      hardware/meca/headers/original.stl
  37. 0
    0
      hardware/meca/helice encodeur.ipt
  38. 0
    0
      hardware/meca/mini usbl.ipt
  39. 0
    0
      hardware/meca/moteur.iam
  40. 0
    0
      hardware/meca/moteur.ipt
  41. 0
    0
      hardware/meca/original.stl
  42. 0
    0
      hardware/meca/pcb.ipt
  43. 0
    0
      hardware/meca/pied.ipt
  44. 0
    0
      hardware/meca/plaque moteur.ipt
  45. 0
    0
      hardware/meca/queue.ipt
  46. 0
    0
      hardware/meca/reducteur.ipt
  47. 0
    0
      hardware/meca/roue.iam
  48. 0
    0
      hardware/meca/tactileswitch-short.STEP
  49. 0
    0
      hardware/meca/xbee.ipt
  50. 0
    0
      hardware/pcb/.gitignore
  51. 0
    0
      hardware/pcb/Chargeur/Chargeur.OutJob
  52. 0
    0
      hardware/pcb/Chargeur/Chargeur.PDF
  53. 0
    0
      hardware/pcb/Chargeur/Chargeur.PcbDoc
  54. 0
    0
      hardware/pcb/Chargeur/Chargeur.PrjPcb
  55. 0
    0
      hardware/pcb/Chargeur/Chargeur.PrjPcbStructure
  56. 0
    0
      hardware/pcb/Chargeur/Chargeur.SchDoc
  57. 0
    0
      hardware/pcb/Chargeur/Chargeur_nucleo.PcbDoc
  58. 0
    0
      hardware/pcb/Dumber-Cap/Cap.PcbDoc
  59. 0
    0
      hardware/pcb/Dumber-Cap/Cap.SchDoc
  60. 0
    0
      hardware/pcb/Dumber-Cap/Dumber_Cap.PrjPcb
  61. 0
    0
      hardware/pcb/Dumber-Cap/Dumber_Cap.PrjPcbStructure
  62. 0
    0
      hardware/pcb/Dumber/Dumber.CmpLib
  63. 0
    0
      hardware/pcb/Dumber/Dumber.OutJob
  64. 0
    0
      hardware/pcb/Dumber/Dumber.PCB3DLib
  65. 0
    0
      hardware/pcb/Dumber/Dumber.PDF
  66. 0
    0
      hardware/pcb/Dumber/Dumber.PcbDoc
  67. 0
    0
      hardware/pcb/Dumber/Dumber.PcbLib
  68. 0
    0
      hardware/pcb/Dumber/Dumber.PrjPCB
  69. 0
    0
      hardware/pcb/Dumber/Dumber.PrjPCBStructure
  70. 0
    0
      hardware/pcb/Dumber/Dumber.RUL
  71. 0
    0
      hardware/pcb/Dumber/Dumber.SchDoc
  72. 0
    0
      hardware/pcb/Dumber/Dumber.SchLib
  73. 0
    0
      hardware/pcb/Dumber/Mecanique.SchDoc
  74. 0
    0
      hardware/pcb/Dumber/Power.SchDoc
  75. 0
    0
      hardware/pcb/Dumber/cpu.SchDoc
  76. 0
    0
      hardware/pcb/Models/Batterie.stp
  77. 0
    0
      hardware/pcb/Models/Bloc roue.stp
  78. 0
    0
      hardware/pcb/Models/pcb.stl
  79. 0
    0
      hardware/pcb/Models/pcb.stp
  80. 0
    0
      hardware/pcb/README.md
  81. 0
    0
      hardware/pcb/Shield-Pi-Xbee/Shield_Pi_Xbee.PcbDoc
  82. 0
    0
      hardware/pcb/Shield-Pi-Xbee/Shield_Pi_Xbee.PrjPcb
  83. 0
    0
      hardware/pcb/Shield-Pi-Xbee/Shield_Pi_Xbee.PrjPcbStructure
  84. 0
    0
      hardware/pcb/Shield-Pi-Xbee/Shield_Pi_Xbee.SchDoc
  85. 5
    5
      software/README.md
  86. 8
    1
      software/monitor/monitor/Client.cs
  87. 0
    1
      software/monitor/monitor/gtk-gui/gui.stetic
  88. BIN
      software/monitor/monitor/monitor
  89. BIN
      software/raspberry/conception_robot_2018.pdf
  90. BIN
      software/raspberry/sujet_robot_2018.pdf
  91. 5
    1
      software/raspberry/superviseur-robot/.gitignore
  92. BIN
      software/raspberry/superviseur-robot/dist/Debug/GNU-Linux/superviseur-robot
  93. 3
    0
      software/raspberry/superviseur-robot/lib/camera.cpp
  94. 77
    74
      software/raspberry/superviseur-robot/lib/comrobot.cpp
  95. 4
    0
      software/raspberry/superviseur-robot/lib/img.cpp
  96. 39
    10
      software/raspberry/superviseur-robot/lib/img.h
  97. 12
    18
      software/raspberry/superviseur-robot/nbproject/Makefile-Debug__PC_.mk
  98. 0
    125
      software/raspberry/superviseur-robot/nbproject/Makefile-Debug__Pthread_.mk
  99. 0
    131
      software/raspberry/superviseur-robot/nbproject/Makefile-Debug__Pthread__RPI.mk
  100. 0
    0
      software/raspberry/superviseur-robot/nbproject/Makefile-Debug__RPI_.mk

+ 4
- 10
README.md View File

@@ -1,15 +1,9 @@
1 1
 # Dumber
2 2
 
3
-## 2017-2018 :
4
-Problème : 
5
-- Watchdog du robot ne fonctionne pas
6
-- Interface graphique qui a des etats mal gérée (je voulais le reprendre en utilisant les 'stores' de vuex pour éviter ça).
7
-- Il faudrait une execution de l'interface (srv nodejs) par défaut au démarage de la RPI.
8
- 	L'exectution devrait se faire dans l'user space de linux dans le cas d'utilisation d'un noyau xenomai (co-kernel).
9
-	=> Potentiellement passer d'un noyau preempt_rt (actuel) à un noyau xenomai
3
+Depot du projet de temps reel 4eme année au departement GEI de l'INSA Toulouse.
10 4
 
11 5
 ## Repertoires
12
-- hardware : contient les plans pour la partie mecanique du robot et de son chargeur
6
+- hardware : contient les plans pour la partie mecanique du robot et de son chargeur, ainsi que les plans de conception des PCB du robot, du chargeur, de l'adaptateur Xbee pour la raspberry  et les plans des CAP du robot
13 7
 - software: rassemble les parties logicielles du robot, du chargeur, les bibliotheques et superviseur coté raspberry et l'interface Web
14
-- pcb: contient les plans de conception des PCB du robot, du chargeur, de l'adaptateur Xbee pour la raspberry  et les plans des CAP du robot
15
-- incubateur: projet en incubation. Actuellement, contient des essais sur les aruco (pour la detection des robots) ou le portage du firmware du robot sous freertos.
8
+- doc: contient les sujets de TD et TP
9
+- aruco_markers: Script de generation des tags (aruco) utilisés sur les robots

hardware/0605-LED_Verde.STEP → hardware/meca/0605-LED_Verde.STEP View File


hardware/Batterie.ipt → hardware/meca/Batterie.ipt View File


hardware/Bloc roue.iam → hardware/meca/Bloc roue.iam View File


hardware/Chargeur/1593K PCB.dwg → hardware/meca/Chargeur/1593K PCB.dwg View File


hardware/Chargeur/1593K PCB.igs → hardware/meca/Chargeur/1593K PCB.igs View File


hardware/Chargeur/1593K PCB.ipt → hardware/meca/Chargeur/1593K PCB.ipt View File


hardware/Chargeur/1593K PCB.stl → hardware/meca/Chargeur/1593K PCB.stl View File


hardware/Chargeur/1593K PCB.stp → hardware/meca/Chargeur/1593K PCB.stp View File


hardware/Chargeur/Chargeur.iam → hardware/meca/Chargeur/Chargeur.iam View File


hardware/Chargeur/Chargeur_Dumber.ipj → hardware/meca/Chargeur/Chargeur_Dumber.ipj View File


hardware/Chargeur/Hammond/1593K.igs → hardware/meca/Chargeur/Hammond/1593K.igs View File


hardware/Chargeur/Hammond/1593K.stp → hardware/meca/Chargeur/Hammond/1593K.stp View File


hardware/Dumber 2015-2.ipj → hardware/meca/Dumber 2015-2.ipj View File


hardware/Dumber 2015.ipj → hardware/meca/Dumber 2015.ipj View File


hardware/Export/capot.stl → hardware/meca/Export/capot.stl View File


hardware/Export/capot.stp → hardware/meca/Export/capot.stp View File


hardware/Export/pied.stl → hardware/meca/Export/pied.stl View File


hardware/Export/pied.stp → hardware/meca/Export/pied.stp View File


hardware/Platine encodeur.ipt → hardware/meca/Platine encodeur.ipt View File


hardware/Pneu.ipt → hardware/meca/Pneu.ipt View File


hardware/Push Button Switch.STEP → hardware/meca/Push Button Switch.STEP View File


hardware/Robot.iam → hardware/meca/Robot.iam View File


hardware/Robot.pdf → hardware/meca/Robot.pdf View File


hardware/Roue.ipt → hardware/meca/Roue.ipt View File


hardware/USB_Mini_B_SMD_buchse.STEP → hardware/meca/USB_Mini_B_SMD_buchse.STEP View File


hardware/XBee Chip.STEP → hardware/meca/XBee Chip.STEP View File


hardware/axe.ipt → hardware/meca/axe.ipt View File


hardware/capot.ipt → hardware/meca/capot.ipt View File


hardware/connecteur 10.ipt → hardware/meca/connecteur 10.ipt View File


hardware/connecteur 6.ipt → hardware/meca/connecteur 6.ipt View File


hardware/fixation moteur.ipt → hardware/meca/fixation moteur.ipt View File


hardware/headers/2.54_base.SLDPRT → hardware/meca/headers/2.54_base.SLDPRT View File


hardware/headers/2.54_straight-header.SLDASM → hardware/meca/headers/2.54_straight-header.SLDASM View File


hardware/headers/2.54_straight-pin.SLDPRT → hardware/meca/headers/2.54_straight-pin.SLDPRT View File


hardware/original.stl → hardware/meca/headers/original.stl View File


hardware/helice encodeur.ipt → hardware/meca/helice encodeur.ipt View File


hardware/mini usbl.ipt → hardware/meca/mini usbl.ipt View File


hardware/moteur.iam → hardware/meca/moteur.iam View File


hardware/moteur.ipt → hardware/meca/moteur.ipt View File


hardware/headers/original.stl → hardware/meca/original.stl View File


hardware/pcb.ipt → hardware/meca/pcb.ipt View File


hardware/pied.ipt → hardware/meca/pied.ipt View File


hardware/plaque moteur.ipt → hardware/meca/plaque moteur.ipt View File


hardware/queue.ipt → hardware/meca/queue.ipt View File


hardware/reducteur.ipt → hardware/meca/reducteur.ipt View File


hardware/roue.iam → hardware/meca/roue.iam View File


hardware/tactileswitch-short.STEP → hardware/meca/tactileswitch-short.STEP View File


hardware/xbee.ipt → hardware/meca/xbee.ipt View File


pcb/.gitignore → hardware/pcb/.gitignore View File


pcb/Chargeur/Chargeur.OutJob → hardware/pcb/Chargeur/Chargeur.OutJob View File


pcb/Chargeur/Chargeur.PDF → hardware/pcb/Chargeur/Chargeur.PDF View File


pcb/Chargeur/Chargeur.PcbDoc → hardware/pcb/Chargeur/Chargeur.PcbDoc View File


pcb/Chargeur/Chargeur.PrjPcb → hardware/pcb/Chargeur/Chargeur.PrjPcb View File


pcb/Chargeur/Chargeur.PrjPcbStructure → hardware/pcb/Chargeur/Chargeur.PrjPcbStructure View File


pcb/Chargeur/Chargeur.SchDoc → hardware/pcb/Chargeur/Chargeur.SchDoc View File


pcb/Chargeur/Chargeur_nucleo.PcbDoc → hardware/pcb/Chargeur/Chargeur_nucleo.PcbDoc View File


pcb/Dumber-Cap/Cap.PcbDoc → hardware/pcb/Dumber-Cap/Cap.PcbDoc View File


pcb/Dumber-Cap/Cap.SchDoc → hardware/pcb/Dumber-Cap/Cap.SchDoc View File


pcb/Dumber-Cap/Dumber_Cap.PrjPcb → hardware/pcb/Dumber-Cap/Dumber_Cap.PrjPcb View File


pcb/Dumber-Cap/Dumber_Cap.PrjPcbStructure → hardware/pcb/Dumber-Cap/Dumber_Cap.PrjPcbStructure View File


pcb/Dumber/Dumber.CmpLib → hardware/pcb/Dumber/Dumber.CmpLib View File


pcb/Dumber/Dumber.OutJob → hardware/pcb/Dumber/Dumber.OutJob View File


pcb/Dumber/Dumber.PCB3DLib → hardware/pcb/Dumber/Dumber.PCB3DLib View File


pcb/Dumber/Dumber.PDF → hardware/pcb/Dumber/Dumber.PDF View File


pcb/Dumber/Dumber.PcbDoc → hardware/pcb/Dumber/Dumber.PcbDoc View File


pcb/Dumber/Dumber.PcbLib → hardware/pcb/Dumber/Dumber.PcbLib View File


pcb/Dumber/Dumber.PrjPCB → hardware/pcb/Dumber/Dumber.PrjPCB View File


pcb/Dumber/Dumber.PrjPCBStructure → hardware/pcb/Dumber/Dumber.PrjPCBStructure View File


pcb/Dumber/Dumber.RUL → hardware/pcb/Dumber/Dumber.RUL View File


pcb/Dumber/Dumber.SchDoc → hardware/pcb/Dumber/Dumber.SchDoc View File


pcb/Dumber/Dumber.SchLib → hardware/pcb/Dumber/Dumber.SchLib View File


pcb/Dumber/Mecanique.SchDoc → hardware/pcb/Dumber/Mecanique.SchDoc View File


pcb/Dumber/Power.SchDoc → hardware/pcb/Dumber/Power.SchDoc View File


pcb/Dumber/cpu.SchDoc → hardware/pcb/Dumber/cpu.SchDoc View File


pcb/Models/Batterie.stp → hardware/pcb/Models/Batterie.stp View File


pcb/Models/Bloc roue.stp → hardware/pcb/Models/Bloc roue.stp View File


pcb/Models/pcb.stl → hardware/pcb/Models/pcb.stl View File


pcb/Models/pcb.stp → hardware/pcb/Models/pcb.stp View File


pcb/README.md → hardware/pcb/README.md View File


pcb/Shield-Pi-Xbee/Shield_Pi_Xbee.PcbDoc → hardware/pcb/Shield-Pi-Xbee/Shield_Pi_Xbee.PcbDoc View File


pcb/Shield-Pi-Xbee/Shield_Pi_Xbee.PrjPcb → hardware/pcb/Shield-Pi-Xbee/Shield_Pi_Xbee.PrjPcb View File


pcb/Shield-Pi-Xbee/Shield_Pi_Xbee.PrjPcbStructure → hardware/pcb/Shield-Pi-Xbee/Shield_Pi_Xbee.PrjPcbStructure View File


pcb/Shield-Pi-Xbee/Shield_Pi_Xbee.SchDoc → hardware/pcb/Shield-Pi-Xbee/Shield_Pi_Xbee.SchDoc View File


+ 5
- 5
software/README.md View File

@@ -1,8 +1,8 @@
1 1
 # Software
2 2
 
3
-Dans ce repertoire se trouvent les logiciels pour les differentes parties du projet dumber
4
-- robot: Contient le code source du firmware executé par le robot (STM32 / Keil)
5
-- chargeur: Contient le code executé dans le boitier du chargeur de batterie du robot (STM32 / Keil)
3
+Dans ce repertoire se trouvent les logiciels pour les differentes parties du projet de TP Temps reel (dumber)
4
+- robot: Contient le code source du firmware executé par le robot (STM32 / TrueStudio)
5
+- chargeur: Contient le code executé dans le boitier du chargeur de batterie du robot (STM32 / TrueStudio)
6 6
 - raspberry: Contient le code du superviseur temps reel s'executant sur la raspberry et en charge du controle de la camera, et du pilotage du robot (via la liaison serie)
7
-- UserinterfaceWeb: interface Web pour la surveillance du systeme: connexion au superviseur RT, control et affichage de l'etat du robot, retour d'image.
8
-- android: Application android pour le pilotage du robot via un module bluetooth à la place du module XBEE de base sur le robot.
7
+- monitor: client C# pour la communication avec le superviseur
8
+- install-opencv.sh: Script pour installer et deployer opencv avec support des aruco et bibliotheque raspicam

+ 8
- 1
software/monitor/monitor/Client.cs View File

@@ -258,7 +258,14 @@ namespace monitor
258 258
             {
259 259
                 byte[] writeBuffer = Encoding.UTF8.GetBytes(mes);
260 260
 
261
-                stream.Write(writeBuffer, 0, mes.Length);
261
+                try
262
+                {
263
+                    stream.Write(writeBuffer, 0, mes.Length);
264
+                }
265
+                catch (System.IO.IOException) {
266
+                    Console.WriteLine("Server closed");
267
+                    client.Close();
268
+                }
262 269
             }
263 270
         }
264 271
     }

+ 0
- 1
software/monitor/monitor/gtk-gui/gui.stetic View File

@@ -812,7 +812,6 @@
812 812
                                         <property name="MemberName" />
813 813
                                         <property name="CanFocus">True</property>
814 814
                                         <property name="Label" translatable="yes">Get battery level</property>
815
-                                        <property name="Active">True</property>
816 815
                                         <property name="DrawIndicator">True</property>
817 816
                                         <property name="HasLabel">True</property>
818 817
                                         <property name="UseUnderline">True</property>

BIN
software/monitor/monitor/monitor View File


BIN
software/raspberry/conception_robot_2018.pdf View File


BIN
software/raspberry/sujet_robot_2018.pdf View File


+ 5
- 1
software/raspberry/superviseur-robot/.gitignore View File

@@ -2,7 +2,6 @@ build/
2 2
 src.sav/
3 3
 cmake-build-debug/
4 4
 futur/
5
-build/
6 5
 CMakeFiles/
7 6
 
8 7
 Makefile
@@ -12,3 +11,8 @@ CMakeCache.txt
12 11
 docs/
13 12
 doc/
14 13
 
14
+workspace/
15
+dist/
16
+not_for_students/
17
+
18
+

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


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

@@ -114,7 +114,10 @@ Img Camera::Grab() {
114 114
 #else
115 115
     cap.grab();
116 116
     cap.retrieve(frame);
117
+
118
+#ifdef __INVERSE_COLOR__
117 119
     cvtColor(frame, frame, CV_BGR2RGB);
120
+#endif // __INVERSE_COLOR__
118 121
 
119 122
     Img capture = Img(frame);
120 123
 #endif /* __FOR_PC__ */

+ 77
- 74
software/raspberry/superviseur-robot/lib/comrobot.cpp View File

@@ -70,22 +70,20 @@ int ComRobot::Open() {
70 70
  */
71 71
 int ComRobot::Open(string usart) {
72 72
     struct termios options;
73
-    
73
+
74 74
     fd = open(usart.c_str(), O_RDWR | O_NOCTTY /*| O_NDELAY*/); //Open in blocking read/write mode
75 75
     if (fd == -1) {
76
-        cerr<<"["<<__PRETTY_FUNCTION__<<"] Unable to open UART ("<<usart<<"). Ensure it is not in use by another application"<<endl<<flush;
76
+        cerr << "[" << __PRETTY_FUNCTION__ << "] Unable to open UART (" << usart << "). Ensure it is not in use by another application" << endl << flush;
77 77
         throw std::runtime_error{"Unable to open UART"};
78 78
         exit(EXIT_FAILURE);
79
-    }
80
-    else
81
-    {
79
+    } else {
82 80
         fcntl(fd, F_SETFL, 0);
83 81
         tcgetattr(fd, &options);
84 82
         options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
85
-        cfsetospeed (&options, B9600);
86
-        cfsetispeed (&options, B9600);
87
-        options.c_cc[VMIN]=0;
88
-        options.c_cc[VTIME]=1; /* Timeout of 100 ms per character*/
83
+        cfsetospeed(&options, B9600);
84
+        cfsetispeed(&options, B9600);
85
+        options.c_cc[VMIN] = 0;
86
+        options.c_cc[VTIME] = 1; /* Timeout of 100 ms per character */
89 87
         tcsetattr(fd, TCSANOW, &options);
90 88
     }
91 89
 
@@ -99,6 +97,7 @@ int ComRobot::Open(string usart) {
99 97
 int ComRobot::Close() {
100 98
     return close(fd);
101 99
 }
100
+
102 101
 /**
103 102
  * Send a message to robot
104 103
  * @param msg Message to send to robot
@@ -115,7 +114,7 @@ Message *ComRobot::Write(Message* msg) {
115 114
 
116 115
         Write_Pre();
117 116
 
118
-        s=MessageToString(msg);
117
+        s = MessageToString(msg);
119 118
         AddChecksum(s);
120 119
 
121 120
         //cout << "[" <<__PRETTY_FUNCTION__<<"] Send command: "<<s<<endl<<flush;
@@ -128,8 +127,8 @@ Message *ComRobot::Write(Message* msg) {
128 127
 
129 128
             try {
130 129
                 s = Read();
131
-                cout << "Answer = "<<s<<endl<<flush;
132
-                
130
+                //cout << "Answer = "<<s<<endl<<flush;
131
+
133 132
                 if (VerifyChecksum(s)) {
134 133
                     msgAnswer = StringToMessage(s);
135 134
                 } else msgAnswer = new Message(MESSAGE_ANSWER_ROBOT_UNKNOWN_COMMAND);
@@ -169,14 +168,14 @@ string ComRobot::Read() {
169 168
 
170 169
     do {
171 170
         rxLength = read(this->fd, (void*) &receivedChar, 1); //Filestream, buffer to store in, number of bytes to read (max)
172
-        if (rxLength ==0) { // timeout
171
+        if (rxLength == 0) { // timeout
173 172
             // try again
174 173
             rxLength = read(this->fd, (void*) &receivedChar, 1); //Filestream, buffer to store in, number of bytes to read (max)
175
-            if (rxLength ==0) { // re-timeout: it sucks !
176
-                throw std::runtime_error {"ComRobot::Read: Timeout when reading from com port"};
174
+            if (rxLength == 0) { // re-timeout: it sucks !
175
+                throw std::runtime_error{"ComRobot::Read: Timeout when reading from com port"};
177 176
             }
178
-        } else if (rxLength <0) { // big pb !
179
-            throw std::runtime_error {"ComRobot::Read: Unknown problem when reading from com port"};
177
+        } else if (rxLength < 0) { // big pb !
178
+            throw std::runtime_error{"ComRobot::Read: Unknown problem when reading from com port"};
180 179
         } else { // everything ok
181 180
             if ((receivedChar != '\r') && (receivedChar != '\n')) s += receivedChar;
182 181
         }
@@ -190,7 +189,7 @@ Message *ComRobot::SendCommand(Message* msg, MessageID answerID, int maxRetries)
190 189
     Message *msgSend;
191 190
     Message *msgRcv;
192 191
     Message *msgTmp;
193
-    
192
+
194 193
     do {
195 194
         msgSend = msg->Copy();
196 195
         cout << "S => " << msgSend->ToString() << endl << flush;
@@ -200,13 +199,13 @@ Message *ComRobot::SendCommand(Message* msg, MessageID answerID, int maxRetries)
200 199
         if (msgTmp->CompareID(answerID)) counter = 0;
201 200
         else counter--;
202 201
 
203
-        if (counter == 0) msgRcv=msgTmp->Copy();
204
-        
202
+        if (counter == 0) msgRcv = msgTmp->Copy();
203
+
205 204
         delete(msgTmp);
206 205
     } while (counter);
207
-    
206
+
208 207
     delete (msg);
209
-    
208
+
210 209
     return msgRcv;
211 210
 }
212 211
 
@@ -220,26 +219,26 @@ Message* ComRobot::StringToMessage(string s) {
220 219
 
221 220
     switch (s[0]) {
222 221
         case LABEL_ROBOT_OK:
223
-            msg=new Message(MESSAGE_ANSWER_ACK);
222
+            msg = new Message(MESSAGE_ANSWER_ACK);
224 223
             break;
225 224
         case LABEL_ROBOT_ERROR:
226
-            msg=new Message(MESSAGE_ANSWER_ROBOT_ERROR);
225
+            msg = new Message(MESSAGE_ANSWER_ROBOT_ERROR);
227 226
             break;
228 227
         case LABEL_ROBOT_UNKNOWN_COMMAND:
229
-            msg=new Message(MESSAGE_ANSWER_ROBOT_UNKNOWN_COMMAND);
228
+            msg = new Message(MESSAGE_ANSWER_ROBOT_UNKNOWN_COMMAND);
230 229
             break;
231 230
         case '0':
232
-            msg=new MessageBattery(MESSAGE_ROBOT_BATTERY_LEVEL, BATTERY_EMPTY);
231
+            msg = new MessageBattery(MESSAGE_ROBOT_BATTERY_LEVEL, BATTERY_EMPTY);
233 232
             break;
234
-            case '1':
235
-            msg=new MessageBattery(MESSAGE_ROBOT_BATTERY_LEVEL, BATTERY_LOW);
233
+        case '1':
234
+            msg = new MessageBattery(MESSAGE_ROBOT_BATTERY_LEVEL, BATTERY_LOW);
236 235
             break;
237
-            case '2':
238
-            msg=new MessageBattery(MESSAGE_ROBOT_BATTERY_LEVEL, BATTERY_FULL);
236
+        case '2':
237
+            msg = new MessageBattery(MESSAGE_ROBOT_BATTERY_LEVEL, BATTERY_FULL);
239 238
             break;
240 239
         default:
241
-            msg=new Message(MESSAGE_ANSWER_ROBOT_ERROR);
242
-            cerr<<"["<<__PRETTY_FUNCTION__<<"] Unknown message received from robot (" << s <<")"<<endl<<flush;
240
+            msg = new Message(MESSAGE_ANSWER_ROBOT_ERROR);
241
+            cerr << "[" << __PRETTY_FUNCTION__ << "] Unknown message received from robot (" << s << ")" << endl << flush;
243 242
     }
244 243
 
245 244
     return msg;
@@ -252,69 +251,74 @@ Message* ComRobot::StringToMessage(string s) {
252 251
  */
253 252
 string ComRobot::MessageToString(Message *msg) {
254 253
     string s;
255
-    
254
+
256 255
     float val_f;
257 256
     int val_i;
258 257
     unsigned char *b;
259 258
 
260 259
     switch (msg->GetID()) {
261 260
         case MESSAGE_ROBOT_PING:
262
-            s+=LABEL_ROBOT_PING;
261
+            s += LABEL_ROBOT_PING;
263 262
             break;
264 263
         case MESSAGE_ROBOT_RESET:
265
-            s+=LABEL_ROBOT_RESET;
264
+            s += LABEL_ROBOT_RESET;
266 265
             break;
267 266
         case MESSAGE_ROBOT_POWEROFF:
268
-            s+=LABEL_ROBOT_POWEROFF;
267
+            s += LABEL_ROBOT_POWEROFF;
269 268
             break;
270 269
         case MESSAGE_ROBOT_START_WITHOUT_WD:
271
-            s+=LABEL_ROBOT_START_WITHOUT_WD;
270
+            s += LABEL_ROBOT_START_WITHOUT_WD;
272 271
             break;
273 272
         case MESSAGE_ROBOT_START_WITH_WD:
274
-            s+=LABEL_ROBOT_START_WITH_WD;
273
+            s += LABEL_ROBOT_START_WITH_WD;
275 274
             break;
276 275
         case MESSAGE_ROBOT_RELOAD_WD:
277
-            s+=LABEL_ROBOT_RELOAD_WD;
276
+            s += LABEL_ROBOT_RELOAD_WD;
278 277
             break;
279 278
         case MESSAGE_ROBOT_BATTERY_GET:
280
-            s+=LABEL_ROBOT_GET_BATTERY;
279
+            s += LABEL_ROBOT_GET_BATTERY;
281 280
             break;
282 281
         case MESSAGE_ROBOT_STATE_GET:
283
-            s+=LABEL_ROBOT_GET_STATE;
282
+            s += LABEL_ROBOT_GET_STATE;
284 283
             break;
285 284
         case MESSAGE_ROBOT_GO_FORWARD:
286
-            s+=LABEL_ROBOT_MOVE;
287
-            s+=LABEL_ROBOT_SEPARATOR_CHAR;
285
+            s += LABEL_ROBOT_MOVE;
286
+            s += LABEL_ROBOT_SEPARATOR_CHAR;
288 287
             s.append(to_string(500000));
289 288
             break;
290 289
         case MESSAGE_ROBOT_GO_BACKWARD:
291
-            s+=LABEL_ROBOT_MOVE;
292
-            s+=LABEL_ROBOT_SEPARATOR_CHAR;
290
+            s += LABEL_ROBOT_MOVE;
291
+            s += LABEL_ROBOT_SEPARATOR_CHAR;
293 292
             s.append(to_string(-500000));
294 293
             break;
295 294
         case MESSAGE_ROBOT_GO_LEFT:
296
-            s+=LABEL_ROBOT_TURN;
297
-            s+=LABEL_ROBOT_SEPARATOR_CHAR;
298
-            s.append(to_string(90));
295
+            s += LABEL_ROBOT_TURN;
296
+            s += LABEL_ROBOT_SEPARATOR_CHAR;
297
+            s.append(to_string(-500000));
299 298
             break;
300 299
         case MESSAGE_ROBOT_GO_RIGHT:
301
-            s+=LABEL_ROBOT_TURN;
302
-            s+=LABEL_ROBOT_SEPARATOR_CHAR;
303
-            s.append(to_string(-90));
300
+            s += LABEL_ROBOT_TURN;
301
+            s += LABEL_ROBOT_SEPARATOR_CHAR;
302
+            s.append(to_string(500000));
303
+            break;
304
+        case MESSAGE_ROBOT_STOP:
305
+            s += LABEL_ROBOT_MOVE;
306
+            s += LABEL_ROBOT_SEPARATOR_CHAR;
307
+            s.append(to_string(0));
304 308
             break;
305 309
         case MESSAGE_ROBOT_MOVE:
306
-            s+=LABEL_ROBOT_MOVE;
307
-            s+=LABEL_ROBOT_SEPARATOR_CHAR;
308
-            s.append(to_string(((MessageInt*)msg)->GetValue()));
310
+            s += LABEL_ROBOT_MOVE;
311
+            s += LABEL_ROBOT_SEPARATOR_CHAR;
312
+            s.append(to_string(((MessageInt*) msg)->GetValue()));
309 313
             break;
310 314
         case MESSAGE_ROBOT_TURN:
311
-            s+=LABEL_ROBOT_TURN;
312
-            s+=LABEL_ROBOT_SEPARATOR_CHAR;
313
-            s.append(to_string(((MessageInt*)msg)->GetValue()));
315
+            s += LABEL_ROBOT_TURN;
316
+            s += LABEL_ROBOT_SEPARATOR_CHAR;
317
+            s.append(to_string(((MessageInt*) msg)->GetValue()));
314 318
             break;
315 319
         default:
316
-            cerr<<"["<<__PRETTY_FUNCTION__<<"] Invalid message for robot ("<<msg->ToString()<<")"<<endl<<flush;
317
-            throw std::runtime_error {"Invalid message"};
320
+            cerr << "[" << __PRETTY_FUNCTION__ << "] Invalid message for robot (" << msg->ToString() << ")" << endl << flush;
321
+            throw std::runtime_error{"Invalid message"};
318 322
     }
319 323
 
320 324
     return s;
@@ -325,14 +329,14 @@ string ComRobot::MessageToString(Message *msg) {
325 329
  * @param[in,out] s String containing command for robot, without ending char (carriage return) 
326 330
  */
327 331
 void ComRobot::AddChecksum(string &s) {
328
-    unsigned char checksum=0;
329
-    
330
-    for (string::iterator it=s.begin(); it!=s.end(); ++it) {
331
-        checksum ^= (unsigned char)*it;
332
+    unsigned char checksum = 0;
333
+
334
+    for (string::iterator it = s.begin(); it != s.end(); ++it) {
335
+        checksum ^= (unsigned char) *it;
332 336
     }
333
-    
334
-    s+=(char)checksum; // Add calculated checksum
335
-    s+=(char)LABEL_ROBOT_ENDING_CHAR;
337
+
338
+    s += (char) checksum; // Add calculated checksum
339
+    s += (char) LABEL_ROBOT_ENDING_CHAR;
336 340
 }
337 341
 
338 342
 /**
@@ -342,15 +346,14 @@ void ComRobot::AddChecksum(string &s) {
342 346
  * @return true is checksum is valid, false otherwise.
343 347
  */
344 348
 bool ComRobot::VerifyChecksum(string &s) {
345
-    unsigned char checksum=0;
346
-    
347
-    for (string::iterator it=s.begin(); it!=s.end(); ++it) {
348
-        checksum ^= (unsigned char)*it;
349
+    unsigned char checksum = 0;
350
+
351
+    for (string::iterator it = s.begin(); it != s.end(); ++it) {
352
+        checksum ^= (unsigned char) *it;
349 353
     }
350
-    
351
-    if (checksum==0) { // checksum is ok, remove last char of string (checksum)
354
+
355
+    if (checksum == 0) { // checksum is ok, remove last char of string (checksum)
352 356
         s.pop_back(); // remove last char
353 357
         return true;
354
-    }
355
-    else return false;
358
+    } else return false;
356 359
 }

+ 4
- 0
software/raspberry/superviseur-robot/lib/img.cpp View File

@@ -33,6 +33,10 @@ bool Arena::IsEmpty() {
33 33
  */
34 34
 Img::Img(ImageMat imgMatrice) {
35 35
     this->img = imgMatrice.clone();
36
+   
37
+#ifdef __WITH_ARUCO__
38
+    this->dictionary=cv::aruco::getPredefinedDictionary(cv::aruco::PREDEFINED_DICTIONARY_NAME(3));
39
+#endif // __WITH_ARUCO__
36 40
 }
37 41
 
38 42
 /**

+ 39
- 10
software/raspberry/superviseur-robot/lib/img.h View File

@@ -47,16 +47,35 @@ typedef cv::Mat ImageMat;
47 47
 typedef vector<unsigned char> Jpg;
48 48
 
49 49
 /**
50
- * Position type used for store robot coordinates
50
+ * Class position, used for store robot coordinates
51 51
  * 
52
- * @brief Position type used for store robot coordinates
52
+ * @brief Class position, used for store robot coordinates
53 53
  */
54
-typedef struct {
54
+class Position {
55
+public:
56
+    int robotId;
57
+    float angle;
55 58
     cv::Point2f center; 
56 59
     cv::Point2f direction;
57
-    float angle;
58
-    int robotId;
59
-} Position;
60
+    
61
+    /**
62
+     * Constructor of Position object
63
+     */
64
+    Position() {
65
+        robotId = -1;
66
+        angle = 0.0;
67
+        center=cv::Point2f(0.0,0.0);
68
+        direction=cv::Point2f(0.0,0.0);
69
+    }
70
+    
71
+    /**
72
+     * Build a string representation of the object
73
+     * @return String containing object information
74
+     */
75
+    string ToString() {
76
+        return "Id=" + to_string(this->robotId) + ", Angle=" + to_string(this->angle) + ", center=(" + to_string(this->center.x) + ";" + to_string(this->center.y) + ")";
77
+    }
78
+};
60 79
 
61 80
 /**
62 81
  * Class arena, used for holding outline of arena on image and cropping image to only usefull area
@@ -66,20 +85,30 @@ typedef struct {
66 85
 class Arena {
67 86
 public:
68 87
     /**
69
-     * Constructor of Arena object
88
+     * Coordinate of arena, empty if no arena found
70 89
      */
71
-    Arena() {}
90
+    cv::Rect arena;
72 91
     
73 92
     /**
74
-     * Coordinate of arena, empty if no arena found
93
+     * Constructor of Arena object
75 94
      */
76
-    cv::Rect arena;
95
+    Arena() {}
77 96
     
78 97
     /**
79 98
      * Tell if arena is empty (not found) or not
80 99
      * @return true if no arena found, false otherwise
81 100
      */
82 101
     bool IsEmpty();
102
+    
103
+    /**
104
+     * Build a string representation of the object
105
+     * @return String containing object information
106
+     */
107
+    string ToString() {
108
+        if (IsEmpty()) return "Arena empty";
109
+        else
110
+        return "Arena: (x;y)=(" + to_string(this->arena.x) + ";" + to_string(this->arena.x) + " (w;h)=(" + to_string(this->arena.width) + ";" + to_string(this->arena.height) + ")";
111
+    }
83 112
 };
84 113
 
85 114
 /**

software/raspberry/superviseur-robot/nbproject/Makefile-Debug.mk → software/raspberry/superviseur-robot/nbproject/Makefile-Debug__PC_.mk View File

@@ -23,7 +23,7 @@ AS=as
23 23
 # Macros
24 24
 CND_PLATFORM=GNU-Linux
25 25
 CND_DLIB_EXT=so
26
-CND_CONF=Debug
26
+CND_CONF=Debug__PC_
27 27
 CND_DISTDIR=dist
28 28
 CND_BUILDDIR=build
29 29
 
@@ -42,16 +42,15 @@ OBJECTFILES= \
42 42
 	${OBJECTDIR}/lib/img.o \
43 43
 	${OBJECTDIR}/lib/messages.o \
44 44
 	${OBJECTDIR}/main.o \
45
-	${OBJECTDIR}/tasks.o \
46
-	${OBJECTDIR}/tasks_pthread.o
45
+	${OBJECTDIR}/tasks.o
47 46
 
48 47
 
49 48
 # C Compiler Flags
50 49
 CFLAGS=-I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy
51 50
 
52 51
 # CC Compiler Flags
53
-CCFLAGS=-I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy
54
-CXXFLAGS=-I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy
52
+CCFLAGS=-I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy -Wno-pmf-conversions
53
+CXXFLAGS=-I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy -Wno-pmf-conversions
55 54
 
56 55
 # Fortran Compiler Flags
57 56
 FFLAGS=
@@ -73,47 +72,42 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot: ${OBJECTFILES}
73 72
 ${OBJECTDIR}/lib/base64/base64.o: lib/base64/base64.cpp
74 73
 	${MKDIR} -p ${OBJECTDIR}/lib/base64
75 74
 	${RM} "$@.d"
76
-	$(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
75
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -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
77 76
 
78 77
 ${OBJECTDIR}/lib/camera.o: lib/camera.cpp
79 78
 	${MKDIR} -p ${OBJECTDIR}/lib
80 79
 	${RM} "$@.d"
81
-	$(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
80
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -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
82 81
 
83 82
 ${OBJECTDIR}/lib/commonitor.o: lib/commonitor.cpp
84 83
 	${MKDIR} -p ${OBJECTDIR}/lib
85 84
 	${RM} "$@.d"
86
-	$(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
85
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -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
87 86
 
88 87
 ${OBJECTDIR}/lib/comrobot.o: lib/comrobot.cpp
89 88
 	${MKDIR} -p ${OBJECTDIR}/lib
90 89
 	${RM} "$@.d"
91
-	$(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
90
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -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
92 91
 
93 92
 ${OBJECTDIR}/lib/img.o: lib/img.cpp
94 93
 	${MKDIR} -p ${OBJECTDIR}/lib
95 94
 	${RM} "$@.d"
96
-	$(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
95
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -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
97 96
 
98 97
 ${OBJECTDIR}/lib/messages.o: lib/messages.cpp
99 98
 	${MKDIR} -p ${OBJECTDIR}/lib
100 99
 	${RM} "$@.d"
101
-	$(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/messages.o lib/messages.cpp
100
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/messages.o lib/messages.cpp
102 101
 
103 102
 ${OBJECTDIR}/main.o: main.cpp
104 103
 	${MKDIR} -p ${OBJECTDIR}
105 104
 	${RM} "$@.d"
106
-	$(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}/main.o main.cpp
105
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
107 106
 
108 107
 ${OBJECTDIR}/tasks.o: tasks.cpp
109 108
 	${MKDIR} -p ${OBJECTDIR}
110 109
 	${RM} "$@.d"
111
-	$(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
112
-
113
-${OBJECTDIR}/tasks_pthread.o: tasks_pthread.cpp
114
-	${MKDIR} -p ${OBJECTDIR}
115
-	${RM} "$@.d"
116
-	$(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_pthread.o tasks_pthread.cpp
110
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/tasks.o tasks.cpp
117 111
 
118 112
 # Subprojects
119 113
 .build-subprojects:

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

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

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

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

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


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save