[英]struct.pack raises “struct.error: required argument is not an integer”
[英]struct.error: required argument is not an integer
我有以下python代碼:
velocity = 0
rotation = 0
vr = velocity + (rotation/2)
vl = velocity - (rotation/2)
cmd = struct.pack(">Bhh", 145, vr, vl)
我處理以下錯誤:
File "control.py", line 125, in __init__
cmd = struct.pack(">Bhh", 145, vr, vl)
struct.error: required argument is not an integer
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.