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

Tall vehicles: calibrate vlead from model error #26926

Closed
wants to merge 4 commits into from

Conversation

morrislee
Copy link
Contributor

@morrislee morrislee commented Jan 12, 2023

Description

When using vision only longitudinal control from OpenPilot (more prominent on taller vehicles), it estimates the world objects moving too slow overall including itself #26799. This is verified from speed reported from the model is off from wheel speed, we used this info to calibrate e2e before, now we can use this concept to calibrate vlead and lead acceleration too.

Verification

I have been driving a few days with another proof of concept branch and has been working really well on my GMC Sierra 1500 AT4 (2 inch taller than regular 1500's)

Route
Route: https://connect.comma.ai/fe80a4e1cedec853/1673461336764/1673461574279

As shown in the route, it maintained the distance with little to no overshooting or undershooting, also experience a cut-in that was handled perfectly with OP VOACC, I have driven a few hundred kms with this implemented so far

@haraschax
Copy link
Contributor

I think it's best not to correct lead_a, can we just do v?

@sshane sshane added enhancement controls controls/planner related autonomy labels Jan 12, 2023
Comment on lines +136 to +138
if v_ego > 0 and vision_v_ego > 0:
vision_velocity_factor = v_ego / vision_v_ego
corrected_v_lead = lead_msg.v[0] * vision_velocity_factor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might make more sense to copy what longitudinal_planner does, which is simply get an error to subtract

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be a scale rather than a subtract, if there is an error, then it might apply to a static lead no?

suggested by Harold for consistency to scaling vlead
@Verylukyguy
Copy link
Contributor

My 2018 Acadia is considered a Mid-Sized SUV and the camera height is 53" or 1.35 meters. This is only slightly higher that the standard 1.22 meters. I've heard that increasing the height might mitigate some of the lane hugging. Is this true?

@morrislee
Copy link
Contributor Author

My 2018 Acadia is considered a Mid-Sized SUV and the camera height is 53" or 1.35 meters. This is only slightly higher that the standard 1.22 meters. I've heard that increasing the height might mitigate some of the lane hugging. Is this true?

this calibration will not have any effect on lateral performance, at least, not supposed to. it is strictly scaling the speed leads are traveling and also assist on how fast e2e think the car is going.

@Verylukyguy
Copy link
Contributor

Verylukyguy commented Feb 1, 2023

Interesting. Skip did a lot of trial-and-error testing when the Silverado was first ported. His camera height was 1.62 meters and it seemed to cause wandering and hugging. At least, that is what he thought.

@morrislee
Copy link
Contributor Author

been driving with harold's PR #27493 seems to be very similar in performance, will close this PR as harold's approach is a bit cleaner and safer

@morrislee morrislee closed this Mar 20, 2023
@morrislee morrislee deleted the vlead-cali branch October 23, 2024 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autonomy controls controls/planner related enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants