summaryrefslogtreecommitdiff
path: root/2005/i
diff options
context:
space:
mode:
authorgaillaro2005-05-06 16:41:01 +0000
committergaillaro2005-05-06 16:41:01 +0000
commit098033352f64f814b6e8586624319855a5982b99 (patch)
treed345848f84869d36b3e71100062e8df9b21d1a2b /2005/i
parent3294a9b2fdcc20c428dfcdd9fa5421272e2bd5d3 (diff)
correction de bugs suir l'intégration de la caméra
Diffstat (limited to '2005/i')
-rw-r--r--2005/i/robert/src/ovision/see/ovision.cc22
-rw-r--r--2005/i/robert/src/ovision/see/ovision.hh1
2 files changed, 12 insertions, 11 deletions
diff --git a/2005/i/robert/src/ovision/see/ovision.cc b/2005/i/robert/src/ovision/see/ovision.cc
index 5dd7c51..8b7b28d 100644
--- a/2005/i/robert/src/ovision/see/ovision.cc
+++ b/2005/i/robert/src/ovision/see/ovision.cc
@@ -31,24 +31,24 @@ OVision::init (const Group::ZoneType aim)
// Initialisation des classes
if (aim == Group::redSkittle)
{
- colorTab_ = new ColorTable ("../runtime/rc/colorTableGreen.z");
- //oconfig_->nnInfluLum = ;
+ colorTab_ = new ColorTable ("../runtime/rc/colortableGreen.z");
+ oconfig_->nnInfluLum = 0.4;
oconfig_->groupColor.clear ();
ObjectColor tmp;
tmp.label = "redSkittle";
- tmp.color = 4;
- tmp.type = Group::redSkittle;
+ tmp.color = 0;
+ tmp.type = aim;
oconfig_->groupColor.push_back (tmp);
}
else
{
- colorTab_ = new ColorTable ("../runtime/rc/colorTableRed.z");
- //oconfig_->nnInfluLum = ;
+ colorTab_ = new ColorTable ("../runtime/rc/colortableRed.z");
+ oconfig_->nnInfluLum = 0.4;
ObjectColor tmp;
oconfig_->groupColor.clear ();
tmp.label = "greenSkittle";
- tmp.color = 4;
- tmp.type = Group::greenSkittle;
+ tmp.color = 0;
+ tmp.type = aim;
oconfig_->groupColor.push_back (tmp);
}
@@ -132,11 +132,11 @@ OVision::getLoc (Zone &zone, int &x, int &y, int &angle, int &dist)
newPcY = zone.pcY;
}
int tmpX = (int)((zone.xmax - zone.centerx) * newPcX + zone.centerx);
- int tmpY = (int)((zone.ymax - zone.centery) *newPcY + zone.centery);
+ int tmpY = (int)((zone.ymax - zone.centery) * newPcY + zone.centery);
int newX, newY;
space_->getLoc (tmpX, tmpY, newX, newY);
- angle = (int)(atan (tmpX / (tmpY+9)));
- dist = tmpY;
+ angle = (int)(atan (newX / (newY + 9)));
+ dist = newY;
}
/// Renvoie la liste des quilles
diff --git a/2005/i/robert/src/ovision/see/ovision.hh b/2005/i/robert/src/ovision/see/ovision.hh
index bc722ef..28ba4c3 100644
--- a/2005/i/robert/src/ovision/see/ovision.hh
+++ b/2005/i/robert/src/ovision/see/ovision.hh
@@ -72,6 +72,7 @@ class OVision
/// Renvoie le pointeur sur Video4Linux
Video4Linux &getVideo4Linux () const;
/// Renvoie la position de la quille dans le rfrentiel robot
+ /// Donne l'angle du robot par rapport la balle + distance
void getLoc (Zone &zone, int &x, int &y, int &angle, int &dist);
};