Skip to content

Commit

Permalink
Made u_desired an argument instead of yaml parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Andeshog committed Apr 15, 2024
1 parent 6aa786d commit 739f505
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
lambda_val: 0.15 # Curvature constant
path_generator_order: 1 # Differentiability order
dt: 0.1 # Time step
u_desired: 0.5 # Desired speed
mu: 0.03 # Tuning parameter
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ def __init__(self):
parameters=[
('hybridpath_guidance.lambda_val', 0.15),
('hybridpath_guidance.path_generator_order', 1),
('hybridpath_guidance.time_to_max_speed', 10.0),
('hybridpath_guidance.dt', 0.1),
('hybridpath_guidance.u_desired', 0.5),
('hybridpath_guidance.mu', 0.03)
])

Expand All @@ -32,7 +30,6 @@ def __init__(self):
self.lambda_val = self.get_parameter('hybridpath_guidance.lambda_val').get_parameter_value().double_value
self.path_generator_order = self.get_parameter('hybridpath_guidance.path_generator_order').get_parameter_value().integer_value
self.dt = self.get_parameter('hybridpath_guidance.dt').get_parameter_value().double_value
self.u_desired = self.get_parameter('hybridpath_guidance.u_desired').get_parameter_value().double_value
self.mu = self.get_parameter('hybridpath_guidance.mu').get_parameter_value().double_value
self.eta = np.zeros(3)

Expand All @@ -53,6 +50,7 @@ def waypoint_callback(self, request, response):
self.waiting_message_printed = False # Reset this flag to handle multiple waypoint sets
self.s = 0
signals = HybridPathSignals(self.path, self.s)
self.u_desired = signals.u_desired
self.w = signals.get_w(self.mu, self.eta)
response.success = True
return response
Expand Down

0 comments on commit 739f505

Please sign in to comment.