Add angular rates carcontroller packet (#23980)

* Controlsd: give carcontroller angular rates

* Update cereal

* Needs to be list

* Update refs
pull/23745/head
HaraldSchafer 2022-03-16 21:12:11 -07:00 committed by GitHub
parent 3a7edeea32
commit dcece099ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 5 deletions

2
cereal

@ -1 +1 @@
Subproject commit 64b6014193a69fe2e2b3b7a17f9e228162081ddf
Subproject commit 85406f66760b30700c27aace228f5e480f3a5bbe

View File

@ -572,10 +572,14 @@ class Controls:
def publish_logs(self, CS, start_time, CC, lac_log):
"""Send actuators and hud commands to the car, send controlsstate and MPC logging"""
orientation_value = self.sm['liveLocationKalman'].orientationNED.value
# Orientation and angle rates can be useful for carcontroller
# Only calibrated (car) frame is relevant for the carcontroller
orientation_value = list(self.sm['liveLocationKalman'].calibratedOrientationNED.value)
if len(orientation_value) > 2:
CC.roll = orientation_value[0]
CC.pitch = orientation_value[1]
CC.orientationNED = orientation_value
angular_rate_value = list(self.sm['liveLocationKalman'].angularVelocityCalibrated.value)
if len(angular_rate_value) > 2:
CC.angularVelocity = angular_rate_value
CC.cruiseControl.cancel = CS.cruiseState.enabled and (not self.enabled or not self.CP.pcmCruise)
if self.joystick_mode and self.sm.rcv_frame['testJoystick'] > 0 and self.sm['testJoystick'].buttons[0]:

View File

@ -1 +1 @@
927918307b45657df0a4ac0255c3e8e3dc62d7cd
61bac237e228da19e59d456c883f99a92172d217