Ejemplo n.º 1
0
def SetSpeedRover(motor_sel, enc_speed):
	AccessRoboclaw()
	if motor_sel[1] == 1:
		roboclaw.SpeedM1(motor_sel[0], int(enc_speed))
	elif motor_sel[1] == 2:
		roboclaw.SpeedM2(motor_sel[0], int(enc_speed))
	else:
		raise NotImplementedError
Ejemplo n.º 2
0
 def drive_speed(self, motor, speed):
     if self.motor_num[motor] == 1:
         out = roboclaw_driver.SpeedM1(self.address[motor], speed)
     else:
         out = roboclaw_driver.SpeedM2(self.address[motor], speed)
     return out