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

Lincoln MKZ / Ford Fusion compatibility #1

Closed
4 tasks
ingenieroariel opened this issue Nov 30, 2016 · 108 comments
Closed
4 tasks

Lincoln MKZ / Ford Fusion compatibility #1

ingenieroariel opened this issue Nov 30, 2016 · 108 comments

Comments

@ingenieroariel
Copy link

ingenieroariel commented Nov 30, 2016

Udacity is also building a self driving car using that model as a reference.

What is the list of things to take into account to port openpilot to other cars?

Here is a list based on what I have read so far:

  • Create .dbc file
  • Steering
  • Brake/Throttle
  • Shift
@ingenieroariel
Copy link
Author

First thing seems to be to create a file like this one:

screen shot 2016-11-30 at 2 45 37 pm

@ingenieroariel
Copy link
Author

espes added a commit that referenced this issue Nov 30, 2016
Ford Fusion 2017 dbc can file. refs #1.
@jon-mullen
Copy link

That dbc's not correct for production cars, just (i assume) dataspeed's

@geohot
Copy link
Contributor

geohot commented Nov 30, 2016

Unfortunately yes, only dataspeed.

@ingenieroariel
Copy link
Author

I have a Ford Fusion 2017 myself and will debug further next week when my oneplus three arrives.

@galv
Copy link

galv commented Nov 30, 2016

That dbc file won't work at all. It defines the message formats on a private CAN bus run by dataspeed. Dataspeed, as far as I know, controls the vehicle via some electromechanical methods, not just CAN codes. A node on the private CAN bus translates these messages to actual electrical signals. My guess is that the throttle is handled by controlling a voltage, but I'm not sure.

@ingenieroariel
Copy link
Author

According to the following spreadsheet [1] available from the OpenXC website here is the information we can find on CAN1 [OBD-II pins 6 (+) and 14 (-) ]: CAN high / CAN low from ISO 15765-4 and SAE-J2284

steering_wheel_angle
engine_speed
transmission_gear_position
gear_lever_position
ignition_status
brake_pedal_status
parking_brake_status
headlamp_status
accelerator_pedal_position
torque_at_transmission
vehicle_speed
fuel_consumed_since_restart
door_status
windshield_wiper_status
odometer
high_beam_status
fuel_level
latitude
longitude
button_event

[1] https://docs.google.com/spreadsheets/d/1hOBi9-tFwR1KRFXfeaHTAddwJuSGx5Ir1ET4N2zWAiE/edit#gid=6

@ingenieroariel
Copy link
Author

For people trying to help solve this issue @geohot recommended the following document:

http://www.ioactive.com/pdfs/IOActive_Adventures_in_Automotive_Networks_and_Control_Units.pdf

I personally recommend to get an OpenXC adapter from Ford instead of trying to build the NEO can adapter. I got the FORD REFERENCE VI for $130 usd at https://shop.openxcplatform.com

@ingenieroariel
Copy link
Author

okay, I've been able to read data from the car via bluetooth and USB. So far I have only been able to get data in JSON format, but I plan to see if I can create a raw CAN dump using the kvaser leaf light.

Once I have a raw dump with the corresponding JSON dump I'll share it here.

screen shot 2016-12-16 at 2 19 02 pm

{"value":750.0,"name":"engine_speed","a":{"a":{"name":"engine_speed"},"b":1191599776},"timestamp":1481910779.319}
{"value":-253.5,"name":"steering_wheel_angle","a":{"a":{"name":"steering_wheel_angle"},"b":-1273841975},"timestamp":1481910779.323}
{"value":102.71772,"name":"fuel_level","a":{"a":{"name":"fuel_level"},"b":227280207},"timestamp":1481910779.323}
{"value":0.027625,"name":"fuel_consumed_since_restart","a":{"a":{"name":"fuel_consumed_since_restart"},"b":989500470},"timestamp":1481910779.359}
{"value":551.0,"name":"odometer","a":{"a":{"name":"odometer"},"b":2014857251},"timestamp":1481910779.368}

https://gist.github.com/ingenieroariel/ff1f4cac30e1bc5ec22f72967b1d2866

@ingenieroariel
Copy link
Author

Here is a sample data dump from a regular ford fusion when idle. It'll be useful later when comparing with the data dump from can bus 1 after cruise control is enabled.

{"bus": 1, "data": "0x0000000000000000", "id": 65, "timestamp": 1482689993.885337}                                    
{"bus": 1, "data": "0x140401f981f70000", "id": 390, "timestamp": 1482689993.885957}
{"bus": 1, "data": "0x8c00000006500000", "id": 1068, "timestamp": 1482689993.886489}
{"bus": 1, "data": "0xa000000000000000", "id": 1109, "timestamp": 1482689993.887}
{"bus": 1, "data": "0x7ef47ef4a174f000", "id": 145, "timestamp": 1482689993.887517}
{"bus": 1, "data": "0x7d0854008c804000", "id": 130, "timestamp": 1482689993.888006}
{"bus": 1, "data": "0x7d01800023b07cd7", "id": 133, "timestamp": 1482689993.888512}
{"bus": 1, "data": "0x2000000000000000", "id": 71, "timestamp": 1482689993.888998}
{"bus": 1, "data": "0x10c0000000000000", "id": 357, "timestamp": 1482689993.889519}
{"bus": 1, "data": "0x140c000000000000", "id": 369, "timestamp": 1482689993.890035}
{"bus": 1, "data": "0x00007fe17fe10000", "id": 512, "timestamp": 1482689993.890527}
{"bus": 1, "data": "0x04f9180060000000", "id": 514, "timestamp": 1482689993.891034}
{"bus": 1, "data": "0xc0007d01b3000000", "id": 516, "timestamp": 1482689993.891495}
{"bus": 1, "data": "0x0000000097000000", "id": 560, "timestamp": 1482689993.891988}
{"bus": 1, "data": "0x7d04002e660701b4", "id": 1071, "timestamp": 1482689993.892702}
{"bus": 1, "data": "0x0100273a00000000", "id": 936, "timestamp": 1482689993.893345}
{"bus": 1, "data": "0x002220ff0ff0eeee", "id": 938, "timestamp": 1482689993.894054}
{"bus": 1, "data": "0x125f0ff078eee000", "id": 939, "timestamp": 1482689993.894706}
{"bus": 1, "data": "0x0000000000000000", "id": 66, "timestamp": 1482689993.895373}
{"bus": 1, "data": "0x7d01800022c07cd7", "id": 133, "timestamp": 1482689993.897228}
{"bus": 1, "data": "0x0000000000400000", "id": 818, "timestamp": 1482689993.898004}
{"bus": 1, "data": "0x727fff100019fb00", "id": 359, "timestamp": 1482689993.898527}
{"bus": 1, "data": "0x04f8200060000000", "id": 514, "timestamp": 1482689993.898945}
{"bus": 1, "data": "0xc0007d01b3000000", "id": 516, "timestamp": 1482689993.899377}
{"bus": 1, "data": "0x0000fb40009fe7ff", "id": 125, "timestamp": 1482689993.90242}
{"bus": 1, "data": "0x000000000000fb40", "id": 532, "timestamp": 1482689993.90312}
{"bus": 1, "data": "0x0000e0f40ffe0ffe", "id": 1045, "timestamp": 1482689993.903668}
{"bus": 1, "data": "0x01008000400000fb", "id": 1200, "timestamp": 1482689993.904254}
{"bus": 1, "data": "0x0200000000000000", "id": 819, "timestamp": 1482689993.904832}
{"bus": 1, "data": "0x0000000000000000", "id": 65, "timestamp": 1482689993.905323}
{"bus": 1, "data": "0x005021d7cf000001", "id": 578, "timestamp": 1482689993.905862}
{"bus": 1, "data": "0x140401f981f70000", "id": 390, "timestamp": 1482689993.906278}

