Live data from Hacker News

Autopilot: an open source driving agent

github.com

41–50 of 129 posts

Re: Autopilot: an open source driving agent

#41

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.

> 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.

IAANAL, but I don't think even that is true. I think it actually is legal to allow it to take control of your car, provided you are still sitting in the driver's seat and can take control back at any time.

Re: Autopilot: an open source driving agent

#42

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.

[deleted]

Re: Autopilot: an open source driving agent

#43
post #3

I have my reservations about this code. I am a long time free software developer so it is hard to say it but it seems clear to me that a single entity (from a legal perspective) has to "own" the self-driving car software. In the future bits of a self-driving car system may get open-sourced the way Facebook Open Compute has emerged in data centers, but first the proprietary implementations will need to pave the way in…

I don't see why. Liability for other dangerous, complex artifacts don't necessarily follow that rule, even when it comes to software, and even when it comes to open source software.

GPSd is one example. Used pretty much everywhere, including life-and-death real-world situations. Consumer products (like your car's GPS) including it tend to pop up a "don't be an idiot, but we're not liable even if this malfunctions" screen. (The Pentagon and oceanic research operations, well, I'm the wrong person to ask about how they handle software liability, but kinda doubt we'll see class actions from either.) But the important part is that that screen is not there to protect the authors of GPSd. It is there to protect the VAR.

Re: Autopilot: an open source driving agent

#44

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.

The big problem in my mind is that Python is the wrong tool for the job. It is 2016, there are more hard-RTOS prototyping platforms than ever before. My favorite is National Instrument's RIO platform, which lets you use C or LabVIEW (imho the best language for prototyping control algorithms by far). Mathworks also has a platform based on Matlab/Simulink, and the list goes on.

Why use Python when there are existing tools that are made for this type of application?

Re: Autopilot: an open source driving agent

#46
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…

There's a neural network in there :)

Re: Autopilot: an open source driving agent

#47

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.

This is research code, not product code. I wouldn't recommend shipping a consumer product with your PID loops in Python.

Re: Autopilot: an open source driving agent

#48

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.

The thing that distinguishes an engineer from a bodger is not just observing what works but understanding why, how, and to what margin of safety it works.

The reason the "realtime" designation exists at all is that, in a realtime system, it is possible to say what the worst-case timing is for any operation, and to guarantee by design what failure conditions can and cannot happen.

You cannot guarantee in a python program the timing of your GC. You can't even guarantee that the whole thing won't fall over with an exception.

And we've already had this problem with the Toyota "unintended acceleration" bug, in the (far simpler) electronic throttle system: https://users.ece.cmu.edu/~koopman/pubs/koopman14_toyota_ua_... - and that was using C, but not in an appropriate style (MISRA or similar).

(89 dead, cost Toyota billions)

Re: Autopilot: an open source driving agent

#50
post #46
post #34

Earlier quoted context omitted.

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…

There's a neural network in there :)

Ha, straight from the horse's mouth - I stand corrected :) I think this will be the first binary I've pulled apart with one, look forward to it!
Post reply on HN