-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Adds Pedal Interceptor Support for Honda & Acura Vehicles #274
Changes from 17 commits
a087c05
ab53c22
3bb9a1b
eb54840
d9dbf43
0bbf1cd
80df262
d5c1859
2471a1e
2bb629a
6ab21a3
e815afd
834fb23
9ac92fb
c4d2f19
2e7b195
d873cd7
19b5127
8a144b0
ecbaec1
11dd10e
1d92ef4
b98ece5
92d06f2
0a2476f
54896cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,23 +45,45 @@ Supported Cars | |
- Due to limitations in steering firmware, steering is disabled below 12 mph | ||
- Uses stock Honda Sensing for longitudinal control | ||
|
||
- Honda CR-V Touring 2015-2016 | ||
- Honda CR-V Touring 2015-2016 with Honda Sensing | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was intentional to leave off "with Honda Sensing". This is redundant because Honda Sensing is not an option, it is standard on touring trim, and touring only for these years There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The whole file is redundant. The supported vehicles don’t belong on the readme. They belong on the wiki or a linked The code base has vehicles hardcoded. If we’re writing It must be feature based or at the very least year make model based. I get that it was mostly for rapid prototyping purposes but it’s all redundant in the end game. To truly inspire, we will have to move away from the majority of how things are written. But baby steps I suppose. :D There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. README went through big changes for 0.5 release. Better to revert the changes to this file. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair enough, will do! |
||
- Can only be enabled above 25 mph | ||
- *With optional [Comma Pedal](#what-is-comma-pedal):* | ||
- Can only be enabled above 12 mph (due to steering firmware limitations) | ||
- Enables stop and go (gas / brake) all the way to 0 mph | ||
- Steering warning under 12 mph | ||
|
||
- Honda Odyssey 2018 with Honda Sensing (alpha!) | ||
- Can only be enabled above 25 mph | ||
- *With optional [Comma Pedal](#what-is-comma-pedal):* | ||
- Can be enabled at any speed. | ||
- Enables stop-and-go steering, gas, and brake all the way to 0 mph. | ||
|
||
- Honda Pilot 2017 with Honda Sensing (alpha!) | ||
- Honda Pilot 2016-2017 with Honda Sensing (alpha!) | ||
- Can only be enabled above 27 mph | ||
- *With optional [Comma Pedal](#what-is-comma-pedal):* | ||
- Can only be enabled above 12 mph (due to steering firmware limitations) | ||
- Enables stop and go (gas / brake) all the way to 0 mph | ||
- Steering warning under 12 mph | ||
|
||
- Honda Ridgeline 2017 with Honda Sensing (alpha!) | ||
- Can only be enabled above 27 mph | ||
- *With optional [Comma Pedal](#what-is-comma-pedal):* | ||
- Can only be enabled above 12 mph (due to steering firmware limitations) | ||
- Enables stop and go (gas / brake) all the way to 0 mph | ||
- Steering warning under 12 mph | ||
|
||
- Acura ILX 2016 with AcuraWatch Plus | ||
- Due to use of the cruise control for gas, it can only be enabled above 25 mph | ||
- *With optional [Comma Pedal](#what-is-comma-pedal):* | ||
- Can only be enabled above 12 mph (due to steering firmware limitations) | ||
- Enables stop and go (gas / brake) all the way to 0 mph | ||
- Steering warning under 12 mph | ||
|
||
- Acura RDX 2018 with AcuraWatch Plus (alpha!) | ||
- Can only be enabled above 25 mph | ||
- *With optional [Comma Pedal](#what-is-comma-pedal):* | ||
- Can be enabled at any speed. | ||
- Enables stop-and-go steering, gas, and brake all the way to 0 mph. | ||
|
||
### Toyota + Lexus ### | ||
|
||
|
@@ -114,6 +136,14 @@ We've written a [porting guide](https://medium.com/@comma_ai/openpilot-port-guid | |
|
||
Sadly, BMW, Audi, Volvo, and Mercedes all use [FlexRay](https://en.wikipedia.org/wiki/FlexRay) and are unlikely to be supported any time soon. We also put time into a Ford port, but the steering has a 10 second cutout limitation that makes it unusable. | ||
|
||
### What is Comma Pedal? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is a good paragraph, which is worth to keep. I'll copy paste in our internal branch. Thanks! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So does this mean you want the rest of the readme changes removed or? |
||
|
||
[Comma Pedal](https://community.comma.ai/wiki/index.php/Comma_Pedal) is used to provide stop-and-go capability to openpilot-supported cars that don't currently support stop-and-go. | ||
- [About the Comma Pedal](https://community.comma.ai/wiki/index.php/Comma_Pedal) | ||
- [Build a Comma Pedal](https://medium.com/@jfrux/comma-pedal-building-with-macrofab-6328bea791e8) | ||
|
||
***NOTE: The Comma Pedal is not officially supported by [Comma.ai, Inc.](https://comma.ai)*** | ||
|
||
Directory structure | ||
------ | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -219,11 +219,19 @@ def update(self, cp): | |
cp.vl["DOORS_STATUS"]['DOOR_OPEN_RL'], cp.vl["DOORS_STATUS"]['DOOR_OPEN_RR']]) | ||
self.seatbelt = not cp.vl["SEATBELT_STATUS"]['SEATBELT_DRIVER_LAMP'] and cp.vl["SEATBELT_STATUS"]['SEATBELT_DRIVER_LATCHED'] | ||
|
||
# STEER STATUS | ||
# 2 = temporary; 3 = TBD; 4 = temporary, hit a bump; 5 = (permanent); 6 = temporary; 7 = (permanent) | ||
# TODO: Use values from DBC to parse this field | ||
self.steer_error = cp.vl["STEER_STATUS"]['STEER_STATUS'] not in [0, 2, 3, 4, 6] | ||
self.steer_not_allowed = cp.vl["STEER_STATUS"]['STEER_STATUS'] != 0 | ||
self.steer_warning = cp.vl["STEER_STATUS"]['STEER_STATUS'] not in [0, 3] # 3 is low speed lockout, not worth a warning | ||
self.steer_warning = cp.vl["STEER_STATUS"]['STEER_STATUS'] not in [0, 3] # 3 is low speed lockout, not worth a warning | ||
|
||
# Adds steering warning for low speed lockout on interceptor-enabled vehicles | ||
# For safety, it's best we warn the driver that the steering is disabled on cars requiring interceptor for stop and go. | ||
# Although for most of the vehicles that steer to zero this is pointless, for some like the 2016 / 2017 Pilot and Ridgeline they only steer to 12mph with Pedal, they need the warnings. | ||
if self.CP.enableGasInterceptor and self.CP.carFingerprint in (CAR.PILOT, CAR.ACURA_RDX, CAR.RIDGELINE): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would prefer no alerts at low speed. they are repeatable (user gets used to them pretty quickly) and annoying I think. Plus at 12mph steer isn't critical. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alright, sounds good! |
||
self.steer_warning = cp.vl["STEER_STATUS"]['STEER_STATUS'] != 0 | ||
|
||
self.brake_error = cp.vl["STANDSTILL"]['BRAKE_ERROR_1'] or cp.vl["STANDSTILL"]['BRAKE_ERROR_2'] | ||
self.esp_disabled = cp.vl["VSA_STATUS"]['ESP_DISABLED'] | ||
|
||
|
@@ -276,7 +284,8 @@ def update(self, cp): | |
self.gear_shifter = parse_gear_shifter(can_gear_shifter, self.CP.carFingerprint) | ||
|
||
self.pedal_gas = cp.vl["POWERTRAIN_DATA"]['PEDAL_GAS'] | ||
# crv doesn't include cruise control | ||
|
||
# if doesn't include cruise control | ||
if self.CP.carFingerprint in (CAR.CRV, CAR.ODYSSEY, CAR.ACURA_RDX, CAR.RIDGELINE): | ||
self.car_gas = self.pedal_gas | ||
else: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -275,7 +275,7 @@ def get_params(candidate, fingerprint): | |
ret.wheelbase = 2.81 | ||
ret.centerToFront = ret.wheelbase * 0.41 | ||
ret.steerRatio = 16.0 | ||
ret.steerKpV, ret.steerKiV = [[0.38], [0.11]] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we remove this? It's a super minor change anyway |
||
ret.steerKpV, ret.steerKiV = [[0.38], [0.114]] | ||
|
||
ret.longitudinalKpBP = [0., 5., 35.] | ||
ret.longitudinalKpV = [1.2, 0.8, 0.5] | ||
|
@@ -288,7 +288,7 @@ def get_params(candidate, fingerprint): | |
ret.wheelbase = 3.18 | ||
ret.centerToFront = ret.wheelbase * 0.41 | ||
ret.steerRatio = 15.59 | ||
ret.steerKpV, ret.steerKiV = [[0.38], [0.11]] | ||
ret.steerKpV, ret.steerKiV = [[0.38], [0.114]] | ||
|
||
ret.longitudinalKpBP = [0., 5., 35.] | ||
ret.longitudinalKpV = [1.2, 0.8, 0.5] | ||
|
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.
ok