Add robot configuration to the state
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user