コード例 #1
0
 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 = []
コード例 #2
0
ファイル: odeRTB.py プロジェクト: jacky4566/ykpilot
    def __init__(self, gui):
        self.gui = gui

        self.vDHistory = []
        self.bPHistory = []

        self.th = TimeHelper()

        self.w = World()
        self.w.setGravity((0.0, 0.0, 0.0))
        self.b = Body(self.w)
        self.b.setPosition((0.0, 0.0, 0.0))

        self.lt = self.th.getTimestamp(microsec=True)
        self.lastVal = None
コード例 #3
0
    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