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

Add lane departure alert for Toyota #605

Merged
merged 18 commits into from May 6, 2019

Conversation

Projects
None yet
5 participants
@arne182
Copy link
Contributor

commented Apr 15, 2019

No description provided.

arne182 added some commits Apr 15, 2019

@mtourangeau

This comment has been minimized.

Copy link

commented Apr 15, 2019

Can I test this?

arne182 added some commits Apr 15, 2019

@arne182

This comment has been minimized.

Copy link
Contributor Author

commented Apr 15, 2019

Yes @mtourangeau. It is ready now for testing.

@arne182

This comment has been minimized.

Copy link
Contributor Author

commented Apr 15, 2019

Requirements. Must drive above 40 kph and cross a lane line without blinking, or at least get to within 15cm of it.

@arne182

This comment has been minimized.

Copy link
Contributor Author

commented Apr 15, 2019

Still getting a raise IndexError('Out of bounds') from path_plan.pathPlan.lPoly[3]

arne182 added some commits Apr 15, 2019

ShaneSmiskol added some commits Apr 16, 2019

@legonigel legonigel requested a review from pd0wm Apr 21, 2019

@pd0wm

This comment has been minimized.

Copy link
Contributor

commented May 3, 2019

I like the feature!

Since this is only a UI change, and no alerts/sounds are triggered this can be merged without extensive testing for false positives. If we want to add those add some point we should probably follow the same procedure as for FCW: https://medium.com/@comma_ai/bringing-forward-collision-warnings-to-our-open-source-self-driving-car-7545b6e398cd

If my comments are fixed I'll merge it.

Show resolved Hide resolved selfdrive/controls/controlsd.py Outdated
Show resolved Hide resolved selfdrive/controls/controlsd.py Outdated
Show resolved Hide resolved selfdrive/car/toyota/carcontroller.py Outdated

arne182 added some commits May 3, 2019

Remove redundant False allocation
leftLaneDepart and rightLaneDepart as False by default according to @pd0wm
Modify variable names
right_lane_depart and left_lane_depart to conform with python naming convention
Modify variable names
right_lane_depart and left_lane_depart to conform with python naming convention
@@ -307,6 +307,10 @@ def data_send(plan, path_plan, CS, CI, CP, VM, state, events, actuators, v_cruis
CC.hudControl.leadVisible = plan.hasLead
CC.hudControl.rightLaneVisible = bool(path_plan.pathPlan.rProb > 0.5)
CC.hudControl.leftLaneVisible = bool(path_plan.pathPlan.lProb > 0.5)
if len(list(path_plan.pathPlan.rPoly)) == 4:
CC.hudControl.rightLaneDepart = bool(path_plan.pathPlan.rPoly[3] > -1.11 and not CS.rightBlinker) and CS.vEgo > 12.5 and bool(path_plan.pathPlan.rProb > 0.5) # Speed needs to be above 12.5m/s for LDA and only if blinker if off

This comment has been minimized.

Copy link
@pd0wm

pd0wm May 3, 2019

Contributor

Can you wrap the whole expression into one bool?

This comment has been minimized.

Copy link
@arne182

arne182 May 4, 2019

Author Contributor

Done.

This comment has been minimized.

Copy link
@arne182

arne182 May 4, 2019

Author Contributor

Do you mean add the if statement check into the bool as well?

@pd0wm

This comment has been minimized.

Copy link
Contributor

commented May 3, 2019

Thanks for fixing my comments. I added one more small comment.

In the meantime, I'll figure out while CI breaks.

@pd0wm pd0wm merged commit f504467 into commaai:devel May 6, 2019

1 check failed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.