我有以下python代码:
velocity = 0
rotation = 0
vr = velocity + (rotation/2)
vl = velocity - (rotation/2)
cmd = struct.pack(">Bhh", 145, vr, vl)
Run Code Online (Sandbox Code Playgroud)
我处理以下错误:
File "control.py", line 125, in __init__
cmd = struct.pack(">Bhh", 145, vr, vl)
struct.error: required argument is not an integer
Run Code Online (Sandbox Code Playgroud)