forked from Telos4/RoboRally
added condition if marker cannot be found
This commit is contained in:
parent
b54c2d565c
commit
2a5e0e8ae7
|
@ -236,8 +236,9 @@ class OpenLoopSolver:
|
||||||
for o in obstacles:
|
for o in obstacles:
|
||||||
p = obstacles[o].pos
|
p = obstacles[o].pos
|
||||||
r = obstacles[o].radius
|
r = obstacles[o].radius
|
||||||
for k in range(1,self.N):
|
if p is not None:
|
||||||
self.opti.subject_to((self.X[0,k]-p[0])**2 + (self.X[1,k]-p[1])**2 + self.slack > r**2)
|
for k in range(1,self.N):
|
||||||
|
self.opti.subject_to((self.X[0,k]-p[0])**2 + (self.X[1,k]-p[1])**2 + self.slack > r**2)
|
||||||
# pass
|
# pass
|
||||||
posx = self.X[0, :]
|
posx = self.X[0, :]
|
||||||
posy = self.X[1, :]
|
posy = self.X[1, :]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user