I am a teacher and struggling with “ghosts in the machine”. When my students run a code through blockly e.g. to travel straight (for 85cm) the robots are doing random spins, not travelling straight.
It seems the motors have different efforts.
Then sometimes the robot work and other times just spins, with the same code.
Its so frustrating as the students are programming correctly and they are feeling very disheartened.
Is there a way to reboot everything to factory settings? Or some other way of fixing this issue?
What can I do when the XRP Robot after a few goes of operating correctly using the blockly code, decides to run some random program that doesn’t match what is programmed in the editor?
Hopefully you can view video in link below. The XRP has brand new batteries and you can see that the motors have two different efforts so XRP cannot travel straight. Not sure why motors have differences…
I think most of the issues are stemming from calibration problems - I’d try either calibrating with 'effort, adjusting left and right (increase left for now) with just a ‘straight’ function until the xrp is driving evenly, the re-test
You can also use the ‘speed’ function which is encoder-based and should adjust effort in the background for ya; see the blue link a few posts above
The “straight” block uses the XRP’s built-in IMU to ensure a precise heading is maintained while driving forward, but this requires the IMU to be calibrated. A 1 second calibration is automatically performed when you first run your code, and if the XRP moves at all during the calibration, that can cause the IMU to report that the XRP is constantly turning when it’s actually stationary. So when you try to drive straight, the robot compensates by adjusting its heading in the opposite direction. I believe this is the root of the problem you’re seeing.
To fix this, ensure the XRP is completely stationary while the IMU is being calibrated, do not hold it in your hands or pick up the XRP until the calibration is done. Calibrations will persist until a reset occurs, so press the reset button on the XRP to ensure the previous calibration is forgotten.
Hope this helps! If you have future issues using the XRP, I would suggest posting in https://xrp.discourse.group/, which is a forum dedicated for the XRP and has more folks there experienced with the XRP that can help you out.