mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-22 00:33:44 +08:00
paramsd: fix variable cpu usage (#24281)
* paramsd: fix variable cpu usage * fix that * increase that a bit old-commit-hash: f7c2b8b46e87f9f32eaeb5a11d20d3df24fe96e4
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
import gc
|
||||
import math
|
||||
|
||||
import json
|
||||
import numpy as np
|
||||
|
||||
import cereal.messaging as messaging
|
||||
from cereal import car
|
||||
from common.params import Params, put_nonblocking
|
||||
from common.realtime import set_realtime_priority, DT_MDL
|
||||
from common.realtime import config_realtime_process, DT_MDL
|
||||
from common.numpy_fast import clip
|
||||
from selfdrive.locationd.models.car_kf import CarKalman, ObservationKind, States
|
||||
from selfdrive.locationd.models.constants import GENERATED_DIR
|
||||
@@ -103,8 +101,7 @@ class ParamsLearner:
|
||||
|
||||
|
||||
def main(sm=None, pm=None):
|
||||
gc.disable()
|
||||
set_realtime_priority(5)
|
||||
config_realtime_process([0, 1, 2, 3], 5)
|
||||
|
||||
if sm is None:
|
||||
sm = messaging.SubMaster(['liveLocationKalman', 'carState'], poll=['liveLocationKalman'])
|
||||
|
||||
@@ -11,7 +11,7 @@ from common.realtime import set_core_affinity, set_realtime_priority
|
||||
# openpilot processes
|
||||
|
||||
def main() -> NoReturn:
|
||||
set_core_affinity(int(os.getenv("CORE", "3")))
|
||||
set_core_affinity([int(os.getenv("CORE", "3")), ])
|
||||
set_realtime_priority(1)
|
||||
|
||||
while True:
|
||||
|
||||
@@ -27,7 +27,7 @@ PROCS = {
|
||||
"./locationd": 9.1,
|
||||
"selfdrive.controls.plannerd": 11.7,
|
||||
"./_ui": 33.0,
|
||||
"selfdrive.locationd.paramsd": 5.0,
|
||||
"selfdrive.locationd.paramsd": 9.0,
|
||||
"./_sensord": 6.17,
|
||||
"selfdrive.controls.radard": 4.5,
|
||||
"./_modeld": 4.48,
|
||||
|
||||
Reference in New Issue
Block a user