Add robot configuration to the state

This commit is contained in:
Michel Breyer
2021-09-12 14:40:17 +02:00
parent 027a925693
commit 8ba015b1ef
4 changed files with 15 additions and 13 deletions

View File

@@ -4,9 +4,9 @@ from .policy import SingleViewPolicy, MultiViewPolicy, compute_error
class InitialView(SingleViewPolicy):
def update(self, img, pose):
self.x_d = pose
super().update(img, pose)
def update(self, img, x, q):
self.x_d = x
super().update(img, x, q)
class TopView(SingleViewPolicy):
@@ -22,8 +22,8 @@ class TopTrajectory(MultiViewPolicy):
self.x_d = self.view_sphere.get_view(0.0, 0.0)
self.done = False if self.is_feasible(self.x_d) else True
def update(self, img, x):
self.integrate(img, x)
def update(self, img, x, q):
self.integrate(img, x, q)
linear, _ = compute_error(self.x_d, x)
if np.linalg.norm(linear) < 0.02:
self.done = True