Esempio n. 1
0
 def run_tachometer(self, tachometer, speed=100, direction=1):
     if speed == 0:  #temporary until better solution found
         self.motor_action_pub.publish(
             motor_action(self.motor_id, 6, 0, 0, False))
     else:
         self.motor_action_pub.publish(
             motor_action(self.motor_id, 4, tachometer, speed, direction))
Esempio n. 2
0
 def run_unlimited(self, speed=100, direction=1):
     if speed == 0:  #temporary until better solution found
         self.motor_action_pub.publish(
             motor_action(self.motor_id, 6, 0, 0, False))
     else:
         self.motor_action_pub.publish(
             motor_action(self.motor_id, 5, 0, speed, direction))
Esempio n. 3
0
 def run_rotations(self, rotations, speed=100, direction=1):
     if speed == 0:  #temporary until better solution found
         self.motor_action_pub.publish(
             motor_action(self.motor_id, 6, 0, 0, False))
     else:
         self.motor_action_pub.publish(
             motor_action(self.motor_id, 2, rotations, speed, direction))
Esempio n. 4
0
 def stop(self):
     self.motor_action_pub.publish(
         motor_action(self.motor_id, 6, 0, 0, False))