commaai / openpilot

openpilot is an operating system for robotics. Currently, it upgrades the driver assistance system on 275+ supported cars.
https://comma.ai/openpilot
MIT License
49.98k stars 9.12k forks source link

Lincoln MKZ / Ford Fusion compatibility #1

Closed ingenieroariel closed 5 years ago

ingenieroariel commented 7 years ago

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:

alan707 commented 7 years ago

Can someone confirm 0x3A6#000D generates Vehicle Coming from Left alert as the picture on issue #31 shows? This is the command I ran: cangen can0 -g 10 -I 3A6 -D 000D

ingenieroariel commented 7 years ago

I ran the same command on my car (HS2 bus, the one connected to camera) and got nothing, while in parking, reverse and drive. On which bus did you send it?

alan707 commented 7 years ago

When I had all CAN buses open, that was on HS3. I confirmed that doesn't work through the DLC (OBD-II port). Now that I have connected all 4 CAN buses to the CAN gateway module, it is acting more like the real system and that message will need to be piped in directly to HS3

alan707 commented 7 years ago

Here's an explanation how you solve SocketCAN's No buffer space available error: https://community.carloop.io/t/socketcan-canplayer-error-sendto-no-buffer-space-available/298

ingenieroariel commented 7 years ago

I was able to capture data from the 3 high speed can buses using 3 x canable.io ($20 usd), flashing them with the candlelight firmware and using a custom gs_usb kernel extension. Attached are 3 million can messages with LKAS and ACC on from the 3 can buses.

I also recorded video with GPS information using a garmin virb, video at 240 fps around the car with 4 gopros and 4K video front facing. Here is an example:

https://www.youtube.com/watch?v=6VeWhmZnWIw

3can.zip

adam-nelson commented 7 years ago

So thats the car driving itself?

On Thu, Jun 15, 2017 at 6:06 AM, Ariel Núñez notifications@github.com wrote:

I was able to capture data from the 3 high speed can buses using 3 x canable.io ($20 usd), flashing them with the candlelight firmware and using a custom gs_usb kernel extension. Attached are 3 million can messages with LKAS and ACC on from the 3 can buses.

I also recorded video with GPS information using a garmin virb, video at 240 fps around the car with 4 gopros and 4K video front facing. Here is an example:

https://www.youtube.com/watch?v=6VeWhmZnWIw

3can.zip https://github.com/commaai/openpilot/files/1075779/3can.zip

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/commaai/openpilot/issues/1#issuecomment-308542896, or mute the thread https://github.com/notifications/unsubscribe-auth/AE9EvzGf6Rbh5E7WJ6Y0Ox7wYc3-n6xIks5sED00gaJpZM4LAlJO .

ingenieroariel commented 7 years ago

Parts of the trip yes, but with the built in system that we are trying to replace with openpilot.

-a

On Jun 14, 2017, at 9:55 PM, Adam Nelson notifications@github.com wrote:

So thats the car driving itself?

On Thu, Jun 15, 2017 at 6:06 AM, Ariel Núñez notifications@github.com wrote:

I was able to capture data from the 3 high speed can buses using 3 x canable.io ($20 usd), flashing them with the candlelight firmware and using a custom gs_usb kernel extension. Attached are 3 million can messages with LKAS and ACC on from the 3 can buses.

I also recorded video with GPS information using a garmin virb, video at 240 fps around the car with 4 gopros and 4K video front facing. Here is an example:

https://www.youtube.com/watch?v=6VeWhmZnWIw

3can.zip https://github.com/commaai/openpilot/files/1075779/3can.zip

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/commaai/openpilot/issues/1#issuecomment-308542896, or mute the thread https://github.com/notifications/unsubscribe-auth/AE9EvzGf6Rbh5E7WJ6Y0Ox7wYc3-n6xIks5sED00gaJpZM4LAlJO .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

adam-nelson commented 7 years ago

Well this is good news

@geohots should be happy

On Thu, Jun 15, 2017 at 8:58 PM, Ariel Núñez notifications@github.com wrote:

Parts of the trip yes, but with the built in system that we are trying to replace with openpilot.

-a

On Jun 14, 2017, at 9:55 PM, Adam Nelson notifications@github.com wrote:

So thats the car driving itself?

On Thu, Jun 15, 2017 at 6:06 AM, Ariel Núñez notifications@github.com wrote:

