def RotateAxis(self, theta, axis): '''Rotates the component an angle theta degrees around axis in global coordinates.''' MiroAPI.rotateBody(self.body, rotAngle=theta, rotAxis=axis) for name, linkp in self.linkpoints.items(): linkp_new = MiroAPI.rotateVector(linkp, rotAngle=theta, rotAxis=axis) self.linkpoints.update({ name: MiroAPI.rotateVector(linkp, rotAngle=theta, rotAxis=axis) }) for name, linkd in self.linkdirs.items(): linkd_new = MiroAPI.rotateVector(linkd, rotAngle=theta, rotAxis=axis) self.linkdirs.update({ name: MiroAPI.rotateVector(linkd, rotAngle=theta, rotAxis=axis) })
def Set_Ready(self): MiroAPI.rotateBody(self.bulb, rotAngle=-180, rotAxis=self.bulb_pos)
def Set_Idle(self): MiroAPI.rotateBody(self.bulb, rotAngle=180, rotAxis=self.bulb_pos)