def initGeneralApplication(self):
     from dynamic_graph.sot.application.velocity.precomputed_meta_tasks import initialize
     self.solver = initialize(self.robot)
Beispiel #2
0
robot.dynamic.acceleration.value = robot.dimension * (0., )

robot.dynamic.ffposition.unplug()
robot.dynamic.ffvelocity.unplug()
robot.dynamic.ffacceleration.unplug()

robot.dynamic.setProperty('ComputeBackwardDynamics', 'true')
robot.dynamic.setProperty('ComputeAccelerationCoM', 'true')

robot.device.control.unplug()

# ------------------------------------------------------------------------------
# --- SOLVER ----------------------------------------------------------------
# ------------------------------------------------------------------------------

solver = initialize(robot)

# ------------------------------------------------------------------------------
# --- MAIN LOOP ----------------------------------------------------------------
# ------------------------------------------------------------------------------


def inc():
    robot.device.increment(robot.timeStep)
    attime.run(robot.device.control.time)
    updateComDisplay(robot.device, robot.dynamic.com)

    if state >= 3 and state <= 21:
        updateToolDisplay(robot.mTasks['screw'],
                          linalg.inv(TwoHandToolToScrewMatrix), robot.device)
    """
 def initGeneralApplication(self):
     self.solver = initialize(self.robot)