Endowing a Chevy Bolt with Self-Driving Capabilities Using an Openpilot-Derived System
A quick note about the awesome Chevy Bolt
In my opinion the Chevy Bolt is a better car than the Tesla Model 3. There, I said it. How? Why? The LT version of the Bolt is about $1000 cheaper than the Standard Range Model 3 and has slightly more range (259 miles vs 250), but unlike the Model 3 it has a nicely utilitarian 5-door design, does not have the stupidly minimalist interior design (did you know that in the Model 3 you can't even open the glove box without the touchscreen? Or change the windshield wiper speed? I'm convinced that minimalism in UI design is a fad). There is a place in the world for tactile controls, but Tesla's obsession with reducing every input to the touchscreen is juvenile. Certain controls (like the windshield wipers) MUST be findable by the driver without taking eyes off the road (i.e., by feel alone). This will never be possible with touch screens.
Back to the point, another issue is that in the war against "the right to repair" the Tesla ethos comes with a lot of baggage. Don't get me wrong, I think Elon Musk is an incredibly important force for progress, but let us not pretend it's all good! Meanwhile, Chevy came out with the amazing car they call the Bolt, but unfortunately their marketing department is filled with morons. Harsh, yeah, but hear me out. In 2011 they came out with the Volt, with a V. OK. Around the same time, they rebranded the Daewoo Matiz as the Chevy Spark. OK, cool... except the Spark wasn't an electric car, nor even a hybrid (although they did come out with a variant called the Spark EV a bit later on)! FUCK guys, missed opportunity! So eventually GM is ready to get into the all-electric car game, and they're hatching a design for a really well thought out long-range EV that some were calling the Tesla Killer. And what do they call it? The Bolt, with a B, forever ensuring that everyone who hears the word will mis-hear it as "Volt", which is now discontinued. On top of that, in contrast to Tesla's fanfare-powered press releases, GM has done nothing to build enthusiasm for the Bolt, which at this point seems ever-doomed to be seen as the un-cool Tesla alternative. WHAT A MISSED OPPORTUNITY. There should be a *significant* fan base for this car, and instead I only see another Bolt on the road once every few months. You almost have to wonder if the same execs that killed the GM EV-1 still have an axe to grind. And it really is a great car. The only thing the Bolt doesn't have going for it is autopilot, which is what the rest of this page is about.
DIY Car Autopilot? Is that really a thing?
Yes. The main open source software project is called openpilot, has a large community of extremely intelligent and committed developers, and has several spinoffs. In general, people run it on a commercially-available hardware retrofit kit from a company called Comma, which is also heavily involved in openpilot development. At this point it's possible to use these resources to have pretty reliable L2 automation on many 2017-and-newer cars with an easy to install add-on.
How is this possible?
A common safety feature on new cars (since about 2017) called LKAS (Lane Keep Assist System) gently nudges a car back into a lane if a dedicated camera detects that the driver is allowing the car to cross lane boundaries. Because said cars have the electronic power steering system needed for the car to physically steer itself, as well as the CAN bus (Controller Area Network bus) functionality to relay steering commands, this system can be hacked for control from a much more advanced autopilot system. Moreover, many new cars also have ACC (Adaptive Cruise Control), whereby the car can accelerate and brake to maintain the distance to a leading car, meaning velocity commands are also supported over the CAN bus. Cars that have both LKAS and ACC thus have all the electromechanical actuators and communications infrastructure needed to fully control the car by computer. Luckily, even without ACC, most electric cars (like the Bolt) still have all the necessary degrees of freedom because "single pedal mode" allows the accelerator alone to bring the car to a full stop. Taking advantage of that, the signals from the car's accelerator pedal can be intercepted by custom hardware which then sends replacement velocity commands (generated by the autopilot) to the car's EV-ECU (Electric Vehicle Engine Control Unit). The icing on the cake -- the thing that brings it all together -- is that all these CAN bus control signals are accessible via the OBD-II (On-Board Diagnostics-2) port standard, which has been mandatory for all vehicles sold in the US since 1996.
The Purpose of this Webpage
This page documents my own notes on using a spinoff of openpilot on a Chevy Bolt, which isn't an officially supported car. Integrating this system in a Bolt is made possible by Jason Shuler's development work, with more recent contributions from others. An openpilot wiki for the Bolt is here, but I find it useful to maintain this page separately as the modifications I can describe here are unconstrained by the strict (but warranted) openpilot safety culture. That is, some of what's described on this page may be dangerous if attempted or used by a non-engineer, or someone who otherwise doesn't understand and respect the limitations of the system. These changes include:
General Links
This page describes a specific incarnation of openpilot on a specific car. For context, see the company actually developing openpilot and selling the retrofit kits for supported cars: comma.aiConfiguration Variations
Special Hardware
Choose subset of hardware bits based on "Configuration Variations" above:
"Giraffe" Jumper-Configurable Cable Passthrough
Custom version for Chevy Bolt by J. Shuler
Bolt-Specific Cable Assembly for Comma Harness
Pedal Interceptor
This is a new single-sided version with easier access to the DFU (programming mode) pin. Board layout by J. Haupt with direction from J. Shuler.
Modifying and Mounting the Comma EON for External Power and Camera
The Eon is the previous-generation computer platform for openpilot, but the computer performance is identical to the newer Comma 2 (there was no Comma 1... that was the Eon). The improvements in the Comma 2 incorporated the functionality of the Panda Black (GPS and CAN bus interface) internally, improved resistance to the hot sun by removing the internal battery, and added IR illumination LEDs to improve nighttime camera performance.
Removing the internal battery and powering the Eon externally:
coming soon
Removing the internal front facing camera:
coming soon
Mounting Eon and camera in alternate location:
coming soon
On using the NVIDIA Jetson Nano instead of officially-supported hardware
8/19/20 UPDATE: I'm putting the Jetson project aside for now in favor of getting up and running with official hardware (the comma.ai EON), and modifying such to externalize the camera and remove the battery.
Since the introduction of the original Raspberry Pi single-board computer (SBC) in 2012, the SBC market has expanded significantly, with many other manufacturer's jumping on the bandwagon. An increasingly-popular SBC from NVIDIA called the Jetson Nano has a GPU which has been hardware-optimized for AI applications, and it comes in at just over $100. The native OS is a slight variant of Ubuntu, and when coupled with external webcams and a screen, is a cheaper, more powerful, and (presumably) a more extensible alternative to the officially supported openpilot hardware (the Comma 2 and its predecessor, the EON).
Aside from an ongoing tendency toward technological masochism, why use an SBC instead of the Comma 2 or EON? For me, when it comes to an open source project like this I just can't bring myself to spend $1k on an all-in-one specially-packaged smartphone (the Comma 2), which probably isn't going to be able to survive the march toward L3 autonomy, which I'll be less able to experiment with, and which fixes the screen to be co-located with the camera. I need flexibility, damnit! My thinking for the Jetson is that, aside from the development-ease within the "classical" Linux environment offered by Ubuntu on the Jetson, if (when) openpilot or its derivatives get to the point of using side- and rear-facing cameras as will be necessary for L3+ autonomy (Musk is right on about LIDAR being a dead-end by the way... the human head is an existence proof for L5 automation with just TWO cameras and a yaw actuator, if you get my drift), the Jetson should be able to handle it. Just add cameras. Also, the idea of sticking a smartphone-like device to my windshield below the rear-view mirror is, to me, unsavory. We can do better.
Installing openpilot on the Jetson
I got stuck. See note above. My progress is documented here.
References: Official openpilot installation instructions for Ubuntu; Jinn Liu's notes on comma/openpilot programming, including alternate installation instructions for openpilot on Ubuntu; comma.ai demoing openpilot w/ PC