Compass_robot: pointing error management

In the compass robot, I am guessing the purpose of the test “do a turn if amount to turn is => accepted_minimum_by_drivers (6 degrees)” is to prevent oscillating around the desired heading, but I do not understand the accepted_minimum_by_drivers concept. This seems like the pointing error will end up as +/- 18 degrees (error * rotational_factor 0.3 > 6 degrees).

Also why is the acceptable_error(_percent) a percentage rather than a fixed number of degrees?

1 Like