Skip to content

Commit

Permalink
fix bug in FRS
Browse files Browse the repository at this point in the history
  • Loading branch information
zzx9636 committed Mar 20, 2023
1 parent b194c8c commit 1e3ce3f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ROS_Core/src/Labs/Lab2/scripts/frs.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ def __init__(self, map_file = None):
self.lanelet_map = pickle.load(f)
self.lanelet_map.build_graph(0)

def get(self, state: Odometry, t_list, K_vx, K_y, K_vy, dx, dy, v_ref = None, allow_lane_change=True):
def get(self, state: Odometry, t_list, K_vx, K_vy, K_y, dx, dy, v_ref = None, allow_lane_change=True):
'''
Get the zonotope reachable set for given time steps in cartesian coordinates
Parameters:
t_list: [N,] np.ndarray, time to calculate the reachable set [s]
Note: this is the absolute wall time in your ROS system
K_vx: float, gain for longitudinal velocity
K_y: float, gain for lateral state
K_vy: float, gain for lateral velocity
K_y: float, gain for lateral state
v_ref: float, reference velocity
dx: float, disturbance in x direction [m/s^2]
dy: float, disturbance in y direction [m/s^2]
Expand Down Expand Up @@ -178,7 +178,7 @@ def get(self, state: Odometry, t_list, K_vx, K_y, K_vy, dx, dy, v_ref = None, al

for route in reachable_routes:
reachable_sets = []
for zonotope in zonotopes[1:]:
for zonotope in zonotopes:
# Reachable set is rectangular
x_min = np.min(np.array(zonotope.verts())[:,0])-0.1
x_max = np.max(np.array(zonotope.verts())[:,0])+0.3
Expand Down

0 comments on commit 1e3ce3f

Please sign in to comment.