I was able to capture data from the 3 high speed can buses using 3 x canable.io ($20 usd), flashing them with the candlelight firmware and using a custom gs_usb kernel extension. Attached are 3 million can messages with LKAS and ACC on from the 3 can buses.

I also recorded video with GPS information using a garmin virb, video at 240 fps around the car with 4 gopros and 4K video front facing. Here is an example:

https://www.youtube.com/watch?v=6VeWhmZnWIw

3can.zip https://github.com/commaai/openpilot/files/1075779/3can.zip

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <https://github.com/commaai/openpilot/issues/1#issuecomment-308542896 , or mute the thread https://github.com/notifications/unsubscribe-auth/ AE9EvzGf6Rbh5E7WJ6Y0Ox7wYc3-n6xIks5sED00gaJpZM4LAlJO .

— You are receiving this because you authored the thread.

Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/commaai/openpilot/issues/1#issuecomment-308698684, or mute the thread https://github.com/notifications/unsubscribe-auth/AE9Ev7ZPEeKAv3h8IyKsvhBUOvhZYpAkks5sEQ5CgaJpZM4LAlJO .

ingenieroariel commented 7 years ago

Here is a non-exhaustive list of id's in those 3 can buses, if anyone wants to help out, you can create issues for the id messages that were not in abraham before:

041
042
047
048
04A
04B
04C
05A
05C
05D
076
077
078
07D
081
082
083
084
085
091
092
108
109
14C
156
165
166
167
168
169
171
178
179
186
187
188
18A
18B
192
19A
1E6
200
202
204
20A
213
214
215
216
217
220
221
222
223
224
225
227
228
229
22C
230
242
261
262
265
276
277
279
287
290
2A0
2A1
2A4
2AC
2B1
2B4
2C0
2D0
2D1
2D2
2D5
2D6
2D7
2D8
2D9
2DA
2DB
2DC
2DE
2E0
2E3
2E6
2EE
2F1
2F2
2F3
2F4
2F5
2F6
2F7
2F8
2F9
2FD
303
307
30A
30F
313
315
316
317
318
320
321
326
331
332
333
336
33B
346
348
34E
350
353
35B
35E
360
361
362
37B
386
38A
38D
3A6
3A7
3A8
3AA
3AB
3B2
3B3
3B4
3B5
3B6
3B7
3B8
3C3
3C7
3C8
3CA
3CC
3CD
3D0
3D8
3DA
3DE
3E0
3E1
3E2
3E3
3E5
3E6
3E7
3E8
3EA
3EB
3EC
3F0
3F1
3FB
40A
412
415
416
41D
41E
421
422
423
42C
42D
42F
430
431
432
433
434
435
439
43A
43C
43D
43E
447
453
454
455
456
45A
45E
462
463
464
465
466
467
46A
46B
470
4A2
4B0
4D0
51E
581
591
593
595
596
59E
5B2
5B3
5B5
5C6
5E2
adam-nelson commented 7 years ago

Does the fusion have a sync system?

ingenieroariel commented 7 years ago

SYNC3

-a

On Jul 11, 2017, at 3:47 AM, Adam Nelson notifications@github.com wrote:

Does the fusion have a sync system?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

ankita9017 commented 7 years ago

@ingenieroariel any latest updates? were you able to find the steering control IDs?

lemassykoi commented 7 years ago

@ingenieroariel Hi, I just ordered a Panda from Comma.ai few days ago, and after reading your story, I'm wondering if I should cancel it, to buy an OpenXC Ford Ref VI instead, cause I own a Ford Mondeo. I already installed chffr and record trips with it.

Thanks

ingenieroariel commented 7 years ago

Clement,

I have not used my OpenXC device in a while and now use the kvaser leaf light and the canable with a modified firmware to connect to the different buses, it all goes to a jetson tx2 board. The openxc in json mode was too slow.

Since the Panda is not open source I cannot comment.

-a

On Aug 19, 2017, at 9:54 AM, Clément PAPPALARDO notifications@github.com wrote:

@ingenieroariel Hi, I just ordered a Panda from Comma.ai few days ago, and after reading your story, I'm wondering if I should cancel it, to buy an OpenXC Ford Ref VI instead, cause I own a Ford Mondeo. I already installed chffr and record trips with it.

Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

geohot commented 7 years ago

