Finally have all my C++ for the API working so turning to testing how the RVR works.
I laid out a 1 meter distance on a tile floor and tested the accuracy of the locator data. The test was a loop reading the locator Y value streaming at 30 msec. It started with a reset of the locator and stopped when Y > 1.0. The error over a number of tests was generally less than 0.05. I also ran it in reverse from the ending position until Y < 0.0 with similar results.
These tests were done with both raw and heading versions of the API. Note that setting the heading speed to 0 didn’t stop the RVR but allowed it to roll forward a distance. How far depended on the speed. Using a raw drive of (0, 0) caused a full stop.
I set speeds based on percentage (0-100) not the 0-255. I find it easier to think of speed that way.
When speed was less than 15% the locator was way off. The loop stopped when Y > 1.0 but it actually was around 0.75m (eye ball estimate).
An adjustment I need to make is gradual acceleration and deceleration of speed. Going from 0 to 100% or 100% to 0 not only looks bad but slowing at the end should allow more accurate movement.