@ingenieroariel
Copy link
Author

Here is a full can dump with park assist activated:

   0x742000001dd20000 Bus 1: 0x166               Msgs: 735  Freq. (Hz): 2
    0x72805910001a0600 Bus 1: 0x167               Msgs: 342  Freq. (Hz): 10
    0x14803a10001a0800 Bus 1: 0x171               Msgs: 665              2
    0x00802810001a0400 Bus 1: 0x168               Msgs: 756  Freq. (Hz): 16
    0x0086c00000000000 Bus 1: 0x169               Msgs: 9    Freq. (Hz): 1
    0x002702000e95ce94 Bus 1: 0x178               Msgs: 525  Freq. (Hz): 2
    0x142402000e930000 Bus 1: 0x186               Msgs: 245  Freq. (Hz): 6
    0x1a0801fd0e920943 Bus 1: 0x179               Msgs: 72   Freq. (Hz): 2
    0x0a0640f981f700fc Bus 1: 0x202               Msgs: 572  Freq. (Hz): 3
    0x000080f981f70000 Bus 1: 0x200               Msgs: 374  Freq. (Hz): 11
    0xfcf4802f802fff41 Bus 1: 0x213               Msgs: 292  Freq. (Hz): 6
    0xccfa100175000000 Bus 1: 0x204               Msgs: 703  Freq. (Hz): 17
    0x000000007b00f4b0 Bus 1: 0x214               Msgs: 155  Freq. (Hz): 4
    0x0000000082000960 Bus 1: 0x216               Msgs: 454  Freq. (Hz): 14
    0x0000000000000c30 Bus 1: 0x217               Msgs: 455  Freq. (Hz): 14
    0xc1014b3931485232 Bus 1: 0x40a               Msgs: 436  Freq. (Hz): 13
    0x1006000097000000 Bus 1: 0x230               Msgs: 785  Freq. (Hz): 19
    0xe0022046d8000001 Bus 1: 0x242               Msgs: 96   Freq. (Hz): 2
    0x00002034d6000000 Bus 1: 0x261               Msgs: 180  Freq. (Hz): 4
    0x0000000000000000 Bus 1: 0x262               Msgs: 53   Freq. (Hz): 1
    0x0000510000000100 Bus 1: 0x2f1               Msgs: 46   Freq. (Hz): 1
    0x81a025b981c400c8 Bus 1: 0x326               Msgs: 75   Freq. (Hz): 1
    0xc01d5629047c9422 Bus 1: 0x331               Msgs: 73   Freq. (Hz): 2
    0x0000000900000000 Bus 1: 0x332               Msgs: 15   Freq. (Hz): 1
    0x0000000000000000 Bus 1: 0x333               Msgs: 61   Freq. (Hz): 1
    0x03fe00ffffff0400 Bus 1: 0x336               Msgs: 78   Freq. (Hz): 2
    0x00c0006aa7343000 Bus 1: 0x35e               Msgs: 12   Freq. (Hz): 1
    0x0000000906000000 Bus 1: 0x37b               Msgs: 90   Freq. (Hz): 1
    0x0000000000000000 Bus 1: 0x386               Msgs: 68   Freq. (Hz): 1
    0x2000000000000000 Bus 1: 0x38d               Msgs: 7    Freq. (Hz): 1
    0x1a00b80b00000000 Bus 1: 0x3a8               Msgs: 865  Freq. (Hz): 3
    0x0a00afdc0ff00000 Bus 1: 0x3aa               Msgs: 327  Freq. (Hz): 9
    0x12ff0ff040000000 Bus 1: 0x3ab               Msgs: 31   Freq. (Hz): 1
    0x4488c20c10000002 Bus 1: 0x3b3               Msgs: 24   Freq. (Hz): 1
    0x401111ff25250000 Bus 1: 0x3b4               Msgs: 16
    0x011c0121011b0112 Bus 1: 0x3b5               Msgs: 5    Freq. (Hz): 1
    0x08000b0000000000 Bus 1: 0x3b6               Msgs: 17   Freq. (Hz): 1
    0x0000090000000000 Bus 1: 0x3b7               Msgs: 28   Freq. (Hz): 1
    0xfffff3ff00005f8c Bus 1: 0x3b8               Msgs: 69   Freq. (Hz): 1
    0x5cc3000000000000 Bus 1: 0x3c3               Msgs: 14   Freq. (Hz): 1
    0x0003080400000000 Bus 1: 0x3c7               Msgs: 7    Freq. (Hz): 1
    0x0164000000000000 Bus 1: 0x3da               Msgs: 10   Freq. (Hz): 1
    0x0000000080000000 Bus 1: 0x3e0               Msgs: 5    Freq. (Hz): 1
    0x8000010701800000 Bus 1: 0x3e1               Msgs: 8    Freq. (Hz): 1
    0x0000000080000000 Bus 1: 0x3e2               Msgs: 6
    0x0001041380016400 Bus 1: 0x3e3               Msgs: 4    Freq. (Hz): 1
    0xc20414080f200000 Bus 1: 0x3eb               Msgs: 50   Freq. (Hz): 1
    0x0000000000006000 Bus 1: 0x3ea               Msgs: 3    Freq. (Hz): 1
    0x01023130163639ff Bus 1: 0x415               Msgs: 24   Freq. (Hz): 16
    0x0104014107f670c1 Bus 1: 0x41                Msgs: 47   Freq. (Hz): 1
    0x8000e0f400000000 Bus 1: 0x41d               Msgs: 106              3
    0x9a00d4f701000000 Bus 1: 0x416               Msgs: 359  Freq. (Hz): 9
    0x8100fc0006600000 Bus 1: 0x42c               Msgs: 652  Freq. (Hz): 2
    0x0000000000000000 Bus 1: 0x42                Msgs: 342  Freq. (Hz): 9
    0x0200900000009300 Bus 1: 0x421               Msgs: 74   Freq. (Hz): 1
    0x2000000000000700 Bus 1: 0x47                Msgs: 43   Freq. (Hz): 2
    0x00031f000000f000 Bus 1: 0x42d               Msgs: 144  Freq. (Hz): 3
    0x7d04002e66270176 Bus 1: 0x42f               Msgs: 346  Freq. (Hz): 2
    0x83000303861f0176 Bus 1: 0x430               Msgs: 214  Freq. (Hz): 5
    0x23e374000fff0203 Bus 1: 0x434               Msgs: 65   Freq. (Hz): 1
    0x28231097e1000103 Bus 1: 0x435               Msgs: 56   Freq. (Hz): 1
    0x2820189f00000000 Bus 1: 0x439               Msgs: 55   Freq. (Hz): 1
    0x3218506a38dd7414 Bus 1: 0x43c               Msgs: 6    Freq. (Hz): 1
    0x004b769000000000 Bus 1: 0x43d               Msgs: 68   Freq. (Hz): 2
    0x0046738d00000000 Bus 1: 0x43e               Msgs: 103  Freq. (Hz): 2
    0x2273000004000000 Bus 1: 0x447               Msgs: 104  Freq. (Hz): 2
    0xa000000000000000 Bus 1: 0x455               Msgs: 74   Freq. (Hz): 1
    0x8000000000000000 Bus 1: 0x456               Msgs: 55   Freq. (Hz): 2
    0x63ee411234f08f88 Bus 1: 0x465               Msgs: 5    Freq. (Hz): 1
    0xb0d46c29b0b03000 Bus 1: 0x466               Msgs: 9    Freq. (Hz): 1
    0x8a80943509001820 Bus 1: 0x467               Msgs: 7    Freq. (Hz): 1
    0x9200800060141874 Bus 1: 0x4b0               Msgs: 900  Freq. (Hz): 4
    0x0200000000000000 Bus 1: 0x4a                Msgs: 367  Freq. (Hz): 10
    0x00c0d8d8d8d8c000 Bus 1: 0x4b                Msgs: 69   Freq. (Hz): 1
    0x0000004540144071 Bus 1: 0x5a                Msgs: 650  Freq. (Hz): 3
    0x20afffc030143074 Bus 1: 0x4c                Msgs: 318  Freq. (Hz): 11
    0x8100ffffffffffff Bus 1: 0x581               Msgs: 64   Freq. (Hz): 1
    0x9500ffffffffffff Bus 1: 0x595               Msgs: 9
    0x9e00ffffffffffff Bus 1: 0x59e               Msgs: 4    Freq. (Hz): 1
    0x2d18c015eddf0000 Bus 1: 0x76                Msgs: 69   Freq. (Hz): 1
    0xb200ff15f19fffff Bus 1: 0x5b2               Msgs: 97   Freq. (Hz): 2
    0x001000fb201e0000 Bus 1: 0x5c                Msgs: 81   Freq. (Hz): 1
    0x00d000ef201e0000 Bus 1: 0x5d                Msgs: 78   Freq. (Hz): 2
    0x421f8628b0f7fdff Bus 1: 0x77                Msgs: 941  Freq. (Hz): 2
    0x451578027ff7f9ff Bus 1: 0x7d                Msgs: 451              12
    0x5c6878027ff7f9ff Bus 1: 0x85                Msgs: 453  Freq. (Hz): 13
    0x84067431431ff800 Bus 1: 0x82                Msgs: 459  Freq. (Hz): 14
    0x83089bfc8e000000 Bus 1: 0x83                Msgs: 378  Freq. (Hz): 13
    0x10000168341e1100 Bus 1: 0x84                Msgs: 73   Freq. (Hz): 2
    0x7ccb800075266dd6 Bus 1: 0x91                Msgs: 105              5
      74bb800083906dd7                                  744  Freq. (Hz): 24
    0x6ef87f017f8456c5 Bus 1: 0x92                Msgs: 290  Freq. (Hz): 7
        9f6f99736f9f7f   

