def moveDisplay(self):
        tau = 1.0 if self.duration<=0 else float(self.t) / self.duration
        xyz = tau * array(self.ball) + (1-tau) * array(self.prec)
        robot.device.viewer.updateElementConfig('zmp',vectorToTuple(xyz)+(0,0,0))

        self.t += 1
        if self.t>self.duration and self.duration>0:
            attime.stop(self.f)
        self.xyz= xyz
Exemple #2
0
    def moveDisplay(self):
        tau = 1.0 if self.duration <= 0 else float(self.t) / self.duration
        xyz = tau * array(self.ball) + (1 - tau) * array(self.prec)
        robot.viewer.updateElementConfig('zmp', vectorToTuple(xyz) + (0, 0, 0))

        self.t += 1
        if self.t > self.duration and self.duration > 0:
            attime.stop(self.f)
        self.xyz = xyz