Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate zorropilot into master #15

Merged
merged 20 commits into from
Feb 19, 2022
Merged

Integrate zorropilot into master #15

merged 20 commits into from
Feb 19, 2022

Conversation

rpaulhanna
Copy link
Owner

No description provided.

Ross Fisher and others added 20 commits February 18, 2022 01:09
__Additions__

* Forward distance button presses to car can
* Read distance_lines can message from car and use to set distance
profile.
* Alter T_Follow based on distance profile
  * Stock = 1.45
  * Relaxed = 1.25
  * Traffic ~= 1.05 (at low speeds closer to 1.25)
* Adjust J_Cost, A_Change_Cost, and D_Cost based on distance profile
  * Weights for Costs need to be adjusted when T_Follow is decreased.

__Tests__
* Add Longitudinal Tests for Additional Following Profiles
  * Copy the comma tests, with appropriate following distance for
each profile.
* Tweak Process_Replay Action - Ignores the new carState.distanceLines
message, so that replay refs still pass.

Thanks to sshane for help with this. See the tree ending with
commit 73237de

Repos

cereal distance lines

use zorropilot cereal repo

wat
Uses Dynamic MPC Costs which decreases the a_change and jerk
costs at low speeds.

Also dynamically decreases the Stop_Distance as the lead pulls
away so that the long_mpc commands forward accel just a
little bit sooner.

Lower overall Stop_Distance slightly, since we stop a bit more
assertively now with the decreased costs, the stop distance
doesn't need to be as high.

Add a test_accel file for testing sluggish starts.

Ignore longitudinalPlan Msgs in Process Replay.

Update long_mpc.py
The Rav4 2019 TSS2 has ~1.4s lag between when accel commands are sent
to the car and when they are acted upon when the car is starting from
a dead stop.  Stock feels fine with this limitation, so OP can too.

Most of these changes are designed to fix any sluggishness caused by
the Toyota Tune.  Additional changes need to be made to the Long MPC
in order to solve the sluggish start completely.

Changes:

Decrease vEgoStopping and vEgoStarting to 0.2.  Car is perfectly
capable of controlling at these speeds.  Lower value allows for state
machine to exit stopping phase just a bit faster.

Double the ActuatorDelay lag to .3 so we look into the future just a bit
more, seems a bit more inline with realworld experience.

Halve stoppingDecelRate to match the OEM stop_accel of -.4m/s2.  Makes
the final jerk in stopping a bit smoother

Increase the PID max accel to 1.8 m/s2 tappering back to 1.5 m/s2 at 5m/s.

Increase planner max accel to 1.4 m/s2 from 1.2 m/s2 starting from a stop
tapering back to 1.2 m/s2 at 10m/s.

Decreased planner max accel at 55mph, seemed a little uncomfortable to me.

Decrease A_Change Timescale in Long_MPC to match more closely what toyota
lag is.

Ignore some messages and fields in process_replay test in order to
keep it working.
Brings back the raw log toggle that was used prior to version
8.12.

Upload RLogs First then Videos

This reverts in part commit 2e0c73f.
Update README.md
interpolate for lower rate lateral plan

fix

should be correct now

same convention as longcontrol.py
commit 8fc2566
Merge: 3168372 92e9823
Author: Ross Fisher <zorrobyte@gmail.com>
Date:   Sat Feb 19 13:49:13 2022 -0500

    Merge branch 'master' into zorropilot

commit 3168372
Author: Ross Fisher <zorrobyte@gmail.com>
Date:   Sat Feb 19 13:48:47 2022 -0500

    Revert "interpolate for lower rate lateral plan"

    This reverts commit 5ef248d.

commit 92e9823
Author: George Hotz <72895+geohot@users.noreply.github.com>
Date:   Fri Feb 18 20:15:20 2022 -0800

    camerad: fast debayer on c2 cameras (commaai#23795)

    * fast debayer on c2 dcam

    * add casts

    * 128 local worksize on HDR debayer, 8 ms -> 3.5 ms

    * width instead of saving rgb_width

    Co-authored-by: Comma Device <device@comma.ai>
This reverts commit bde09b3.
This reverts commit 40f0781.
@rpaulhanna rpaulhanna merged commit ceb1cec into rpaulhanna:master Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants