Exemplo n.º 1
0
 def goOffPose(self):
     returnvalue = self.stub.goOffPose(nxtmsg.Empty()).value
     if returnvalue == nxtmsg.Status.ERROR:
         print("Something went wrong with the server!! Try again!")
         raise Exception()
     else:
         print("The robot is moved to the off pose.")
Exemplo n.º 2
0
 def servoOff(self):
     returnvalue = self.stub.servoOff(nxtmsg.Empty()).value
     if returnvalue == nxtmsg.Status.ERROR:
         print("Something went wrong with the server!! Try again!")
         raise Exception()
     else:
         print("Servos are turned off.")
Exemplo n.º 3
0
 def ejectHandToolLft(self):
     returnvalue = self.stub.ejectHandToolLft(nxtmsg.Empty()).value
     if returnvalue == nxtmsg.Status.ERROR:
         print("Something went wrong with the server!! Try again!")
         raise Exception()
     else:
         print("The robot has ejected its left handtool.")
Exemplo n.º 4
0
 def checkEncoders(self):
     returnvalue = self.stub.checkEncoders(nxtmsg.Empty()).value
     if returnvalue == nxtmsg.Status.ERROR:
         print("Something went wrong with the server!! Try again!")
         raise Exception()
     else:
         print("Encoders succesfully checked.")
Exemplo n.º 5
0
 def attachHandToolRgt(self):
     returnvalue = self.stub.attachHandToolRgt(nxtmsg.Empty()).value
     if returnvalue == nxtmsg.Status.ERROR:
         print("Something went wrong with the server!! Try again!")
         raise Exception()
     else:
         print("The robot has attached its right handtool.")
Exemplo n.º 6
0
 def getJointAngles(self):
     if self.__oldyaml:
         jntangles = yaml.load(self.stub.getJointAngles(nxtmsg.Empty()).data)
     else:
         jntangles = yaml.load(self.stub.getJointAngles(nxtmsg.Empty()).data, Loader=yaml.UnsafeLoader)
     return jntangles