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))
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))
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))
def stop(self): self.motor_action_pub.publish( motor_action(self.motor_id, 6, 0, 0, False))