summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/ai/ai.cc
diff options
context:
space:
mode:
authordufourj2005-06-05 17:17:44 +0000
committerdufourj2005-06-05 17:17:44 +0000
commite2f75a35e64344bd275a7a3cad7b82eafeefc9a4 (patch)
tree7e0b484e3e273624083a5ba12c5d577161da02f7 /2005/i/robert/src/ai/ai.cc
parente43ca926f4afb158a998498558e4ec43b2ebaca8 (diff)
Correction de la segfault dans OVision (variable non initialisé).
Correction des chemins de libz.a dans les Makefiles. Activation de la vision (à tester). Problèmes de test des seconds arguments des commandes dans test_ai
Diffstat (limited to '2005/i/robert/src/ai/ai.cc')
-rw-r--r--2005/i/robert/src/ai/ai.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/2005/i/robert/src/ai/ai.cc b/2005/i/robert/src/ai/ai.cc
index b3b4f09..958aa78 100644
--- a/2005/i/robert/src/ai/ai.cc
+++ b/2005/i/robert/src/ai/ai.cc
@@ -74,8 +74,8 @@ void Ai::init(void)
// initialise la carte es
es_.init();
// on init la vision
-// oVision_.init(motor_.colorState() ? Group::redSkittle :
-// Group::greenSkittle);
+ oVision_.init(motor_.colorState() ? Group::redSkittle :
+ Group::greenSkittle);
while (!update());
}
@@ -437,11 +437,11 @@ void Ai::scanVision (bool followLine) /// XXX mettre un argument
for (int i = 0; i < (followLine ? 1 : 4) ; i++)
{
// On prend la photo
-// oVision_.takeShoot();
-// // On analyse la photo
-// oVision_.update();
+ oVision_.takeShoot();
+ // On analyse la photo
+ oVision_.update();
// On mets la liste brute dans le vector
-// skittles.push_back(oVision_.getSkittles());
+ skittles.push_back(oVision_.getSkittles());
// on tournicote
motor_.rotation(angleDepart + ((i + 1) * M_PI/4));
}
@@ -479,7 +479,7 @@ void Ai::remonteWithCam(void)
{
int x, y , angle, dist;
Zone zeSkittles = goodSkittles_.back();
-// oVision_.getLoc(zeSkittles, x, y, angle, dist);
+ oVision_.getLoc(zeSkittles, x, y, angle, dist);
dist -= 9;
rotation(motor_.getA() + angle);
setMaxSpeed(2,1);