-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chevy Volt Setup Instructions #104
Conversation
Longer demo videos: |
This is awesome, thanks for all the effort. I was wondering how it does in stop and go traffic? Most of my 45 mile drive to downtown Miami is stop and go mostly straight but a few turns. I have been looking at the Volt and wanted a little more autonomous support and this may be enough to have me buying one sooner than later. Thanks again, |
Hopefully this helps someone. Additional parts required for @vntarasov board above: (all parts from existing Neo Digikey order and also these below)
I haven't put the digikey numbers for the caps and resistors because they are just normal parts, might update that later. Also, no idea what diode should be used? Any recommendations vntarasov? |
Thanks @linagee! I suggest a different L1. To survive in case of a short-circuit of output to ground, L1 preferably should be at least 350mA (NCV7356's overcurrent protection guarantee). |
I've replaced the L1 above with digikey: 587-2443-1-ND, current rating: 300mA, current saturation: 410mA. (Other choices that fit the footprint were: |
Thank you for submitting this! I guess my message from LA didn't post, was out of office last week. I have locked the bounty while we work to upstream. Hoping to rent a car this week and test. Questions:
For the code to be upstreamed, we need the board to provide safety as well. (block messages when not engaged). See https://github.com/commaai/panda/blob/master/board/honda_safety.h for a template. On another note, we are finally getting some good quality candidates for our firmware position. So once we hire, expect the quality of the board code to increase. We know it's bad... |
selfdrive/car/gm/carstate.py
Outdated
|
||
self.steer_override = False | ||
|
||
self.steer_error = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do steering and braking ever have errors? Like do they ever not listen to commands? Need seatbelt and doors as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes EPS ignores commands (plus it always ignores LKAS commands below about 8mph). Workaround is to re-engage. I haven't figured out yet where the EPS reports this error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So am I correct in saying this solution is good from 8-10 MPH up and not currently usable below that? Over 1/2 of my drive is stop and go so I would need something that at the very least can still do the ACC at low speeds then take over steering as I accelerate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACC can be controlled up to 0 km/h while the steering can't be controlled below 10km/h. So the solution is probably to deactivate automatically the steering control below that speed or install a gateway between the EPS and the rest of the car to modify the speed signal sent over CAN if you really want to keep the functionality below 10 km/h.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the reply, both would be acceptable options but ultimately support down to 0 would be my preferred solution. Something to think about for the future. Once this is tested and support "officially" added I will be ordering my Volt.
selfdrive/car/gm/interface.py
Outdated
|
||
# steering wheel | ||
ret.steeringAngle = self.CS.angle_steers | ||
ret.steeringPressed = self.CS.steer_override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is always being set to False. We need the timer to reset when the user uses the steering wheel.
@geohot, I'm excited to see the Volt/Bolt bounty locked :) Forgot about the board. Will do. Openpilot of course will not engage until board's state machine reports "controls allowed".
|
The SW GMLAN is actually not required at all to use it with Openpilot on a second gen Volt. All of the info you use from the SW GMLAN is available on the other CAN buses (mainly the Powertrain and Chassis/Object). The only thing I haven't seen anywhere on the others HS buses is the beep/chime command which seem to be only available on the SW GMLAN. I've a Panda as gateway only for this particular signal. This port should probably be renamed as GM Global A as their intent is to have a superset architecture that cover all possibles cases of options for any vehicles using this architecture. For example, the message to control the steering is the same in the Bolt when I checked couple of months ago. It also mean that once this port is completed, it not only open up the Volt but the vast majority of the 2010+ GM products that has LKA/ACC as an OEM options. It also mean that since it's easy enough to reprogram all nodes that are not in LKA/ACC mode in a car not equipped with LKA/ACC but for which theses options were available, it could be reprogrammed with the right firmware and unlock the possibility to control them in an LKA/ACC fashion with Openpilot. It would also require retrofitting an OEM or an aftermarket radar. This should be confirmed with logs from couple of models that offer the same equipment as the Volt (ELR, XTS, ATS, SRX Escalade ,Malibu, Impala etc..) |
Assuming your Volt Premier Gen2 has feature codes: - = must not have, + = must have, check passenger glove compartment for feature code list label
The Front Radar, Front Camera (5&7 and 6&8 bridge), OBD2 port (w/Panda doing forwarding), and Active Safety Control Module (6&7 and 13&14 bridge) are the only things on the Object CAN bus.
As you can see, there are four buses total and they can all be accessed from the OBD2 port to the lower left of the steering wheel. (1 low speed GMLAN/CAN bus, 3 high speed CAN buses) The low speed bus is Single-Wire CAN and the high speed CAN buses are all differential pairs. Object and Chassis CAN busses typically get a copy of Powertrain CAN bus packets, but the opposite direction is not quite (or ever?) true. |
@linagee : There's a typo for the OBD2 connector : pin 13 is chassis CAN LOW (-) |
This is perfect. I suspect we can even bitbang the GMLAN chime from the MCU without using a CAN. Very exciting if they are all on the OBD port! I imagine the camera is sending these packets normally. Is there a way to stop it sending packets without unplugging it? Would be amazing if we could control GM through only the OBD port. |
@geohot : according to the FSM, the Object CAN will be inaccessible from the OBD2 port (pins 3/11) if the front camera is unplugged as the splice to the front radar goes through this device (dual pinout). It should also be noted that if the Active Safety Module is unplugged, there will be one missing CAN termination resistor on the network. A 120 ohms resistors should be added at the other end of the Object CAN network. |
So on Honda, there's diagnostic commands to disable certain modules sending commands. The ideal is that the panda will disable the stock modules in software. The dream:
|
That was my ultimate goal, one panda in the OBD2 port with a long USB cable to the NEO. I also have the 5V version of fan in the NEO to be driven by the 5V from the Panda. We could spend more time to find a way to get the chime to work from the PT CAN, I'm pretty sure it's achievable and it's worth the time spent if we could get a clean solution with only a Panda and nothing else required. |
My dream is doing it all through the Front Camera plug. Depending on whether the Front Camera module is sending steering packets or whether it's just sending everything to the Active Safety Control Module (along with the front radar data) determines if this is possible or not. @vntarasov is telling me that's not possible so I'm likely going to go with a two board solution to emulate what he has working. (Panda seems less convenient for me because of it's limited availability / limited open sourceness.) (@TheMutley typo fixed, thanks for pointing that out.) |
Wow! Nice work.. |
Re: Chime (Assuming the steering wheel buttons can be accessed from other buses as @TheMutley said.) |
Hi @GregHans . Re: "where is it coming from?" - you can use two CAN transceivers of the Neo board to man-in-the-middle any ECU, to see what's sent and what is received. |
@geohot , what would be the best way to go about car-adaptive board safety code?
Wanted to get your opinion / implementation strategy before jumping into coding. What would an elegant enough way for common/fingerprints.py logic to configure the neo board? |
That sounds good to me. boardd could proxy a control request from fingerprints. (btw, check out commaai/panda#16, this is how we move away from boardd eventually) |
Re: fingerprinting, I think we should use the VIN for cars that broadcast it on the PT CAN since the way it's actually done could end up not fingerprinting the car if a new UDS call is done upon startup and send a new CAN ID that was not used in the fingerprint of the car. I've been using this code for my port :
|
@vntarasov I have all the signals you need regarding the EPS and much more! I'm currently building a new Powertrain, Chassis, Object and GMLAN DBC (with the actual GMLAN bahavior in them) which will combine your findings and mine. I will post them this weekend after I verified everything. |
@TheMutley you have all the EPS traffic? @vntarasov I don't actually have a Neo board.. My hardware consists of a board I designed for a chademo quick charging project using two single CAN processors linked by UART so it's fine when the messages are known but can't really support the bandwidth for true man-in-the-middle testing. I've popped off the cover for the Mobileye.. If I unplug it and short the CAN pins through the connector I assume the car complains.. As long as it's not a permanent DTC I'll go and try it, but if you already have the complete Mobileye CAN traffic mapped that would save me the time. I suspect most of the traffic on the Object bus is from the ESR (I've used the Delphi ESR in other applications). It looks like 306/308 are from the vehicle (steering, speed)?? I'm looking specifically for the messages from Mobileye. I've ordered the shop manuals and would be happy to tap in anywhere for testing but might need to borrow a Neo or similar for true man-in-the-middle stuff. I'm in SoCal. |
@GregHans : I have all the EPS traffic as I placed a gateway in-between the EPS and the rest of the car. All the EPS IDs are not all RE but the single most important one that unlock a true LKA is : the EPS error signals. With this, once you notice that it's giving an error , I've find out that you have to temporarily turn off the LKA control for a very short time and restart it. It's almost unnoticeable for the driver. On my setup , I have a special chime sound to let me know that it's currently being reset. With this , I can drive for a very long time without problems. |
Thanks @TheMutley .. I'm not exactly sure what you mean by the error signal.. Are you referring to the "keep your hands on the wheel" alarm? Is the steering angle reporting coming from EPS or a separate device (like on Prius)? If it's from the EPS, couldn't a gateway between EPS and th car just diddle the lower bits to make the car think hands are on the wheel? What are the IDs to/from EPS? |
@GregHans error like in EPS setting a bit to warn that it no longer accept being controlled by the LKA command. This is triggered by the control algorithm in the EPS firmware to prevent weird or odd control request. I have not being able to pin point exactly on which type of signal form it's triggering this. It's probably not useful since we know when it's on/off and we just need to turn off the control momentarily. I just drove more than two consecutive hours , and with my current LKA control tuning , the chime to let me know that the EPS as detected an error probably went on 5 or 6 times. The tuning parameters for LKA are largely responsible for the EPS to go off. The more aggressive and responsive they are , the more frequent it will go off. |
@TheMutley ah.. Interesting. Good to know.. So you've identified the location of this EPS error bit? I think I might have seen this condition even with the stock LKA some times when I get into aggressive ping-ponging in the lane (a nice flat/straight 3 lane road near my house makes for good testing in early morning hours). I now have my display on the dash showing the PT 180 steer value so I can see what I'm feeling through the steering wheel... Pretty cool. Btw, I unplugged the camera module without routing the CAN lines through and noticed from the OBD2 port that all msgs between 310 and 510 went away.. Are we sure the ESR is on the other side of the CAN bridge on the Mobileye connector? I assume 300-310 are from the vehicle projected on the object bus for the ESR.. They were present with the camera unplugged as well.. It seemed strange as lots of the 420-52f stuff looks like ESR target tracks (kinda) so I would have expected all of it to stay or go depending on which side of the camera connector the ESR is on. I should have my shop manuals in a few days then hopefully I'll see exactly how it's wired. |
Btw.. Slightly OT but has anyone found the battery current or SOC on the PT bus? I found the pack voltage on 186 and what I think are temperatures on 222.. |
@Stormwind99, I hope it would work for 2016-2018 ACC Volts. I'll rename it to "CHEVROLET VOLT GEN2". |
I’m so excited for this project, I have a 2017 Bolt EV Premier with LKA and emergency braking but as I’m sure you know there is no ACC option(2018 bolt doesn’t have ACC either) Since the car does detect the car in front can this be used to follow and maintain distance? I just started using chffr and ordered a panda so I can contribute in that way for now, if I can help I wouldn’t mind ordering a EON but although I’m computer and car savvy the only coding I have done was some MS visual basics back when I was a kid in the late 90s :/ |
@XBS9, unfortunately this PR won't be very useful for cars without ACC, unless you can get a custom firmware installed into PCM. |
Thanks for the reply, hopefully it will at least be able to keep the car in the lane like the Model S guy, just won't be able to maintain distance. It would still be worth it, the Bolt OEM LKA is horrible. |
This was v0.3.9 merge. To use it, disable submodule update to not to interfere with voltboard firmware. |
@tedder, which firmware was on the Panda? Any other alterations to the car besides plugged in Panda? Also, #panda or #volt slack channels could be a better place to post it. |
@tedder I've seen "Adaptive Cruise Temporarily Unavailable" randomly on my Volt Gen2 too many times also, but I haven't yet plugged in any pandas/comma.ai stuff. (https://www.google.com/search?q=Adaptive+Cruise+Control+Temporarily+Unavailable) Just pointing out it may or may not be related to installing a Panda. |
Yeah, I never updated the firmware, and am unwilling to go through this again :) Mostly putting here in case others experience it. |
@vntarasov Do I still need to get a voltboard or just two Panda? Is there any tutorial how to flash panda? |
@here Has anyone verified or confirmed that the Volt code/port is compatible with the Cadillac ELR? |
selfdrive/car/gm/carcontroller.py
Outdated
from . import gmcan | ||
|
||
|
||
def actuator_hystereses(final_brake, braking, brake_steady, v_ego, civic): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vntarasov , I would remove CIvic dependencies
selfdrive/car/gm/radar_interface.py
Outdated
|
||
cpt = self.rcp.vl[ii] | ||
# Zero distance means it's an empty target slot | ||
if cpt['TrkRange'] > 0.0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't there a "new track" signal that tells you when the radar starts tracking a new object?
This is useful when the same targetId gets reassigned from an object to another, so we can correctly interpret jumps in vRel and dRel and reset the Kalman filter appropriately.
selfdrive/car/gm/carcontroller.py
Outdated
# More aggressive braking near full stop | ||
NEAR_STOP_BRAKE_PHASE = 1.3 # m/s. ~3mph | ||
|
||
# This is only a safety limit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how many m/s^2 does this correspond to?
selfdrive/car/gm/carcontroller.py
Outdated
# *** compute control surfaces *** | ||
tt = sec_since_boot() | ||
# Only a safety limit | ||
GAS_MAX = 1024 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how many m/s^2 does this correspond to?
2253dd3 fix volt ign detect 3b299d7 add ignition and refactor af9af6d Merge pull request #110 from Jamezz/volt 13e850e more correct f295063 add new define to tests fec9758 gate that with debug 5516ebf one more ifdef cac7b31 only panda has float 938d474 fpu enable ffbf0c7 cleaner de30f27 Revert "need f to not be double" 4142acf need f to not be double 3eb15c8 refactor to share code a4c8b64 change to O2 to fix make recover 711fd11 Enable compiler optimizations, fix things it breaks 2e6f774 block IPAS in main toyota safety mode e7a2b3a add ipas tests 894572c fix tests 367c9ad add safety toyota ipas 95919b9 Bounty: panda high quality CAN autobaud (#96) 6557cd2 Toyota Safety: allow controls only on rising edge of cruise_engaged 02c1ddf Revert "added steer override check when IPAS is in control (#106)" 9f925ba Fix the merge mess 23d3833 Merge from comma upstream a0cc51a Undo safety mode override ea1c1dc make wlan interface name generic 6dbd8c9 Implement WebUSB and upgrade WinUSB to 2.0 (#107) 4fc83a5 Add safety hook for ignition and have GM use gear selector to determine ignition 52b2ac0 switch from travis to circleci 48e2374 build panda esp image 065572a circleci build stm image 7a1f319 add panda python package test and fix safety test 021dde7 move saftey test helper files into safety folder ce0545f add ci files 6a3307c no LIN over ELM 7d21acb added steer override check when IPAS is in control (#106) 1c88caf Safety code testing (#104) f4efd1f Merge pull request #101 from adhintz/master c02618b Merge pull request #102 from quillford/master 1ba5f8a added link to wiki for user scripts de2b19e add support for multiple buses to can_unique and can_bittransition output data in sorted order. git-subtree-dir: panda git-subtree-split: 2253dd3
d62ebdd Toyota: added chr hybrid. Honda: regenerated fit. 29e3247 This adds support for 8 Speed Auto Tranismission (#104) ebfe523 🚐 more chrysler pacifica signals (#84) 5023510 Honda Nidec: added wrong config radar value 563e3b5 Add 2018 Honda Fit EX F-CAN dbc (#100) git-subtree-dir: opendbc git-subtree-split: d62ebdd
* Update README.md (#295) Changed GM minimum speed for steer control * Added 2014 pre-AP tesla (prior to Oct 28, 2014) (#303) * Revert "Added 2014 pre-AP tesla (prior to Oct 28, 2014) (#303)" (#307) This reverts commit e07853b. * Squashed 'panda/' changes from 5c905b7..5570dac 5570dac Merge pull request #124 from AllWashedOut/patch-1 341e6d3 bumped panda version 98b71f3 Toyota safety: added support for camry and chr (#127) ba8762d Toyota safety: vars and consts need 'toyota_' prefix d8fc9ff Update tesla_tester.py 2a8c2c2 Strengthen VIN detection git-subtree-dir: panda git-subtree-split: 5570dac * Squashed 'opendbc/' changes from 3741637..d62ebdd d62ebdd Toyota: added chr hybrid. Honda: regenerated fit. 29e3247 This adds support for 8 Speed Auto Tranismission (#104) ebfe523 🚐 more chrysler pacifica signals (#84) 5023510 Honda Nidec: added wrong config radar value 563e3b5 Add 2018 Honda Fit EX F-CAN dbc (#100) git-subtree-dir: opendbc git-subtree-split: d62ebdd * openpilot v0.5.1 release * Spelling Correction (#316)
Aldd kegman conf
It also converts LKAS11 and LKAS12 into byte only messages Based off hyundai_2015_ccan.dbc
* inital infrastructure for panda safety testing * add test for toyota acceleration * test for non real time torque rate limits and refactoring * add test for cruise disable * fix toyota limit down * add tests for realtime limits * test for torque measurements * fix toyota test setup * honda button logic * test for brake logic * tests for gas logic * test steer, gas and brake message contents * add test script * fix hardcoded limits
…TE to interfaces (commaai#104)
Demo
https://www.youtube.com/watch?v=IYa5vQQEX2w
Supported Cars
Chevy Volt 2017 Premier with Adaptive Cruise Control package
Recommended Setup
a) EON running latest release of openpilot.
b) Panda is plugged into OBDII port. All types of pandas are supported. For a nicer looking setup, route the USB cable from EON to Panda through the left pillar and behind the headliner. You may have to use a short extension for the USB cable.
c) Radar power is controlled manually. Don't forget to turn it off to not to drain Volt's 12v lead-acid battery.
Limitations