openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

Toyota: only use pedal to get out of standstill on supported cars

Open cydia2020 opened this issue 3 years ago • 10 comments

Only use pedal to get the car out of standstill on cars with full speed DRCC (namely Prius, ~~RAV4 Hybrid, Kluger~~, CTH, ~~ESH~~, NX, and RX).

This eliminates the jerk introduced by the pedal at low speeds, it also helps simplify tuning. Tested on my Prius.

cydia2020 avatar Dec 04 '21 02:12 cydia2020

, CAR.RAV4H, CAR.HIGHLANDER, CAR.HIGHLANDERH], those cars don't need pedals?

@adeebshihadeh Don't have any objections to this. I think it's good to use the pedal as little as possible.

haraschax avatar Dec 05 '21 03:12 haraschax

, CAR.RAV4H, CAR.HIGHLANDER, CAR.HIGHLANDERH], those cars don't need pedals?

@adeebshihadeh Don't have any objections to this. I think it's good to use the pedal as little as possible.

That's one of the things that I am not sure of, standstill is not requested on those cars. So they should just "go" when op sends accel command

cydia2020 avatar Dec 05 '21 03:12 cydia2020

At least for the Rav4H and the HighlanderH they both do stop and go without hitting resume so exclude them from this list. Not 100% sure about the regular Highlander.

VirtuallyChris avatar Dec 05 '21 06:12 VirtuallyChris

At least for the Rav4H and the HighlanderH they both do stop and go without hitting resume so exclude them from this list. Not 100% sure about the regular Highlander.

Highlander is also marked as a no stop timer car, so I won't add it to the no auto resume car list

Edit: someone in the discord server mentioned that tss-p kluger does do full SnG, so it'll not be in the NO_AUTO_RESUME_CAR list.

cydia2020 avatar Dec 05 '21 08:12 cydia2020

Think this is ready for merge, I've been running this for almost a year now and haven't experienced any hiccups.

cydia2020 avatar May 20 '22 02:05 cydia2020

Can you provide a route with the changes? Want to quickly see if you overshoot at all, and how much

sshane avatar May 20 '22 03:05 sshane

I'm unable to provide a useradmin link as my device was repaired, a route file was provided to @sshane a few days ago on discord, I won't post it here anymore as it's a privacy concern.

cydia2020 avatar Jun 01 '22 08:06 cydia2020

This also occurs on my CH-R - have to press to resume, can this car be added to the list for this? Or can it be addressed an another way?

cferra avatar Jun 09 '22 20:06 cferra

This also occurs on my CH-R - have to press to resume, can this car be added to the list for this? Or can it be addressed an another way?

If it's tss-p, then openpilot doesn't control longitudinal, so that'd be a no, there are forks out there that does, but it requires another piece of hardware.

cydia2020 avatar Jun 09 '22 22:06 cydia2020

@cydia2020 I wonder, what if you just adjust MIN_ACC_SPEED to be 1 mph or less for your car?

sshane avatar Aug 26 '22 00:08 sshane

I wonder, what if you just adjust MIN_ACC_SPEED to be 1 mph or less for your car?

MIN_ACC_SPEED is already -1 for this particular model. As

ret.minEnableSpeed = -1. if (stop_and_go or ret.enableGasInterceptor) else MIN_ACC_SPEED

and

    if candidate == CAR.PRIUS:
      stop_and_go = True

Side note, I am still running this full time on my Prius, the vehicle doesn't move when op "taps" the interceptor, it only brings the vehicle out of standstill (similar to the effect of tapping the UP button on the cruise lever), so no jerk is introduced.

cydia2020 avatar Jun 07 '23 13:06 cydia2020

Thanks for the PR, but this is too much code and discussion than we can afford for niche things like the pedal.

adeebshihadeh avatar Aug 22 '23 20:08 adeebshihadeh