If anyone wants to help me out identify what is what, be my guest. My next target is finding a can bus directly on the front camera.

PS: Not sure what the right etiquette for this project is, if I am spamming too much please let me know and I'll do less frequent updates.

@adam-nelson
Copy link

You reckon this the same system for all ford vehicles.

I could try this in a focus

@ingenieroariel
Copy link
Author

image uploaded from ios
I have connected the openxc device to the car and to the oneplus 3 via usb OTG. Next is looking into boardd and trying to read the JSON encoded raw can output coming from the openxc adapter.

@ingenieroariel
Copy link
Author

Okay, after cutting the wires from the canbus that went to the camera I was able to write a few packets that changed the left arrow keys on my wheel control.

When connecting the camera again I got the following id codes that are potentially related to LKAS and collision assist.

3ca
3cd
3d8

I'll collect data from just those 3 codes on a longer ride today. Is anyone interested in helping me decode them?

Here is a sample in SocketCan format:

(1484854733.03) can1 3ca#fe7e458200000000
(1484854733.04) can1 3cd#0000000000000000
(1484854733.04) can1 3d8#0000000080456030
(1484854733.06) can1 3ca#fe7e458200000000
(1484854733.08) can1 3ca#fe7e458200000000
(1484854733.12) can1 3ca#fe7e458200000000
(1484854733.14) can1 3ca#fe7e458200000000
(1484854733.18) can1 3ca#fe7e458200000000
(1484854733.2) can1 3ca#fe7e458200000000
(1484854733.24) can1 3ca#fe7e458200000000
(1484854733.26) can1 3ca#fe7e458200000000
(1484854733.3) can1 3ca#fe7e458200000000
(1484854733.32) can1 3ca#fe7e458200000000
(1484854733.36) can1 3ca#fe7e458200000000
(1484854733.38) can1 3ca#fe7e458200000000
(1484854733.42) can1 3ca#fe7e458200000000
(1484854733.44) can1 3ca#fe7e458200000000
(1484854733.48) can1 3ca#fe7e458200000000
(1484854733.5) can1 3ca#fe7e458200000000
(1484854733.54) can1 3ca#fe7e458200000000
(1484854733.56) can1 3ca#fe7e458200000000
(1484854733.6) can1 3ca#fe7e458200000000
(1484854733.62) can1 3ca#fe7e458200000000
(1484854733.66) can1 3ca#fe7e458200000000
(1484854733.68) can1 3ca#fe7e458200000000
(1484854733.72) can1 3ca#fe7e458200000000
(1484854733.74) can1 3ca#fe7e458200000000
(1484854733.78) can1 3ca#fe7e458200000000
(1484854733.8) can1 3ca#fe7e458200000000
(1484854733.84) can1 3ca#fe7e458200000000
(1484854733.86) can1 3ca#fe7e458200000000
(1484854733.9) can1 3ca#fe7e458200000000
(1484854733.93) can1 3ca#fe7e458200000000
(1484854733.96) can1 3ca#fe7e458200000000
(1484854733.98) can1 3ca#fe7e458200000000
(1484854734.02) can1 3ca#fe7e458200000000
(1484854734.04) can1 3cd#0000000000000000
(1484854734.04) can1 3d8#0000000080456030
(1484854734.05) can1 3ca#fe7e458200000000
(1484854734.08) can1 3ca#fe7e458200000000
(1484854734.1) can1 3ca#fe7e458200000000
(1484854734.14) can1 3ca#fe7e458200000000
(1484854734.16) can1 3ca#fe7e458200000000
(1484854734.2) can1 3ca#fe7e458200000000
(1484854734.23) can1 3ca#fe7e458200000000
(1484854734.26) can1 3ca#fe7e458200000000
(1484854734.28) can1 3ca#fe7e458200000000
(1484854734.31) can1 3ca#fe7e458200000000
(1484854734.35) can1 3ca#fe7e458200000000
(1484854734.38) can1 3ca#fe7e458200000000
(1484854734.41) can1 3ca#fe7e458200000000
(1484854734.44) can1 3ca#fe7e458200000000
(1484854734.47) can1 3ca#fe7e458200000000
(1484854734.5) can1 3ca#fe7e458200000000
(1484854734.52) can1 3ca#fe7e458200000000
(1484854734.56) can1 3ca#fe7e458200000000
(1484854734.58) can1 3ca#fe7e458200000000
(1484854734.62) can1 3ca#fe7e458200000000
(1484854734.64) can1 3ca#fe7e458200000000
(1484854734.68) can1 3ca#fe7e458200000000
(1484854734.7) can1 3ca#fe7e458200000000
(1484854734.74) can1 3ca#fe7e458200000000
(1484854734.76) can1 3ca#fe7e458200000000
(1484854734.8) can1 3ca#fe7e458200000000
(1484854734.82) can1 3ca#fe7e458200000000
(1484854734.86) can1 3ca#fe7e458200000000
(1484854734.88) can1 3ca#fe7e458200000000
(1484854734.92) can1 3ca#fe7e458200000000
(1484854734.94) can1 3ca#fe7e458200000000
(1484854734.98) can1 3ca#fe7e458200000000
(1484854735.0) can1 3ca#fe7e458200000000
(1484854735.04) can1 3ca#fe7e458200000000
(1484854735.04) can1 3cd#0000000000000000
(1484854735.04) can1 3d8#0000000080456030
(1484854735.06) can1 3ca#fe7e458200000000
(1484854735.1) can1 3ca#fe7e458200000000
(1484854735.12) can1 3ca#fe7e458200000000
(1484854735.16) can1 3ca#fe7e458200000000
(1484854735.18) can1 3ca#fe7e458200000000
(1484854735.22) can1 3ca#fe7e458200000000

