log mpc em manobra

This commit is contained in:
Diego Freitas 2026-09-23 09:02:03 -03:00
parent db10742954
commit 60c7468d55
1 changed files with 1 additions and 1 deletions

View File

@ -4327,7 +4327,7 @@ class ControladorMPC:
comando = self._processar_mpc_receding(contexto, comando_anterior)
t_exec = max((now() - self.ultima_atualizacao), 1e-3)
if comando['erro']:
if comando['erro'] or contexto.get("Carro", {}).get("Status", StatusCarroMapa.Indefinido.value) == StatusCarroMapa.Manobrando.value:
mostrar_log(f"🧭 Direcional MPC | Latencia: {comando['latencia']} | Parada: {comando['parada_necessaria']} | Movimento: {TipoMovimentoDirecional(comando['tipo']).name} | Ângulo: {comando['angulo']}° | CT: {comando['candidatos_testados']} ({len(comando['debug_custo'])}) | Horizonte: {len(comando['simulacao'])} | dt: {dt_raw:.2f} s | freq = {(1.0 / dt_raw):.2f} Hz | t_exec: {t_exec:.2} s | f_exec: {(1.0 / t_exec):.2f} Hz")
return comando