Ghost in the machine- XRP robot

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?

For the disconnects: Double-check the cables/drivers

For the motor issue, ensure you calibrate their efforts to match Motors — XRP 2023.0 documentation

Hi TS-Russel thanks for your response.

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?

My first guess = Ensure the batteries are new…there isn’t a lot of reason for things to go haywire, but underpowering is one

Can you share a link to a video of the behavior?

Hi,

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…

iCloud Mail - Apple iCloud

Got it - post the code being used…the right wheel is definitely spinning way faster

Can you share a photo of the connectors/board?

Here is the code

Here is what happened (new batteries)

iCloud Mail - Apple iCloud

The things is, we have about 12 robots and the random behaviour is happening often. Its quite frustrating.

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

Hi there,

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.

Thanks Dryw,

I’ll give it a go.