Skip to content
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

Honda Pilot 2017 Port #161

Merged
merged 55 commits into from
Feb 9, 2018
Merged
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
d7b0114
Update README.md
vanillagorillaa Dec 14, 2017
e3877fc
Update fingerprints.py
vanillagorillaa Dec 14, 2017
563f2ce
Update carstate.py
vanillagorillaa Dec 14, 2017
6115b56
Update hondacan.py
vanillagorillaa Dec 14, 2017
a70ce5b
Update interface.py
vanillagorillaa Dec 14, 2017
b74f8b3
Update interface.py
vanillagorillaa Dec 14, 2017
8602a3a
Update interface.py
vanillagorillaa Dec 14, 2017
f76e4ff
Update README.md
vanillagorillaa Dec 15, 2017
0814683
Update README.md
vanillagorillaa Dec 15, 2017
102f8de
Update README.md
vanillagorillaa Dec 15, 2017
9e2323f
Update fingerprints.py
vanillagorillaa Dec 15, 2017
ad4d9fc
Update carstate.py
vanillagorillaa Dec 15, 2017
a713b6a
Update hondacan.py
vanillagorillaa Dec 15, 2017
7d35de7
Update interface.py
vanillagorillaa Dec 15, 2017
4ca17cb
Merge pull request #1 from vanillagorillaa/vanillagorillaa-rdx-port
vanillagorillaa Dec 15, 2017
2e01ac6
Update carstate.py
vanillagorillaa Dec 15, 2017
cb6eece
Update hondacan.py
vanillagorillaa Dec 15, 2017
f28f5d1
Merge pull request #2 from vanillagorillaa/vanillagorillaa-rdx-port
vanillagorillaa Dec 15, 2017
6a04ff8
Merge branch 'devel' into vanillagorillaa-pilot-port
vanillagorillaa Dec 15, 2017
6c87943
Update README.md
vanillagorillaa Dec 15, 2017
6fb4f3e
Update fingerprints.py
vanillagorillaa Dec 15, 2017
e255be7
Update carstate.py
vanillagorillaa Dec 15, 2017
e104c95
Update carstate.py
vanillagorillaa Dec 15, 2017
ee4510d
Update carstate.py
vanillagorillaa Dec 15, 2017
9927bd3
Update hondacan.py
vanillagorillaa Dec 15, 2017
b219e3c
Update interface.py
vanillagorillaa Dec 15, 2017
426bc09
Update carstate.py
vanillagorillaa Dec 15, 2017
70f5a95
Update carstate.py
vanillagorillaa Dec 15, 2017
46ec856
Update Pilot Fingerprint
vanillagorillaa Dec 18, 2017
eab0301
Update fingerprints.py
vanillagorillaa Dec 18, 2017
ae60223
Give pilot its own definition and not use ILX
vanillagorillaa Dec 18, 2017
1f14ae2
add pilot argument
vanillagorillaa Dec 18, 2017
dde9e23
Add Pilot interface
vanillagorillaa Dec 18, 2017
f6821da
Add pilot argument
vanillagorillaa Dec 18, 2017
e8ca426
Update interface.py
vanillagorillaa Dec 18, 2017
2ab23b6
Parse Different gear on pilot
vanillagorillaa Dec 18, 2017
f509631
Add steer max
vanillagorillaa Dec 21, 2017
9583f0b
Fixed duplication of steer max value
energee Dec 21, 2017
d4919ee
Adjust PID's for steering
vanillagorillaa Dec 24, 2017
21a45c9
Merge branch 'devel' into vanillagorillaa-pilot-port
vanillagorillaa Dec 24, 2017
24f27ab
Merge branch 'devel' into vanillagorillaa-pilot-port
vanillagorillaa Dec 24, 2017
853624a
Update carcontroller.py
vanillagorillaa Dec 24, 2017
b8894f8
Change Steer Ratio and wheelbase
vanillagorillaa Jan 19, 2018
e33bf2c
Merged with all odyssey code
energee Jan 19, 2018
1cd4754
Update Steer fault values
vanillagorillaa Jan 19, 2018
1a18eec
Update Kp,Ki Ratio
vanillagorillaa Jan 23, 2018
e4be70f
Merge branch 'devel' into vanillagorillaa-pilot-port
vanillagorillaa Jan 31, 2018
4d74803
Update interface.py
vanillagorillaa Jan 31, 2018
ce69814
Update readme for Pilot
vanillagorillaa Feb 3, 2018
db5a328
add pilot
vanillagorillaa Feb 8, 2018
9a26945
Update fingerprints.py
vanillagorillaa Feb 8, 2018
097c4bc
Update carstate.py
vanillagorillaa Feb 8, 2018
14003cf
add signals
vanillagorillaa Feb 9, 2018
a3d17df
add signal
vanillagorillaa Feb 9, 2018
c687240
Merge branch 'devel' into vanillagorillaa-pilot-port
vanillagorillaa Feb 9, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Supported Cars

