= Sanity Checks =
== What are they? ==
They are object-recognition rules to help the robot to translate colour blobs processed from the raw image data to landscapes on the field, balls, other robots, etc.
Instead of checking "sanities" of objects in an image, currently, it is more appropiate to call them "INsanity checks" of objects: things that is NOT possible to happen in an image captured by the robot camera. If any colour blob satisified(or "fired") the "insane" checks, it is not recognised as an object.
So far most (or all?) of the sanity checks are done in {{{vision/VisualCortex.cc}}}
NB. Most of the current sanity checks are based of the ''colours'' of the blobs, a few based of the ''relationships'' between them. but not based on the ''shapes'' of the blobs whatsoever.
== Problems with the current checks (in VisualCortex.cc) ==
* There seems some sanity checks for beacons (e.g. method !BeaconsSanities()) have this implicit assumptions that the robot CANNOT go out of the field. Is this really an issue?
* There are implicit assumptions that beacons are at the corners. E.g. in !VisualCortex.cc, method {{{LandmarkSanities()}}} has comments:
{{{
/* Cannot see yellow goal and blue beacons together. */
/* Cannot see blue goal and yellow beacons together. */
}}}
While on the new field, this IS possible.
* Same problem in method {{{GoalSanities()}}}.
* So is LookForColourGoal() line 6114:
{{{
/* Goal cannot be too close to the beacon. */
}}}
* The goal is NOT recognised when there's a goalie in the goal, that's probably because of the sanity check at about line 6217,
{{{
// Its dimension is too small, so forget about it altogether
}}}
* At about line 6395:
{{{
int minGoalBlobSize = 200;
}}}
This variable should be smaller since we can see the goal from further distance (and it should be calculated instead of hard-coded).
* At about line 8326:
{{{
/* Goal should be further away than robot, added 20 cm */
}}}
Again, any robot can be outside of the bottom line.
* From around line 8365 to line 8492, there are goal and ball sanity checks in method !FindRobot(), what?
== New possible GUI tools ==
* Proposing a GUI tool along with the CPlane to indicate which sanity check rules are fired.
* Comment: this is alreaydy in CPlaneDisplay (if you view the log offline e.g : java CPlaneDisplay CPLANE_LOG, fired sanity checks are shown on the right panel), and CPlaneProtocol (embedded bits that tells which sanitychecks were fired). Kim
* Thanks, Kim, I will take a look at that later, like next year (2005). Weiming =]
* Proposing another GUI tool to define the sanity check rules(conditions, out messages etc.), then automatically generate a c++ file with all the check rules.
== New possible sanity checks ==
* A ball CANNOT be above any goal or beacon.
* A ball can only be in a green blob, or b/t green&white blobs, or (covered by robots).
----
up to line 7095 in !VisualCortex.cc -- weiming