@ingenieroariel
Copy link
Author

BTW, here is a list of all the packet ids that are NOT coming from the front camera:

background_ids = ['047', '04a', '04b', '04c', '05a', '05c', '05d', '076', '077', '078', '07d', '081', '082', '083', '084', '085', '091', '092', '165', '167', '168', '169', '178', '186', '187', '188', '18a', '200', '202', '204', '213', '214', '216', '217', '230', '242', '261', '265', '2a1', '33b', '350', '3a6', '3a7', '3a8', '3b3', '3c3', '3cc', '3e0', '3e2', '3e5', '3e6', '3eb', '40a', '415', '416', '41d', '41e', '422', '423', '42c', '42f', '430', '431', '43a', '453', '454', '455', '456', '4b0', '593', '596', '59e', '5b3', '5b5']

@ingenieroariel
Copy link
Author

I may be wrong but here is what I think based on enabling LKAS on the road.

This message may mean LKAS is enabled but no lane has been found:

3d8#0000000080456030

In this frame LKAS found me drifting away from my lane and trying to get me back on track.

(1484874055.46) can0 3d8#0000000080456030
(1484874056.46) can0 3d8#0000000080456030
(1484874057.46) can0 3d8#0000000080456030
(1484874058.26) can0 3d8#0000000080856030
(1484874058.46) can0 3d8#0000000080856030
(1484874059.46) can0 3d8#0000000080856030
(1484874060.46) can0 3d8#0000000080856030
(1484874061.46) can0 3d8#0000000080856030
(1484874061.64) can0 3d8#0000000080855830
(1484874062.46) can0 3d8#0000000080855830
(1484874062.49) can0 3d8#0000000080856030
(1484874063.46) can0 3d8#0000000080856030
(1484874063.64) can0 3d8#0000000080855830
(1484874064.46) can0 3d8#0000000080855830
(1484874065.46) can0 3d8#0000000080855830
(1484874065.76) can0 3d8#0000000080853030
(1484874066.46) can0 3d8#0000000080853030
(1484874067.46) can0 3d8#0000000080853030
(1484874068.46) can0 3d8#0000000080853030
(1484874069.46) can0 3d8#0000000080853030
(1484874070.46) can0 3d8#0000000080853030
(1484874071.36) can0 3d8#0000000080c53030
(1484874071.46) can0 3d8#0000000080c53030
(1484874072.46) can0 3d8#0000000080c53030
(1484874073.46) can0 3d8#0000000080c53030
(1484874074.46) can0 3d8#0000000080c53030
(1484874075.46) can0 3d8#0000000080c53030
(1484874076.46) can0 3d8#0000000080c53030
(1484874077.46) can0 3d8#0000000080c53030
(1484874078.46) can0 3d8#0000000080c53030
(1484874079.46) can0 3d8#0000000080c53030
(1484874080.46) can0 3d8#0000000080c53030
(1484874081.46) can0 3d8#0000000080c53030
(1484874082.46) can0 3d8#0000000080c53030
(1484874083.46) can0 3d8#0000000080c53030
(1484874084.46) can0 3d8#0000000080c53030
(1484874085.46) can0 3d8#0000000080c53030
(1484874086.46) can0 3d8#0000000080c53030
(1484874087.46) can0 3d8#0000000080c53030
(1484874088.46) can0 3d8#0000000080c53030
(1484874089.46) can0 3d8#0000000080c53030
(1484874090.46) can0 3d8#0000000080c53030
(1484874091.46) can0 3d8#0000000080c53030
(1484874092.46) can0 3d8#0000000080c53030
(1484874093.46) can0 3d8#0000000080c53030
(1484874094.46) can0 3d8#0000000080c53030
(1484874095.09) can0 3d8#0000000080c53830
(1484874095.33) can0 3d8#0000000080c56030
(1484874095.46) can0 3d8#0000000080c56030
(1484874096.47) can0 3d8#0000000080c56030
(1484874097.46) can0 3d8#0000000080c56030
(1484874098.46) can0 3d8#0000000080c56030
(1484874099.46) can0 3d8#0000000080c56030
(1484874100.46) can0 3d8#0000000080c56030
(1484874100.85) can0 3d8#0000000080c53830
(1484874101.46) can0 3d8#0000000080c53830
(1484874102.46) can0 3d8#0000000080c53830
(1484874103.46) can0 3d8#0000000080c53830
(1484874104.46) can0 3d8#0000000080c53830
(1484874105.46) can0 3d8#0000000080c53830
(1484874106.46) can0 3d8#0000000080c53830
(1484874107.46) can0 3d8#0000000080c53830
(1484874108.46) can0 3d8#0000000080c53830
(1484874109.46) can0 3d8#0000000080c53830
(1484874110.46) can0 3d8#0000000080c53830
(1484874111.46) can0 3d8#0000000080c53830
(1484874111.84) can0 3d8#0000000080c5b030
(1484874112.46) can0 3d8#0000000080c5b030
(1484874113.46) can0 3d8#0000000080c5b030
(1484874114.46) can0 3d8#0000000080c5b030
(1484874115.46) can0 3d8#0000000080c5b030
(1484874115.63) can0 3d8#0000000080c53830
(1484874116.46) can0 3d8#0000000080c53830
(1484874117.46) can0 3d8#0000000080c53830
(1484874118.46) can0 3d8#0000000080c53830
(1484874119.46) can0 3d8#0000000080c53830
(1484874120.46) can0 3d8#0000000080c53830
(1484874121.46) can0 3d8#0000000080c53830
(1484874122.04) can0 3d8#0000000080c5b030
(1484874122.46) can0 3d8#0000000080c5b030
(1484874123.47) can0 3d8#0000000080c5b030
(1484874124.46) can0 3d8#0000000080c5b030
(1484874125.46) can0 3d8#0000000080c5b030
(1484874126.46) can0 3d8#0000000080c5b030
(1484874126.56) can0 3d8#0000000080c4b030
(1484874126.66) can0 3d8#000000008044b030
(1484874126.72) can0 3d8#000000008044b230
(1484874127.46) can0 3d8#000000008044b230
(1484874128.05) can0 3d8#0000000080443a30
(1484874128.46) can0 3d8#0000000080443a30
(1484874128.73) can0 3d8#0000000080443c30
(1484874129.46) can0 3d8#0000000080443c30
(1484874130.41) can0 3d8#0000000080443830
(1484874130.46) can0 3d8#0000000080443830
(1484874131.46) can0 3d8#0000000080443830
(1484874132.46) can0 3d8#0000000080443830
(1484874133.46) can0 3d8#0000000080443830
(1484874134.16) can0 3d8#000000008044b030
(1484874134.46) can0 3d8#000000008044b030
(1484874135.46) can0 3d8#000000008044b030
(1484874135.49) can0 3d8#0000000080443830
(1484874136.16) can0 3d8#0000000080c43830
(1484874136.46) can0 3d8#0000000080c43830
(1484874137.46) can0 3d8#0000000080c43830
(1484874138.46) can0 3d8#0000000080c43830
(1484874139.46) can0 3d8#0000000080c43830
(1484874140.46) can0 3d8#0000000080c43830
(1484874141.16) can0 3d8#0000000080c53830
(1484874141.46) can0 3d8#0000000080c53830
(1484874142.46) can0 3d8#0000000080c53830
(1484874143.44) can0 3d8#0000000080c5b030
(1484874143.47) can0 3d8#0000000080c5b030
(1484874144.47) can0 3d8#0000000080c5b030
(1484874145.46) can0 3d8#0000000080c5b030
(1484874146.46) can0 3d8#0000000080c5b030
(1484874146.66) can0 3d8#0000000080c4b030
(1484874147.46) can0 3d8#0000000080c4b030
(1484874148.11) can0 3d8#0000000080c43830
(1484874148.46) can0 3d8#0000000080c43830
(1484874149.46) can0 3d8#0000000080c43830
(1484874150.46) can0 3d8#0000000080c43830
(1484874151.46) can0 3d8#0000000080c43830
(1484874152.46) can0 3d8#0000000080c43830
(1484874153.46) can0 3d8#0000000080c43830
(1484874154.46) can0 3d8#0000000080c43830
(1484874155.46) can0 3d8#0000000080c43830
(1484874156.46) can0 3d8#0000000080c43830
(1484874157.4) can0 3d8#0000000080c4b030
(1484874157.46) can0 3d8#0000000080c4b030
(1484874158.47) can0 3d8#0000000080c4b030
(1484874159.46) can0 3d8#0000000080c4b030
(1484874160.47) can0 3d8#0000000080c4b030
(1484874161.44) can0 3d8#0000000080c4b230
(1484874161.47) can0 3d8#0000000080c4b230
(1484874162.14) can0 3d8#0000000080c43a30
(1484874162.46) can0 3d8#0000000080c43a30
(1484874163.04) can0 3d8#0000000080c43830
(1484874163.46) can0 3d8#0000000080c43830
(1484874164.46) can0 3d8#0000000080c43830
(1484874165.46) can0 3d8#0000000080c43830
(1484874166.47) can0 3d8#0000000080c43830
(1484874167.46) can0 3d8#0000000080c43830
(1484874168.46) can0 3d8#0000000080c43830
(1484874169.46) can0 3d8#0000000080c43830
(1484874170.46) can0 3d8#0000000080c43830
(1484874170.6) can0 3d8#0000000080c43030
(1484874171.47) can0 3d8#0000000080c43030
(1484874172.46) can0 3d8#0000000080c43030
(1484874173.46) can0 3d8#0000000080c43030
(1484874174.1) can0 3d8#0000000080c43830
(1484874174.46) can0 3d8#0000000080c43830
(1484874175.47) can0 3d8#0000000080c43830
(1484874176.46) can0 3d8#0000000080c43830
(1484874177.46) can0 3d8#0000000080c43830
(1484874178.47) can0 3d8#0000000080c43830
(1484874179.46) can0 3d8#0000000080c43830
(1484874180.46) can0 3d8#0000000080c43830
(1484874181.47) can0 3d8#0000000080c43830
(1484874182.47) can0 3d8#0000000080c43830
(1484874183.47) can0 3d8#0000000080c43830
(1484874184.46) can0 3d8#0000000080c43830
(1484874184.94) can0 3d8#0000000080c4b030
(1484874185.46) can0 3d8#0000000080c4b030
(1484874186.46) can0 3d8#0000000080c4b030
(1484874187.46) can0 3d8#0000000080c4b030
(1484874188.46) can0 3d8#0000000080c4b030
(1484874189.1) can0 3d8#0000000080c4b230
(1484874189.46) can0 3d8#0000000080c4b230
(1484874190.02) can0 3d8#0000000080c43a30
(1484874190.24) can0 3d8#0000000080c43830
(1484874190.47) can0 3d8#0000000080c43830
(1484874191.46) can0 3d8#0000000080c43830
(1484874192.47) can0 3d8#0000000080c43830
(1484874193.47) can0 3d8#0000000080c43830
(1484874194.46) can0 3d8#0000000080c43830
(1484874194.88) can0 3d8#0000000080c46030
(1484874195.46) can0 3d8#0000000080c46030
(1484874196.36) can0 3d8#0000000080446030
(1484874196.47) can0 3d8#0000000080446030
(1484874196.98) can0 3d8#0000000080443830
(1484874197.47) can0 3d8#0000000080443830
(1484874197.54) can0 3d8#0000000080446030
(1484874198.47) can0 3d8#0000000080446030
(1484874199.47) can0 3d8#0000000080446030
(1484874200.47) can0 3d8#0000000080446030
(1484874201.47) can0 3d8#0000000080446030
(1484874202.47) can0 3d8#0000000080446030
(1484874203.47) can0 3d8#0000000080446030
(1484874204.47) can0 3d8#0000000080446030
(1484874205.47) can0 3d8#0000000080446030
(1484874206.47) can0 3d8#0000000080446030
(1484874207.47) can0 3d8#0000000080446030
(1484874208.47) can0 3d8#0000000080446030
(1484874209.47) can0 3d8#0000000080446030
(1484874210.47) can0 3d8#0000000080446030
(1484874211.47) can0 3d8#0000000080446030
(1484874212.47) can0 3d8#0000000080446030
(1484874213.47) can0 3d8#0000000080446030
(1484874214.47) can0 3d8#0000000080446030
(1484874215.47) can0 3d8#0000000080446030
(1484874216.47) can0 3d8#0000000080446030
(1484874217.47) can0 3d8#0000000080446030
(1484874218.47) can0 3d8#0000000080446030
(1484874219.47) can0 3d8#0000000080446030
(1484874220.47) can0 3d8#0000000080446030
(1484874221.47) can0 3d8#0000000080446030
(1484874222.47) can0 3d8#0000000080446030
(1484874223.47) can0 3d8#0000000080446030
(1484874224.47) can0 3d8#0000000080446030
(1484874225.47) can0 3d8#0000000080446030
(1484874226.47) can0 3d8#0000000080446030
(1484874227.47) can0 3d8#0000000080446030
(1484874228.47) can0 3d8#0000000080446030
(1484874229.47) can0 3d8#0000000080446030

