diff --git a/.github/labeler.yaml b/.github/labeler.yaml index 63d41d5b73506c..16c55789bdb9d5 100644 --- a/.github/labeler.yaml +++ b/.github/labeler.yaml @@ -4,7 +4,7 @@ CI / testing: car: - changed-files: - - any-glob-to-all-files: '{selfdrive/car/**,opendbc_repo}' + - any-glob-to-all-files: 'selfdrive/car/**' simulation: - changed-files: diff --git a/.github/workflows/repo-maintenance.yaml b/.github/workflows/repo-maintenance.yaml index d2c2447d7acd16..4f82d1282e2ebc 100644 --- a/.github/workflows/repo-maintenance.yaml +++ b/.github/workflows/repo-maintenance.yaml @@ -68,7 +68,7 @@ jobs: git add . - name: update car docs run: | - scons -j$(nproc) --minimal opendbc_repo + scons -j$(nproc) --minimal python selfdrive/car/docs.py git add docs/CARS.md - name: Create Pull Request diff --git a/.gitmodules b/.gitmodules index ad6530de9ac910..904fee05d7cc16 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,18 +1,3 @@ -[submodule "panda"] - path = panda - url = ../../commaai/panda.git -[submodule "opendbc"] - path = opendbc_repo - url = ../../commaai/opendbc.git -[submodule "msgq"] - path = msgq_repo - url = ../../commaai/msgq.git -[submodule "rednose_repo"] - path = rednose_repo - url = ../../commaai/rednose.git -[submodule "teleoprtc_repo"] - path = teleoprtc_repo - url = ../../commaai/teleoprtc [submodule "tinygrad"] path = tinygrad_repo url = https://github.com/tinygrad/tinygrad.git diff --git a/SConstruct b/SConstruct index 3b8aadf91408be..29f7cb0919b14d 100644 --- a/SConstruct +++ b/SConstruct @@ -5,6 +5,10 @@ import sysconfig import platform import shlex import numpy as np +import opendbc +import panda as _panda +import rednose +import msgq as _msgq import SCons.Errors @@ -65,7 +69,9 @@ env = Environment( CXXFLAGS=["-std=c++1z"], CPPPATH=[ "#", - "#msgq", + _msgq.INCLUDE_PATH, + _panda.INCLUDE_PATH, + rednose.BASEDIR, "#third_party", "#third_party/json11", "#third_party/linux/include", @@ -77,19 +83,18 @@ env = Environment( ], LIBPATH=[ "#common", - "#msgq_repo", "#third_party", "#selfdrive/pandad", - "#rednose/helpers", + "#build/rednose", f"#third_party/libyuv/{arch}/lib", f"#third_party/acados/{arch}/lib", ], RPATH=[], CYTHONCFILESUFFIX=".cpp", COMPILATIONDB_USE_ABSPATH=True, - REDNOSE_ROOT="#", + REDNOSE_ROOT=rednose.INCLUDE_PATH, tools=["default", "cython", "compilation_db", "rednose_filter"], - toolpath=["#site_scons/site_tools", "#rednose_repo/site_scons/site_tools"], + toolpath=["#site_scons/site_tools", rednose.SITE_SCONS_TOOLS], ) # Arch-specific flags and paths @@ -182,21 +187,53 @@ Export('common') # Enable swaglog include in submodules env_swaglog = env.Clone() env_swaglog['CXXFLAGS'].append('-DSWAGLOG="\\"common/swaglog.h\\""') -SConscript(['msgq_repo/SConscript'], exports={'env': env_swaglog}) -SConscript(['opendbc_repo/SConscript'], exports={'env': env_swaglog}) + +# Build msgq/visionipc static libraries (for linking into openpilot C++ binaries) +# Note: Cython extensions (ipc_pyx.so, visionipc_pyx.so) are built by pip install +msgq_dir = _msgq.BASEDIR +vipc_dir = os.path.join(msgq_dir, 'visionipc') + +msgq_cc = ['ipc.cc', 'event.cc', 'impl_msgq.cc', 'impl_fake.cc', 'msgq.cc'] +msgq_objects = [env_swaglog.SharedObject(f'#build/msgq/{f.replace(".cc", ".os")}', os.path.join(msgq_dir, f)) for f in msgq_cc] +msgq_lib = env.Library('msgq', msgq_objects) + +vipc_files = ['visionipc.cc', 'visionipc_server.cc', 'visionipc_client.cc'] +vipc_files += ['visionbuf_ion.cc'] if arch == "larch64" else ['visionbuf.cc'] +vipc_objects = [env.SharedObject(f'#build/visionipc/{f.replace(".cc", ".os")}', os.path.join(vipc_dir, f)) for f in vipc_files] +visionipc = env.Library('visionipc', vipc_objects) +Export('visionipc', 'msgq_lib') SConscript(['cereal/SConscript']) -Import('socketmaster', 'msgq') -messaging = [socketmaster, msgq, 'capnp', 'kj',] +Import('socketmaster') +messaging = [socketmaster, msgq_lib, 'capnp', 'kj',] Export('messaging') -# Build other submodules -SConscript(['panda/SConscript']) - -# Build rednose library -SConscript(['rednose/SConscript']) +# Build rednose static library (for linking into openpilot C++ binaries) +# Note: Cython extension (ekf_sym_pyx.so) is built by pip install +Import('_common') +rednose_helpers = rednose.HELPERS_PATH +rednose_cc_files = ['ekf_load.cc', 'ekf_sym.cc'] +ekf_objects = [env.SharedObject(f'#build/rednose/{f.replace(".cc", ".os")}', os.path.join(rednose_helpers, f)) for f in rednose_cc_files] +rednose_lib = env.Library('#build/rednose/ekf_sym', ekf_objects, LIBS=['dl', _common, 'zmq']) +Export('rednose_lib') + +# Build opendbc libsafety for tests +safety_dir = os.path.join(os.path.dirname(opendbc.__file__), 'safety', 'tests', 'libsafety') +if GetOption('extras') and os.path.exists(os.path.join(safety_dir, 'safety.c')): + safety_env = Environment( + CC='clang', + CFLAGS=['-Wall', '-Wextra', '-Werror', '-nostdlib', '-fno-builtin', '-std=gnu11', + '-Wfatal-errors', '-Wno-pointer-to-int-cast', '-g', '-O0', + '-fno-omit-frame-pointer', '-grecord-command-line', '-DALLOW_DEBUG'], + LINKFLAGS=['-fsanitize=undefined', '-fno-sanitize-recover=undefined'], + CPPPATH=[os.path.dirname(opendbc.__file__) + "/.."], + tools=["default"], + ) + safety = safety_env.SharedObject('#build/opendbc/safety.os', os.path.join(safety_dir, "safety.c")) + # libsafety.so must be in opendbc's package dir (loaded via cffi dlopen from __file__'s dir) + safety_env.SharedLibrary(os.path.join(safety_dir, "libsafety.so"), [safety]) # Build system services SConscript([ diff --git a/cereal/SConscript b/cereal/SConscript index 73dc61844b3c58..b9b51e9ee4f689 100644 --- a/cereal/SConscript +++ b/cereal/SConscript @@ -1,4 +1,4 @@ -Import('env', 'common', 'msgq') +Import('env', 'common', 'msgq_lib') cereal_dir = Dir('.') gen_dir = Dir('gen') @@ -13,7 +13,7 @@ cereal = env.Library('cereal', [f'gen/cpp/{s}.c++' for s in schema_files]) # Build messaging services_h = env.Command(['services.h'], ['services.py'], 'python3 ' + cereal_dir.path + '/services.py > $TARGET') -env.Program('messaging/bridge', ['messaging/bridge.cc', 'messaging/msgq_to_zmq.cc', 'messaging/bridge_zmq.cc'], LIBS=[msgq, common, 'pthread']) +env.Program('messaging/bridge', ['messaging/bridge.cc', 'messaging/msgq_to_zmq.cc', 'messaging/bridge_zmq.cc'], LIBS=[msgq_lib, common, 'pthread']) socketmaster = env.Library('socketmaster', ['messaging/socketmaster.cc']) diff --git a/cereal/__init__.py b/cereal/__init__.py index 93f4d772276d57..61e22741dc1a4b 100644 --- a/cereal/__init__.py +++ b/cereal/__init__.py @@ -1,11 +1,9 @@ import os import capnp -from importlib.resources import as_file, files capnp.remove_import_hook() -with as_file(files("cereal")) as fspath: - CEREAL_PATH = fspath.as_posix() - log = capnp.load(os.path.join(CEREAL_PATH, "log.capnp")) - car = capnp.load(os.path.join(CEREAL_PATH, "car.capnp")) - custom = capnp.load(os.path.join(CEREAL_PATH, "custom.capnp")) +CEREAL_PATH = os.path.dirname(os.path.abspath(__file__)) +log = capnp.load(os.path.join(CEREAL_PATH, "log.capnp")) +car = capnp.load(os.path.join(CEREAL_PATH, "car.capnp")) +custom = capnp.load(os.path.join(CEREAL_PATH, "custom.capnp")) diff --git a/cereal/car.capnp b/cereal/car.capnp deleted file mode 120000 index 4bc7f89b1fb5f2..00000000000000 --- a/cereal/car.capnp +++ /dev/null @@ -1 +0,0 @@ -../opendbc_repo/opendbc/car/car.capnp \ No newline at end of file diff --git a/cereal/car.capnp b/cereal/car.capnp new file mode 100644 index 00000000000000..d2b8d758a7c159 --- /dev/null +++ b/cereal/car.capnp @@ -0,0 +1,736 @@ +using Cxx = import "./include/c++.capnp"; +$Cxx.namespace("cereal"); + +@0x8e2af1e708af8b8d; + +# ******* events causing controls state machine transition ******* + +# IMPORTANT: This struct is to not be modified so old logs can be parsed +struct OnroadEventDEPRECATED @0x9b1657f34caf3ad3 { + name @0 :EventName; + + # event types + enable @1 :Bool; + noEntry @2 :Bool; + warning @3 :Bool; # alerts presented only when enabled or soft disabling + userDisable @4 :Bool; + softDisable @5 :Bool; + immediateDisable @6 :Bool; + preEnable @7 :Bool; + permanent @8 :Bool; # alerts presented regardless of openpilot state + overrideLateral @10 :Bool; + overrideLongitudinal @9 :Bool; + + enum EventName @0xbaa8c5d505f727de { + canError @0; + steerUnavailable @1; + wrongGear @4; + doorOpen @5; + seatbeltNotLatched @6; + espDisabled @7; + wrongCarMode @8; + steerTempUnavailable @9; + reverseGear @10; + buttonCancel @11; + buttonEnable @12; + pedalPressed @13; # exits active state + preEnableStandstill @73; # added during pre-enable state with brake + gasPressedOverride @108; # added when user is pressing gas with no disengage on gas + steerOverride @114; + cruiseDisabled @14; + speedTooLow @17; + outOfSpace @18; + overheat @19; + calibrationIncomplete @20; + calibrationInvalid @21; + calibrationRecalibrating @117; + controlsMismatch @22; + pcmEnable @23; + pcmDisable @24; + radarFault @26; + brakeHold @28; + parkBrake @29; + manualRestart @30; + joystickDebug @34; + longitudinalManeuver @124; + steerTempUnavailableSilent @35; + resumeRequired @36; + preDriverDistracted @37; + promptDriverDistracted @38; + driverDistracted @39; + preDriverUnresponsive @43; + promptDriverUnresponsive @44; + driverUnresponsive @45; + belowSteerSpeed @46; + lowBattery @48; + accFaulted @51; + sensorDataInvalid @52; + commIssue @53; + commIssueAvgFreq @109; + tooDistracted @54; + posenetInvalid @55; + preLaneChangeLeft @57; + preLaneChangeRight @58; + laneChange @59; + lowMemory @63; + stockAeb @64; + ldw @65; + carUnrecognized @66; + invalidLkasSetting @69; + speedTooHigh @70; + laneChangeBlocked @71; + relayMalfunction @72; + stockFcw @74; + startup @75; + startupNoCar @76; + startupNoControl @77; + startupNoSecOcKey @125; + startupMaster @78; + fcw @79; + steerSaturated @80; + belowEngageSpeed @84; + noGps @85; + wrongCruiseMode @87; + modeldLagging @89; + deviceFalling @90; + fanMalfunction @91; + cameraMalfunction @92; + cameraFrameRate @110; + processNotRunning @95; + dashcamMode @96; + selfdriveInitializing @98; + usbError @99; + cruiseMismatch @106; + canBusMissing @111; + selfdrivedLagging @112; + resumeBlocked @113; + steerTimeLimit @115; + vehicleSensorsInvalid @116; + locationdTemporaryError @103; + locationdPermanentError @118; + paramsdTemporaryError @50; + paramsdPermanentError @119; + actuatorsApiUnavailable @120; + espActive @121; + personalityChanged @122; + aeb @123; + + radarCanErrorDEPRECATED @15; + communityFeatureDisallowedDEPRECATED @62; + radarCommIssueDEPRECATED @67; + driverMonitorLowAccDEPRECATED @68; + gasUnavailableDEPRECATED @3; + dataNeededDEPRECATED @16; + modelCommIssueDEPRECATED @27; + ipasOverrideDEPRECATED @33; + geofenceDEPRECATED @40; + driverMonitorOnDEPRECATED @41; + driverMonitorOffDEPRECATED @42; + calibrationProgressDEPRECATED @47; + invalidGiraffeHondaDEPRECATED @49; + invalidGiraffeToyotaDEPRECATED @60; + internetConnectivityNeededDEPRECATED @61; + whitePandaUnsupportedDEPRECATED @81; + commIssueWarningDEPRECATED @83; + focusRecoverActiveDEPRECATED @86; + neosUpdateRequiredDEPRECATED @88; + modelLagWarningDEPRECATED @93; + startupOneplusDEPRECATED @82; + startupFuzzyFingerprintDEPRECATED @97; + noTargetDEPRECATED @25; + brakeUnavailableDEPRECATED @2; + plannerErrorDEPRECATED @32; + gpsMalfunctionDEPRECATED @94; + roadCameraErrorDEPRECATED @100; + driverCameraErrorDEPRECATED @101; + wideRoadCameraErrorDEPRECATED @102; + highCpuUsageDEPRECATED @105; + startupNoFwDEPRECATED @104; + lowSpeedLockoutDEPRECATED @31; + lkasDisabledDEPRECATED @107; + soundsUnavailableDEPRECATED @56; + } +} + +struct CarState { + # CAN health + canValid @26 :Bool; # invalid counter/checksums + canTimeout @40 :Bool; # CAN bus dropped out + canErrorCounter @48 :UInt32; + + # process meta + cumLagMs @50 :Float32; + + # car speed + vEgo @1 :Float32; # best estimate of speed + aEgo @16 :Float32; # best estimate of aCAN cceleration + vEgoRaw @17 :Float32; # unfiltered speed from wheel speed sensors + vEgoCluster @44 :Float32; # best estimate of speed shown on car's instrument cluster, used for UI + + vCruise @53 :Float32; # actual set speed + vCruiseCluster @54 :Float32; # set speed to display in the UI + + yawRate @22 :Float32; # best estimate of yaw rate + standstill @18 :Bool; + wheelSpeeds @2 :WheelSpeeds; + + gasPressed @4 :Bool; # this is user pedal only + + # brake pedal, 0.0-1.0 + brake @5 :Float32; # this is user pedal only + brakePressed @6 :Bool; # this is user pedal only + regenBraking @45 :Bool; # this is user pedal only + parkingBrake @39 :Bool; + brakeHoldActive @38 :Bool; + + # steering wheel + steeringAngleDeg @7 :Float32; + steeringAngleOffsetDeg @37 :Float32; # Offset between sensors in case there multiple + steeringRateDeg @15 :Float32; # optional + steeringTorque @8 :Float32; # Native CAN units, only needed on cars where it's used for control + steeringTorqueEps @27 :Float32; # Native CAN units, only needed on cars where it's used for control + steeringPressed @9 :Bool; # is the user overring the steering wheel? + steeringDisengage @58 :Bool; # more force than steeringPressed, disengages for applicable brands + steerFaultTemporary @35 :Bool; + steerFaultPermanent @36 :Bool; + + invalidLkasSetting @55 :Bool; # stock LKAS is incorrectly configured (i.e. on or off) + stockAeb @30 :Bool; + stockLkas @59 :Bool; + stockFcw @31 :Bool; + espDisabled @32 :Bool; + accFaulted @42 :Bool; + carFaultedNonCritical @47 :Bool; # some ECU is faulted, but car remains controllable + espActive @51 :Bool; + vehicleSensorsInvalid @52 :Bool; # invalid steering angle readings, etc. + lowSpeedAlert @56 :Bool; # lost steering control due to a dynamic min steering speed + blockPcmEnable @60 :Bool; # whether to allow PCM to enable this frame + + # cruise state + cruiseState @10 :CruiseState; + + # gear + gearShifter @14 :GearShifter; + + # button presses + buttonEvents @11 :List(ButtonEvent); + buttonEnable @57 :Bool; # user is requesting enable, usually one frame. set if pcmCruise=False + leftBlinker @20 :Bool; + rightBlinker @21 :Bool; + genericToggle @23 :Bool; + + # lock info + doorOpen @24 :Bool; # ideally includes all doors + seatbeltUnlatched @25 :Bool; # driver seatbelt + + # blindspot sensors + leftBlindspot @33 :Bool; # Is there something blocking the left lane change + rightBlindspot @34 :Bool; # Is there something blocking the right lane change + + fuelGauge @41 :Float32; # battery or fuel tank level from [0.0, 1.0] + charging @43 :Bool; + + struct WheelSpeeds { + # optional wheel speeds + fl @0 :Float32; + fr @1 :Float32; + rl @2 :Float32; + rr @3 :Float32; + } + + struct CruiseState { + enabled @0 :Bool; + speed @1 :Float32; + speedCluster @6 :Float32; # Set speed as shown on instrument cluster + available @2 :Bool; + standstill @4 :Bool; + nonAdaptive @5 :Bool; + + speedOffsetDEPRECATED @3 :Float32; + } + + enum GearShifter { + unknown @0; + park @1; + drive @2; + neutral @3; + reverse @4; + sport @5; + low @6; + brake @7; + eco @8; + manumatic @9; + } + + # send on change + struct ButtonEvent { + pressed @0 :Bool; + type @1 :Type; + + enum Type { + unknown @0; + leftBlinker @1; + rightBlinker @2; + accelCruise @3; + decelCruise @4; + cancel @5; + lkas @6; + altButton2 @7; + mainCruise @8; + setCruise @9; + resumeCruise @10; + gapAdjustCruise @11; + } + } + + # deprecated + errorsDEPRECATED @0 :List(OnroadEventDEPRECATED.EventName); + gasDEPRECATED @3 :Float32; # this is user pedal only + brakeLightsDEPRECATED @19 :Bool; + steeringRateLimitedDEPRECATED @29 :Bool; + canMonoTimesDEPRECATED @12: List(UInt64); + canRcvTimeoutDEPRECATED @49 :Bool; + eventsDEPRECATED @13 :List(OnroadEventDEPRECATED); + clutchPressedDEPRECATED @28 :Bool; + engineRpmDEPRECATED @46 :Float32; +} + +# ******* radar state @ 20hz ******* + +struct RadarData @0x888ad6581cf0aacb { + errors @3 :Error; + points @1 :List(RadarPoint); + + struct Error { + canError @0 :Bool; + radarFault @1 :Bool; + wrongConfig @2 :Bool; + radarUnavailableTemporary @3 :Bool; # radar data is temporarily unavailable due to conditions the car sets + } + + # similar to LiveTracks + # is one timestamp valid for all? I think so + struct RadarPoint { + trackId @0 :UInt64; # no trackId reuse + + # these 3 are the minimum required + dRel @1 :Float32; # m from the front bumper of the car + yRel @2 :Float32; # m + vRel @3 :Float32; # m/s + + # these are optional and valid if they are not NaN + aRel @4 :Float32; # m/s^2 + yvRel @5 :Float32; # m/s + + # some radars flag measurements VS estimates + measured @6 :Bool; + } + + enum ErrorDEPRECATED { + canError @0; + fault @1; + wrongConfig @2; + } + + # deprecated + canMonoTimesDEPRECATED @2 :List(UInt64); + errorsDEPRECATED @0 :List(ErrorDEPRECATED); +} + +# ******* car controls @ 100hz ******* + +struct CarControl { + # must be true for any actuator commands to work + enabled @0 :Bool; + latActive @11: Bool; + longActive @12: Bool; + + # Final actuator commands + actuators @6 :Actuators; + + # Blinker controls + leftBlinker @15: Bool; + rightBlinker @16: Bool; + + orientationNED @13 :List(Float32); + angularVelocity @14 :List(Float32); + currentCurvature @17 :Float32; # From vehicle model + + cruiseControl @4 :CruiseControl; + hudControl @5 :HUDControl; + + struct Actuators { + # lateral commands, mutually exclusive + torque @2: Float32; # [0.0, 1.0] + steeringAngleDeg @3: Float32; + curvature @7: Float32; + + # longitudinal commands + accel @4: Float32; # m/s^2 + longControlState @5: LongControlState; + + # these are only for logging the actual values sent to the car over CAN + gas @0: Float32; # [0.0, 1.0] + brake @1: Float32; # [0.0, 1.0] + torqueOutputCan @8: Float32; # value sent over can to the car + speed @6: Float32; # m/s + + enum LongControlState @0xe40f3a917d908282{ + off @0; + pid @1; + stopping @2; + starting @3; + } + } + + struct CruiseControl { + cancel @0: Bool; + resume @1: Bool; + override @4: Bool; + speedOverrideDEPRECATED @2: Float32; + accelOverrideDEPRECATED @3: Float32; + } + + struct HUDControl { + speedVisible @0: Bool; + setSpeed @1: Float32; + lanesVisible @2: Bool; + leadVisible @3: Bool; + visualAlert @4: VisualAlert; + rightLaneVisible @6: Bool; + 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 + + # not used with the dash, TODO: separate structs for dash UI and device UI + audibleAlert @5: AudibleAlert; + + enum VisualAlert { + # these are the choices from the Honda + # map as good as you can for your car + none @0; + fcw @1; + steerRequired @2; + brakePressed @3; + wrongGear @4; + seatbeltUnbuckled @5; + speedTooHigh @6; + ldw @7; + } + + enum AudibleAlert { + none @0; + + engage @1; + disengage @2; + refuse @3; + + warningSoft @4; + warningImmediate @5; + + prompt @6; + promptRepeat @7; + promptDistracted @8; + } + } + + gasDEPRECATED @1 :Float32; + brakeDEPRECATED @2 :Float32; + steeringTorqueDEPRECATED @3 :Float32; + activeDEPRECATED @7 :Bool; + rollDEPRECATED @8 :Float32; + pitchDEPRECATED @9 :Float32; + actuatorsOutputDEPRECATED @10 :Actuators; +} + +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 { + brand @0 :Text; # Designates which group a platform falls under. Each folder in opendbc/car is assigned one brand string + carFingerprint @1 :Text; + fuzzyFingerprint @55 :Bool; + + notCar @66 :Bool; # flag for non-car robotics platforms + + pcmCruise @3 :Bool; # is openpilot's state tied to the PCM's cruise state? + enableBsm @56 :Bool; # blind spot monitoring + flags @64 :UInt32; # flags for car specific quirks + alphaLongitudinalAvailable @71 :Bool; + + minEnableSpeed @7 :Float32; + minSteerSpeed @8 :Float32; + steerAtStandstill @77 :Bool; # is steering available at standstill? just check if it faults + safetyConfigs @62 :List(SafetyConfig); + alternativeExperience @65 :Int16; # panda flag for features like no disengage on gas + + # Car docs fields, not used for control + maxLateralAccel @68 :Float32; + autoResumeSng @69 :Bool; # describes whether car can resume from a stop automatically + + # things about the car in the manual + mass @17 :Float32; # [kg] curb weight: all fluids no cargo + wheelbase @18 :Float32; # [m] distance from rear axle to front axle + centerToFront @19 :Float32; # [m] distance from center of mass to front axle + steerRatio @20 :Float32; # [] ratio of steering wheel angle to front wheel angle + steerRatioRear @21 :Float32; # [] ratio of steering wheel angle to rear wheel angle (usually 0) + + # things we can derive + rotationalInertia @22 :Float32; # [kg*m2] body rotational inertia + tireStiffnessFactor @72 :Float32; # scaling factor used in calculating tireStiffness[Front,Rear] + tireStiffnessFront @23 :Float32; # [N/rad] front tire coeff of stiff + tireStiffnessRear @24 :Float32; # [N/rad] rear tire coeff of stiff + + longitudinalTuning @25 :LongitudinalPIDTuning; + lateralParams @48 :LateralParams; + lateralTuning :union { + pid @26 :LateralPIDTuning; + indiDEPRECATED @27 :LateralINDITuning; + lqrDEPRECATED @40 :LateralLQRTuning; + torque @67 :LateralTorqueTuning; + } + + steerLimitAlert @28 :Bool; + steerLimitTimer @47 :Float32; # time before steerLimitAlert is issued + + vEgoStopping @29 :Float32; # Speed at which the car goes into stopping state + vEgoStarting @59 :Float32; # Speed at which the car goes into starting state + steerControlType @34 :SteerControlType; + radarUnavailable @35 :Bool; # True when radar objects aren't visible on CAN or aren't parsed out + stopAccel @60 :Float32; # Required acceleration to keep vehicle stationary + stoppingDecelRate @52 :Float32; # m/s^2/s while trying to stop + startAccel @32 :Float32; # Required acceleration to get car moving + startingState @70 :Bool; # Does this car make use of special starting state + + steerActuatorDelay @36 :Float32; # Steering wheel actuator delay in seconds + longitudinalActuatorDelay @58 :Float32; # Gas/Brake actuator delay in seconds + openpilotLongitudinalControl @37 :Bool; # is openpilot doing the longitudinal control? + carVin @38 :Text; # VIN number queried during fingerprinting + dashcamOnly @41: Bool; + passive @73: Bool; # is openpilot in control? + transmissionType @43 :TransmissionType; + carFw @44 :List(CarFw); + + radarDelay @74 :Float32; + fingerprintSource @49: FingerprintSource; + networkLocation @50 :NetworkLocation; # Where Panda/C2 is integrated into the car's CAN network + + wheelSpeedFactor @63 :Float32; # Multiplier on wheels speeds to computer actual speeds + + secOcRequired @75 :Bool; # Car requires SecOC message authentication to operate + secOcKeyAvailable @76 :Bool; # Stored SecOC key loaded from params + + struct SafetyConfig { + safetyModel @0 :SafetyModel; + safetyParam @3 :UInt16; + safetyParamDEPRECATED @1 :Int16; + safetyParam2DEPRECATED @2 :UInt32; + } + + struct LateralParams { + torqueBP @0 :List(Int32); + torqueV @1 :List(Int32); + } + + struct LateralPIDTuning { + kpBP @0 :List(Float32); + kpV @1 :List(Float32); + kiBP @2 :List(Float32); + kiV @3 :List(Float32); + kf @4 :Float32; + } + + struct LateralTorqueTuning { + friction @3 :Float32; + steeringAngleDeadzoneDeg @5 :Float32; + latAccelFactor @6 :Float32; + latAccelOffset @7 :Float32; + useSteeringAngleDEPRECATED @0 :Bool; + kpDEPRECATED @1 :Float32; + kiDEPRECATED @2 :Float32; + kfDEPRECATED @4 :Float32; + kdDEPRECATED @8 : Float32; + } + + struct LongitudinalPIDTuning { + kpBP @0 :List(Float32); + kpV @1 :List(Float32); + kiBP @2 :List(Float32); + kiV @3 :List(Float32); + kfDEPRECATED @6 :Float32; + deadzoneBPDEPRECATED @4 :List(Float32); + deadzoneVDEPRECATED @5 :List(Float32); + } + + struct LateralINDITuning { + outerLoopGainBP @4 :List(Float32); + outerLoopGainV @5 :List(Float32); + innerLoopGainBP @6 :List(Float32); + innerLoopGainV @7 :List(Float32); + timeConstantBP @8 :List(Float32); + timeConstantV @9 :List(Float32); + actuatorEffectivenessBP @10 :List(Float32); + actuatorEffectivenessV @11 :List(Float32); + + outerLoopGainDEPRECATED @0 :Float32; + innerLoopGainDEPRECATED @1 :Float32; + timeConstantDEPRECATED @2 :Float32; + actuatorEffectivenessDEPRECATED @3 :Float32; + } + + struct LateralLQRTuning { + scale @0 :Float32; + ki @1 :Float32; + dcGain @2 :Float32; + + # State space system + a @3 :List(Float32); + b @4 :List(Float32); + c @5 :List(Float32); + + k @6 :List(Float32); # LQR gain + l @7 :List(Float32); # Kalman gain + } + + enum SafetyModel { + silent @0; + hondaNidec @1; + toyota @2; + elm327 @3; + gm @4; + hondaBoschGiraffe @5; + ford @6; + cadillac @7; + hyundai @8; + chrysler @9; + tesla @10; + subaru @11; + gmPassive @12; + mazda @13; + nissan @14; + volkswagen @15; + toyotaIpas @16; + allOutput @17; + gmAscm @18; + noOutput @19; # like silent but without silent CAN TXs + hondaBosch @20; + volkswagenPq @21; + subaruPreglobal @22; # pre-Global platform + hyundaiLegacy @23; + hyundaiCommunity @24; + volkswagenMlb @25; + hongqi @26; + body @27; + hyundaiCanfd @28; + volkswagenMqbEvo @29; + chryslerCusw @30; + psa @31; + fcaGiorgio @32; + rivian @33; + volkswagenMeb @34; + } + + enum SteerControlType { + torque @0; + angle @1; + + curvatureDEPRECATED @2; + } + + enum TransmissionType { + unknown @0; + automatic @1; # Traditional auto, including DSG + manual @2; # True "stick shift" only + direct @3; # Electric vehicle or other direct drive + cvt @4; + } + + struct CarFw { + ecu @0 :Ecu; + fwVersion @1 :Data; + address @2 :UInt32; + subAddress @3 :UInt8; + responseAddress @4 :UInt32; + request @5 :List(Data); + brand @6 :Text; + bus @7 :UInt8; + logging @8 :Bool; + obdMultiplexing @9 :Bool; + } + + enum Ecu { + eps @0; + abs @1; + fwdRadar @2; + fwdCamera @3; + engine @4; + unknown @5; + transmission @8; # Transmission Control Module + hybrid @18; # hybrid control unit, e.g. Chrysler's HCP, Honda's IMA Control Unit, Toyota's hybrid control computer + srs @9; # airbag + gateway @10; # can gateway + hud @11; # heads up display + combinationMeter @12; # instrument cluster + electricBrakeBooster @15; + shiftByWire @16; + adas @19; + cornerRadar @21; + hvac @20; + parkingAdas @7; # parking assist system ECU, e.g. Toyota's IPAS, Hyundai's RSPA, etc. + epb @22; # electronic parking brake + telematics @23; + body @24; # body control module + + # Toyota only + dsu @6; + + # Honda only + vsa @13; # Vehicle Stability Assist + programmedFuelInjection @14; + + debug @17; + } + + enum FingerprintSource { + can @0; + fw @1; + fixed @2; + } + + enum NetworkLocation { + fwdCamera @0; # Standard/default integration at LKAS camera + gateway @1; # Integration at vehicle's CAN gateway + } + + enableGasInterceptorDEPRECATED @2 :Bool; + enableCameraDEPRECATED @4 :Bool; + enableApgsDEPRECATED @6 :Bool; + steerRateCostDEPRECATED @33 :Float32; + isPandaBlackDEPRECATED @39 :Bool; + hasStockCameraDEPRECATED @57 :Bool; + safetyParamDEPRECATED @10 :Int16; + safetyModelDEPRECATED @9 :SafetyModel; + safetyModelPassiveDEPRECATED @42 :SafetyModel = silent; + minSpeedCanDEPRECATED @51 :Float32; + communityFeatureDEPRECATED @46: Bool; + startingAccelRateDEPRECATED @53 :Float32; + steerMaxBPDEPRECATED @11 :List(Float32); + steerMaxVDEPRECATED @12 :List(Float32); + gasMaxBPDEPRECATED @13 :List(Float32); + gasMaxVDEPRECATED @14 :List(Float32); + brakeMaxBPDEPRECATED @15 :List(Float32); + brakeMaxVDEPRECATED @16 :List(Float32); + directAccelControlDEPRECATED @30 :Bool; + maxSteeringAngleDegDEPRECATED @54 :Float32; + longitudinalActuatorDelayLowerBoundDEPRECATED @61 :Float32; + stoppingControlDEPRECATED @31 :Bool; # Does the car allow full control even at lows speeds when stopping + radarTimeStepDEPRECATED @45: Float32 = 0.05; # time delta between radar updates, 20Hz is very standard + enableDsuDEPRECATED @5 :Bool; # driving support unit +} diff --git a/msgq b/msgq deleted file mode 120000 index df09146f62ea88..00000000000000 --- a/msgq +++ /dev/null @@ -1 +0,0 @@ -msgq_repo/msgq \ No newline at end of file diff --git a/msgq_repo b/msgq_repo deleted file mode 160000 index fa514e7dd77025..00000000000000 --- a/msgq_repo +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fa514e7dd77025952d94e893c622a5006e260321 diff --git a/opendbc b/opendbc deleted file mode 120000 index 7cd9a5bd1ebf2e..00000000000000 --- a/opendbc +++ /dev/null @@ -1 +0,0 @@ -opendbc_repo/opendbc \ No newline at end of file diff --git a/opendbc_repo b/opendbc_repo deleted file mode 160000 index 647441e42db573..00000000000000 --- a/opendbc_repo +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 647441e42db5735e249344449ad857eeeeff7224 diff --git a/panda b/panda deleted file mode 160000 index e1da7dc918c0bc..00000000000000 --- a/panda +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e1da7dc918c0bcda6fbbdd9ee6f89c5428ec5039 diff --git a/pyproject.toml b/pyproject.toml index 5aeb2ffab4a2e3..7d0f6f871b574b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,6 +63,13 @@ dependencies = [ "raylib > 5.5.0.3", "qrcode", "jeepney", + + # submodule packages + "teleoprtc @ git+https://github.com/commaai/teleoprtc.git@389815b", + "pandacan @ git+https://github.com/commaai/panda.git@fix_packages", + "opendbc @ git+https://github.com/commaai/opendbc.git@fix_packages", + "rednose @ git+https://github.com/commaai/rednose.git@fix_packages", + "msgq @ git+https://github.com/commaai/msgq.git@fix_packages", ] [project.optional-dependencies] @@ -112,7 +119,7 @@ allow-direct-references = true [tool.pytest.ini_options] minversion = "6.0" -addopts = "--ignore=openpilot/ --ignore=opendbc/ --ignore=panda/ --ignore=rednose_repo/ --ignore=tinygrad_repo/ --ignore=teleoprtc_repo/ --ignore=msgq/ -Werror --strict-config --strict-markers --durations=20 --maxprocesses=8 -n auto --dist=loadgroup" +addopts = "--ignore=openpilot/ --ignore=tinygrad_repo/ -Werror --strict-config --strict-markers --durations=20 --maxprocesses=8 -n auto --dist=loadgroup" cpp_files = "test_*" cpp_harness = "selfdrive/test/cpp_harness.py" python_files = "test_*.py" @@ -135,7 +142,7 @@ quiet-level = 3 # if you've got a short variable name that's getting flagged, add it here ignore-words-list = "bu,ro,te,ue,alo,hda,ois,nam,nams,ned,som,parm,setts,inout,warmup,bumb,nd,sie,preints,whit,indexIn,ws,uint,grey,deque,stdio,amin,BA,LITE,atEnd,UIs,errorString,arange,FocusIn,od,tim,relA,hist,copyable,jupyter,thead,TGE,abl,lite" builtin = "clear,rare,informal,code,names,en-GB_to_en-US" -skip = "./third_party/*, ./tinygrad/*, ./tinygrad_repo/*, ./msgq/*, ./panda/*, ./opendbc/*, ./opendbc_repo/*, ./rednose/*, ./rednose_repo/*, ./teleoprtc/*, ./teleoprtc_repo/*, *.po, uv.lock, *.onnx, ./cereal/gen/*, */c_generated_code/*, docs/assets/*, tools/plotjuggler/layouts/*, selfdrive/assets/offroad/mici_fcc.html" +skip = "./third_party/*, ./tinygrad/*, ./tinygrad_repo/*, *.po, uv.lock, *.onnx, ./cereal/gen/*, */c_generated_code/*, docs/assets/*, tools/plotjuggler/layouts/*, selfdrive/assets/offroad/mici_fcc.html" # https://docs.astral.sh/ruff/configuration/#using-pyprojecttoml [tool.ruff] @@ -164,13 +171,7 @@ target-version ="py311" exclude = [ "body", "cereal", - "panda", - "opendbc", - "opendbc_repo", - "rednose_repo", "tinygrad_repo", - "teleoprtc", - "teleoprtc_repo", "third_party", "*.ipynb", "generated", @@ -199,17 +200,8 @@ quote-style = "preserve" [tool.ty.src] exclude = [ "cereal/", - "msgq/", - "msgq_repo/", - "opendbc/", - "opendbc_repo/", - "panda/", - "rednose/", - "rednose_repo/", "tinygrad/", "tinygrad_repo/", - "teleoprtc/", - "teleoprtc_repo/", "third_party/", ] diff --git a/rednose b/rednose deleted file mode 120000 index 674cfec35f9112..00000000000000 --- a/rednose +++ /dev/null @@ -1 +0,0 @@ -rednose_repo/rednose \ No newline at end of file diff --git a/rednose_repo b/rednose_repo deleted file mode 160000 index 7fddc8e6d49def..00000000000000 --- a/rednose_repo +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7fddc8e6d49def83c952a78673179bdc62789214 diff --git a/scripts/lint/lint.sh b/scripts/lint/lint.sh index 5581171e8feb65..36f07bcc11032b 100755 --- a/scripts/lint/lint.sh +++ b/scripts/lint/lint.sh @@ -14,7 +14,7 @@ cd $ROOT FAILED=0 IGNORED_FILES="uv\.lock|docs\/CARS.md" -IGNORED_DIRS="^third_party.*|^msgq.*|^msgq_repo.*|^opendbc.*|^opendbc_repo.*|^cereal.*|^panda.*|^rednose.*|^rednose_repo.*|^tinygrad.*|^tinygrad_repo.*|^teleoprtc.*|^teleoprtc_repo.*" +IGNORED_DIRS="^third_party.*|^cereal.*|^tinygrad.*|^tinygrad_repo.*" function run() { shopt -s extglob diff --git a/selfdrive/controls/lib/lateral_mpc_lib/SConscript b/selfdrive/controls/lib/lateral_mpc_lib/SConscript index c9ebf892079976..77e5bc58418a90 100644 --- a/selfdrive/controls/lib/lateral_mpc_lib/SConscript +++ b/selfdrive/controls/lib/lateral_mpc_lib/SConscript @@ -1,4 +1,4 @@ -Import('env', 'envCython', 'arch', 'msgq_python', 'common_python', 'np_version') +Import('env', 'envCython', 'arch', 'common_python', 'np_version') gen = "c_generated_code" @@ -62,7 +62,7 @@ lenv.Clean(generated_files, Dir(gen)) generated_lat = lenv.Command(generated_files, source_list, f"cd {Dir('.').abspath} && python3 lat_mpc.py") -lenv.Depends(generated_lat, [msgq_python, common_python]) +lenv.Depends(generated_lat, [common_python]) lenv["CFLAGS"].append("-DACADOS_WITH_QPOASES") lenv["CXXFLAGS"].append("-DACADOS_WITH_QPOASES") diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/SConscript b/selfdrive/controls/lib/longitudinal_mpc_lib/SConscript index 7a6c02a538d728..bb24419185f277 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/SConscript +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/SConscript @@ -1,4 +1,4 @@ -Import('env', 'envCython', 'arch', 'msgq_python', 'common_python', 'np_version') +Import('env', 'envCython', 'arch', 'common_python', 'np_version') gen = "c_generated_code" @@ -67,7 +67,7 @@ lenv.Clean(generated_files, Dir(gen)) generated_long = lenv.Command(generated_files, source_list, f"cd {Dir('.').abspath} && python3 long_mpc.py") -lenv.Depends(generated_long, [msgq_python, common_python]) +lenv.Depends(generated_long, [common_python]) lenv["CFLAGS"].append("-DACADOS_WITH_QPOASES") lenv["CXXFLAGS"].append("-DACADOS_WITH_QPOASES") diff --git a/selfdrive/locationd/SConscript b/selfdrive/locationd/SConscript index e8eeff7e0cc102..206564c7950e9f 100644 --- a/selfdrive/locationd/SConscript +++ b/selfdrive/locationd/SConscript @@ -1,4 +1,4 @@ -Import('env', 'rednose') +Import('env', 'rednose_lib') # build ekf models rednose_gen_dir = 'models/generated' diff --git a/selfdrive/test/scons_build_test.sh b/selfdrive/test/scons_build_test.sh deleted file mode 100755 index 5ffdb4379e004c..00000000000000 --- a/selfdrive/test/scons_build_test.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -set -e - -SCRIPT_DIR=$(dirname "$0") -BASEDIR=$(realpath "$SCRIPT_DIR/../../") -cd $BASEDIR - -# tests that our build system's dependencies are configured properly, -# needs a machine with lots of cores - -# helpful commands: -# scons -Q --tree=derived - -cd $BASEDIR/opendbc_repo/ -scons --clean -scons --no-cache --random -j$(nproc) -if ! scons -q; then - echo "FAILED: all build products not up to date after first pass." - exit 1 -fi diff --git a/teleoprtc b/teleoprtc deleted file mode 120000 index 3d3dbc8dea1ac6..00000000000000 --- a/teleoprtc +++ /dev/null @@ -1 +0,0 @@ -teleoprtc_repo/teleoprtc \ No newline at end of file diff --git a/teleoprtc_repo b/teleoprtc_repo deleted file mode 160000 index 389815b8ca5302..00000000000000 --- a/teleoprtc_repo +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 389815b8ca5302ce7c1504b7841d4eb61a8cd51b diff --git a/tools/cabana/SConscript b/tools/cabana/SConscript index 025797d1e371ac..840998f47d1d0a 100644 --- a/tools/cabana/SConscript +++ b/tools/cabana/SConscript @@ -1,6 +1,7 @@ import subprocess import os import shutil +import opendbc Import('env', 'arch', 'common', 'messaging', 'visionipc', 'cereal') @@ -76,7 +77,7 @@ qt_libs = base_libs cabana_env = qt_env.Clone() cabana_libs = [cereal, messaging, visionipc, replay_lib, 'avutil', 'avcodec', 'avformat', 'bz2', 'zstd', 'curl', 'yuv', 'usb-1.0'] + qt_libs -opendbc_path = '-DOPENDBC_FILE_PATH=\'"%s"\'' % (cabana_env.Dir("../../opendbc/dbc").abspath) +opendbc_path = '-DOPENDBC_FILE_PATH=\'"%s"\'' % opendbc.DBC_PATH cabana_env['CXXFLAGS'] += [opendbc_path] # build assets @@ -100,4 +101,4 @@ output_json_file = 'tools/cabana/dbc/car_fingerprint_to_dbc.json' generate_dbc = cabana_env.Command('#' + output_json_file, ['dbc/generate_dbc_json.py'], "python3 tools/cabana/dbc/generate_dbc_json.py --out " + output_json_file) -cabana_env.Depends(generate_dbc, ["#common", '#opendbc_repo', "#cereal", "#msgq_repo"]) +cabana_env.Depends(generate_dbc, ["#common", "#cereal"]) diff --git a/uv.lock b/uv.lock index 8b8bfd639ba195..e99331760b5071 100644 --- a/uv.lock +++ b/uv.lock @@ -107,16 +107,16 @@ wheels = [ [[package]] name = "av" -version = "13.1.0" +version = "12.3.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/0c/9d/486d31e76784cc0ad943f420c5e05867263b32b37e2f4b0f7f22fdc1ca3a/av-13.1.0.tar.gz", hash = "sha256:d3da736c55847d8596eb8c26c60e036f193001db3bc5c10da8665622d906c17e", size = 3957908, upload-time = "2024-10-06T04:54:57.507Z" } +sdist = { url = "https://files.pythonhosted.org/packages/00/f8/5adeeae0c42a7130933d168b8d84a21c98a32cb9fcf9222e2541ed0d9c7b/av-12.3.0.tar.gz", hash = "sha256:04b1892562aff3277efc79f32bd8f1d0cbb64ed011241cb3e96f9ad471816c22", size = 3833953, upload-time = "2024-07-21T04:02:43.708Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/9b/aa/4bdd8ce59173574fc6e0c282c71ee6f96fca82643d97bf172bc4cb5a5674/av-13.1.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:261dbc3f4b55f4f8f3375b10b2258fca7f2ab7a6365c01bc65e77a0d5327a195", size = 24268674, upload-time = "2024-10-06T04:53:11.251Z" }, - { url = "https://files.pythonhosted.org/packages/17/b4/b267dd5bad99eed49ec6731827c6bcb5ab03864bf732a7ebb81e3df79911/av-13.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:83d259ef86b9054eb914bc7c6a7f6092a6d75cb939295e70ee979cfd92a67b99", size = 19475617, upload-time = "2024-10-06T04:53:13.832Z" }, - { url = "https://files.pythonhosted.org/packages/68/32/4209e51f54d7b54a1feb576d309c671ed1ff437b54fcc4ec68c239199e0a/av-13.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f3b4d3ca159eceab97e3c0fb08fe756520fb95508417f76e48198fda2a5b0806", size = 32468873, upload-time = "2024-10-06T04:53:17.639Z" }, - { url = "https://files.pythonhosted.org/packages/b6/d8/c174da5f06b24f3c9e36f91fd02a7411c39da9ce792c17964260d4be675e/av-13.1.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40e8f757e373b73a2dc4640852a00cce4a4a92ef19b2e642a96d6994cd1fffbf", size = 31818484, upload-time = "2024-10-06T04:53:21.509Z" }, - { url = "https://files.pythonhosted.org/packages/7f/22/0dd8d1d5cad415772bb707d16aea8b81cf75d340d11d3668eea43468c730/av-13.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d8aaec2c0bfd024359db3821d679009d4e637e1bee0321d20f61c54ed6b20f41", size = 34398652, upload-time = "2024-10-06T04:53:25.798Z" }, - { url = "https://files.pythonhosted.org/packages/7b/ff/48fa68888b8d5bae36d915556ff18f9e5fdc6b5ff5ae23dc4904c9713168/av-13.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:5ea0deab0e6a739cb742fba2a3983d8102f7516a3cdf3c46669f3cac0ed1f351", size = 25781343, upload-time = "2024-10-06T04:53:29.577Z" }, + { url = "https://files.pythonhosted.org/packages/e4/c1/0636bccf5a1a2c935952614b9d34d8d8aae078c9773a60efb5376702f499/av-12.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:5174e995772ebe33561980dca625f830aea8d39a4338728dedb41ae7dc2605af", size = 24669628, upload-time = "2024-07-21T04:00:58.643Z" }, + { url = "https://files.pythonhosted.org/packages/ef/7d/9126abdafe20fa73d2c19fd108450363253cfea283c350618cc1434f473c/av-12.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:028d8b40308536f740dace3efd0178eb96825b414897c9594fb74136532901cb", size = 19928928, upload-time = "2024-07-21T04:01:01.506Z" }, + { url = "https://files.pythonhosted.org/packages/27/75/c1b9e0aa4bd0d8b8311f366b6b38f6c6600d66baddfe2888accc7f76b1f5/av-12.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b030791ecc6185776d832d19ce196f61daf3e17e591a9bb6fd181280e1754138", size = 32793461, upload-time = "2024-07-21T04:01:04.62Z" }, + { url = "https://files.pythonhosted.org/packages/5a/06/1364c445f8a8ab4870f0f5c4530b496257ae09de7fa01b6108525abea8b9/av-12.3.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3703a35481fda5798a27bf6208c1ec3b61c18931625771fb3c9fd870539c7d7", size = 32217647, upload-time = "2024-07-21T04:01:07.549Z" }, + { url = "https://files.pythonhosted.org/packages/27/08/220d5a1ae7e7830d66d041c71e607c1f5df2e3598b12fb406b0d7c2defa7/av-12.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:32f3eef56b2df289db6105f9fe2ebc9a8134a8adbd62190daeb8e22c4ff47794", size = 34746451, upload-time = "2024-07-21T04:01:10.506Z" }, + { url = "https://files.pythonhosted.org/packages/96/67/9f1c444864d4f3e3773100b9ed20e670f80d5575b7a8fd53cca20de9d681/av-12.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:62d036ee8321d67190887012c3dbcd1ad83248603cc29ea75fbb75835b8d6e6e", size = 25977611, upload-time = "2024-07-21T04:01:13.709Z" }, ] [[package]] @@ -672,6 +672,14 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/43/e3/7d92a15f894aa0c9c4b49b8ee9ac9850d6e63b03c9c32c0367a13ae62209/mpmath-1.3.0-py3-none-any.whl", hash = "sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c", size = 536198, upload-time = "2023-03-07T16:47:09.197Z" }, ] +[[package]] +name = "msgq" +version = "0.1.0" +source = { git = "https://github.com/commaai/msgq.git?rev=fix_packages#32b2404f68eab3c9c0869777a055b272e1ebf0e5" } +dependencies = [ + { name = "numpy" }, +] + [[package]] name = "multidict" version = "6.7.1" @@ -736,6 +744,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/4a/90/b338326131ccb2aaa3c2c85d00f41822c0050139a4bfe723cfd95455bd2d/opencv_python_headless-4.13.0.92-cp37-abi3-win_amd64.whl", hash = "sha256:77a82fe35ddcec0f62c15f2ba8a12ecc2ed4207c17b0902c7a3151ae29f37fb6", size = 40070414, upload-time = "2026-02-05T07:02:26.448Z" }, ] +[[package]] +name = "opendbc" +version = "0.2.1" +source = { git = "https://github.com/commaai/opendbc.git?rev=fix_packages#66aff6a1f7a5cf3efbcd8a52d9ade3813c8b6486" } +dependencies = [ + { name = "crcmod-plus" }, + { name = "numpy" }, + { name = "pycapnp" }, + { name = "pycryptodome" }, + { name = "scons" }, + { name = "tqdm" }, +] + [[package]] name = "openpilot" version = "0.1.0" @@ -752,7 +773,10 @@ dependencies = [ { name = "jeepney" }, { name = "json-rpc" }, { name = "libusb1" }, + { name = "msgq" }, { name = "numpy" }, + { name = "opendbc" }, + { name = "pandacan" }, { name = "psutil" }, { name = "pyaudio" }, { name = "pycapnp" }, @@ -762,6 +786,7 @@ dependencies = [ { name = "pyzmq" }, { name = "qrcode" }, { name = "raylib" }, + { name = "rednose" }, { name = "requests" }, { name = "scons" }, { name = "sentry-sdk" }, @@ -770,6 +795,7 @@ dependencies = [ { name = "sounddevice" }, { name = "spidev", marker = "sys_platform == 'linux'" }, { name = "sympy" }, + { name = "teleoprtc" }, { name = "tqdm" }, { name = "websocket-client" }, { name = "xattr" }, @@ -825,8 +851,11 @@ requires-dist = [ { name = "matplotlib", marker = "extra == 'dev'" }, { name = "metadrive-simulator", marker = "platform_machine != 'aarch64' and extra == 'tools'", git = "https://github.com/commaai/metadrive.git?rev=minimal" }, { name = "mkdocs", marker = "extra == 'docs'" }, + { name = "msgq", git = "https://github.com/commaai/msgq.git?rev=fix_packages" }, { name = "numpy", specifier = ">=2.0" }, { name = "opencv-python-headless", marker = "extra == 'dev'" }, + { name = "opendbc", git = "https://github.com/commaai/opendbc.git?rev=fix_packages" }, + { name = "pandacan", git = "https://github.com/commaai/panda.git?rev=fix_packages" }, { name = "pre-commit-hooks", marker = "extra == 'testing'" }, { name = "psutil" }, { name = "pyaudio" }, @@ -843,6 +872,7 @@ requires-dist = [ { name = "pyzmq" }, { name = "qrcode" }, { name = "raylib", specifier = ">5.5.0.3" }, + { name = "rednose", git = "https://github.com/commaai/rednose.git?rev=fix_packages" }, { name = "requests" }, { name = "ruff", marker = "extra == 'testing'" }, { name = "scons" }, @@ -852,6 +882,7 @@ requires-dist = [ { name = "sounddevice" }, { name = "spidev", marker = "sys_platform == 'linux'" }, { name = "sympy" }, + { name = "teleoprtc", git = "https://github.com/commaai/teleoprtc.git?rev=389815b" }, { name = "tqdm" }, { name = "ty", marker = "extra == 'testing'" }, { name = "websocket-client" }, @@ -908,6 +939,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/11/5d/3744c6550dddf933785a37cdd4a9921fe13284e6d115b5a2637fe390f158/panda3d_simplepbr-0.13.1-py3-none-any.whl", hash = "sha256:cda41cb57cff035b851646956cfbdcc408bee42511dabd4f2d7bd4fbf48c57a9", size = 2457097, upload-time = "2025-03-30T16:57:39.729Z" }, ] +[[package]] +name = "pandacan" +version = "0.0.10" +source = { git = "https://github.com/commaai/panda.git?rev=fix_packages#8f19e23383b4cc8f38907546e0ba56afd223f819" } +dependencies = [ + { name = "libusb1" }, + { name = "opendbc" }, +] + [[package]] name = "pathspec" version = "1.0.4" @@ -1314,6 +1354,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/2c/66/a307e61c953ace906ba68ba1174ed8f1e90e68d5fc3e3af9fb7dc46d68d1/raylib-5.5.0.4-cp312-cp312-win_amd64.whl", hash = "sha256:553043a050a31f2ef072f26d3a70373f838a04733f7c5b26a4e9ee3f8caf06ec", size = 1708354, upload-time = "2025-12-11T15:27:45.979Z" }, ] +[[package]] +name = "rednose" +version = "0.1.0" +source = { git = "https://github.com/commaai/rednose.git?rev=fix_packages#0ffaec2be5f6b31c13716a6298e05dab0fe6b437" } +dependencies = [ + { name = "cffi" }, + { name = "cython" }, + { name = "numpy" }, + { name = "scons" }, + { name = "sympy" }, +] + [[package]] name = "requests" version = "2.32.5" @@ -1464,6 +1516,17 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/a2/09/77d55d46fd61b4a135c444fc97158ef34a095e5681d0a6c10b75bf356191/sympy-1.14.0-py3-none-any.whl", hash = "sha256:e091cc3e99d2141a0ba2847328f5479b05d94a6635cb96148ccb3f34671bd8f5", size = 6299353, upload-time = "2025-04-27T18:04:59.103Z" }, ] +[[package]] +name = "teleoprtc" +version = "1.0.1" +source = { git = "https://github.com/commaai/teleoprtc.git?rev=389815b#389815b8ca5302ce7c1504b7841d4eb61a8cd51b" } +dependencies = [ + { name = "aiohttp" }, + { name = "aiortc" }, + { name = "av" }, + { name = "numpy" }, +] + [[package]] name = "tqdm" version = "4.67.3"