mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-24 23:42:05 +08:00
make locationd and paramsd RT (#21264)
This commit is contained in:
@@ -469,7 +469,7 @@ int Localizer::locationd_thread() {
|
||||
}
|
||||
|
||||
int main() {
|
||||
setpriority(PRIO_PROCESS, 0, -20);
|
||||
set_realtime_priority(5);
|
||||
|
||||
Localizer localizer;
|
||||
return localizer.locationd_thread();
|
||||
|
||||
@@ -8,7 +8,7 @@ import numpy as np
|
||||
import cereal.messaging as messaging
|
||||
from cereal import car
|
||||
from common.params import Params, put_nonblocking
|
||||
from common.realtime import DT_MDL
|
||||
from common.realtime import set_realtime_priority, 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
|
||||
@@ -73,6 +73,7 @@ class ParamsLearner:
|
||||
|
||||
def main(sm=None, pm=None):
|
||||
gc.disable()
|
||||
set_realtime_priority(5)
|
||||
|
||||
if sm is None:
|
||||
sm = messaging.SubMaster(['liveLocationKalman', 'carState'], poll=['liveLocationKalman'])
|
||||
|
||||
Reference in New Issue
Block a user