give calibrationd rt priority (#23725)

pull/23727/head
Adeeb Shihadeh 3 years ago committed by GitHub
parent 4c766934be
commit 8a0fc850b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      selfdrive/locationd/calibrationd.py

@ -6,17 +6,20 @@ While the roll calibration is a real value that can be estimated, here we assume
and the image input into the neural network is not corrected for roll.
'''
import gc
import os
from typing import NoReturn
import numpy as np
import cereal.messaging as messaging
from typing import NoReturn
from cereal import log
from selfdrive.hardware import TICI
import cereal.messaging as messaging
from common.params import Params, put_nonblocking
from common.realtime import set_realtime_priority
from common.transformations.model import model_height
from common.transformations.camera import get_view_frame_from_road_frame
from common.transformations.orientation import rot_from_euler, euler_from_rot
from selfdrive.config import Conversions as CV
from selfdrive.hardware import TICI
from selfdrive.swaglog import cloudlog
MIN_SPEED_FILTER = 15 * CV.MPH_TO_MS
@ -191,6 +194,9 @@ class Calibrator():
def calibrationd_thread(sm=None, pm=None) -> NoReturn:
gc.disable()
set_realtime_priority(1)
if sm is None:
sm = messaging.SubMaster(['cameraOdometry', 'carState'], poll=['cameraOdometry'])

Loading…
Cancel
Save