- Honda Odyssey 2018 with Honda Sensing (alpha!)
- Can only be enabled above 25 mph

- Honda Pilot 2017 with Honda Sensing (alpha!)

- Toyota RAV-4 2016+ non-hybrid with TSS-P
- By default it uses stock Toyota ACC for longitudinal control
Expand Down Expand Up @@ -62,8 +64,6 @@ Community WIP Cars

- [Classic Tesla Model S (pre-AP)](https://github.com/commaai/openpilot/pull/145)

- [Honda Pilot 2017 with Honda Sensing](https://github.com/commaai/openpilot/pull/161)

- [Acura RDX 2018 with AcuraWatch Plus](https://github.com/commaai/openpilot/pull/162)

Directory structure
Expand Down
5 changes: 5 additions & 0 deletions common/fingerprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class HONDA:
ACURA_ILX = "ACURA ILX 2016 ACURAWATCH PLUS"
CRV = "HONDA CR-V 2016 TOURING"
ODYSSEY = "HONDA ODYSSEY 2018 EX-L"
PILOT = "HONDA PILOT 2017 TOURING"


class TOYOTA:
Expand Down Expand Up @@ -31,7 +32,11 @@ class TOYOTA:
HONDA.ODYSSEY: {
57L: 3, 148L: 8, 228L: 5, 229L: 4, 316L: 8, 342L: 6, 344L: 8, 380L: 8, 399L: 7, 411L: 5, 419L: 8, 420L: 8, 427L: 3, 432L: 7, 450L: 8, 463L: 8, 464L: 8, 476L: 4, 490L: 8, 506L: 8, 542L: 7, 545L: 6, 597L: 8, 662L: 4, 773L: 7, 777L: 8, 780L: 8, 795L: 8, 800L: 8, 804L: 8, 806L: 8, 808L: 8, 817L: 4, 819L: 7, 821L: 5, 825L: 4, 829L: 5, 837L: 5, 856L: 7, 862L: 8, 871L: 8, 881L: 8, 882L: 4, 884L: 8, 891L: 8, 892L: 8, 905L: 8, 923L: 2, 927L: 8, 929L: 8, 963L: 8, 965L: 8, 966L: 8, 967L: 8, 983L: 8, 985L: 3, 1029L: 8, 1036L: 8, 1052L: 8, 1064L: 7, 1088L: 8, 1089L: 8, 1092L: 1, 1108L: 8, 1110L: 8, 1125L: 8, 1296L: 8, 1302L: 8, 1600L: 5, 1601L: 8, 1612L: 5, 1613L: 5, 1614L: 5, 1615L: 8, 1616L: 5, 1619L: 5, 1623L: 5, 1668L: 5
},
HONDA.PILOT: {
1600L: 5, 1027L: 5, 1668L: 5, 1029L: 8, 1601L: 8, 777L: 8, 891L: 8, 1036L: 8, 399L: 7, 1424L: 5, 145L: 8, 660L: 8, 985L: 3, 1616L: 5, 538L: 3, 795L: 8, 542L: 7, 773L: 7, 800L: 8, 545L: 5, 546L: 3, 419L: 8, 420L: 8, 422L: 8, 1064L: 7, 425L: 8, 426L: 8, 427L: 3, 432L: 7, 819L: 7, 308L: 5, 821L: 5, 57L: 3, 965L: 8, 316L: 8, 829L: 5, 1088L: 8, 1089L: 8, 963L: 8, 837L: 5, 966L: 8, 929L: 8, 780L: 8, 923L: 2, 1613L: 5, 334L: 8, 463L: 8, 464L: 8, 1618L: 5, 1108L: 8, 597L: 8, 342L: 6, 983L: 8, 856L: 7, 804L: 8, 1612L: 5, 476L: 4, 1125L: 8, 344L: 8, 1296L: 8, 379L: 8, 228L: 5, 229L: 4, 871L: 8, 892L: 8, 490L: 8, 808L: 8, 882L: 2, 884L: 7, 967L: 8, 506L: 8, 507L: 1, 380L: 8,
},
TOYOTA.RAV4: {

36L: 8, 37L: 8, 170L: 8, 180L: 8, 186L: 4, 426L: 6, 452L: 8, 464L: 8, 466L: 8, 467L: 8, 547L: 8, 548L: 8, 552L: 4, 562L: 4, 608L: 8, 610L: 5, 643L: 7, 705L: 8, 725L: 2, 740L: 5, 800L: 8, 835L: 8, 836L: 8, 849L: 4, 869L: 7, 870L: 7, 871L: 2, 896L: 8, 897L: 8, 900L: 6, 902L: 6, 905L: 8, 911L: 8, 916L: 3, 918L: 7, 921L: 8, 933L: 8, 944L: 8, 945L: 8, 951L: 8, 955L: 4, 956L: 8, 979L: 2, 998L: 5, 999L: 7, 1000L: 8, 1001L: 8, 1008L: 2, 1014L: 8, 1017L: 8, 1041L: 8, 1042L: 8, 1043L: 8, 1044L: 8, 1056L: 8, 1059L: 1, 1114L: 8, 1161L: 8, 1162L: 8, 1163L: 8, 1176L: 8, 1177L: 8, 1178L: 8, 1179L: 8, 1180L: 8, 1181L: 8, 1190L: 8, 1191L: 8, 1192L: 8, 1196L: 8, 1227L: 8, 1228L: 8, 1235L: 8, 1237L: 8, 1263L: 8, 1279L: 8, 1408L: 8, 1409L: 8, 1410L: 8, 1552L: 8, 1553L: 8, 1554L: 8, 1555L: 8, 1556L: 8, 1557L: 8, 1561L: 8, 1562L: 8, 1568L: 8, 1569L: 8, 1570L: 8, 1571L: 8, 1572L: 8, 1584L: 8, 1589L: 8, 1592L: 8, 1593L: 8, 1595L: 8, 1596L: 8, 1597L: 8, 1600L: 8, 1656L: 8, 1664L: 8, 1728L: 8, 1745L: 8, 1779L: 8, 1904L: 8, 1912L: 8, 1990L: 8, 1998L: 8
},
TOYOTA.RAV4H: {
Expand Down
1 change: 1 addition & 0 deletions selfdrive/car/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
HONDA.ACURA_ILX: HondaInterface,
HONDA.CRV: HondaInterface,
HONDA.ODYSSEY: HondaInterface,
HONDA.PILOT: HondaInterface,

TOYOTA.PRIUS: ToyotaInterface,
TOYOTA.RAV4: ToyotaInterface,
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/car/honda/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def update(self, sendcan, enabled, CS, frame, actuators, \
tt = sec_since_boot()
GAS_MAX = 1004
BRAKE_MAX = 1024/4
if CS.CP.carFingerprint in (CAR.CIVIC, CAR.ODYSSEY):
if CS.CP.carFingerprint in (CAR.CIVIC, CAR.ODYSSEY, CAR.PILOT):
is_fw_modified = os.getenv("DONGLE_ID") in ['b0f5a01cf604185c']
STEER_MAX = 0x1FFF if is_fw_modified else 0x1000
elif CS.crv:
Expand Down
15 changes: 13 additions & 2 deletions selfdrive/car/honda/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ def parse_gear_shifter(can_gear_shifter, car_fingerprint):
return "drive"
elif can_gear_shifter == 0xa:
return "sport"

elif car_fingerprint in (CAR.PILOT):
if can_gear_shifter == 0x8:
return "reverse"
elif can_gear_shifter == 0x4:
return "park"
elif can_gear_shifter == 0x20:
return "drive"

elif car_fingerprint in (CAR.CIVIC, CAR.CRV):
if can_gear_shifter == 0x4:
return "neutral"
Expand Down Expand Up @@ -122,6 +131,8 @@ def get_can_signals(CP):
("EPB_STATE", "EPB_STATUS", 0),
("BRAKE_HOLD_ACTIVE", "VSA_STATUS", 0)]
checks += [("EPB_STATUS", 50)]
elif CP.carFingerprint == CAR.ODYSSEY:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean CAR.PILOT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

dbc_f = 'honda_pilot_touring_2017_can_generated.dbc'

# add gas interceptor reading if we are using it
if CP.enableGas:
Expand Down Expand Up @@ -184,9 +195,9 @@ 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']

# 2 = temporary 4 = temporary, hit a bump 5 (permanent) 6 = temporary 7 (permanent)
# 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, 4, 6]
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.brake_error = cp.vl["STANDSTILL"]['BRAKE_ERROR_1'] or cp.vl["STANDSTILL"]['BRAKE_ERROR_2']
self.esp_disabled = cp.vl["VSA_STATUS"]['ESP_DISABLED']
Expand Down
4 changes: 3 additions & 1 deletion selfdrive/car/honda/hondacan.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ def create_ui_commands(pcm_speed, hud, car_fingerprint, idx):
commands.append(make_can_msg(0x39f, msg_0x39f, idx, 0))
return commands


def create_radar_commands(v_ego, car_fingerprint, idx):
"""Creates an iterable of CAN messages for the radar system."""
commands = []
Expand All @@ -103,6 +102,9 @@ def create_radar_commands(v_ego, car_fingerprint, idx):
elif car_fingerprint == CAR.ACURA_ILX:
msg_0x301 = "\x0f\x18\x51\x02\x5a\x00\x00"
commands.append(make_can_msg(0x300, msg_0x300, idx, 1))
elif car_fingerprint == CAR.PILOT:
msg_0x301 = "\x00\x00\x56\x02\x58\x00\x00"
commands.append(make_can_msg(0x300, msg_0x300, idx, 1))

commands.append(make_can_msg(0x301, msg_0x301, idx, 1))
return commands
12 changes: 12 additions & 0 deletions selfdrive/car/honda/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,18 @@ def get_params(candidate, fingerprint):
ret.steerRatio = 14.35
ret.steerKp, ret.steerKi = 0.6, 0.18

ret.longitudinalKpBP = [0., 5., 35.]
ret.longitudinalKpV = [1.2, 0.8, 0.5]
ret.longitudinalKiBP = [0., 35.]
ret.longitudinalKiV = [0.18, 0.12]
elif candidate == CAR.PILOT:
stop_and_go = False
ret.mass = 4303./2.205 + std_cargo
ret.wheelbase = 2.81
ret.centerToFront = ret.wheelbase * 0.41
ret.steerRatio = 16.0
ret.steerKp, ret.steerKi = 0.38, 0.11

ret.longitudinalKpBP = [0., 5., 35.]
ret.longitudinalKpV = [1.2, 0.8, 0.5]
ret.longitudinalKiBP = [0., 35.]
Expand Down