91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2KB
    文件類型: .py
    金幣: 2
    下載: 1 次
    發(fā)布日期: 2021-06-07
  • 語言: Python
  • 標簽: lms511??sick??三維??

資源簡介

通過此程序自動獲取sick lms511數(shù)據(jù),并將獲得數(shù)據(jù)由極坐標轉(zhuǎn)直角坐標,同時顯示掃描上來的數(shù)據(jù)曲線

資源截圖

代碼片段和文件信息

“““
socket?client
“““

from?socket?import?*
from?scipy?import?*
import?matplotlib.pyplot?as?plt

HOST?=?‘192.168.0.10‘
PORT?=?2111
s?=?None


def?startclient():
????“““

????:return:
????“““
????BUFSIZE?=?40000
????ADDR?=?(HOST?PORT)

????while?True:
????????data?=?input(‘>‘)
????????#data?=?‘02?73?52?4E?20?4C?4D?44?73?63?61?6E?64?61?74?61?03‘
????????if?not?data:
????????????break
????????bites?=?getcmd(data)
????????cmdstring?=?bytearray(bites?encoding=‘utf-8‘)
????????print(cmdstring)
????????tcpclisocket?=?socket(AF_INET?SOCK_STREAM)
????????tcpclisocket.connect(ADDR)
????????tcpclisocket.send(cmdstring)
????????pcddata?=?tcpclisocket.recv(BUFSIZE).decode()
????????print(pcddata)
????????caldata(pcddata)
????????tcpclisocket.close()


def?getcmd(hexstring):
????“““

????:param?hexstring:
????:return:
????“““
????hexstring?=?hexstring.replace(“?“?““)
????if?(len(hexstring)?%?2)?!=?0:
????????hexstring?+=?“?“
????bits?=?““
????fo

評論

共有 條評論

相關(guān)資源