1. Attachments are working again! Check out this thread for more details and to report any other bugs.

Open Pilot Comma 2

Discussion in 'Prime Accessories and Modifications' started by High Mileage, Jun 10, 2020.

  1. Schrauger

    Schrauger Junior Member

    Joined:
    Mar 11, 2015
    27
    11
    0
    Location:
    USA
    Vehicle:
    2021 Prius Prime
    Model:
    XLE
    The Deluxe smartDSU is not a new DSU, but rather a standalone device that sits between your regular DSU and the cable that the DSU uses to connect to the car. Your existing DSU is still plugged in, just with this device daisy-chained in-between.

    Also, he no longer sells the deluxe smart DSU. He's moved exclusively over to smartenedDSU where you send him your DSU and he modifies it. He has a setup where he'll mail you a temporary replacement DSU to you first so you can still drive your car while he works on yours, then you mail it back when you get your modified DSU. It requires an extra downpayment and presumably a bit in shipping costs if you want to go that route. Or you can just live without a DSU for those few days, as long as you have OpenPilot installed and booted up before you start your car.

    I got the deluxe smart DSU when he first started accepting orders. I like the fact that I can move it to another toyota in the event I need to, or I could sell it to anyone with a DSU-based toyota. Whereas the modified DSU (smartenedDSU) is stuck with the car, and you could only take that DSU to another of the same model; the regular prius and the prime have slightly different firmware making them non-interchangeable.
     
    mistermojorizin likes this.
  2. cirruspete

    cirruspete Junior Member

    Joined:
    Sep 8, 2004
    75
    23
    0
    Location:
    Sonora, CA
    Vehicle:
    2017 Prius Prime
    Model:
    Plug-in Advanced
    Hi there- I ordered the Smart DSU and the ZSS from Erich. I need to send him my DSU sometime next week for the modification, I guess. I sure hope I can figure out how to install everything correctly! That ZSS looks difficult, based on the ten short serial videos he composed.
     
  3. a_scalzi

    a_scalzi Junior Member

    Joined:
    Oct 27, 2006
    15
    2
    0
  4. High Mileage

    High Mileage Active Member

    Joined:
    Nov 25, 2016
    136
    236
    0
    Location:
    California
    Vehicle:
    2018 Prius Prime
    Model:
    Prime Advanced
    Hi a_scalzi, I am not technically competent in that area yet. I am trying to read and educate myself. I once considered myself fairly technical, once getting on Discord, Github etc, I find I am not.
    Erich did DM me yesterday with his fork. But I don't know how to do that yet.
    I just had a nice chat with Cirruspete about his ZSS/SDSU purchase. He had Erich help him remotely install the fork. I wish there was a good WIKI to read.
    I have asked Erich to put me in line for a ZSS/SDSU, meanwhile I will work on the SSH/Putty lesson.
     
  5. mistermojorizin

    mistermojorizin Active Member

    Joined:
    Jun 12, 2019
    310
    136
    0
    Location:
    usa
    Vehicle:
    2019 Prius Prime
    Model:
    Prime Advanced
    Are you able to SSH into the comma with WorkBench? you can download it from here: Releases · jfrux/workbench · GitHub and here's an article on how to get connected:

    After that it's pretty easy to install a fork. here's that easy to read article you wanted:


    these are the commands I use (don't include the stuff after the # those are just comments explaining the commands):

    cd /data #this moves to the right directory

    mv openpilot openpilot.backup OR rm -rf openpilot #this either backs up the current installation or deletes it, do one or the other

    ls -lah #this lists directory files, you can skip this step, it's just to double check that everything's been moved to the backup folder

    git clone GitHub - ErichMoraga/openpilot: open source driving agent.git #this points OP at the fork on github

    cd openpilot #this moves to the right directory

    git checkout 076 #this points OP to the right branch, 076 (version 0.7.6.1 is currently the latest without ZSS, with ZSS it's something like 076zss) but not sure on that last part - go on the github for the fork and look through branches to figure out.

    reboot #this will take 15-30 mins to build on the Comma
     
    robertjackson17 likes this.
  6. cirruspete

    cirruspete Junior Member

    Joined:
    Sep 8, 2004
    75
    23
    0
    Location:
    Sonora, CA
    Vehicle:
    2017 Prius Prime
    Model:
    Plug-in Advanced
    Hi and thanks for all these links and the articles! But... both High Mileage and I have the new Comma 2, delivered to us in the past two months. Does your information pertain to the latest generation Comma 2 (I see mentions of "EON", which I think may be the earlier version).
     
  7. High Mileage

    High Mileage Active Member

    Joined:
    Nov 25, 2016
    136
    236
    0
    Location:
    California
    Vehicle:
    2018 Prius Prime
    Model:
    Prime Advanced
    mistermojorizin, thank you for taking the time to provide these links.
    I did install Workbench on my laptop but it was not able to "Find" the device by scanning. I was able to manually add the IP address, but still would not connect. I do have SSH enabled in the C2.
    I had watched several of Jfrux's help videos' or help sessions. I have watched them again and am starting to digest the info.
    On my next set of days off I will try again to SSH in with putty, or use workbench. Erich from Discord has sent me a link to a fork he developed that is supposed to improve the lane control on the Prius which I would like to try.
    Any other suggestions for looking at the code? I see and hear talk of enabling certain features, like auto start/stop, but not sure which files and how to open. Thanks again for helping the new guys.
     
    Raytheeagle likes this.
  8. Schrauger

    Schrauger Junior Member

    Joined:
    Mar 11, 2015
    27
    11
    0
    Location:
    USA
    Vehicle:
    2021 Prius Prime
    Model:
    XLE
    The new Comma 2 is the exact same device as the Comma 1, internally. It has a beefier heat sink, and notably the company removed the battery and replaced it with a capacitor, letting the device survive extreme heat. There were a few other modifications as well, but the android-based device is the same, as is the OS, so any ssh commands should be unchanged.
     
  9. mistermojorizin

    mistermojorizin Active Member

    Joined:
    Jun 12, 2019
    310
    136
    0
    Location:
    usa
    Vehicle:
    2019 Prius Prime
    Model:
    Prime Advanced
    The commands I use are for my comma 2 that I bought a few weeks ago. Does everything in the articles apply? I can't be 100% certain. The articles are from 2 yrs ago so there might be some small differences compared to the old software. But I can say a least 95% of the things do apply. The EON can be updated to the latest version of OP. The only thing that's been deprecated as far as I know is a certain type of panda (the comma 2 has a built in panda).
     
  10. mistermojorizin

    mistermojorizin Active Member

    Joined:
    Jun 12, 2019
    310
    136
    0
    Location:
    usa
    Vehicle:
    2019 Prius Prime
    Model:
    Prime Advanced
    A lot of those features are included in other forks, but they don't drive nearly as well as Erich's in my limited experience. So I'm stikcing with Erich's and just cherry picking a couple features.

    SnG is already enabled on Erich's. Here's commands I use if I need to enable it on stock. This is actually going to the file and editing and commenting out the two lines of code that make the car go into standby at stops. Note this will cause the prius to use more energy/gas because without going into standby the electric power keeps flowing while stopped (you can see it in energy management view).

    · stop n go hack SNG

    cd /data/openpilot/selfdrive/car/toyota/

    nano carcontroller.py

    ctrl+shift+-

    #go to line 104 or 164 and add the pound signs to comment out the following lines:


    # if CS.out.standstill and not self.last_standstill:

    # self.standstill_req = True

    ctrl+x
    y
    enter #these three will exit and save your work

    reboot


    o SnG hack · ErichMoraga/openpilot@7630a31 · GitHub
    -------------------------
    Another one I adjust is changing how much OP slows down for turns. Stock is a factor of 1, Erich's uses a factor of 1.625 I believe which means the car goes faster through corners. I found too many disengagements/me getting scared and intervening even with stock speed, so I change the factor to 0.95. I'm gonna include less explanation here, if you're able to understand/do the SnG hack, you can figure out what's going on here. Basically you're going to that specific directory, editing that planner.py file, finding the line starting with "v_curvature" and changing from **1.6 or 1.7 to **0.95. In stock OP, there will be no **1.xxx factor at all since it uses a factor of 1 by default, but you can add the **X.XXX to it and it'll work the same way.

    · Change slow on curvature:

    cd /data/openpilot/selfdrive/controls/lib

    nano planner.py

    o Ctrl\ **1.625

    o Ctrlx, y, enter

    o Change line 148 to **1 (stock) or less

    § v_curvature = np.sqrt(a_y_max / np.clip(np.abs(curv)**1.625, 1e-4, None))

    § 1.75x curvature to reduce slowdown · ErichMoraga/openpilot@65eddca · GitHub

    -----------------------
    · lane change speed (you can't use lane change below 45 by default, I like to decrease that limit).

    cd /data/openpilot/selfdrive/controls/lib

    nano pathplanner.py

    o openpilot/selfdrive/controls/lib/pathplanner.py

    o change line 20 from 45 to 40mph

    -----------------------------
    · Increase temp temperature

    There's a risk here, but the new developer version of stock OP is using higher temp tolerances, so I'm using the same numbers.

    o Increase temperature range · commaai/openpilot@c82fda9 · GitHub

    cd /data/openpilot/selfdrive/thermald/

    nano thermald.py

    o Ctrl\ 92.5 change to 96

    o Ctrl\ 87.5 change to 94

    o Ctrlx, y, enter
     
  11. a_scalzi

    a_scalzi Junior Member

    Joined:
    Oct 27, 2006
    15
    2
    0
    @mistermojorizin excellent post about ssh. The new comma.ai wiki leaves the Comma EON: Getting Connected with SSH step out of the wiki or at least I could not find it. You need that step to ssh into the eon using Workbench or just SSHing into the EON/Comma2 without WorkBench.
    To SSH without WorkBench:
    1. right-click on the windows 10 icon and load Windows PowerShell or Windows PowerShell(Admin)
    2. type or paste and enter (ssh [email protected] -p 8022 -i ~/.ssh/openpilot_rsa) using your own Comma 2 IP address (settings--WiFi--Open WiFi settings--more options---3 dots upper right-hand corner of screen---Advanced---scroll down to the bottom of dropdown and get C2 IP address).

    If you are in: root@localhost:/system/comma/home

    To get a specific a branch from Erich's fork such type

    rm -rf /data/openpilot && cd /data && git clone GitHub - ErichMoraga/openpilot: open source driving agent && cd openpilot && git checkout 076_zss && reboot

    To get 076 with Erick specific prime mods

    rm -rf /data/openpilot && cd /data && git clone GitHub - ErichMoraga/openpilot: open source driving agent && cd openpilot && git checkout 076 && reboot

    Two years ago Jfrux taught me to ssh before the SSH docs were written and Erich wrote the script necessary to use his OpenPilot fork.
    Link to view Erick's Fork and different branches GitHub - ErichMoraga/openpilot: open source driving agent
     
    High Mileage likes this.
  12. mistermojorizin

    mistermojorizin Active Member

    Joined:
    Jun 12, 2019
    310
    136
    0
    Location:
    usa
    Vehicle:
    2019 Prius Prime
    Model:
    Prime Advanced
    thanks, you are clearly better at this than I am. I actually SSH'd into it with powershell first before using workbench and I had to add the key to the .ssh folder on my computer and change permissions a certain way. I much prefer powershell, but because of those two things it was much harder to get started with.

    also, just wanted point out that "rm -rf /data/openpilot" will delete openpilot. I prefer the backup command, but sometimes I'll delete it too.
     
    High Mileage likes this.
  13. a_scalzi

    a_scalzi Junior Member

    Joined:
    Oct 27, 2006
    15
    2
    0
    @mistermojorizin I don't know code. I just use what is suggested. So any suggestions are appreciated. I like Erick's fork. It is stable and safe. Sometimes he asks me to test his new branches and give input. I discussed the slowdown at curves with him when I had a slowdown of 5mph in the passing lane moving in heavy traffic on a minor curve on an intestate. My main goal replying here was to attempt to keep new users from frustration using ssh.

    I suggest anyone contemplating buying and installing OpenPilot to read Commaai's discord welcome and new wiki.
     
    robertjackson17 likes this.
  14. High Mileage

    High Mileage Active Member

    Joined:
    Nov 25, 2016
    136
    236
    0
    Location:
    California
    Vehicle:
    2018 Prius Prime
    Model:
    Prime Advanced
    Thank you mistermojorizin and a_scalzi for this great information.
    Myself and Cirruspete both have a ZSS and SDSU in progress with Erich.
    I will be reading and making a notepad cheatsheat of all the commands you mention. I like the idea of being able to reduce the cornering speed and enabling the SNG hack with my stock 7.6.1. I may or may not install Erich's 7.6 fork depending on how long it takes him to get us the SDSU and ZSS, when I will obviously need to install his 76_zss fork.
    Thanks again, I hope to get better using Workbench or SSH to look at and tweak the OP files with help from the community.
     
    Raytheeagle likes this.
  15. High Mileage

    High Mileage Active Member

    Joined:
    Nov 25, 2016
    136
    236
    0
    Location:
    California
    Vehicle:
    2018 Prius Prime
    Model:
    Prime Advanced
    Robertjackson17 and Joel Natividad, Cirruspete and myself have a couple of questions for you.
    We both pulled our DSU's last night and they are on their way to Erich for modification and ZSS upgrade.
    To be able to drive my car without all the error messages and actually use OP I had to enable "Community Features".
    One thing I notice is that there is a noticeable difference in the longitudinal control. It used to be much smoother and there was some deadband on hiills etc. As it is right now it reminds me of the old days of cruise control where any slight loss of speed would result in the transmission downshifting and the motor going up to the redline.
    My main question I guess is with the SDSU can I still control my following distance with the button from the steering wheel? Will I still have my 3 bars of setting? I really liked how the system controller speed and distance before and I really don't want to lose that with the SDSU.

    With community features enabled OP slows down for turns, and very abruptly I must say. Again I hope once the SDSU is back I go back to how things were. I was really pretty happy with OP other than the coarseness of lateral control and its affinity for hugging the left double yellow, so my hope was that the ZSS would improve that.
    I am hoping you guys can validate if we may be losing any longitudinal control with the SDSU.
     
  16. mistermojorizin

    mistermojorizin Active Member

    Joined:
    Jun 12, 2019
    310
    136
    0
    Location:
    usa
    Vehicle:
    2019 Prius Prime
    Model:
    Prime Advanced
    So the logic is this -
    All sDSU does is remove all the errors and enable stock automatic emergency braking. Otherwise it's just like driving without DSU. I've seen some talk on the discord where you can have a switch installed to the sDSU, where you could flip the switch and it's as if you have the stock DSU plugged in - but I'm not totally clear on this point here and you'd need to ask Erich.
    • If you have stock DSU plugged in, then OP does not touch long, but controls lat.
    • If you unplug stock DSU, then OP controls long and lat.
    • If you plug in an sDSU, OP controls long and lat.
    • If you plug in an sDSU, but turn off the comma, OP does not touch long and does not control lat - you get your old DRCC behavior back but no OP basically back to stock.
    Before I decided to get the sDSU, I spent a good amount of time driving with it unplugged, to decide if I wanted to go with the sDSU because that's the behavior you're going to get with the sDSU and OP. To me the OP long felt much better than stock DRCC because Stock DRCC
    • does not recognize stopped cars like 80% of the time,
    • does not have automatic stop n go, cannot be set if you're driving below 28mph (OP can be set while driving below 28mph by hitting set or resume, but it'll get set to 28mph or higher and the car will accelerate up to the set speed from 0mph without touching the gas),
    • hits the brakes really abruptly, while OP actually feathers the brake more making it much more comfy for low speed situations
    • does not enhance OP lat control
    While testing out the unplugged DSU, I played with stock OP, Erich's fork, and Shane's fork. The unpleasant acceleration behavior you're talking about is not present for me on Erich's fork, but I did notice it on Shane's and a little on stock OP. So you could try the fork and/or talking to Erich about getting a switch or cancelling the order.

    EDIT:
    a couple more thoughts -
    -the v_curvature edit is what I was talking about for tuning how much it slows down for turns. On Erich's fork it slows down very little by default.
    -the folllowing distance cannot be controlled by the button on the steering wheel. the folllowing distance is longer than 3 bars at speed and shorter than 1 bar in traffic. here's a video:

    -there are forks that let you have different levels for following distance (shane's and dragonpilot I beileive). I liked that about Shane's but I didn't like how it drove in general (a lot of ping ponging, agressive acceleration)
    -open pilot does have some learning that it does and improves over time
    - this is important - you can change how aggressive the lat control is with changing the driving mode from eco to normal to power. At least that is how it is on Erich's fork. This doesn't change follow distance, but just how much it will downshift.
     
    #56 mistermojorizin, Jul 6, 2020
    Last edited: Jul 6, 2020
    robertjackson17 and High Mileage like this.
  17. a_scalzi

    a_scalzi Junior Member

    Joined:
    Oct 27, 2006
    15
    2
    0
    If you run OP with DSU unplugged or missing be careful no AEB.
     
  18. High Mileage

    High Mileage Active Member

    Joined:
    Nov 25, 2016
    136
    236
    0
    Location:
    California
    Vehicle:
    2018 Prius Prime
    Model:
    Prime Advanced
    a_scalzi, Yea so not having the SDU yesterday and driving home from work with all the July 4 people heading home was a poor choice on my part:( Nothing bad happened but it was not the best day to be without that extra level of protection available.
     
  19. High Mileage

    High Mileage Active Member

    Joined:
    Nov 25, 2016
    136
    236
    0
    Location:
    California
    Vehicle:
    2018 Prius Prime
    Model:
    Prime Advanced
    mistermojorizin, Thank you again for taking the time to reply, I wish I could have this kind of discussion with Erich. He is an extremely bright individual and Comma is lucky to have him spend the kind of time he does on Discord helping others. I only wish he was a little easier to talk to...………………….
    That being said I had a talk with him this morning on Discord trying to fully understand what Cirruspete and I can expect. He mentioned the "Switch" which I had not seen before. Based on what I have read I think the switch option would be my best choice. If OP long control is better than what I am getting now I can leave the switch on. If I don't like it and want DRCC to have long control then I can switch off.
    I can only guess that a lot of what I experienced yesterday has to do with the lack of the DSU. But I will not know until I have it or the SDSU back. I will update all when I get there.
     
    Raytheeagle and mistermojorizin like this.
  20. mistermojorizin

    mistermojorizin Active Member

    Joined:
    Jun 12, 2019
    310
    136
    0
    Location:
    usa
    Vehicle:
    2019 Prius Prime
    Model:
    Prime Advanced
    I know what you mean. When I started following the discord about half a year ago, there was more tolerance for noobs like us. There was another gentleman on there who posted on here too and was very helpful, but he has left in February or so.

    Yea the switch seems like the best of both worlds. New versions are coming out all the time that work better and better. And OP itself learns over time. Check out Erich's fork, it's really the best driving experience for our cars. Were you ever able to get on SSH?