Skip to content

Commit

Permalink
fixed for python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulgoel873 committed Jan 5, 2025
1 parent 354330b commit fa64058
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions rb_ws/src/buggy/buggy/controller/controller_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ def __init__(self):
start_index = self.cur_traj.get_index_from_distance(start_dist)

self.declare_parameter("controller_name", "stanley")
match (self.get_parameter("controller_name").value):
case "stanley":
self.controller = StanleyController(start_index = start_index, namespace = self.get_namespace(), node=self) #IMPORT STANLEY
case _:
self.get_logger().error("Invalid Controller Name!")
raise Exception("Invalid Controller Argument")

controller_name = self.get_parameter("controller_name").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
else:
self.get_logger().error("Invalid Controller Name: " + controller_name.lower())
raise Exception("Invalid Controller Argument")

# Publishers
self.init_check_publisher = self.create_publisher(Bool,
Expand Down

0 comments on commit fa64058

Please sign in to comment.