From 2db3439835a72d464f08470b43f453e67532dfee Mon Sep 17 00:00:00 2001 From: Mehul Goel Date: Wed, 8 Jan 2025 19:48:53 -0800 Subject: [PATCH] controller debugging --- rb_ws/src/buggy/scripts/controller/controller_node.py | 4 ++-- rb_ws/src/buggy/scripts/controller/stanley_controller.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rb_ws/src/buggy/scripts/controller/controller_node.py b/rb_ws/src/buggy/scripts/controller/controller_node.py index cad007e..7feb9fb 100755 --- a/rb_ws/src/buggy/scripts/controller/controller_node.py +++ b/rb_ws/src/buggy/scripts/controller/controller_node.py @@ -40,9 +40,9 @@ def __init__(self): start_index = self.cur_traj.get_index_from_distance(start_dist) - self.declare_parameter("controller_name", "stanley") + self.declare_parameter("controller", "stanley") - controller_name = self.get_parameter("controller_name").value + controller_name = self.get_parameter("controller").value print(controller_name.lower) if (controller_name.lower() == "stanley"): self.controller = StanleyController(start_index = start_index, namespace = self.get_namespace(), node=self) #IMPORT STANLEY diff --git a/rb_ws/src/buggy/scripts/controller/stanley_controller.py b/rb_ws/src/buggy/scripts/controller/stanley_controller.py index 4c5b10f..b5378ec 100755 --- a/rb_ws/src/buggy/scripts/controller/stanley_controller.py +++ b/rb_ws/src/buggy/scripts/controller/stanley_controller.py @@ -48,7 +48,7 @@ def compute_control(self, state_msg : Odometry, trajectory : Trajectory): float (desired steering angle) """ if self.current_traj_index >= trajectory.get_num_points() - 1: - self.node.get_logger.error("[Stanley]: Ran out of path to follow!") + self.node.get_logger().error("[Stanley]: Ran out of path to follow!") raise Exception("[Stanley]: Ran out of path to follow!") current_rospose = state_msg.pose.pose