Skip to content
Snippets Groups Projects
Commit 20ac18c7 authored by aastorg2's avatar aastorg2
Browse files

Merge branch 'main' of gitlab.engr.illinois.edu:chsieh16/cs598mp-fall2021-proj into main

parents 1a15c866 c7f3c569
No related branches found
No related tags found
No related merge requests found
......@@ -108,14 +108,9 @@ class GEMStanleyGurobiTeacher(GurobiTeacherBase):
super().__init__(name=name,
state_dim=3, perc_dim=2, ctrl_dim=1, norm_ord=norm_ord)
def is_positive_example(self, ex) -> Optional[bool]:
def is_positive_example(self, ex) -> bool:
assert len(ex) == self.state_dim + self.perc_dim
state_arr = np.asfarray(ex[0:self.state_dim])
if not (np.all(self._old_state.lb <= state_arr) and
np.all(state_arr <= self._old_state.ub)):
return None
def g(cte, phi):
error = phi + np.arctan(K_P*cte/FORWARD_VEL)
steer = np.clip(error, -STEERING_LIM, STEERING_LIM)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment