From 365abba2e2229053d6c3daa17ac19fd063608f8f Mon Sep 17 00:00:00 2001 From: Harald Schafer Date: Wed, 26 Feb 2020 10:39:57 -0800 Subject: [PATCH 1/5] rigour --- log.capnp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/log.capnp b/log.capnp index 46971d81a309e9..a36ecfbc4a7c5c 100644 --- a/log.capnp +++ b/log.capnp @@ -790,6 +790,32 @@ struct PathPlan { } } +struct LiveLocationKalman { + + positionECEF @0 : Measurement; + positionGeodetic @1 : Measurement; + velocityECEF @2 : Measurement; + velocityNED @3 : Measurement; + velocityDevice @4 : Measurement; + accelerationDevice @5: Measurement; + + + # These angles are all eulers and roll, pitch, yaw + # orientationECEF transforms to rot matrix: ecef_from_device + orientationECEF @6 : Measurement; + orientationNED @7 : Measurement; + angularVelocityDevice @8 : Measurement; + + gpsWeek @16 :Int32; + gpsTimeOfWeek @17 :Float64; + + struct Measurement { + val @0 : List(float64); + std @1 : List(float64); + + } +} + struct LiveLocationData { status @0 :UInt8; From 97373f9d249b7a0b9de73d612239d4e7343d98a9 Mon Sep 17 00:00:00 2001 From: Harald Schafer Date: Wed, 26 Feb 2020 10:41:49 -0800 Subject: [PATCH 2/5] or rigor in american --- log.capnp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/log.capnp b/log.capnp index a36ecfbc4a7c5c..73c90502c107b7 100644 --- a/log.capnp +++ b/log.capnp @@ -806,8 +806,8 @@ struct LiveLocationKalman { orientationNED @7 : Measurement; angularVelocityDevice @8 : Measurement; - gpsWeek @16 :Int32; - gpsTimeOfWeek @17 :Float64; + gpsWeek @9 :Int32; + gpsTimeOfWeek @10 :Float64; struct Measurement { val @0 : List(float64); From 166418c00ad800b13c147397e386f8938d28ddca Mon Sep 17 00:00:00 2001 From: Harald Schafer Date: Wed, 26 Feb 2020 11:07:28 -0800 Subject: [PATCH 3/5] improvements --- log.capnp | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/log.capnp b/log.capnp index 73c90502c107b7..302bb54b1f3ab7 100644 --- a/log.capnp +++ b/log.capnp @@ -792,6 +792,9 @@ struct PathPlan { struct LiveLocationKalman { + # More info on reference frames: + # https://github.com/commaai/openpilot/tree/master/common/transformations + positionECEF @0 : Measurement; positionGeodetic @1 : Measurement; velocityECEF @2 : Measurement; @@ -805,14 +808,30 @@ struct LiveLocationKalman { orientationECEF @6 : Measurement; orientationNED @7 : Measurement; angularVelocityDevice @8 : Measurement; - - gpsWeek @9 :Int32; - gpsTimeOfWeek @10 :Float64; + + # orientationNEDCalibrated transforms to rot matrix: NED_from_calibrated + orientationNEDCalibrated @9 : Measurement; + + # Calibrated frame is simply device frame + # aligned with the vehicle + velocityCalibrated @10 : Measurement; + accelerationCalibrated @11 : Measurement; + angularVelocityCalibrated @12 : Measurement; + + gpsWeek @13 :Int32; + gpsTimeOfWeek @14 :Float64; + status @15 :Status; + + enum Status { + uninitialized @0; + uncalibrated @1; + valid @2; + } struct Measurement { - val @0 : List(float64); - std @1 : List(float64); - + val @0 : List(Float64); + std @1 : List(Float64); + valid @2 : Bool; } } From b03c2c52a1eb60fe4d04ca9a54b97532e0681e5b Mon Sep 17 00:00:00 2001 From: Harald Schafer Date: Wed, 26 Feb 2020 13:27:37 -0800 Subject: [PATCH 4/5] already exists --- log.capnp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log.capnp b/log.capnp index 302bb54b1f3ab7..0d4dd5ab5dfe86 100644 --- a/log.capnp +++ b/log.capnp @@ -1978,7 +1978,7 @@ struct Event { gpsLocationExternal @48 :GpsLocationData; location @49 :LiveLocationData; uiNavigationEvent @50 :UiNavigationEvent; - liveLocationKalman @51 :LiveLocationData; + liveLocationKalman @51 :LiveLocationKalman; testJoystick @52 :Joystick; orbOdometry @53 :OrbOdometry; orbFeatures @54 :OrbFeatures; From ab07f229d5720f7f1195168613bf8de956e3a5d1 Mon Sep 17 00:00:00 2001 From: Harald Schafer Date: Wed, 26 Feb 2020 13:30:31 -0800 Subject: [PATCH 5/5] deprecate --- log.capnp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/log.capnp b/log.capnp index 0d4dd5ab5dfe86..225085861022b6 100644 --- a/log.capnp +++ b/log.capnp @@ -1978,7 +1978,7 @@ struct Event { gpsLocationExternal @48 :GpsLocationData; location @49 :LiveLocationData; uiNavigationEvent @50 :UiNavigationEvent; - liveLocationKalman @51 :LiveLocationKalman; + liveLocationKalmanDEPRECATED @51 :LiveLocationData; testJoystick @52 :Joystick; orbOdometry @53 :OrbOdometry; orbFeatures @54 :OrbFeatures; @@ -1998,5 +1998,6 @@ struct Event { carParams @69: Car.CarParams; frontFrame @70: FrameData; dMonitoringState @71: DMonitoringState; + liveLocationKalman @72 :LiveLocationKalman; } }