forked from dragonpilot-community/dragonpilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
date: 2024-07-24T16:04:16 commit: dc9f089
- Loading branch information
1 parent
10a81a8
commit 0f94adf
Showing
130 changed files
with
4,846 additions
and
2,502 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
const uint8_t gitversion[8] = "26f4dbe6"; | ||
const uint8_t gitversion[8] = "3552e110"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env python3 | ||
from cereal import car | ||
from openpilot.common.params import Params | ||
from openpilot.common.realtime import Priority, config_realtime_process | ||
from openpilot.dp_ext.selfdrive.controls.lib.lateral_mpc_lane_planner import LateralMpcLanePlanner | ||
import cereal.messaging as messaging | ||
|
||
def latpland_thread(): | ||
config_realtime_process(5, Priority.CTRL_LOW) | ||
|
||
params = Params() | ||
with car.CarParams.from_bytes(params.get("CarParams", block=True)) as msg: | ||
CP = msg | ||
|
||
lmlp = LateralMpcLanePlanner(CP) | ||
|
||
pm = messaging.PubMaster(['lateralPlan']) | ||
sm = messaging.SubMaster(['carState', 'modelV2'], poll='modelV2') | ||
|
||
while True: | ||
sm.update() | ||
|
||
if sm.updated['modelV2']: | ||
plan_send = messaging.new_message('lateralPlan') | ||
plan_send.valid = sm.all_checks(service_list=['carState', 'modelV2']) | ||
lat_plan = plan_send.lateralPlan | ||
|
||
lmlp.update_md(sm['modelV2']) | ||
lmlp.update_v_ego(sm['carState'].vEgo) | ||
|
||
if lmlp.should_activate(): | ||
lmlp.update() | ||
|
||
lat_plan.psis = lmlp.get_psis() | ||
lat_plan.curvatures = lmlp.get_curvatures() | ||
# lat_plan.curvatureRates = lmlp.get_curvature_rates() | ||
|
||
lat_plan.useLaneLines = lmlp.is_active() | ||
|
||
pm.send('lateralPlan', plan_send) | ||
|
||
|
||
def main(): | ||
latpland_thread() | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.