From 7add5c49efb1e804473ac2cb7138c69ea745c0ec Mon Sep 17 00:00:00 2001 From: Vehicle Researcher Date: Wed, 8 Apr 2020 16:22:32 -0700 Subject: [PATCH] Squashed 'cereal/' changes from 651199064..93ccbcb7a 93ccbcb7a UiLayoutState: add mockEngaged for onboarding 9dbbb5451 UiLayoutState: add 'none' app c820f83d9 Add offroadLayout service e370f7952 Add the laneChangeBlocked Event (#40) 35040fe6b Update service documentation (#39) 8f13dfcaf Additional car params auto-detection in support of VW (#38) 22986de4a add speedTooHigh alert f515e4db2 Add invalid lkas setting alert 590876205 gnustl_shared is only for android b0c746b1e solve by renaming event name instead of service df82a53c1 the service is called androidLogEntry git-subtree-dir: cereal git-subtree-split: 93ccbcb7afb1736ba7b8372567ff73b811fd3b40 --- car.capnp | 16 +++++++++++++--- log.capnp | 12 +++++++----- messaging/messaging_pyx_setup.py | 3 ++- service_list.yaml | 19 ++++++++++++++++--- 4 files changed, 38 insertions(+), 12 deletions(-) diff --git a/car.capnp b/car.capnp index 695f4a91bc47fd..00a7cf545053b7 100644 --- a/car.capnp +++ b/car.capnp @@ -91,6 +91,9 @@ struct CarEvent @0x9b1657f34caf3ad3 { carUnrecognized @66; radarCommIssue @67; driverMonitorLowAcc @68; + invalidLkasSetting @69; + speedTooHigh @70; + laneChangeBlocked @71; } } @@ -151,7 +154,7 @@ struct CarState { # which packets this state came from canMonoTimes @12: List(UInt64); - + # blindspot sensors leftBlindspot @33 :Bool; # Is there something blocking the left lane change rightBlindspot @34 :Bool; # Is there something blocking the right lane change @@ -379,6 +382,7 @@ struct CarParams { radarTimeStep @45: Float32 = 0.05; # time delta between radar updates, 20Hz is very standard communityFeature @46: Bool; # true if a community maintained feature is detected fingerprintSource @49: FingerprintSource; + networkLocation @50 :NetworkLocation; # Where Panda/C2 is integrated into the car's CAN network struct LateralParams { torqueBP @0 :List(Int32); @@ -456,8 +460,9 @@ struct CarParams { enum TransmissionType { unknown @0; - automatic @1; - manual @2; + automatic @1; # Traditional auto, including DSG + manual @2; # True "stick shift" only + direct @3; # Electric vehicle or other direct drive } struct CarFw { @@ -496,4 +501,9 @@ struct CarParams { fw @1; fixed @2; } + + enum NetworkLocation { + fwdCamera @0; # Standard/default integration at LKAS camera + gateway @1; # Integration at vehicle's CAN gateway + } } diff --git a/log.capnp b/log.capnp index e825b00861d9e1..f213ccdb25be94 100644 --- a/log.capnp +++ b/log.capnp @@ -805,7 +805,7 @@ struct PathPlan { struct LiveLocationKalman { - # More info on reference frames: + # More info on reference frames: # https://github.com/commaai/openpilot/tree/master/common/transformations positionECEF @0 : Measurement; @@ -821,10 +821,10 @@ struct LiveLocationKalman { orientationECEF @6 : Measurement; orientationNED @7 : Measurement; angularVelocityDevice @8 : Measurement; - + # orientationNEDCalibrated transforms to rot matrix: NED_from_calibrated orientationNEDCalibrated @9 : Measurement; - + # Calibrated frame is simply device frame # aligned with the vehicle velocityCalibrated @10 : Measurement; @@ -835,7 +835,7 @@ struct LiveLocationKalman { gpsTimeOfWeek @14 :Float64; status @15 :Status; unixTimestampMillis @16 :Int64; - + enum Status { uninitialized @0; uncalibrated @1; @@ -1775,12 +1775,14 @@ struct UiLayoutState { activeApp @0 :App; sidebarCollapsed @1 :Bool; mapEnabled @2 :Bool; + mockEngaged @3 :Bool; enum App { home @0; music @1; nav @2; settings @3; + none @4; } } @@ -1971,7 +1973,7 @@ struct Event { sendcan @17 :List(CanData); logMessage @18 :Text; liveCalibration @19 :LiveCalibrationData; - androidLogEntry @20 :AndroidLogEntry; + androidLog @20 :AndroidLogEntry; gpsLocation @21 :GpsLocationData; carState @22 :Car.CarState; carControl @23 :Car.CarControl; diff --git a/messaging/messaging_pyx_setup.py b/messaging/messaging_pyx_setup.py index a763d89f862586..f5962d0c2b2310 100644 --- a/messaging/messaging_pyx_setup.py +++ b/messaging/messaging_pyx_setup.py @@ -34,7 +34,8 @@ def get_ext_filename(self, ext_name): libraries = ['zmq'] ARCH = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip() # pylint: disable=unexpected-keyword-arg -if ARCH == "aarch64": +if ARCH == "aarch64" and os.path.isdir("/system"): + # android extra_compile_args += ["-Wno-deprecated-register"] libraries += ['gnustl_shared'] diff --git a/service_list.yaml b/service_list.yaml index 960cd44f5587db..e56ed57abe22c6 100644 --- a/service_list.yaml +++ b/service_list.yaml @@ -76,6 +76,7 @@ carEvents: [8070, true, 1., 1] carParams: [8071, true, 0.02, 1] frontFrame: [8072, true, 10.] dMonitoringState: [8073, true, 5., 1] +offroadLayout: [8074, false, 0.] testModel: [8040, false, 0.] testLiveLocation: [8045, false, 0.] @@ -103,19 +104,31 @@ testJoystick: [8056, false, 0.] # gpsd -- publishes EON's gps # publishes: gpsNMEA -# visiond -- talks to the cameras, runs the model, saves the videos -# publishes: frame, model, driverMonitoring, cameraOdometry, thumbnail +# camerad -- publishes camera frames +# publishes: frame, frontFrame, thumbnail +# subscribes: driverState + +# dmonitoringmodeld -- runs face detection on camera frames +# publishes: driverState # **** stateful data transformers **** +# modeld -- runs & publishes the model +# publishes: model, cameraOdometry +# subscribes: liveCalibration, pathPlan + # plannerd -- decides where to drive the car # subscribes: carState, model, radarState, controlsState, liveParameters # publishes: plan, pathPlan, liveMpc, liveLongitudinalMpc # controlsd -- drives the car by sending CAN messages to panda -# subscribes: can, thermal, health, plan, pathPlan, driverMonitoring, liveCalibration +# subscribes: can, thermal, health, plan, pathPlan, dMonitoringState, liveCalibration, model # publishes: carState, carControl, sendcan, controlsState, carEvents, carParams +# dmonitoringd -- processes driver monitoring data and publishes driver awareness +# subscribes: driverState, liveCalibration, carState, model, gpsLocation +# publishes: dMonitoringState + # radard -- processes the radar and vision data # subscribes: can, controlsState, model, liveParameters # publishes: radarState, liveTracks