mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-21 16:13:47 +08:00
less TICI when not needed (#24698)
* less TICI when not needed * fix process replay * move reading voltages into hw abstraction layer * Update selfdrive/hardware/tici/hardware.h Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update selfdrive/hardware/hw.h Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update selfdrive/hardware/base.h Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * rename init function * Update selfdrive/athena/athenad.py Co-authored-by: Robbe Derks <robbe.derks@gmail.com> * Update selfdrive/boardd/boardd.cc * Apply suggestions from code review * Update selfdrive/thermald/thermald.py * update ref * fix alert width if all cameras are bad * add ecam to test_loggerd * bump cereal * bump cereal Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
This commit is contained in:
@@ -24,8 +24,6 @@ constexpr auto T_IDXS_FLOAT = build_idxs<float, TRAJECTORY_SIZE>(10.0);
|
||||
constexpr auto X_IDXS = build_idxs<double, TRAJECTORY_SIZE>(192.0);
|
||||
constexpr auto X_IDXS_FLOAT = build_idxs<float, TRAJECTORY_SIZE>(192.0);
|
||||
|
||||
const int TICI_CAM_WIDTH = 1928;
|
||||
|
||||
namespace tici_dm_crop {
|
||||
const int x_offset = -72;
|
||||
const int y_offset = -144;
|
||||
|
||||
+2
-7
@@ -8,19 +8,14 @@ from typing import Optional, List, Union
|
||||
from setproctitle import getproctitle # pylint: disable=no-name-in-module
|
||||
|
||||
from common.clock import sec_since_boot # pylint: disable=no-name-in-module, import-error
|
||||
from selfdrive.hardware import PC, TICI
|
||||
from selfdrive.hardware import PC
|
||||
|
||||
|
||||
# time step for each process
|
||||
DT_CTRL = 0.01 # controlsd
|
||||
DT_MDL = 0.05 # model
|
||||
DT_TRML = 0.5 # thermald and manager
|
||||
|
||||
# driver monitoring
|
||||
if TICI:
|
||||
DT_DMON = 0.05
|
||||
else:
|
||||
DT_DMON = 0.1
|
||||
DT_DMON = 0.05 # driver monitoring
|
||||
|
||||
|
||||
class Priority:
|
||||
|
||||
+1
-5
@@ -50,11 +50,7 @@ class SwaglogState : public LogState {
|
||||
ctx_j["dirty"] = !getenv("CLEAN");
|
||||
|
||||
// device type
|
||||
if (Hardware::TICI()) {
|
||||
ctx_j["device"] = "tici";
|
||||
} else {
|
||||
ctx_j["device"] = "pc";
|
||||
}
|
||||
ctx_j["device"] = Hardware::get_name();
|
||||
LogState::initialize();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -56,10 +56,7 @@ void recv_log(int thread_cnt, int thread_msg_cnt) {
|
||||
|
||||
REQUIRE(ctx["version"].string_value() == COMMA_VERSION);
|
||||
|
||||
std::string device = "pc";
|
||||
if (Hardware::TICI()) {
|
||||
device = "tici";
|
||||
}
|
||||
std::string device = Hardware::get_name();
|
||||
REQUIRE(ctx["device"].string_value() == device);
|
||||
|
||||
int thread_id = atoi(msg["msg"].string_value().c_str());
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import numpy as np
|
||||
|
||||
import common.transformations.orientation as orient
|
||||
from selfdrive.hardware import TICI
|
||||
|
||||
## -- hardcoded hardware params --
|
||||
eon_f_focal_length = 910.0
|
||||
@@ -45,14 +44,9 @@ tici_fcam_intrinsics_inv = np.linalg.inv(tici_fcam_intrinsics)
|
||||
tici_ecam_intrinsics_inv = np.linalg.inv(tici_ecam_intrinsics)
|
||||
|
||||
|
||||
if not TICI:
|
||||
FULL_FRAME_SIZE = eon_f_frame_size
|
||||
FOCAL = eon_f_focal_length
|
||||
fcam_intrinsics = eon_fcam_intrinsics
|
||||
else:
|
||||
FULL_FRAME_SIZE = tici_f_frame_size
|
||||
FOCAL = tici_f_focal_length
|
||||
fcam_intrinsics = tici_fcam_intrinsics
|
||||
FULL_FRAME_SIZE = tici_f_frame_size
|
||||
FOCAL = tici_f_focal_length
|
||||
fcam_intrinsics = tici_fcam_intrinsics
|
||||
|
||||
W, H = FULL_FRAME_SIZE[0], FULL_FRAME_SIZE[1]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user