def __init__(self): self.geometries = [] self.world = World() self.world.setGravity((0, -9.8, 0)) self.world.setERP(0.4) self.world.setCFM(1E-5) self.space = Space() self.contact_group = JointGroup() self.update_callbacks = []
def __init__(self, Stable, wm, quad_pos=(0, 0, 0)): self.world = World() self.world.setGravity((0, -9.81, 0)) self.space = Space() self.contactgroup = JointGroup() self.wm = wm # draw floor self.floor = GeomPlane(self.space, (0, 1, 0), -1) box(pos=(0, -1, 0), width=2, height=0.01, length=2) # Draw Quad self.quad = Quad(self.world, self.space, pos=quad_pos) # Init Algorithm self.stable = Stable(self.quad) # stop autoscale of the camera scene.autoscale = False