Add lane departure alert for Toyota - #605
Conversation
|
Can I test this? |
|
Yes @mtourangeau. It is ready now for testing. |
|
Requirements. Must drive above 40 kph and cross a lane line without blinking, or at least get to within 15cm of it. |
|
Still getting a raise IndexError('Out of bounds') from path_plan.pathPlan.lPoly[3] |
|
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. |
leftLaneDepart and rightLaneDepart as False by default according to @pd0wm
right_lane_depart and left_lane_depart to conform with python naming convention
right_lane_depart and left_lane_depart to conform with python naming convention
| 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 |
There was a problem hiding this comment.
Can you wrap the whole expression into one bool?
There was a problem hiding this comment.
Do you mean add the if statement check into the bool as well?
|
Thanks for fixing my comments. I added one more small comment. In the meantime, I'll figure out while CI breaks. |
* Add lane departure alert in controlsd * Need init values for LDA * Add lane departure in interface.py * Include LDA in CarControler * Add logic for LDA in toyotacan * Add speed condition and comments for LDA * Correct right CS.vEgo * Correct rPoly spelling * Add left and rightLaneDepart to HUDControl in car.capnp * Add left and rightLane_Depart in UI function * set controlsd priority * revert * There must be a line to depart from * Include changes from @pd0wm * 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 * Wrap lane departure warning in one bool
* Sentry: sets environment tag * master channel --------- Co-authored-by: DevTekVE <devtekve@gmail.com>
* Add lane departure alert in controlsd * Need init values for LDA * Add lane departure in interface.py * Include LDA in CarControler * Add logic for LDA in toyotacan * Add speed condition and comments for LDA * Correct right CS.vEgo * Correct rPoly spelling * Add left and rightLaneDepart to HUDControl in car.capnp * Add left and rightLane_Depart in UI function * set controlsd priority * revert * There must be a line to depart from * Include changes from @pd0wm * 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 * Wrap lane departure warning in one bool old-commit-hash: f504467
No description provided.