torqued: add DEBUG flag (#36161)

Add a debug flag to torqued
This commit is contained in:
Kacper Rączy
2025-09-15 23:04:33 +02:00
committed by GitHub
parent 96c00271e3
commit 889ce4c4fb
+4 -1
View File
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
import os
import numpy as np
from collections import deque, defaultdict
@@ -242,6 +243,8 @@ class TorqueEstimator(ParameterEstimator):
def main(demo=False):
config_realtime_process([0, 1, 2, 3], 5)
DEBUG = bool(int(os.getenv("DEBUG", "0")))
pm = messaging.PubMaster(['liveTorqueParameters'])
sm = messaging.SubMaster(['carControl', 'carOutput', 'carState', 'liveCalibration', 'livePose', 'liveDelay'], poll='livePose')
@@ -258,7 +261,7 @@ def main(demo=False):
# 4Hz driven by livePose
if sm.frame % 5 == 0:
pm.send('liveTorqueParameters', estimator.get_msg(valid=sm.all_checks()))
pm.send('liveTorqueParameters', estimator.get_msg(valid=sm.all_checks(), with_points=DEBUG))
# Cache points every 60 seconds while onroad
if sm.frame % 240 == 0: