You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We just updated to the latest firmware, as of Nov 3, 2026.
As soon as the program starts, before any of our code is executed, the robot starts driving backwards at a high speed. This behavior started as soon as we upgraded, and we definitely don't have any code that instructs the robot to behave this way.
I ran your program (without the ta and tb motors)
on the current firmware of beta.pybricks: ('primehub', '4.1.2', 'ci-release-114-v4.1.2 on 2026-10-29')
I am attaching the entire program. Most of it is not run as you can see, only mission_02() is called. When the wait_kbd() command is added, the problem does not appear (the one marked with ## <- THIS). When this command is not there, it happens with the frequency I described.
I don't think it has anything to do with mission_02(). We also noticed the same thing when mission_03() was run and everything else was commented out.
There is actually two different SPIKE Prime hardware versions and therefore two different firmwares. I don't remember what we did to allow us to tell the difference though. If the SPIKE Prime was purchased in 2026, it may be possible that it is a different firmware from what Bert is testing.
This is a much older spike prime (yellow hub), bought when they first came out. The hub is oriented so that the on/off button is at the right side of the robot, and the bluetooth button at the left side of the robot, so it is sideways to the robot's movement. Could that be an issue?
The problem (sudden unexpected, very fast, backwards movement of the robot at startup) occurs in the exact code that I have attached in my previous message, when I remove the wait_kbd() call. When the wait_kbd() call is there, the problem does not appear. The problem definitely started as soon as we upgraded. I am not sure when was the previous time we had upgraded, but it was not tool long ago (maybe a month?).
Let me know if you need more info. I can try to upload a video of the problem if you want.
This is a much older spike prime (yellow hub), bought when they first came out.
So no 2026-version hub. Makes it easier for me to try to recreate as I have an early spike prime too.
The hub is oriented so that the on/off button is at the right side of the robot, and the bluetooth button at the left side of the robot, so it is sideways to the robot's movement. Could that be an issue?
I'll make the model sideways too.
The problem (sudden unexpected, very fast, backwards movement of the robot at startup) occurs in the exact code that I have attached in my previous message, when I remove the wait_kbd() call. When the wait_kbd() call is there, the problem does not appear. The problem definitely started as soon as we upgraded. I am not sure when was the previous time we had upgraded, but it was not tool long ago (maybe a month?).
The wait gives the gyro the time to calibrate.
I have no idea why that would cause so violent movement in this case.
Let me know if you need more info.
Do you start the program mostly:
via upload and run, or
hub button press
I can try to upload a video of the problem if you want.
Visual is always a good way to share. Please paste the video here.
That would also help me to build a model with the orientation you have.
Another thought and just hypothetical:
If the hub is not correctly wired or has wrong rotate direction, then the gyro gets correct environmental data but the resulting correction is wrong due to wiring or motor direction.
That would also cause havoc.
I do not think that is the case here.
I tried to reproduce the problem yesterday, but it never appeared again. Then we had a full practice session, again it never appeared. The only thing that changed is that the robot was rebooted (turned off and on) between the day that the problem appeared and yesterday, I can't think of anything else that might have affected the outcome.
If you feel that this bug should be closed, feel free to do so. If the problem reappears, I will certainly either reopen the bug or open a new one.
@mauroid: You can follow these steps to try the solution before we include it in the next release.
I am curious to hear if this fixes it for you.
Before you try it, maybe you can reproduce it with your existing program: stop the robot while it is moving. Then the problem should happen when you start it again.
With the update, doing the same operation should no longer show the issue.
frompybricks.pupdevicesimportMotorfrompybricks.parametersimportPort# from pybricks.robotics import DriveBasefrompybricks.toolsimportwaitmotor=Motor(Port.A)
# motor.reset_angle(0)motor.run(500)
print("start motor angle", motor.angle())
wait(1000)
print(" mid motor angle", motor.angle())
motor.run_angle(500, -360) # Next run is wrong if you stop the program midway here.print(" end motor angle", motor.angle())
On start of the second program I see the first movement in the wrong direction and with the high speed (the final speed of program 1).
Now test with ('primehub', '4.1.2', 'ci-build-5141-v4.1.2-3-g4d274c913 on 2026-11-05')
Set telemetry ON and run the two programs after each other.
No problem seen in 10 tests.
I didn't mention it, since that is how urban legends are made. Telemetry was just something that made this long-standing bug visible. It is not the cause of it. 😄
Activity
mauroid commentedon Nov 3, 2026
We are using the Pybricks Beta.
BertLindeman commentedon Nov 3, 2026
I ran your program (without the ta and tb motors)
on the current firmware of beta.pybricks:
('primehub', '4.1.2', 'ci-release-114-v4.1.2 on 2026-10-29')And did not show any motor movements.
mauroid commentedon Nov 3, 2026
Yes, it doesn't always do it. It does it some times. But when it does it, it is catastrophic. The robot almost teared up the FLL mat.
I would say it happens around 20-30% of the time. It definitely started as soon as we upgraded.
BertLindeman commentedon Nov 3, 2026
That is horrible.
Any idea under which circumstances the problem occurs more often?
A stable testcase would be the best.
mauroid commentedon Nov 3, 2026
I am attaching the entire program. Most of it is not run as you can see, only mission_02() is called. When the wait_kbd() command is added, the problem does not appear (the one marked with ## <- THIS). When this command is not there, it happens with the frequency I described.
I don't think it has anything to do with mission_02(). We also noticed the same thing when mission_03() was run and everything else was commented out.
FLL_2026_missions13.py
BertLindeman commentedon Nov 4, 2026
Hi Dimitrios,
I have not yet been able to reproduce.
Tried 20 times via upload and 20 times via button start.
Some things just to be sure:
And a question: Does the problem occur after a fresh program upload or also on a start using the hub button?
Loose thoughts:
==> Battery: 7.749VBert
dlech commentedon Nov 4, 2026
There is actually two different SPIKE Prime hardware versions and therefore two different firmwares. I don't remember what we did to allow us to tell the difference though. If the SPIKE Prime was purchased in 2026, it may be possible that it is a different firmware from what Bert is testing.
mauroid commentedon Nov 4, 2026
Hi Bert,
This is a much older spike prime (yellow hub), bought when they first came out. The hub is oriented so that the on/off button is at the right side of the robot, and the bluetooth button at the left side of the robot, so it is sideways to the robot's movement. Could that be an issue?
The problem (sudden unexpected, very fast, backwards movement of the robot at startup) occurs in the exact code that I have attached in my previous message, when I remove the wait_kbd() call. When the wait_kbd() call is there, the problem does not appear. The problem definitely started as soon as we upgraded. I am not sure when was the previous time we had upgraded, but it was not tool long ago (maybe a month?).
Let me know if you need more info. I can try to upload a video of the problem if you want.
BertLindeman commentedon Nov 4, 2026
So no 2026-version hub. Makes it easier for me to try to recreate as I have an early spike prime too.
I'll make the model sideways too.
The wait gives the gyro the time to calibrate.
I have no idea why that would cause so violent movement in this case.
Do you start the program mostly:
Visual is always a good way to share. Please paste the video here.
That would also help me to build a model with the orientation you have.
Another thought and just hypothetical:
If the hub is not correctly wired or has wrong rotate direction, then the gyro gets correct environmental data but the resulting correction is wrong due to wiring or motor direction.
That would also cause havoc.
I do not think that is the case here.
mauroid commentedon Nov 4, 2026
I almost always start the program via upload and run.
I will post a video as soon as I can, later today.
BertLindeman commentedon Nov 4, 2026
Reconfigured the robot here.
Commented
taandtblines out, as they have no effect on this.Did over 30 times upload+run without any problem.
Without
wait_kbd() ## <- THISI still do not think the orientation of the hub is the real culprit in this case.
but...
Pybricks uses this coordinate system:
The top_side is the side with the buttons; front_side is the side with the USB port
We have the top-side on top so +Z
The usb port (front-side) is on the left so +Y
The mapping is:
So you can change the hub definition into:
The PrimeHub has an imu.ready() method.
It indicates whether the IMU has calibrated and is ready.
You can add after the hub is instantiated:
Maybe these two changes make the drivebase work correct.
And then you can remove the wait again.
But no feeling that I found the problem though.
Bert
mauroid commentedon Nov 5, 2026
I tried to reproduce the problem yesterday, but it never appeared again. Then we had a full practice session, again it never appeared. The only thing that changed is that the robot was rebooted (turned off and on) between the day that the problem appeared and yesterday, I can't think of anything else that might have affected the outcome.
If you feel that this bug should be closed, feel free to do so. If the problem reappears, I will certainly either reopen the bug or open a new one.
BertLindeman commentedon Nov 5, 2026
Thank you for reporting back.
I have no permission to close.
laurensvalk commentedon Nov 5, 2026
Let's keep this issue open. This is useful so far.
Just to confirm, this is between multiple consecutive runs without any restarts?
2 remaining items
laurensvalk commentedon Nov 5, 2026
Found the underlying cause too. Hopefully we can launch a fix tomorrow.
pbio/observer: Reset cached differentiator state.
laurensvalk commentedon Nov 5, 2026
@mauroid: You can follow these steps to try the solution before we include it in the next release.
I am curious to hear if this fixes it for you.
Before you try it, maybe you can reproduce it with your existing program: stop the robot while it is moving. Then the problem should happen when you start it again.
With the update, doing the same operation should no longer show the issue.
Thanks!
mauroid commentedon Nov 5, 2026
Apologies, I am out of town and won't be able to test this until next week..
laurensvalk commentedon Nov 5, 2026
No rush! We're happy that you reported it.
We will release this fix, and you are welcome to re-open this issue if you find that it still happens when you try it later.
BertLindeman commentedon Nov 5, 2026
Ah, finally got it recreated with Dimitrios FLL program.
I did not get it recreated, because I had telemetry OFF.
And now with telemetry ON I see the problem.
100% recreated running these two programs after each other.
First `issue_2887_1.py`:
and then `issue_2887_2.py`:
On start of the second program I see the first movement in the wrong direction and with the high speed (the final speed of program 1).
Now test with
('primehub', '4.1.2', 'ci-build-5141-v4.1.2-3-g4d274c913 on 2026-11-05')Set telemetry ON and run the two programs after each other.
No problem seen in 10 tests.
laurensvalk commentedon Nov 5, 2026
I didn't mention it, since that is how urban legends are made. Telemetry was just something that made this long-standing bug visible. It is not the cause of it. 😄
BertLindeman commentedon Nov 5, 2026
Updated post 😄
Well found and fast fixed problem. Thank you.
laurensvalk commentedon Nov 6, 2026
The fix has been included in the latest beta and stable release!