Collision Avoidance and More
The initial rover collision avoidance algorithm was created so that the rover would turn his SONAR turret back and forth and attempt to detect an obstacle within 3 feet in any direction. It worked well enough but was probably too aggressive. When the Rover got close to a wall he got very suspicious when he probably didn’t need to.
When the rover is operating near a wall, 3 feet of lateral clearance is too much. It prevents him from traveling in parallel to a wall or from passing through any hallway less than 6 feet wide.

As the Rover attempts to navigate this hallway, the 3 foot detection radius registers the hallway as a false obstacle.
3 feet of clearance on the left + 3 feet of clearance on the right
=
6 feet minimum lateral clearance
If you would believe my high school math teacher we might be able to find a use for math in the real world. In fact, there is a handy ratio function that lets us trim down the obstacle detection field.
If our obstacle detection is 3 feet and we want 10 inches of clearance on either side for the wheels, we can use the ratio to get there like this:
- y – axis (Forward Obstacle Detection) = 36 inches (3 feet)
- x – axis (Lateral Obstacle Detection) = 10 inches
- 36 inches – 10 inches = 26 inches
We just plug our numbers into this equation and out drops our new detection zone:
Obstacle distance at angle Theta = (RATIO x 26 inches) + (10 inches)
Crunching these numbers we get the following results:
- -90 degrees = (0.0 x 26″) + 10″ = 10″ – (Looking Left)
- -45 degrees = (0.5 x 26″) + 10″ = 23″ – (Looking Left & Forward)
- 0 degrees = (1.0 x 26″) + 10″ = 36″ – (Looking Forward)
- +45 degrees = (0.5 x 26″) + 10″ = 23″ – (Looking Right & Forward)
- +90 degrees = (0.0 x 26″) + 10″ = 10″ – (Looking Right)
That changes the shape of the obstacle detection field from a half-circle into this triangle:
With this little bit of math we can more easily travel through a narrow hallway. This modified detection algorithm is what we used in the successful obstacle avoidance test video. The best part is that while we travel parallel to a wall we won’t detect it as an obstacle but if we start to drift into it, the Rover will still detect it.




Trackbacks & Pingbacks