63 Duplicate message interface prior to swig of header file. 65 # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 AddrMin = 0x80 ## minimum controller address 69 AddrMax = 0x87 ## maximum controller address 70 AddrDft = 0x80 ## default controller address 72 # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 # compatibility mode commands 77 CmdDriveForwardMot1 = 0 ## drive motor 1 forward 78 CmdDriveBackwardMot1 = 1 ## drive motor 1 backward 79 CmdSetMinMainVolt = 2 ## set main battery minimum voltage 80 CmdSetMaxMainVolt = 3 ## set main battery maximum voltage 81 CmdDriveForwardMot2 = 4 ## drive motor 1 forward 82 CmdDriveBackwardMot2 = 5 ## drive motor 2 backward 83 CmdDriveMot1 = 6 ## drive motor 1 forward/back (7-bit) 84 CmdDriveMot2 = 7 ## drive motor 2 foward/back (7-bit) 87 CmdMixDriveForward = 8 ## drive motors forward 88 CmdMixDriveBackward = 9 ## drive motors backward 89 CmdMixTurnRight = 10 ## drive motors to turn right 90 CmdMixTurnLeft = 11 ## drive motors to turn left 91 CmdMixDrive = 12 ## drive motors foward/back (7-bit) 92 CmdMixTurn = 13 ## drive motors to turn R/L (7-bit) 95 CmdReadEncoderMot1 = 16 ## read motor 1 encoder 96 CmdReadEncoderMot2 = 17 ## read motor 2 encoder 97 CmdReadSpeedMot1 = 18 ## read motor 1 speed (qpss) 98 CmdReadSpeedMot2 = 19 ## read motor 2 speed (qpss) 99 CmdResetEncoderRegs = 20 ## reset encoder registers (quadra) 100 CmdReadFwVersion = 21 ## read firmware version 101 CmdSetEncoderReg1 = 22 ## set encoder register 1 (quadrature) 102 CmdSetEncoderReg2 = 23 ## set encoder register 2 (quadrature) 103 CmdReadMainBattVolt = 24 ## read main battery voltage 104 CmdReadLogicVolt = 25 ## read logic battery voltage 105 CmdSetMinLogicVolt = 26 ## set logic battery minimum voltage 106 CmdSetMaxLogicVolt = 27 ## set logic battery maximum voltage 107 CmdSetVelPidMot1 = 28 ## set motor 1 velocity PID constants 108 CmdSetVelPidMot2 = 29 ## set motor 2 velocity PID constants 109 CmdRead125SpeedMot1 = 30 ## read motor 1 speed (pulses/125th sec) 110 CmdRead125SpeedMot2 = 31 ## read motor 2 speed (pulses/125th sec) 111 CmdDriveDutyMot1 = 32 ## drive motor 1 at duty cycle (no quad.) 112 CmdDriveDutyMot2 = 33 ## drive motor 2 at duty cycle (no quad.) 113 CmdDriveDuty = 34 ## drive motors at duty cycle (no quad.) 114 CmdDriveQMot1 = 35 ## drive motor 1 at quad. pulses/second 115 CmdDriveQMot2 = 36 ## drive motor 2 at quad. pulses/second 116 CmdDriveQ = 37 ## drive motors at quad. pulses/second 117 CmdDriveQAccelMot1 = 38 ## drive motor 1 at quad. pps with accel. 118 CmdDriveQAccelMot2 = 39 ## drive motor 2 at quad. pps with accel. 119 CmdDriveQAccel = 40 ## drive motors at quad. pps with accel. 120 CmdBufDriveQDistMot1 = 41 ## buffered drive motor 1 to dist at qpps 121 CmdBufDriveQDistMot2 = 42 ## buffered drive motor 2 to dist at qpps 122 CmdBufDriveQDist = 43 ## buffered drive motors to dist at qpps 123 CmdBufDriveQAccelDistMot1 = 44 124 ## buffered drive motor 1 to dist at qpps with accel. 125 CmdBufDriveQAccelDistMot2 = 45 126 ## buffered drive motor 2 to dist at qpps with accel. 127 CmdBufDriveQAccelDist = 46 128 ## buffered drive motors to dist at qpps with accel. 129 CmdReadBufLen = 47 ## read motors bufferd command length 133 CmdReadMotorDraw = 49 ## read motors amp draw 134 CmdDriveQAccel2 = 50 ## drive motros at qpps with 2 accel vals 135 CmdBufDriveQAccel2Dist = 51 136 ## buffered drive motors to dist at qpps w/ 2 accel 139 CmdReadVelPidMot1 = 55 ## read motor 1 velocity PID constants 140 CmdReadVelPidMot2 = 56 ## read motor 2 velocity PID constants 141 CmdSetMainBattCutoffs = 57 ## set main battery voltage cutoffs 142 CmdSetLogicCutoffs = 58 ## set logic voltage cutoffs 143 CmdReadMainBattCutoffs = 59 ## read main battery cutoff settings 144 CmdReadLogicCutoffs = 60 ## read logic voltage cutoff settings 145 CmdSetPosPidMot1 = 61 ## set motor 1 position PID constants 146 CmdSetPosPidMot2 = 62 ## set motor 2 position PID constants 147 CmdReadPosPidMot1 = 63 ## read motor 1 position PID constants 148 CmdReadPosPidMot2 = 64 ## read motor 2 position PID constants 149 CmdBufDriveQProfPosMot1 = 65 150 ## drive motor 1 with signed qpps, accel, deccel and position 151 CmdBufDriveQProfPosMot2 = 66 152 ## drive motor 2 with signed qpps, accel, deccel and position 153 CmdBufDriveQProfPos = 67 154 ## drive motors with signed qpps, accel, deccel and position 158 CmdReadTemp = 82 ## read board temperature 159 CmdReadTemp2 = 83 ## read board second temperature 160 CmdReadStatus = 90 ## read current board status 161 CmdReadEncoderMode = 91 ## read encoder mode for both motors 162 CmdSetEncoderModeMot1 = 92 ## set motor 1 encoder mode 163 CmdSetEncoderModeMot2 = 93 ## set motor 2 encoder mode 164 CmdWriteEEPROM = 94 ## write settings to EEPROM 168 # Note: RoboClass User Manual v5 error. The Cmd*MaxCurrentMotn command numbers 169 # are shifted down by 1. 170 CmdSetMaxCurrentMot1 = 133 ## set motor 1 maximum current limit 171 CmdSetMaxCurrentMot2 = 134 ## set motor 2 maximum current limit 172 CmdReadMaxCurrentMot1 = 135 ## read motor 1 maximum current limit 173 CmdReadMaxCurrentMot2 = 136 ## read motor 2 maximum current limit 176 # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 # RoboClaw Packet Checksum - Deprecated 178 # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 CheckSumMask = 0x7f ## checksum 7-bit mask 180 AckReqBit = 0x80 ## request ack to write commands 182 # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 # RoboClaw Packet CRC 184 # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 RspAck = 0xff ## ack response to write commands 191 # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 # RoboClaw Message Parameters 193 # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 ParamVelPidQppsDft = 44000 ## default qpps max speed 196 ParamVelPidPDft = 0x00010000 ## default vel proportional const 197 ParamVelPidIDft = 0x00008000 ## default vel integrative const 198 ParamVelPidDDft = 0x00004000 ## default vel derivative const 199 ParamVelPidCvt = 0x00010000 ## vel PID conversion 201 ParamAmpScale = 0.01 ## value * s = amps 202 ParamAmpMin = 0.0 ## minimum amps 203 ParamAmpMax = 15.0 ## maximum amps 205 Duplicate interface end 227 return "RoboClawException(%s)" % (repr(self.
message))
259 def open(self, device, baudrate, fnChipSelect=None):
261 self.
m_port = serial.Serial(device, baudrate=baudrate, timeout=0.5)
262 except serial.SerialException
as inst:
264 self.m_port.flushInput()
265 self.m_port.flushOutput()
268 if fnChipSelect
is None:
281 def noop(self, port, addrSel, addrLast):
297 sCmd = chr(addr) + chr(cmdId) + sCmdData
298 crcCmd = self.
crc16(0, sCmd)
302 self.m_port.write(sCmd)
303 except (serial.SerialException, serial.SerialTimeoutException)
as inst:
306 sRsp = self.m_port.read(1)
307 except (serial.SerialException, serial.SerialTimeoutException)
as inst:
325 sCmd = chr(addr) + chr(cmdId) + sCmdData
326 crcCmd = self.
crc16(0, sCmd)
328 sCmd += packU16(crcCmd)
330 self.m_port.write(sCmd)
331 except (serial.SerialException, serial.SerialTimeoutException)
as inst:
334 sRsp = self.m_port.read(lenRsp)
335 except (serial.SerialException, serial.SerialTimeoutException)
as inst:
337 if len(sRsp) != lenRsp:
339 "Expected %d bytes, received %d bytes" % (cmdId, lenRsp, len(sRsp)))
345 crcCalc = self.
crc16(crcCmd, sRsp)
346 if crcRsp != crcCalc:
348 "Expected 0x%04x, received 0x%04x" % (cmdId, crcCalc, crcRsp))
351 def packU8(self, val):
352 return struct.pack(
'>B', val)
354 def packS8(self, val):
355 return struct.pack(
'>b',val)
357 def packU16(self, val):
358 return struct.pack(
'>H',val)
360 def packS16(self, val):
361 return struct.pack(
'>h',val)
363 def packU32(self, val):
364 return struct.pack(
'>L',val)
366 def packS32(self, val):
367 return struct.pack(
'>l',val)
369 def unpackU8(self, s):
370 return struct.unpack(
'>B', s[:1])[0]
372 def unpackS8(self, s):
373 return struct.unpack(
'>b', s[:1])[0]
375 def unpackU16(self, s):
376 return struct.unpack(
'>H', s[:2])[0]
378 def unpackS16(self, s):
379 return struct.unpack(
'>h', s[:2])[0]
381 def unpackU32(self, s):
382 return struct.unpack(
'>L', s[:4])[0]
384 def unpackS32(self, s):
385 return struct.unpack(
'>l', s[:4])[0]
387 def crc16(self, crc, buf):
389 crc = crc ^ (ord(b) << 8);
390 for bit
in range(0,8):
392 crc = (crc << 1) ^ 0x1021;
402 def sendCmdHdr(self, addr, command):
403 raise RoboClaw(
"sendCmdHdr: Deprecated");
408 self.m_port.write(chr(addr))
409 self.m_port.write(chr(command))
410 except (serial.SerialException, serial.SerialTimeoutException)
as inst:
412 except struct.error
as inst:
418 val = struct.unpack(
'>B',self.m_port.read(1))
419 except (serial.SerialException, serial.SerialTimeoutException)
as inst:
421 except struct.error
as inst:
428 val = struct.unpack(
'>b',self.m_port.read(1))
429 except (serial.SerialException, serial.SerialTimeoutException)
as inst:
431 except struct.error
as inst:
438 val = struct.unpack(
'>H',self.m_port.read(2))
439 except (serial.SerialException, serial.SerialTimeoutException)
as inst:
441 except struct.error
as inst:
449 val = struct.unpack(
'>h',self.m_port.read(2))
450 except (serial.SerialException, serial.SerialTimeoutException)
as inst:
452 except struct.error
as inst:
460 val = struct.unpack(
'>L',self.m_port.read(4))
461 except (serial.SerialException, serial.SerialTimeoutException)
as inst:
463 except struct.error
as inst:
473 val = struct.unpack(
'>l',self.m_port.read(4))
474 except (serial.SerialException, serial.SerialTimeoutException)
as inst:
476 except struct.error
as inst:
484 def writeU8(self, val):
487 return self.m_port.write(struct.pack(
'>B',val))
488 except (serial.SerialException, serial.SerialTimeoutException)
as inst:
490 except struct.error
as inst:
493 def writeS8(self, val):
496 return self.m_port.write(struct.pack(
'>b',val))
497 except (serial.SerialException, serial.SerialTimeoutException)
as inst:
499 except struct.error
as inst:
502 def writeU16(self, val):
506 return self.m_port.write(struct.pack(
'>H',val))
507 except (serial.SerialException, serial.SerialTimeoutException)
as inst:
509 except struct.error
as inst:
512 def writeS16(self, val):
516 return self.m_port.write(struct.pack(
'>h',val))
517 except (serial.SerialException, serial.SerialTimeoutException)
as inst:
519 except struct.error
as inst:
522 def writeU32(self, val):
528 return self.m_port.write(struct.pack(
'>L',val))
529 except (serial.SerialException, serial.SerialTimeoutException)
as inst:
531 except struct.error
as inst:
534 def writeS32(self, val):
540 return self.m_port.write(struct.pack(
'>l',val))
541 except (serial.SerialException, serial.SerialTimeoutException)
as inst:
543 except struct.error
as inst:
626 return (speed, status)
633 return (speed, status)
641 sCmd = chr(addr) + chr(CmdReadFwVersion)
642 crcCmd = self.
crc16(0, sCmd)
644 self.m_port.write(sCmd)
645 except (serial.SerialException, serial.SerialTimeoutException)
as inst:
648 sRsp = self.m_port.read(48)
649 except serial.SerialException
as inst:
651 except serial.SerialTimeoutException:
658 crcCalc = self.
crc16(crcCmd, sRsp)
659 if crcRsp != crcCalc:
661 "Expected 0x%04x, received 0x%04x" % (sCmd[1], crcCalc, crcRsp))
699 return (speed,status)
706 return (speed,status)
764 sData += self.
packU32(distance)
765 sData += self.
packU8(buffered)
772 sData += self.
packU32(distance)
773 sData += self.
packU8(buffered)
781 sData += self.
packU32(distance1)
783 sData += self.
packU32(distance2)
784 sData += self.
packU8(buffered)
792 sData += self.
packU32(distance)
793 sData += self.
packU8(buffered)
801 sData += self.
packU32(distance)
802 sData += self.
packU8(buffered)
812 sData += self.
packU32(distance1)
814 sData += self.
packU32(distance2)
815 sData += self.
packU8(buffered)
823 return (buffer1,buffer2)
848 accel2, speed2, distance2,
853 sData += self.
packU32(distance1)
856 sData += self.
packU32(distance2)
857 sData += self.
packU8(buffered)
931 deadzone, minP, maxP):
944 deadzone, minP, maxP):
965 return (p,i,d,imax,deadzone,minP,maxP)
977 return (p,i,d,imax,deadzone,minP,maxP)
986 sData += self.
packU32(position)
987 sData += self.
packU8(buffered)
997 sData += self.
packU32(position)
998 sData += self.
packU8(buffered)
1003 accel1, speed1, deccel1, position1,
1004 accel2, speed2, deccel2, position2,
1009 sData += self.
packU32(deccel1)
1010 sData += self.
packU32(position1)
1013 sData += self.
packU32(deccel2)
1014 sData += self.
packU32(position2)
1015 sData += self.
packU8(buffered)
1033 return (mode1, mode2)
1050 maxAmps = int(maxAmps)
1052 sData += self.
packU32(maxAmps)
1059 maxAmps = int(maxAmps)
1061 sData += self.
packU32(maxAmps)
1081 if __name__ ==
'__main__':
1082 print "Roboclaw Unit Test Example" 1092 motorctlr.open(
"/dev/ttyACM0", 1000000)
1093 except RoboClawException
as inst:
1094 print >>sys.stderr,
"Error:", inst.message
1098 rcv = motorctlr.readVersion(addr)
1104 minV, maxV = motorctlr.readLogicBatterySettings(addr)
1105 print "Logic Battery: [%.1f, %.1f]" % (minV/10.0, maxV/10.0)
1107 minV, maxV = motorctlr.readMainBatterySettings(addr)
1108 print "Main Battery: [%.1f, %.1f]" % (minV/10.0, maxV/10.0)
1110 mode1, mode2 = motorctlr.readEncoderMode(addr)
1111 print "Encoder Modes: 0x%02x, 0x%02x" % (mode1, mode2)
1113 motorctlr.setM1Pidq(addr, 0x00010000, 0x00008000, 0x00004000, 44000)
1114 motorctlr.setM2Pidq(addr, 0x00010000, 0x00008000, 0x00004000, 44000)
1116 p,i,d,qpps = motorctlr.readM1Pidq(addr)
1117 print "M1 Velocity PID:" 1118 print " P = 0x%08x" % (p / 65536.0)
1119 print " I = 0x%08x" % (i / 65536.0)
1120 print " D = 0x%08x" % (d / 65536.0)
1121 print " QPPS = %u" % (qpps)
1123 p,i,d,qpps = motorctlr.readM2Pidq(addr)
1124 print "M2 Velocity PID:" 1125 print " P = 0x%08x" % (p / 65536.0)
1126 print " I = 0x%08x" % (i / 65536.0)
1127 print " D = 0x%08x" % (d / 65536.0)
1128 print " QPPS = %u" % (qpps)
1133 motorctlr.setM1Speed(addr, 0)
1134 motorctlr.setM2Speed(addr, 0)
1136 print "Reset encoders" 1137 motorctlr.resetEncoderCnts(addr)
1148 print "Count = ",cnt
1150 print " Status: 0x%04x" % (motorctlr.readStatus(addr))
1151 print " Temperature: %.1f" % (motorctlr.readTemperature(addr)/10.0)
1152 print " Main Battery: %.1f" % (motorctlr.readMainBattery(addr)/10.0)
1153 print " Logic Battery: %.1f" % (motorctlr.readLogicBattery(addr)/10.0)
1155 m1cur, m2cur = motorctlr.readCurrents(addr)
1156 print " Current M1: %.1f" % (m1cur/100.0)
1157 print " Current M2: %.1f" % (m2cur/100.0)
1159 pos1, status1 = motorctlr.readM1Encoder(addr)
1160 pos2, status2 = motorctlr.readM2Encoder(addr)
1161 print " Position M1: %u, 0x%02x" % (pos1, status1)
1162 print " Position M2: %u, 0x%02x" % (pos2, status2)
1167 if tgtspeed1 > 20000
or tgtspeed2 > 20000:
1171 print " Set Speeds: %u, %u" % (tgtspeed1, tgtspeed2)
1172 motorctlr.setM1Speed(addr, tgtspeed1)
1173 motorctlr.setM2Speed(addr, tgtspeed2)
1175 speed1, status1 = motorctlr.readM1Speed(addr)
1176 speed2, status2 = motorctlr.readM2Speed(addr)
1177 print " Speed M1: %u, 0x%02x" % (speed1, status1)
1178 print " Speed M2: %u, 0x%02x" % (speed2, status2)
1186 motorctlr.setM1Speed(addr, 0)
1187 motorctlr.setM2Speed(addr, 0)
def RightMixed(self, addr, val)
Command: 10.
def readVersion(self, addr)
Command: 21.
def setM2SpeedAccelDistance(self, addr, accel, speed, distance, buffered)
Command: 45.
def LeftMixed(self, addr, val)
Command: 11.
def setM2SpeedDistance(self, addr, speed, distance, buffered)
Command: 42.
def setM2EncoderMode(self, addr, mode)
Command: 93.
def setM2Pidq(self, addr, p, i, d, qpps)
Command: 29.
def setMixedSpeedIAccelDistance(self, addr, accel1, speed1, distance1, accel2, speed2, distance2, buffered)
Command: 51.
def setM2SpeedAccel(self, addr, accel, speed)
Command: 39.
def setMixedSpeedDistance(self, addr, speed1, distance1, speed2, distance2, buffered)
Command: 43.
def M1Forward(self, addr, val)
Command: 0.
def open(self, device, baudrate, fnChipSelect=None)
Open connection to motor controller(s).
RobotClaw Motor Controller class.
def setM2MaxCurrentLimit(self, addr, maxAmps)
Command: 134 Note: RoboClass User Manual v5 error.
message
error message attribute
def execCmdWithDataRsp(self, addr, cmdId, sCmdData, lenRsp, appendCrc=False)
Execute command with data response.
def setM2PositionConstants(self, addr, kp, ki, kd, kimax, deadzone, minP, maxP)
Command: 62.
def readM1PositionConstants(self, addr)
Command: 63.
m_fnChipSelect
last address
def setM1PositionConstants(self, addr, kp, ki, kd, kimax, deadzone, minP, maxP)
Command: 61.
def readLogicBattery(self, addr)
Command: 25.
def setM1DutyAccel(self, addr, accel, duty)
Command: 52.
def readTemperature(self, addr)
Command: 82.
def readM2Encoder(self, addr)
Command: 17.
def readCurrents(self, addr)
Command: 49 Note: RoboClaw User Manual v5 error.
def M2Forward(self, addr, val)
Command: 4.
def readM1Speed(self, addr)
Command: 18.
def setM2Speed(self, addr, val)
Command: 36.
def readEncoderMode(self, addr)
Command: 91.
def readBufferCnts(self, addr)
Command: 47.
def setMixedDuty(self, addr, m1, m2)
Command: 34.
def __init__(self)
Constructor.
def DriveM1(self, addr, val)
Command: 6.
def setMixedSpeed(self, addr, m1, m2)
Command: 37.
def readM2instspeed(self, addr)
Command: 31.
def noop(self, port, addrSel, addrLast)
def readM1MaxCurrentLimit(self, addr)
Command: 135 Note: RoboClass User Manual v5 error.
def setM1Speed(self, addr, val)
Command: 35.
def setM1SpeedDistance(self, addr, speed, distance, buffered)
Command: 41.
def setM2DutyAccel(self, addr, accel, duty)
Command: 53.
def execCmdWithAckRsp(self, addr, cmdId, sCmdData, appendCrc=False)
Execute command with acknowledgement response.
def DriveM2(self, addr, val)
Command: 7.
def setMixedDutyAccel(self, addr, accel1, duty1, accel2, duty2)
Command: 54.
def readM2MaxCurrentLimit(self, addr)
Command: 136 Note: RoboClass User Manual v5 error.
def readM1Encoder(self, addr)
Command: 16.
def readStatus(self, addr)
Command: 90.
def resetEncoderCnts(self, addr)
Command: 20.
def TurnMixed(self, addr, val)
Command: 13.
def setMixedSpeedAccelDistance(self, addr, accel, speed1, distance1, speed2, distance2, buffered)
Command: 46.
def setM1SpeedAccel(self, addr, accel, speed)
Command: 38.
def crc16(self, crc, buf)
def setM1MaxCurrentLimit(self, addr, maxAmps)
Command: 133 Note: RoboClass User Manual v5 error.
def readM2Speed(self, addr)
Command: 19.
def ForwardMixed(self, addr, val)
Command: 8.
def readMainBatterySettings(self, addr)
Command: 59.
def readLogicBatterySettings(self, addr)
Command: 60.
def M2Backward(self, addr, val)
Command: 5.
def setM1SpeedAccelDeccelPosition(self, addr, accel, speed, deccel, position, buffered)
Command: 65.
def readM2PositionConstants(self, addr)
Command: 64.
def setM2SpeedAccelDeccelPosition(self, addr, accel, speed, deccel, position, buffered)
Command: 66.
def writeSettings(self, addr)
Command: 94.
def setMixedSpeedIAccel(self, addr, accel1, speed1, accel2, speed2)
Command: 50.
def setMaxMainBattery(self, addr, val)
Command: 3.
def setM1Pidq(self, addr, p, i, d, qpps)
Command: 28.
def DriveMixed(self, addr, val)
Command: 12.
def setM1SpeedAccelDistance(self, addr, accel, speed, distance, buffered)
Command: 44.
def BackwardMixed(self, addr, val)
Command: 9.
def readM2Pidq(self, addr)
Command: 56.
m_port
checksum (deprecated)
def readM1instspeed(self, addr)
Command: 30.
def __init__(self, msg)
Constructor.
def readMainBattery(self, addr)
Command: 24.
def setMixedSpeedAccel(self, addr, accel, speed1, speed2)
Command: 40.
def setM1EncoderMode(self, addr, mode)
Command: 92.
def setMinMainBattery(self, addr, val)
Command: 2.
RoboClaw exception class.
def M1Backward(self, addr, val)
Command: 1.
def setLogicBatterySettings(self, addr, minV, maxV)
Command: 58.
def setM2Duty(self, addr, val)
Command: 33.
def readM1Pidq(self, addr)
Command: 55.
m_isOpen
board chip select
def setMixedSpeedAccelDeccelPosition(self, addr, accel1, speed1, deccel1, position1, accel2, speed2, deccel2, position2, buffered)
Command: 67.
def setMainBatterySettings(self, addr, minV, maxV)
Command: 57.
def setM1Duty(self, addr, val)
Command: 32.