RVR SDK Drive Examples syntax error

I am making a rvr controller via IoT app, where we have a customizable interface on phone to control rvr from anywhere, with real time camera to see where is the robot heading.
Phone → cloud → esp32 → arduino → rvr

  1. I think there is a small error in RVR-Arduino example Drive With Headings example, both in official site and github repo.
    If you follow the guide and compile on Arduino IDE, it might returns this error:

Arduino_Warehouse:29:66: error: expected primary-expression before ‘.’ token
rvr.driveWithHeading(32, 0, static_cast<uint8_t>(DriveFlags.none));
exit status 1
expected primary-expression before ‘.’ token

From my observation, replacing “DriveFlags.none” with “DriveFlags::none” resolve the problem.

  1. The speed-heading parameters are swapped in driveWithHeadings() and driveControl.startRoll(), so be careful when you switching between these methods.

  2. The driveControl has their default headings hard coded, so even if after you reboot rvr, their 0 degree will be always the same. rvr.resetYaw(); might help. This was addressed in FAQ.

  3. Make sure rvr is in contact with ground when turning. If the robot attempting to turn while being lifted up, the gyroscope doesn’t recognize the spinning movement, it makes the robot think it is too heavy too turn and will rev up the motor to maximum. This is super helpful if you want your robot auto calibrate for different loads and surface, but not really helpful if you want to test your robot in a confined space.

  4. I don’t know if we can get data from rvr and feed it upward, but it is interesting to try out next week.

That’s all I have for today, I will try to update more when I have more time.


SPHERO Email Marketing -