u/narkeeso

I finally found the longitudinal lever I've been looking for as an e2e user

I finally found the longitudinal lever I've been looking for as an e2e user

I'll open by saying, I am not intending to start another fork but the above setting is my personal fork branched off of sunnypilot. I'm hoping this perhaps starts a conversation around having some vetted tuning for users that are embracing full e2e (DEC off). I'd love for something like this to exist in openpilot or sunnypilot. I'll try creating a PR for Sunnypilot to see what they think, I've driven with this bias all week and I'm over the moon with it.


The default openpilot experience in my RAV4 2023 is not great, it's better than stock ACC but it still makes me uncomfortable when it wants to brake and feels rather robotic. Since then I've discovered that the newest models perform exceptionally well with full experimental, leagues better than stock.

The newer models seem to be getting more careful, more conservative and it leads to a more comfortable ride but it has a major drawback, it drives too slow in certain scenes and doesn't go with the flow of traffic. I was really itching for a lever to modify how fast it thinks it can go in certain scenarios. Driving personalities have almost no affect in this case, I could not tell any difference between aggressive or relaxed. I really needed something where I could tell the model that it can go a little faster without sacrificing its ideal braking behaviors to make stopping comfortable.

There isn't too many levers you can adjust when you use full E2E, the model controls most of the behavior but I did discover it feeds into a parameter called desiredAcceleration. My personal fork has a speed bias setting that allows you to adjust the desired acceleration that's controlled by the model. So in scenarios where a scene would conservatively slow down the car in a coasting situation, the bias pushes the acceleration ever so slightly and the result is that it ends up behaving more like "chill mode" without actually being in chill mode.

My problem with DEC has always been the latency to detect whether it should be in blended mode so that the car can stops in tricky situations, e.g. stopped lead prediction. There's even a warning for the DEC feature on the website that the feature may brake late which is a hard pass for me. This speed bias setting allows us to stay in full experimental mode without any switching and the car drives like the model was trained. Now I get the benefits of DEC chill mode while still preserving comfortable braking behavior of newer models (especially RDF).

One other detail I added was to ensure the speed bias didn't fight when the model wanted to stop early, so I added a simple threshold that detects if the car is intending to stop to fade the speed bias back to 0. This simply means we still get the early stopping benefits. I initially made this it's own parameter to adjust but I found that there was a strong correlation between the speed bias setting and the braking threshold so I simply did braking_threshold = (speed_bias * 2) and that seems to work great.

Moving the bias up or down honestly feels like driving personality to me. The lower settings feel relaxed and the higher settings feel more aggressive. These models still have latency of when to stop so setting this too high will make the car brake uncomfortably late at higher acceleration.

longitudinal_planner.py:168-175

output_a_target_e2e = sm['modelV2'].action.desiredAcceleration # model's raw request  
bias_scale = np.clip((output_a_target_e2e + 2.0 * self._e2e_bias) / 0.3, 0.0, 1.0)  
output_a_target_e2e += self._e2e_bias * bias_scale # my speed bias setting  
...  
if self.is_e2e(sm):  
    output_a_target = min(output_a_target_e2e, output_a_target_mpc)     # model never wins over MPC braking 
u/narkeeso — 7 days ago

Why is there live lateral tuning but no live longitudinal tuning?

I was thinking the other day that it's going to be impossible for Comma to come up with a model driving style that fits all. Even if you use full E2E, switch models from say Pop V2 to Off Policy 10v3 and you'll get two entirely different driving experiences.

Pop V2 drives extremely carefully, almost like a hypermiler, slows down very early. OPM10v3 drives a lot more confidently and accelerates closer to the lead but brakes a little too late for my tastes. Ideally I'd want the best of both PopV2 and OPM10v3. This won't be the case for everyone though.

I use Sunnypilot with DEC turned off. The only variable i change these days is the model itself. It's easier to compare how they perform like that but I can tell none of them really understand how my car works best. I'm in a RAV4 2023 Hybrid and I really wish they'd utilize the regen braking and lay on the brake a lot slower than just realize it needs to go aggressive brakes to stop on time.

Would it be feasible for there to have some calibration mode where I can drive for a few miles in various conditions and have the system learn how the car slows down or speeds up?

reddit.com
u/narkeeso — 14 days ago

Is there a guide for all the various models (Pop, CD210, Tomb Raider)?

Where do they come from?

How are they trained?

What do they excel at?

I've been swapping around and it's hard to quantify them through use. I think partly because whatever fork you're using needs to take advantage of whatever differences there are?

reddit.com
u/narkeeso — 3 months ago

Is there anyway to make the stopping more gradual when coming up on stopped/slow traffic?

Setup:
Car: 2023 Toyota RAV4
C4 Sunnypilot Staging May 23rd
Default Model: Pop
Longitudinal: Alpha Long/Stock ACC

Both the stock acc and vision acc create really uncomfortable stopping situations when coming up on stopped/slow traffic. I really wish there was a gradual backoff. There are also some situations where the car will rush to fill the gap and this can feel really uncomfortable in certain situations. I've tried all 3 driving profiles and they produce the same result. I'm guessing there's no way to tune this and is baked into the model somehow?

Update: I turned off dynamic experimental control and just left it on full experimental with alpha and it’s so much better. not perfect but I am much happier with it, it seems to go with the flow of traffic and doesn’t rush like stock acc.

I’m guessing DEC seems to switch to stock acc which tends to have the same rush to fill the gap issue?

reddit.com
u/narkeeso — 3 months ago

Maybe it’s a honeymoon period with the device but I actually enjoy using my car way more. I’m thoroughly impressed by how effective such a small model is with a single forward facing camera. If no progress was made on the current model I’d be very happy with the current state.

That said, is there anything exciting coming our way? I’d love for the stop lights to get polished up, it’s almost there!

reddit.com
u/narkeeso — 3 months ago

I'd like to buy it used ideally and I'm curious if there's any difference in how it performs 2021 vs 2026? I hear it's one of the better native lane keeping assists on the market.

reddit.com
u/narkeeso — 4 months ago