Bugs that broke driving - comma.ai blog
Blog
Jobs
Got questions? Drop a comment and the team will answer!
All software is riddled with bugs, and usually bad software is bad because of those bugs, not because of bad algorithmic choices. openpilot is no different; we’ve made great progress over the years by implementing new exciting ML techniques, but most of the driving improvements came from discovering and fixing blatant bugs. Here I walk through some of the most entertaining bugs through the years.
openpilot drifts rightPermalink
July 22, 2017
riccardo 11:17 PM
Hi guys, 0.34 outsdanding issues encountered during my road trip so far:
-model is biased to the right. After calibration has done is job, car drives ok, but vehicle on right lane are constantly picked up as targets, which is pretty bad in some case, causing abrupt braking. Can we switch to a non biased model? As long as I can remember, model bias to right has always been a problem. We should root cause it (I suspect a ground truth issue with steer angle offset?). Also, model only predicts up to 50m, definitely low for in path vehicle detection if ego vehicle travels above 50 mph. Unless such model bias was also present in 0.33, I consider this problem the only no-go for a new release.
August 21, 2017
mgraczyk 11:57 AM
Update on data bias:
Previously the mean of the ground truth path at 80m was 18cm to the right. Now it is ~5cm to the right. I think this suggests that there was bias (not just a natural nonzero mean from turning right more) and that the bias has been reduced quite a bit.
September 30, 2017
riccardo 11:36 PM
Cool. PM’d a bit with brevan04, it actually seems like things aren’t so bad: he says lane centering is now superhuman, right turn are ok, left turn he had 2 occurrences of car crossing left line. Monday for review sounds ok.
Car hugging right lane when new calibration is triggered is expected and due to model bias (experienced it myself recently). Angle offset needs to be learned.
👍 1
In 2017 comma was not a mature company. We had few users, low quality logging, no metrics in training other than a unitless val loss, and no closed-loop simulation tests. As a result we generally had no clue what was going on with openpilot beyond obvious issues we noticed while driving with it. This is clear from these Slack messages showing we were aware of the driving model’s tendency to bias driving slightly to the right for months, with no root cause or satisfactory explanation.
December 12, 2017
riccardo 3:05 PM
@harald, phone gyro is actually pretty crappy and biased… no wonder why old models were biased too. Let me know when you are back, want to make sure I’m using the best speed and yaw rate available from sensors.
December 12, 2017
harald 4:05 PM
Yes the biases are very large.
@riccardo however they should be accurate for the rest. Scale should be 99% accurate if my tests were done correctly.
Mesh3d/best gives the best estimates. I will be back at 5
By the end of the year we did figure out the major cause of this bias. We trained models to predict the future driving trajectory, and lanelines. These targets were ground-truthed with a localizer that relied on gyro measurements, as well as other sensors. Gyros are usually biased, the Android stack we used automatically corrected for the bias when it detected the device was at rest. This meant that when openpilot started and the car was stationary the bias was corrected appropriately. However, when the car then started moving, the openpilot device would heat up causing the bias to change, but the device never came to rest again so the bias was never corrected. The bias correlation with temperature is similar for every device, so all data would skew the same direction. A more comprehensive localizer that accounted for bias accurately fixed this.
Laneline predictions in the middle of the lanePermalink
November 20, 2019
harald 3:01 PM
found at least one problem relating to bad lanelines people complained about. Seems like when there are white reflections on the hood those get classified as lanelines.
2 replies<br>Last reply 7 years ago
In 2019 we started getting mysterious complaints of cars departing the lane on roads with clearly marked lanelines. This happened because at the time openpilot still relied on the lanelines for driving decisions, and as the image shows, in these cases it would inexplicably detect a laneline in the middle of the lane. After looking for some more cases like this, we found all examples were in situations with bright daylight.
White reflections at front of hood classified as lanelines
The issue became obvious when looking at several examples of the training data with this same flaw. In certain lighting conditions the sun can reflect on the hood showing a bright white area, this gets detected in the ground-truth stack as a laneline marking that is always just in front of the car, and thus gets...