Improve wall detection algorithm
General tasks
-
Make use of the ping sensor when looking in front (e.g. for differentiating ramps from walls - #6 (closed)) -
Logic for wall overrides when new readings do not match previous ones(linked to #20 (closed)) new issue: #26 -
Be able to differentiate ramps from walls on sides (#6 (closed))
Wall detection logic
Front
-
-
all sensors agree
- nothing special (duh)
-
ping detects but both IRs do not
- possibilites:
-
could be bump detected - ping may be able to detect flat faces normal to itbumps likely to be detected only past about 20cmthreshold: above 10cmignore ping & mark no wall
-
below 10cm - object (obstacle) directly in-front of robotmark wall and (potentially) mark cell in-front as black (no victims allowed in cell with obstacle
- narrow object (obstacle) in front - mark as wall
- bumps very unlikely
-
- possibilites:
-
both IRs detect but ping does not
- most likely ramp detected - ping does not get reading back from ramp
- ignore IRs & mark no wall
- no need to mark as ramp because algorithm will traverse there next and mark
- marking would not help the algorithm out anyways
-
only one IR detects a wall
- mark no wall
- possibilities:
- obstacle - only detected by IR sensor on corresponding side
- robot misaligned next to wall (not likely) - detecting edge of wall
- both cases: should move away from side IR detecting wall to avoid whatever is there
-
only one IR does not detect a wall
- possibilities:
- obstacle in front of robot
- mark as wall
- robot misaligned in front of wall (not likely) - one sensor not seeing wall (mark as wall)
- obstacle in front of robot
- possibilities:
Side
-
-
both IRs agree - possibilities:
- readings are close (too close to be ramp)
- mark as wall
- ambiguous readings (could be wall or ramp or obstacle)
- turn to check with front sensors
- readings are far - no wall
- readings are close (too close to be ramp)
-
IRs disagree
- possibilities:
- obstacle
- mark as no wall
- robot misaligned in front of wall or edge of wall
-
❓ check with front?
-
- obstacle
-
❓ overall: check with front?
- possibilities: