Skip to content

Commit

Permalink
controller debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulgoel873 committed Jan 9, 2025
1 parent a72a78a commit 2db3439
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rb_ws/src/buggy/scripts/controller/controller_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion rb_ws/src/buggy/scripts/controller/stanley_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2db3439

Please sign in to comment.