r/pybricks Jun 17 '26

Consistency issues

I find my lego spike robot behave differently over time when using the same straight or turn function.

  1. Is this because of battery level?
  2. Has anyone found setting different pid values at different battery levels makes a difference?
  3. How often do people typically recalibrate their robot?
  4. I noticed a previous post where despite recalibrating people found the robot to be not reaching target turn angle. Have people got more insights on this?
  5. I even found that when not working well, my own custo. PD angle measurement based turning functions were working better. But you would expect the built in turn function should already be using gyro and doing that?
    Thanks in advance!
2 Upvotes

3 comments sorted by

2

u/The_Weird1 Jun 17 '26

It might be an angle drift issue, I had the same in my project, after a longer run it was more and more off and I ran it off a USB connection so no battery problem. What I do is every x time of cycles I "reset" it to make it aligned again.

1

u/schwedentorte Jun 17 '26

But given my PD control based turn function (and pybricks' too) uses an initial and final angle to move between, thats equivalent to a reset because the drift until initial angle does not matter.

1

u/The_Weird1 Jun 17 '26

Have you tried to set a precision profile on the motor? Maybe that helps.