All of the panda software is open source (see our GitHub, don't spread fake news!), and unlike the OpenXC, it is capable of dumping the full contents of the buses in real time.

Kvaser isn't a bad choice either, just expensive.

ingenieroariel commented 7 years ago

My apologies for the confusion, I meant open source hardware (like the NEO). Should have clarified.

OpenXC has an open source hardware version too, and of course kvaser is close source hardware and firmware (but open source linux kernel drivers).

-a

On Aug 19, 2017, at 11:04 AM, George Hotz notifications@github.com wrote:

All of the panda software is open source (see our GitHub, don't spread fake news!), and unlike the OpenXC, it is capable of dumping the full contents of the buses in real time.

Kvasar isn't a bad choice either, just expensive.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

energee commented 7 years ago

A panda should make this car straightforward to port, was hoping to see more progress by now. @lemassykoi have you logged any drives yet?

lemassykoi commented 7 years ago

I'm waiting for my panda, and I am very motivated to get openpilot to work

gekowa commented 7 years ago

I've got my panda today, and I'm trying to hack into Ford Kuga (Escape). Wondering if any updates from you guys about Ford Fusion?

lemassykoi commented 7 years ago

Panda is receiving signals from 2 CAN buses. I am currently decoding signals. I can send some few things, like turn signals, the simpliest thing I've found so far. Hard work.

gekowa commented 7 years ago

@lemassykoi, did you connect Panda with an ordinary male-male USB cable? Did you cut off the power wire of the USB cable? I'm connecting with an ordinary USB cable, but the car turned itself off as soon as the cable is connected. I was told that I need to cut off the power wire of the USB cable, don't know if this is the reason.

lemassykoi commented 7 years ago

Yes, with an ordinary male male USB, from amazon, 5 meters. I didn't cut anything as my panda is rev. C, and my two laptops are all modern and from Dell. Which computer do you use ? Linux or Windows ? go to slack channel, more informations are there.

gekowa commented 7 years ago

@lemassykoi, which operating system do you use? And do you mind share your tool chain about hacking the CAN?

energee commented 7 years ago

@gekowa cut the power wire or plug it into the car before the computer

gekowa commented 7 years ago

@energee, I tried both, neither worked. :(

By cutting the power wire, did you mean to cut both V+/V- wires or just V+? If I only keep D+/D- nothing happened, no new device detected on the computer; if I keep the V- (only cut V+), it goes to previous result - the car turned the dashboard off (seem like some self protection behavior).

Any other suggestions? Does this mean that I cannot use USB to hack my car with panda?

energee commented 7 years ago

You only need to cut the red 5v wire

bertramt commented 7 years ago

I may also suggest making sure to manually update the panda firmware to the latest version (1.0.1) to see if that fixes the issue.

alan707 commented 7 years ago

I connected the panda to a Ford Fusion with the USB cable and had no issues.

alan707 commented 7 years ago

@ingenieroariel any updates??

ingenieroariel commented 7 years ago

Nothing important from my side, left it aside for a few months while catching up with the day job.

I am ordering a Panda and making a custom giraffe to work in nov-dec.

Any progress on your side?

On Oct 28, 2017, at 8:06 AM, Alan Mond notifications@github.com wrote:

@ingenieroariel any updates??

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

alan707 commented 7 years ago

Yes! I think I am getting very close. Will need support with porting stuff on the software side. I think this weekend I will figure out steering controls.

lemassykoi commented 7 years ago

Did you cut the wires, as Ariel ?

On Mon, Oct 30, 2017 at 7:39 PM +0100, "Alan Mond" notifications@github.com<mailto:notifications@github.com> wrote:

Yes! I think I am getting very close. Will need support with porting stuff on the software side. I think this weekend I will figure out steering controls.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/commaai/openpilot/issues/1#issuecomment-340543637, or mute the threadhttps://github.com/notifications/unsubscribe-auth/APnmANPzYxKOw9b5-V9I81obgihBa-L8ks5sxhflgaJpZM4LAlJO.

alan707 commented 7 years ago

no I have a different method buying individual components and comparing CAN messages.

r3dlobst3r commented 6 years ago

@alan707 Have you had any more progress?

0x3333 commented 6 years ago

Looking to create a task force to do this car. I know that people are looking to the bounty, but collaboration is a faster and better way to handle this. My panda hasn't arrived yet, but I got a wiring diagram and will work on "giraffe" to fusion...

davidrhode commented 6 years ago

Whats the latest? I currently have a 2017 Ford Fusion with all the "box's" checked. That I wouldn't mind letting someone use for testing. I am currently in Jacksonville, FL and travel to Asheville, NC frequently.

davidrhode commented 6 years ago

Correction if it makes a difference. 2017 Ford Fusion Energi Titanium

sakshamkota commented 6 years ago

To second davidrhode, I am located in Bothell, WA with a 2017 Fusion Energi Titanium with every option except Autobrake and Autopark. I would love to add those features though even if it means changing the existing hardware. I am also open to anyone helping me with adding these and Autopilot.

ingenieroariel commented 6 years ago

You can join the comma ai slack (#ford channel). There is quite a few of us there. A few people have started on a dbc and it is quite complete.

-a

On Dec 23, 2017, at 12:50 AM, sakshamkota notifications@github.com wrote:

To second davidrhode, I am located in Bothell, WA with a 2017 Fusion Energi Titanium with every option except Autobrake and Autopark. I would love to add those features though even if it means changing the existing hardware. I am also open to anyone helping me with adding these and Autopilot.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

alan707 commented 6 years ago

Can you share the dbc file on opendbc repo?

ingenieroariel commented 6 years ago

It’s on an opendbc fork (lemmaskoy’s i believe)

On Mon, Dec 25, 2017 at 1:51 PM Alan Mond notifications@github.com wrote:

Can you share the dbc file on opendbc repo?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/commaai/openpilot/issues/1#issuecomment-353884889, or mute the thread https://github.com/notifications/unsubscribe-auth/AADW18628GwRBLUrFjhMU4-EhQb-0u3pks5tD-6vgaJpZM4LAlJO .

ingenieroariel commented 6 years ago

https://github.com/lemassykoi/opendbc/blob/master/ford_mondeo_WIP.dbc

davidrhode commented 6 years ago

For those of us who are less code savvy, what is a DBC?

On Mon, Dec 25, 2017 at 1:56 PM Ariel Núñez notifications@github.com wrote:

https://github.com/lemassykoi/opendbc/blob/master/ford_mondeo_WIP.dbc

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/commaai/openpilot/issues/1#issuecomment-353885113, or mute the thread https://github.com/notifications/unsubscribe-auth/AhLCgSAZUR6Cdxwlw2hndyE6WCX9898pks5tD-_rgaJpZM4LAlJO .

rainabba commented 6 years ago

Trying to get spun up now that I'm back and logged some 4,200 miles to Cabana with my F350 Lariat.

The general idea is that with a complete-enough dbc, we can build/run chffr-plus to begin to see something that can then be interested into open pilot? If not, can someone provide a more project-oriented overview to help understand what the challenges are? With that, maybe we can better organize going forward, but I'm ready to dig in and don't quite know where I should go from here

ingenieroariel commented 6 years ago

@rainabba I think the path you describe makes sense. I connected chffrplus to my car and the speed measurement stays at 0km/h the whole time.

I used the DBC file that I linked above and was able to get it to detect speed on a one off script running on another computer in the network and create the correct capnp message. What we need is to test that with an actual panda + chffrplus setup since I don't own a panda.

Do you have a panda + one plus 3 ? If so let me know and I'll post here a copy of the chffrplus branch I am using.

nategreco commented 6 years ago

From what I understand all Ford Fusions (at least 2013 and later) have electronically assisted power steering. Looking on rockauto and parts websites it seems nobody differentiates the steering box on a LKA and non-LKA rnabled fusion. So I'm thinking LKA is not necessary on a Fusion in order to implement openpilot and that a non-LKA car would still respond to CAN commands. Has anybody developed enough of an understanding yet to confirm if this is true?

Aryeh95 commented 6 years ago

I have a 2017 Fusion Energi Platinum and I just got a oneplus 3 and flashed chffrplus on it. My panda is coming tomorrow. Is there anything I can do to help? (I'm based in Baltimore)

Aryeh95 commented 6 years ago

I have the Panda now. It works fine with chffr but with chffrplus although it says paired instead of no car when the panda is connected via USB it won't record any panda to the trips.

energee commented 6 years ago

@Aryeh95 Can you find out more about the connectors to the stock LKAS camera, open this bezel and try to find a match on digikey or send pictures?

Aryeh95 commented 6 years ago

@energee I don't wanna break anything is there instructions on how to remove it somewhere?