Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Fingerprints for all ECUs on 2023 Kia Sportage Hybrid SX Prestige #31993

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ venv/
.overlay_init
.overlay_consistent
.sconsign.dblite
.vscode*
model2.png
a.out
.hypothesis
Expand Down
27 changes: 20 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,23 @@ def setupCredentials() {
}


def build_release(String channel_name) {
return parallel (
"${channel_name} (git)": {
deviceStage("build git", "tici-needs-can", [], [
["build ${channel_name}", "RELEASE_BRANCH=${channel_name} $SOURCE_DIR/release/build_release.sh"],
])
},
"${channel_name} (casync)": {
deviceStage("build casync", "tici-needs-can", [], [
["build ${channel_name}", "RELEASE=1 OPENPILOT_CHANNEL=${channel_name} BUILD_DIR=/data/openpilot_build CASYNC_DIR=/data/casync $SOURCE_DIR/release/create_casync_build.sh"],
//["upload ${channel_name}", "OPENPILOT_CHANNEL=${channel_name} $SOURCE_DIR/release/upload_casync_release.sh"],
])
}
)
}


node {
env.CI = "1"
env.PYTHONWARNINGS = "error"
Expand All @@ -164,15 +181,11 @@ node {

try {
if (env.BRANCH_NAME == 'devel-staging') {
deviceStage("build release3-staging", "tici-needs-can", [], [
["build release3-staging", "RELEASE_BRANCH=release3-staging $SOURCE_DIR/release/build_release.sh"],
])
build_release("release3-staging")
}

if (env.BRANCH_NAME == 'master-ci') {
deviceStage("build nightly", "tici-needs-can", [], [
["build nightly", "RELEASE_BRANCH=nightly $SOURCE_DIR/release/build_release.sh"],
])
build_release("nightly")
}

if (!env.BRANCH_NAME.matches(excludeRegex)) {
Expand All @@ -194,7 +207,7 @@ node {
["test pandad", "pytest selfdrive/boardd/tests/test_pandad.py"],
["test power draw", "pytest -s system/hardware/tici/tests/test_power_draw.py"],
["test encoder", "LD_LIBRARY_PATH=/usr/local/lib pytest system/loggerd/tests/test_encoder.py"],
["test pigeond", "pytest system/sensord/tests/test_pigeond.py"],
["test pigeond", "pytest system/ubloxd/tests/test_pigeond.py"],
["test manager", "pytest selfdrive/manager/test/test_manager.py"],
])
},
Expand Down
9 changes: 9 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Version 0.9.7 (2024-XX-XX)
========================
* New driving model
* Adjust driving personality with the follow distance button
* Support for hybrid variants of supported Ford models

Version 0.9.6 (2024-02-27)
========================
* New driving model
Expand All @@ -6,6 +12,9 @@ Version 0.9.6 (2024-02-27)
* Directly outputs curvature for lateral control
* New driver monitoring model
* Trained on larger dataset
* Model path UI
* Shows where driving model wants to be
* Shows what model is seeing more clearly, but more jittery
* AGNOS 9
* comma body streaming and controls over WebRTC
* Improved fuzzy fingerprinting for many makes and models
Expand Down
22 changes: 4 additions & 18 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ lenv = {
rpath = lenv["LD_LIBRARY_PATH"].copy()

if arch == "larch64":
lenv["LD_LIBRARY_PATH"] += ['/data/data/com.termux/files/usr/lib']

cpppath = [
"#third_party/opencl/include",
]
Expand Down Expand Up @@ -360,13 +358,6 @@ Export('common', 'gpucommon')
# Build cereal and messaging
SConscript(['cereal/SConscript'])

cereal = [File('#cereal/libcereal.a')]
messaging = [File('#cereal/libmessaging.a')]
visionipc = [File('#cereal/libvisionipc.a')]
messaging_python = [File('#cereal/messaging/messaging_pyx.so')]

Export('cereal', 'messaging', 'messaging_python', 'visionipc')

# Build other submodules
SConscript([
'body/board/SConscript',
Expand All @@ -393,17 +384,12 @@ if arch != "Darwin":
# Build openpilot
SConscript(['third_party/SConscript'])

SConscript(['selfdrive/boardd/SConscript'])
SConscript(['selfdrive/controls/lib/lateral_mpc_lib/SConscript'])
SConscript(['selfdrive/controls/lib/longitudinal_mpc_lib/SConscript'])
SConscript(['selfdrive/locationd/SConscript'])
SConscript(['selfdrive/navd/SConscript'])
SConscript(['selfdrive/modeld/SConscript'])
SConscript(['selfdrive/ui/SConscript'])
SConscript(['selfdrive/SConscript'])

if arch in ['x86_64', 'aarch64', 'Darwin'] and Dir('#tools/cabana/').exists() and GetOption('extras'):
if Dir('#tools/cabana/').exists() and GetOption('extras'):
SConscript(['tools/replay/SConscript'])
SConscript(['tools/cabana/SConscript'])
if arch != "larch64":
SConscript(['tools/cabana/SConscript'])

external_sconscript = GetOption('external_sconscript')
if external_sconscript:
Expand Down
18 changes: 10 additions & 8 deletions cereal/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env.Command([f'gen/cpp/{s}.c++' for s in schema_files] + [f'gen/cpp/{s}.h' for s
# TODO: remove non shared cereal and messaging
cereal_objects = env.SharedObject([f'gen/cpp/{s}.c++' for s in schema_files])

env.Library('cereal', cereal_objects)
cereal = env.Library('cereal', cereal_objects)
env.SharedLibrary('cereal_shared', cereal_objects)

# Build messaging
Expand All @@ -34,14 +34,13 @@ messaging_objects = env.SharedObject([
'messaging/socketmaster.cc',
])

messaging_lib = env.Library('messaging', messaging_objects)
messaging = env.Library('messaging', messaging_objects)
Depends('messaging/impl_zmq.cc', services_h)

env.Program('messaging/bridge', ['messaging/bridge.cc'], LIBS=[messaging_lib, 'zmq', common])
env.Program('messaging/bridge', ['messaging/bridge.cc'], LIBS=[messaging, 'zmq', common])
Depends('messaging/bridge.cc', services_h)

envCython.Program('messaging/messaging_pyx.so', 'messaging/messaging_pyx.pyx', LIBS=envCython["LIBS"]+[messaging_lib, "zmq", common])

messaging_python = envCython.Program('messaging/messaging_pyx.so', 'messaging/messaging_pyx.pyx', LIBS=envCython["LIBS"]+[messaging, "zmq", common])

# Build Vision IPC
vipc_sources = [
Expand All @@ -57,11 +56,11 @@ else:
vipc_sources += ['visionipc/visionbuf_cl.cc']

vipc_objects = env.SharedObject(vipc_sources)
vipc = env.Library('visionipc', vipc_objects)
visionipc = env.Library('visionipc', vipc_objects)


vipc_frameworks = []
vipc_libs = envCython["LIBS"] + [vipc, messaging_lib, common, "zmq"]
vipc_libs = envCython["LIBS"] + [visionipc, messaging, common, "zmq"]
if arch == "Darwin":
vipc_frameworks.append('OpenCL')
else:
Expand All @@ -70,7 +69,10 @@ envCython.Program('visionipc/visionipc_pyx.so', 'visionipc/visionipc_pyx.pyx',
LIBS=vipc_libs, FRAMEWORKS=vipc_frameworks)

if GetOption('extras'):
env.Program('messaging/test_runner', ['messaging/test_runner.cc', 'messaging/msgq_tests.cc'], LIBS=[messaging_lib, common])
env.Program('messaging/test_runner', ['messaging/test_runner.cc', 'messaging/msgq_tests.cc'], LIBS=[messaging, common])

env.Program('visionipc/test_runner', ['visionipc/test_runner.cc', 'visionipc/visionipc_tests.cc'],
LIBS=['pthread'] + vipc_libs, FRAMEWORKS=vipc_frameworks)


Export('cereal', 'messaging', 'messaging_python', 'visionipc')
17 changes: 12 additions & 5 deletions cereal/car.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,12 @@ struct CarControl {
# Actuator commands as computed by controlsd
actuators @6 :Actuators;

# moved to CarOutput
actuatorsOutputDEPRECATED @10 :Actuators;

leftBlinker @15: Bool;
rightBlinker @16: Bool;

# Any car specific rate limits or quirks applied by
# the CarController are reflected in actuatorsOutput
# and matches what is sent to the car
actuatorsOutput @10 :Actuators;

orientationNED @13 :List(Float32);
angularVelocity @14 :List(Float32);

Expand Down Expand Up @@ -380,6 +378,7 @@ struct CarControl {
leftLaneVisible @7: Bool;
rightLaneDepart @8: Bool;
leftLaneDepart @9: Bool;
leadDistanceBars @10: Int8; # 1-3: 1 is closest, 3 is farthest. some ports may utilize 2-4 bars instead

enum VisualAlert {
# these are the choices from the Honda
Expand Down Expand Up @@ -418,6 +417,13 @@ struct CarControl {
pitchDEPRECATED @9 :Float32;
}

struct CarOutput {
# Any car specific rate limits or quirks applied by
# the CarController are reflected in actuatorsOutput
# and matches what is sent to the car
actuatorsOutput @0 :CarControl.Actuators;
}

# ****** car param ******

struct CarParams {
Expand Down Expand Up @@ -597,6 +603,7 @@ struct CarParams {
hyundaiCanfd @28;
volkswagenMqbEvo @29;
chryslerCusw @30;
psa @31;
}

enum SteerControlType {
Expand Down
20 changes: 14 additions & 6 deletions cereal/log.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ struct InitData {
tici @4;
pc @5;
tizi @6;
mici @7;
}

struct PandaInfo {
Expand Down Expand Up @@ -250,7 +251,7 @@ struct SensorEventData {

# android struct GpsLocation
struct GpsLocationData {
# Contains GpsLocationFlags bits.
# Contains module-specific flags.
flags @0 :UInt16;

# Represents latitude in degrees.
Expand All @@ -268,8 +269,8 @@ struct GpsLocationData {
# Represents heading in degrees.
bearingDeg @5 :Float32;

# Represents expected accuracy in meters. (presumably 1 sigma?)
accuracy @6 :Float32;
# Represents expected horizontal accuracy in meters.
horizontalAccuracy @6 :Float32;

unixTimestampMillis @7 :Int64;

Expand All @@ -287,6 +288,8 @@ struct GpsLocationData {
# Represents velocity accuracy in m/s. (presumably 1 sigma?)
speedAccuracy @12 :Float32;

hasFix @13 :Bool;

enum SensorSource {
android @0;
iOS @1;
Expand All @@ -297,6 +300,7 @@ struct GpsLocationData {
ublox @6;
trimble @7;
qcomdiag @8;
unicore @9;
}
}

Expand Down Expand Up @@ -331,6 +335,8 @@ struct CanData {
}

struct DeviceState @0xa4d8b5af2aa492eb {
deviceType @45 :InitData.DeviceType;

networkType @22 :NetworkType;
networkInfo @31 :NetworkInfo;
networkStrength @24 :NetworkStrength;
Expand Down Expand Up @@ -436,7 +442,6 @@ struct PandaState @0xa7649e2575e4591e {
ignitionLine @2 :Bool;
rxBufferOverflow @7 :UInt32;
txBufferOverflow @8 :UInt32;
gmlanSendErrs @9 :UInt32;
pandaType @10 :PandaType;
ignitionCan @13 :Bool;
faultStatus @15 :FaultStatus;
Expand Down Expand Up @@ -484,7 +489,7 @@ struct PandaState @0xa7649e2575e4591e {
interruptRateCan2 @3;
interruptRateCan3 @4;
interruptRateTach @5;
interruptRateGmlan @6;
interruptRateGmlanDEPRECATED @6;
interruptRateInterrupts @7;
interruptRateSpiDma @8;
interruptRateSpiCs @9;
Expand Down Expand Up @@ -570,6 +575,7 @@ struct PandaState @0xa7649e2575e4591e {
gasInterceptorDetectedDEPRECATED @4 :Bool;
startedSignalDetectedDEPRECATED @5 :Bool;
hasGpsDEPRECATED @6 :Bool;
gmlanSendErrsDEPRECATED @9 :UInt32;
fanSpeedRpmDEPRECATED @11 :UInt16;
usbPowerModeDEPRECATED @12 :PeripheralState.UsbPowerModeDEPRECATED;
safetyParamDEPRECATED @20 :Int16;
Expand Down Expand Up @@ -681,6 +687,7 @@ struct ControlsState @0x97ff69c53601abf1 {
active @36 :Bool;

experimentalMode @64 :Bool;
personality @66 :LongitudinalPersonality;

longControlState @30 :Car.CarControl.Actuators.LongControlState;
vPid @2 :Float32;
Expand Down Expand Up @@ -1047,7 +1054,6 @@ struct LongitudinalPlan @0xe00b5b3eba12876c {
jerks @34 :List(Float32);

solverExecutionTime @35 :Float32;
personality @36 :LongitudinalPersonality;

enum LongitudinalPlanSource {
cruise @0;
Expand Down Expand Up @@ -1085,6 +1091,7 @@ struct LongitudinalPlan @0xe00b5b3eba12876c {
eventsDEPRECATED @13 :List(Car.CarEvent);
gpsTrajectoryDEPRECATED @12 :GpsTrajectory;
gpsPlannerActiveDEPRECATED @19 :Bool;
personalityDEPRECATED @36 :LongitudinalPersonality;

struct GpsTrajectory {
x @0 :List(Float32);
Expand Down Expand Up @@ -2250,6 +2257,7 @@ struct Event {
liveCalibration @19 :LiveCalibrationData;
carState @22 :Car.CarState;
carControl @23 :Car.CarControl;
carOutput @127 :Car.CarOutput;
longitudinalPlan @24 :LongitudinalPlan;
uiPlan @106 :UiPlan;
ubloxGnss @34 :UbloxGnss;
Expand Down
1 change: 1 addition & 0 deletions cereal/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def __init__(self, port: int, should_log: bool, frequency: float, decimation: Op
"androidLog": (True, 0.),
"carState": (True, 100., 10),
"carControl": (True, 100., 10),
"carOutput": (True, 100., 10),
"longitudinalPlan": (True, 20., 5),
"procLog": (True, 0.5, 15),
"gpsLocationExternal": (True, 10., 10),
Expand Down
3 changes: 1 addition & 2 deletions common/file_helpers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
import tempfile
import contextlib
from typing import Optional


class CallbackReader:
Expand All @@ -24,7 +23,7 @@ def read(self, *args, **kwargs):


@contextlib.contextmanager
def atomic_write_in_dir(path: str, mode: str = 'w', buffering: int = -1, encoding: Optional[str] = None, newline: Optional[str] = None,
def atomic_write_in_dir(path: str, mode: str = 'w', buffering: int = -1, encoding: str = None, newline: str = None,
overwrite: bool = False):
"""Write to a file atomically using a temporary file in the same directory as the destination file."""
dir_name = os.path.dirname(path)
Expand Down
Loading