mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-12 11:13:46 +08:00
FrogPilot base
This commit is contained in:
@@ -374,6 +374,8 @@ def main():
|
||||
lag, valid_blocks = initial_lag_params
|
||||
lag_learner.reset(lag, valid_blocks)
|
||||
|
||||
# FrogPilot variables
|
||||
|
||||
while True:
|
||||
sm.update()
|
||||
if sm.all_checks():
|
||||
@@ -392,3 +394,5 @@ def main():
|
||||
|
||||
if sm.frame % 1200 == 0: # cache every 60 seconds
|
||||
params.put_nonblocking("LiveDelay", lag_msg_dat)
|
||||
|
||||
# FrogPilot variables
|
||||
|
||||
@@ -283,6 +283,8 @@ def main():
|
||||
steer_ratio, stiffness_factor, angle_offset_deg, pInitial = retrieve_initial_vehicle_params(params, CP, REPLAY, DEBUG)
|
||||
learner = VehicleParamsLearner(CP, steer_ratio, stiffness_factor, np.radians(angle_offset_deg), pInitial)
|
||||
|
||||
# FrogPilot variables
|
||||
|
||||
while True:
|
||||
sm.update()
|
||||
if sm.all_checks():
|
||||
@@ -300,6 +302,8 @@ def main():
|
||||
|
||||
pm.send('liveParameters', msg_dat)
|
||||
|
||||
# FrogPilot variables
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -251,6 +251,8 @@ def main(demo=False):
|
||||
params = Params()
|
||||
estimator = TorqueEstimator(messaging.log_from_bytes(params.get("CarParams", block=True), car.CarParams))
|
||||
|
||||
# FrogPilot variables
|
||||
|
||||
while True:
|
||||
sm.update()
|
||||
if sm.all_checks():
|
||||
@@ -268,6 +270,8 @@ def main(demo=False):
|
||||
msg = estimator.get_msg(valid=sm.all_checks(), with_points=True)
|
||||
params.put_nonblocking("LiveTorqueParameters", msg.to_bytes())
|
||||
|
||||
# FrogPilot variables
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import argparse
|
||||
|
||||
Reference in New Issue
Block a user