def update_polygon(self):
     self.handle = None
     try:
         vertices = self.stance.compute_zmp_support_area([0, 0, self.z])
         self.handle = draw_polygon(
             [(x[0], x[1], self.z) for x in vertices],
             normal=[0, 0, 1], color=(0.0, 0.0, 0.5, 0.5))
     except Exception as e:
         print("SupportAreaDrawer: {}".format(e))
Exemple #2
0
 def __init__(self, contact, stiffness=2000.):
     super(SoftContact, self).__init__()
     x, y, z = contact.x, contact.y, contact.z
     polygon = [(x + 0.5, y, z - 0.5), (x + 0.5, y, z + 0.5),
                (x - 0.5, y, z + 0.5), (x - 0.5, y, z - 0.5)]
     self.contact = contact
     self.handle = draw_polygon(polygon, [0, 1, 0], color='k')
     self.init_y = y + 0.01
     self.stiffness = stiffness
 def update_polygon(self):
     self.handle = None
     try:
         vertices = self.stance.compute_static_equilibrium_polygon(
             method=self.method)
         self.handle = draw_polygon(
             [(x[0], x[1], self.z) for x in vertices],
             normal=[0, 0, 1], color=self.color)
     except Exception as e:
         print("SupportPolygonDrawer: {}".format(e))
Exemple #4
0
 def update_handle(self):
     self.handle = None
     try:
         self.vertices = self.stance.compute_static_equilibrium_polygon(
             method=self.method)
         self.handle = draw_polygon([(x[0], x[1], self.height)
                                     for x in self.vertices],
                                    normal=[0, 0, 1],
                                    color='g')
     except Exception as e:
         print("CoMPolygonDrawer: {}".format(e))
Exemple #5
0
 def update_polygon(self):
     self.handle = None
     try:
         vertices = compute_local_actuation_dependent_polygon(
             self.robot, self.stance)
         self.handle = draw_polygon([(x[0], x[1], self.height)
                                     for x in vertices],
                                    normal=[0, 0, 1],
                                    color='m')
     except Exception as e:
         print("ActuationDependentPolygonDrawer: {}".format(e))