So I am still waiting for my RVR to arrive (or even get a tracking number) here in the EU, but I set up a raspberry and took a dive into the code examples to get some ideas and build a plan for my project.
What took me as a surprise was that there are only examples for raw motor control or drive by time with a sleep afterwards. The RVR was advertised to be so intelligent to drive on any terrain and with integrated sensors be precise when driving over it.
So I wonder why there is no example that has a drive by distance?
Do we have to code this ourselves by streaming the sensor data and making sure it does not loose its heading and track the distance that it travels, then interrupting the movement if the desired distance is reached or doing some extra movement when it falls short? I really thought that this would be part of the internal controls to begin with.
And why is there no example that lets the RVR drive and wait for it to complete the command?
Sleeps are a bad way to work with when there is something physical executed, because the sleep time is always just a guess on how long it will take (well actually it is bad practice with any kind of API that executes something and waiting for it to complete). Does the API not support this? Have not seen an example to check if the motors are running or not, but that would be a start to make a loop with a millisecond or so sleep till the motors stopped running.