@adam-nelson
Copy link

What the latest update?

@ingenieroariel
Copy link
Author

I figured out for ACC which frames report the steering wheel buttons are pressed (0x91) and the one that reports ACC being enabled, the brake or gas peal being pressed and which speed the ACC is set to (0x165).

For LKAS this one reports if it is on or not (0x3d8) and also seems to report info from other sensors, but I need to wait until I drive with a sidekick to learn more.

The only frame I have been able to spoof is (0x82) to interact with the arrow buttons on the steering wheel. Will keep at it and report back.

I am doing all this with an openxc adapter spitting out raw can encoded as JSON conected to my Macbook 12". There are several ways I can use to get data faster:

  1. Continue compiling the openxc adapter to ignore a lot of frames and only let few of them pass through. This has been what helped me make progress and the openxc-dashboard and openxc-dump loose a lot of packets when too much info is sent.
  2. Switch my openxc adapter to protobuf or messagepack.
  3. Wait for the mini cantact I ordered, that one will connect directly to the linux kernel as a SocketCan adapter.
  4. Wait for the NEO that's coming from San Diego
  5. Build a PCB locally and put the NEO parts I already have.
  6. Make the Kvaser Leaf Light v2 I have work with SocketCan.
  7. Fly an experienced car hacker, his laptop and his can adapter to Colombia for a couple of days (I've actually offered this to a couple of people but no luck yet :) )

@TheMutley
Copy link

if you have a kvaser interface why are you still using the open-xc interface ? Option number 5 is probably your best bet for reverse engineering you can't afford more expensive tools.

@ingenieroariel
Copy link
Author

It has been mainly logistics. Socketcan does not work on OSX and that's the only laptop I own.

I'll install linux on my laptop and try to get the kvaser working this week, thanks for the hint. When I first tried it I could not get candump to work with it (kvaser driver vs linux built in driver, no termination resistor on my cable, etc)

@adam-nelson
Copy link

From what I've seen ford supports the OpenXC adaptor

@adam-nelson
Copy link

adam-nelson commented Jan 23, 2017

@geohot Have you thought about hiring yourself/team out for a fee?

In the case of some members on github suggesting to fly people out

@geohot
Copy link
Contributor

geohot commented Jan 23, 2017

We are open to people funding ports

@ToddGore
Copy link

I've been a little hesitant to post about can bus codes, but here goes. I also have a Ford Fusion. It's a 2013. It has the parking assist and lane keep assist.
image

image

image

@ToddGore
Copy link

That connector is for the lane keep assist camera.

DrFritzi pushed a commit to DrFritzi/openpilotOld that referenced this issue Feb 14, 2021
jpancotti referenced this issue in jpancotti/openpilot Feb 16, 2021
jpancotti referenced this issue in jpancotti/openpilot Feb 16, 2021
gwillmer pushed a commit to gwillmer/openpilot that referenced this issue May 13, 2021
works on 2017 Gas Chrysler Pacifica
NinoFurger referenced this issue in NinoFurger/openpilot Jun 29, 2021
SebastienLubrano pushed a commit to SebastienLubrano/openpilot that referenced this issue Jul 8, 2021
robin-reckmann referenced this issue in robin-reckmann/openpilot Aug 10, 2021
ClockeNessMnstr referenced this issue in ClockeNessMnstr/openpilot Aug 29, 2021
* (+cereal) Discrete PIDFF

* Back-Calculate PID output

* report actual output per vehicle

* PID Cleanup

* Forester 30 step

* Use EPS torque to backfeed integrator

* (+cereal) Backfeed Stock LKAS/ALC

* Reverse alc contribution

* set saturation on pid clipping only

* add Stock feedback weights

* bump cereal + panda
Gibby referenced this issue in Gibby/openpilot Sep 28, 2021
GregorKikelj pushed a commit to GregorKikelj/openpilot that referenced this issue Dec 28, 2021
khoi referenced this issue in khoi/openpilot Apr 21, 2022
Edison-CBS pushed a commit to Edison-CBS/openpilot that referenced this issue Apr 24, 2022
khoi referenced this issue in khoi/openpilot Apr 28, 2022
haraschax pushed a commit that referenced this issue Jun 7, 2022
* update names + notes for MPC outputs

"current_curvature" is not the correct description of what the MPC is outputting in it's curvature_ego state.
The MPC is integrating it's free variable, curvature_rate, such that curvature[0] is actually the desired_curvature before any delay.
inversely: the curvature_rate_desired is the desired rate of change to the setpoint and not the actual curvature rate. 

If we were to set the initial curvature = measured curvature in the MPC initiation these names would be correct. 
This was possibly how it was initially set up but the nomenclature here is now confusing.

* more notes

* match

* Clarify #1
mmmorks pushed a commit to mmmorks/openpilot that referenced this issue Jun 14, 2022
* update names + notes for MPC outputs

"current_curvature" is not the correct description of what the MPC is outputting in it's curvature_ego state.
The MPC is integrating it's free variable, curvature_rate, such that curvature[0] is actually the desired_curvature before any delay.
inversely: the curvature_rate_desired is the desired rate of change to the setpoint and not the actual curvature rate. 

If we were to set the initial curvature = measured curvature in the MPC initiation these names would be correct. 
This was possibly how it was initially set up but the nomenclature here is now confusing.

* more notes

* match

* Clarify commaai#1
mmmorks pushed a commit to mmmorks/openpilot that referenced this issue Jun 15, 2022
* update names + notes for MPC outputs

"current_curvature" is not the correct description of what the MPC is outputting in it's curvature_ego state.
The MPC is integrating it's free variable, curvature_rate, such that curvature[0] is actually the desired_curvature before any delay.
inversely: the curvature_rate_desired is the desired rate of change to the setpoint and not the actual curvature rate.

If we were to set the initial curvature = measured curvature in the MPC initiation these names would be correct.
This was possibly how it was initially set up but the nomenclature here is now confusing.

* more notes

* match

* Clarify commaai#1

(cherry picked from commit b215d61)
ntegan1 referenced this issue in ntegan1/apilot Jun 16, 2022
* update names + notes for MPC outputs

"current_curvature" is not the correct description of what the MPC is outputting in it's curvature_ego state.
The MPC is integrating it's free variable, curvature_rate, such that curvature[0] is actually the desired_curvature before any delay.
inversely: the curvature_rate_desired is the desired rate of change to the setpoint and not the actual curvature rate.

If we were to set the initial curvature = measured curvature in the MPC initiation these names would be correct.
This was possibly how it was initially set up but the nomenclature here is now confusing.

* more notes

* match

* Clarify #1
rjsmith1999 pushed a commit to rjsmith1999/openpilot that referenced this issue Jun 27, 2022
* update names + notes for MPC outputs

"current_curvature" is not the correct description of what the MPC is outputting in it's curvature_ego state.
The MPC is integrating it's free variable, curvature_rate, such that curvature[0] is actually the desired_curvature before any delay.
inversely: the curvature_rate_desired is the desired rate of change to the setpoint and not the actual curvature rate. 

If we were to set the initial curvature = measured curvature in the MPC initiation these names would be correct. 
This was possibly how it was initially set up but the nomenclature here is now confusing.

* more notes

* match

* Clarify commaai#1
rjsmith1999 added a commit to rjsmith1999/openpilot that referenced this issue Jun 27, 2022
commit d066702
Author: ClockeNessMnstr <locke.dftc@gmail.com>
Date:   Tue Jun 7 12:41:03 2022 -0400

    update DH names + notes for MPC output curvatures (commaai#24701)

    * update names + notes for MPC outputs

    "current_curvature" is not the correct description of what the MPC is outputting in it's curvature_ego state.
    The MPC is integrating it's free variable, curvature_rate, such that curvature[0] is actually the desired_curvature before any delay.
    inversely: the curvature_rate_desired is the desired rate of change to the setpoint and not the actual curvature rate.

    If we were to set the initial curvature = measured curvature in the MPC initiation these names would be correct.
    This was possibly how it was initially set up but the nomenclature here is now confusing.

    * more notes

    * match

    * Clarify commaai#1

commit cb82478
Author: HaraldSchafer <harald.the.engineer@gmail.com>
Date:   Fri May 27 10:21:02 2022 -0700

    Tssp prius torque control (commaai#24669)

    * use llk

    * use steering sensor at low speed stil

    * Try more simple

    * rm prius tune

    * updated ref

commit f1f7a0b
Author: HaraldSchafer <harald.the.engineer@gmail.com>
Date:   Tue May 24 17:52:33 2022 -0700

    Rerevert torque control (commaai#24649)

    * Revert "Revert torque control (commaai#24565)"

    This reverts commit 9f8b037.

    * Move tune out of car specific stuff

    * Update ref commit

commit 041c255
Author: HaraldSchafer <harald.the.engineer@gmail.com>
Date:   Tue May 17 19:00:57 2022 -0700

    Revert torque control (commaai#24565)

    * torque reversal start

    * Fix carmodel tests

    * Update ref

    * update ref

    * Elif is better than if

commit 14f5dab
Author: HaraldSchafer <harald.the.engineer@gmail.com>
Date:   Fri May 20 13:50:47 2022 -0700

    Latcontrol torque: integrator need not be reset (commaai#24606)

    slow integrators need not be reset

commit 9221f3f
Author: ClockeNessMnstr <locke.dftc@gmail.com>
Date:   Fri May 13 19:52:20 2022 -0400

    LatControlTorque: clean up class variable (commaai#24526)

    * move to super

    * no class variable

    * there's CP

    * whitespace

    * drop CI from latcontrol super

    * Revert "drop CI from latcontrol super"

    This reverts commit 9218273.

    Co-authored-by: Shane Smiskol <shane@smiskol.com>

commit efb4dbd
Author: HaraldSchafer <harald.the.engineer@gmail.com>
Date:   Fri May 6 22:17:21 2022 -0700

    Latcontrol torque: fix integrator induced ping pong (commaai#24458)

    * Latcontrol torque: fix integrator induced ping pong

    * Reset on disengage since unwind resets anywayh

    * Might be overkill

    * rm whitespace

    * update ref

commit d105ae2
Author: HaraldSchafer <harald.the.engineer@gmail.com>
Date:   Mon May 2 14:42:18 2022 -0700

    Latcontrol torque: update tuning (commaai#24357)

    * Little more chill

    * Update ref

    * Update refs

commit 0ce2b58
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Apr 28 00:42:52 2022 -0700

    Clean up controllers (commaai#24340)

    * clean up lat controllers

    * pass CP once

    * sort

commit 47b162c
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Apr 27 01:18:05 2022 -0700

    LatControlTorque: fix deadzone and missing steer saturated warning (commaai#24294)

    * fix steer saturated alert and deadzone

    * fix and formatting

    * update refs

    * update refs

    * not needed

    * remove

commit 51a7ef2
Author: HaraldSchafer <harald.the.engineer@gmail.com>
Date:   Wed Apr 20 11:26:24 2022 -0700

    Latcontrol torque: max_torque rename (commaai#24265)

commit 33e00f6
Author: HaraldSchafer <harald.the.engineer@gmail.com>
Date:   Tue Apr 19 19:34:31 2022 -0700

    Lateral torque-based control with roll on TSS2 corolla and TSSP rav4 (commaai#24260)

    * Initial commit

    * Fix bugs

    * Need more torque rate

    * Cleanup cray cray control

    * Write nicely

    * Chiiil

    * Not relevant for cray cray control

    * Do some logging

    * Seems like it has more torque than I thought

    * Bit more feedforward

    * Tune change

    * Retune

    * Retune

    * Little more chill

    * Add coroll

    * Add corolla

    * Give craycray a good name

    * Update to proper logging

    * D to the PI

    * Should be in radians

    * Add d

    * Start oscillations

    * Add D term

    * Only change torque rate limits for new tune

    * Add d logging

    * Should be enough

    * Wrong sign in D

    * Downtune a little

    * Needed to prevent faults

    * Add lqr rav4 to tune

    * Try derivative again

    * Data based retune

    * Data based retune

    * add friction compensation

    * Doesnt need too much P with friction comp

    * remove lqr

    * Remove kd

    * Fix tests

    * fix tests

    * Too much error

    * Get roll induced error under 1cm/deg

    * Too much jitter

    * Do roll comp

    * Add ki

    * Final update

    * Update refs

    * Cleanup latcontrol_torque a little more
ntegan1 referenced this issue in ntegan1/apilot Jul 12, 2022
* update names + notes for MPC outputs

"current_curvature" is not the correct description of what the MPC is outputting in it's curvature_ego state.
The MPC is integrating it's free variable, curvature_rate, such that curvature[0] is actually the desired_curvature before any delay.
inversely: the curvature_rate_desired is the desired rate of change to the setpoint and not the actual curvature rate.

If we were to set the initial curvature = measured curvature in the MPC initiation these names would be correct.
This was possibly how it was initially set up but the nomenclature here is now confusing.

* more notes

* match

* Clarify #1
jbschooley pushed a commit to jbschooley/openpilot that referenced this issue Jul 14, 2022
infiniteCable added a commit to infiniteCable/openpilot that referenced this issue Mar 7, 2024
multikyd pushed a commit to multikyd/openpilot that referenced this issue Apr 25, 2024
chrispypatt pushed a commit to chrispypatt/openpilot that referenced this issue Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests