From 41b5f1d44fdf45fad4eb0bac1edda2277d0cd605 Mon Sep 17 00:00:00 2001 From: ShisatoYano Date: Mon, 24 Jun 2024 14:43:39 +0000 Subject: [PATCH] define function to update control command --- src/components/control/pid/pid_controller.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/control/pid/pid_controller.py b/src/components/control/pid/pid_controller.py index 4bb661c..9d737b2 100644 --- a/src/components/control/pid/pid_controller.py +++ b/src/components/control/pid/pid_controller.py @@ -18,3 +18,13 @@ def __init__(self, spec, course=None): """ self.WHEEL_BASE_M = spec.wheel_base_m + + self.course = course + + def update(self, state): + """ + Function to update data for path tracking + state: Vehicle's state object + """ + + if not self.course: return