Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: OpenPilot

  1. #11
    Verified VCDS User
    Join Date
    Apr 2014
    Location
    US 2014 GTI Drivers Edition/DSG
    Posts
    500
    Post Thanks / Like
    instead of bouncing back and forth, can't you just teach it to follow the centerline and use side line as fallback/secondary?

  2. #12
    FoRT jyoung8607's Avatar
    Join Date
    Feb 2014
    Location
    Cincinnati, OH
    Posts
    2,140
    Post Thanks / Like
    Got some coarsely tuned PIDs dialed-in today. Amateur cinematography and peanut gallery commentary provided by my sons in the backseat.







    There's still some ground to be gained, I'm going to revisit tuning when we get rid of all this snow and salt spray obscuring lane markings everywhere, but it's now very usable on the highway and pretty decent on side/rural roads. I've still got a lot of safety coding yet to be done, but this is going to be a quality OP port.

    Once steering is dialed in, I want to do a little work with ACC. We're still using the stock ACC, and probably will for the foreseeable future, but we could could layer on some functionality. After VCDS recoding to permit resume after short stop/resume from steering wheel button, we can monitor for distance to the vehicle in front, and simulate the resume button press to resume anytime. With that same button press simulation, we can use map-based speed limit data we get from OpenStreetMap to adjust the ACC setpoint.

    Most of OP's code requires really specific data about every single model and year of vehicle, and it's a really cumbersome thing to maintain. I think I can make this code work for MQB in a very general way, and then process the VIN_01 messages to get the VIN, identify the chassis from that, and keep a lookup table of supported MQB vehicle-classes with their associated tuning constants. That will work really well in the USA, but RoW vehicles don't encode nearly so much vehicle type info into the VIN, so (as one example) distinguishing a RoW Golf from a Golf Sportwagen from a Golf Alltrack when they're all chassis AU may be difficult. Thoughts welcome if anyone knows a way to tell those apart from an Auto-Scan or similar.
    Last edited by jyoung8607; 02-01-2019 at 04:53 PM.
    Silence gives consent.

  3. Likes Uwe, D-Dub liked this post
  4. #13
    FoRT jyoung8607's Avatar
    Join Date
    Feb 2014
    Location
    Cincinnati, OH
    Posts
    2,140
    Post Thanks / Like




    PID loops more or less work. Safeties are about two thirds done. Added some code to simulate LDW_02 messages to the instrument cluster, for yellow/green passive/active and left/right lane visibility. For S&Gs I added automatic detection of the car's configured speed units (MPH vs KPH), and later I want to go back and obey terminal 58 dimming for brightness. Lots more to do, but what we have is working pretty decent. If anyone else wants to give this code a try, we're at a point where I could talk you through building the CAN bus tap. No mods required to the car.

    https://github.com/jyoung8607/openpi...lfdrive/car/vw

    Code:
    # TODO: additional signals
    #  * EPS HCA support detection (throw steering error on engage if not supported)
    #  * ACC speed setpoint
    #  * ACC following distance setpoint
    #  * ACC distance to car in front
    #  * Test ACC sensor blind/other error to make sure OP can react clearly and promptly
    #  * GRA_ACC_01 steering wheel buttons for events, and to send cancels and speed changes
    #  * Dimmung messages for EON screen brightness
    #  * (( Klemmen_Status_01 for virtual terminal 15, but goes in Panda safety ))
    #  * (( VIN_01 for auto platform ID, but probably goes in fingerprint or init ))
    #  * ESP_05 ESP_Autohold_aktiv provides DSG and maybe even manual auto-hold state, may be important for auto-resume
    #  * ESP_05 ESP_Verzoeg_EPB_verf may signify presence of an EPB, implying ACC stop-and-go support
    #  * EPB_01 EPB_Status and friends tell us lots about the EPB, if present, still need to track down handbrake
    #  * ACC_06 ACC_Typ may indicate stop-and-go support, @cben = 1, @jyoung8607 = 2
    
    # TODO: Safety
    #  * Seatbelt works to disable. Turns out stock ACC doesn't care, so OP gets to handle. Need to spam ACC cancel.
    #  * Door open detection works to disable. ACC dies immediately anyway, but tested manually.
    #  * Brake pressed. Obviously knocks out stock ACC. Have not made this explicit/redundant in OP yet.
    #  * ESP disabled detection works, but stock ACC re-enables and creates a timing/conflict with OP, need to spam cancel.
    #  * Gas pressed. Trivial but haven't done yet. Will need to spam ACC cancel.
    #  * Control steering torque and ramp rate once we have a reasonable tune model.
    
    # TODO: generic platform detection
    #  * Collect 3x VIN_01 messages and detect chassis (e.g., AU=Golf Mk7) with inherent networking model
    #  * Optionally, collect Motor_Code_01 for transmission type
    
    # TODO: bus layout detection
    #  * At J533 gateway/extended? Required to have any control over ACC long term, even a "lite" model
    #  * At R242 camera? More traditional, but no possibility of controlling ACC
    #  * At J533 gateway/running gear? Needed for lowline J533 in cars without ACC. Will fingerprint differently.
    # FIXME: Temporarily use a hardcoded J533 vs R242 location during development.
    Last edited by jyoung8607; 02-11-2019 at 07:07 PM.
    Silence gives consent.

  5. Likes Zenerdiode, Uwe, NEtech, DGMotors, D-Dub liked this post
  6. #14
    Verified VCDS User Zenerdiode's Avatar
    Join Date
    Jun 2014
    Location
    Newcastle, England
    Posts
    862
    Post Thanks / Like
    Very impressed indeed, Jason. However, I'm glad you're still behind the wheel:

    # TODO: Safety
    ...
    In my line of work (Railway Signalling) anything computer based that life depends on; require the computer to be guaranteed to fail-safe. How? By running three identical processors, each in their own chassis, with identical firmware and each processor executing each MC instruction in unison. The output of each processor is compared by the other two by redundancy management circuits and if two agree and the other one doesn't, the rogue one is physically disabled by the other two deliberately rupturing its security fuse. When two out of three are running, if they disagree the system effectively throws itself on its sword.

    # TODO: Buy a Futaba controller so I can drive this thing remotely.

  7. Likes Uwe, jyoung8607, PetrolDave liked this post

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •