Live data from Hacker News

Autopilot: an open source driving agent

github.com

31–40 of 129 posts

Re: Autopilot: an open source driving agent

#31

Correct me if I'm wrong, but if I were actually to install this in my car, that car would no longer be street legal, right?

The car would likely still be street legal. (IANAL) However, allowing this system to take control of your car on a public road would not.

Another way to say this is, there's nothing dangerous about the hardware. You could be using it as a logging platform for the data on the CAN bus in your car. But letting the software send commands and take control from a driver is a different story.

Re: Autopilot: an open source driving agent

#32

Really, a safety critical hard realtime system with control loops on top of Python, a general purpose OS and a CAN-USB adapter? There are reasons why we have realtime operating systems, deterministic bus systems and dedicated CPUs for these kinds of applications. That might be an interesting research, prototyping or simulation platform. But nothing you want to have on a real public road.

I'm not really following. If it works then why not use a control loop on top of Python? We are engineers, after all.

Because by "works" you mean "I tried it out a bunch of times and nothing bad happened, so must be production ready", because that's what you do when you build websites and desktop CRUD apps and nobody ever died cause the web server choked under load or the web page rendered a bit funny or the request took a full quarter second because the GC kicked off as a wave of requests came in.

And then one day a one-in-ten-million event that never would've surfaced during testing does happen and the OS crashes or the interpreter hangs or some non-determinism causes a period of non-responsiveness or a bit gets mangled because you don't have any redundancies and solar rays are thing or ... and someone dies. And of course that didn't happen in testing, because all of those things are rare possibilities.

And then it happens again.

And again.

And then you're in court being sued for millions. And a bunch of industry experts who do build their systems with redundancies and do design their systems with a safety-first mindset come to the stand and rip you apart for not taking even the most basic precautions. And when it comes out just how many best practices you completely ignored, you're mostly just hoping beyond hope that all of the legal problems stay on the civil side of the civil/criminal divide.

Or, to say it in a sentence, "because the sort of exceptional circumstances that safety-critical software needs to handle with grace are very difficult or impossible to account for with a desktop machine running interpreted code on top of Linux."

Re: Autopilot: an open source driving agent

#33

Really, a safety critical hard realtime system with control loops on top of Python, a general purpose OS and a CAN-USB adapter? There are reasons why we have realtime operating systems, deterministic bus systems and dedicated CPUs for these kinds of applications. That might be an interesting research, prototyping or simulation platform. But nothing you want to have on a real public road.

I'm not really following. If it works then why not use a control loop on top of Python? We are engineers, after all.

you could easily starve a process or thread whose purpose is to stop your car in an emergency over a long enough period of time to cause the occupants harm. I haven't dug into the code so I don't know exactly how this software uses processes and threads (you could have one process no threads and crank down nice on the process) but considering this and GC in python I would not feel confident that this system will always respond quickly enough to emergency scenarios.

Re: Autopilot: an open source driving agent

#34

Not everything seems to be open source. I can't seem to find the vision part, only the binary, see: https://github.com/commaai/openpilot/tree/master/selfdrive/v...

Based on a really cursory inspection of the binary and symbols, the binary seems to be an OpenCV project which uses some common image processing algorithms (Sobel edge detection, Hough to find straight lines).

There doesn't seem to be a large amount of embedded data indicative of a trained model or neural network.

So, it seems that the vision algorithms probably mirror those in the common literature and represent a reimplementation or iterative improvement on existing lane-finding systems.

More reversing would probably yield greater insight :)

Re: Autopilot: an open source driving agent

#35
Hmm, the usage of .dbc files is interesting. That format is owned by Vector and proprietary. I'm curious as to what the limits of using DBC are, as I'd love to integrate them into the product I currently work on without paying thousands of dollars for the official API from Vector.

Re: Autopilot: an open source driving agent

#36

Earlier quoted context omitted.

It explicitly states: "THIS IS ALPHA QUALITY SOFTWARE FOR RESEARCH PURPOSES ONLY. THIS IS NOT A PRODUCT. YOU ARE RESPONSIBLE FOR COMPLYING WITH LOCAL LAWS AND REGULATIONS. NO WARRANTY EXPRESSED OR IMPLIED."

And yet comma ai were definitely testing their products on public roads, products which were presumably running this code.

...Which is why it says "YOU ARE RESPONSIBLE FOR COMPLYING WITH LOCAL LAWS AND REGULATIONS".

Re: Autopilot: an open source driving agent

#37
post #34

Not everything seems to be open source. I can't seem to find the vision part, only the binary, see: https://github.com/commaai/openpilot/tree/master/selfdrive/v...

Based on a really cursory inspection of the binary and symbols, the binary seems to be an OpenCV project which uses some common image processing algorithms (Sobel edge detection, Hough to find straight lines). There doesn't seem to be a large amount of embedded data indicative of a trained model or neural network. So, it seems that the vision algorithms probably mirror those in the common literature and represent a r…

I think it's also using Qualcomm's FastCV, judging by the fcv* prefix on a lot of the symbols. Which makes sense, since FastCV is optimized for the Snapdragon processor in the OnePlus 3 phone they use.

Re: Autopilot: an open source driving agent

#38
post #34

Not everything seems to be open source. I can't seem to find the vision part, only the binary, see: https://github.com/commaai/openpilot/tree/master/selfdrive/v...

Based on a really cursory inspection of the binary and symbols, the binary seems to be an OpenCV project which uses some common image processing algorithms (Sobel edge detection, Hough to find straight lines). There doesn't seem to be a large amount of embedded data indicative of a trained model or neural network. So, it seems that the vision algorithms probably mirror those in the common literature and represent a r…

I did the same thing as you, and found reference to RNNs, ReLus etc... That was the part I was really looking forward to see open sourced, but well :)

Re: Autopilot: an open source driving agent

#40

Not everything seems to be open source. I can't seem to find the vision part, only the binary, see: https://github.com/commaai/openpilot/tree/master/selfdrive/v...

Looking at the code, the good stuff is in the binary blob. The binary blob returns polygons for the edges of the road, with a probability for each. Path planning, in "pathplanner.py", consists of a probability-weighted average to find the center of the lane, using an assumption of 3.6m lane width. There's no map-building at all. It's purely reactive.

Speed control uses data from a radar and from the vision system. The path info is used to decide which targets the radar should consider important. The big thing seems to be identifying the "car ahead", if any, and maintaining an appropriate distance.

There's a hard-coded 6 minute timeout to make the driver take control once in a while.

On a good day on a well-marked freeway, this might work. It would be interesting to modify this to process pre-recorded dashcam data and see how well it tracks the road.

Post reply on HN