Compare commits
9 Commits
feature/we
...
69361c5d5b
| Author | SHA1 | Date | |
|---|---|---|---|
| 69361c5d5b | |||
| ed6cc098df | |||
| cbda29e270 | |||
| e54c8d6f5e | |||
| b66b31d9ad | |||
| fbf28fe9cc | |||
| f274162ee6 | |||
| 8b96a2d3e9 | |||
| 640faf26b8 |
314
.gitignore
vendored
314
.gitignore
vendored
@ -1,276 +1,64 @@
|
||||
# ---> Qt
|
||||
# C++ objects and libs
|
||||
*.slo
|
||||
*.lo
|
||||
*.o
|
||||
*.a
|
||||
*.la
|
||||
*.lai
|
||||
*.so
|
||||
*.so.*
|
||||
*.dll
|
||||
*.dylib
|
||||
|
||||
# Qt-es
|
||||
object_script.*.Release
|
||||
object_script.*.Debug
|
||||
*_plugin_import.cpp
|
||||
/.qmake.cache
|
||||
/.qmake.stash
|
||||
*.pro.user
|
||||
*.pro.user.*
|
||||
*.qbs.user
|
||||
*.qbs.user.*
|
||||
*.moc
|
||||
moc_*.cpp
|
||||
moc_*.h
|
||||
qrc_*.cpp
|
||||
ui_*.h
|
||||
*.qmlc
|
||||
*.jsc
|
||||
Makefile*
|
||||
*build-*
|
||||
*.qm
|
||||
*.prl
|
||||
|
||||
# Qt unit tests
|
||||
target_wrapper.*
|
||||
|
||||
# QtCreator
|
||||
*.autosave
|
||||
|
||||
# QtCreator Qml
|
||||
*.qmlproject.user
|
||||
*.qmlproject.user.*
|
||||
|
||||
# QtCreator CMake
|
||||
CMakeLists.txt.user*
|
||||
|
||||
# QtCreator 4.8< compilation database
|
||||
compile_commands.json
|
||||
|
||||
# QtCreator local machine specific files for imported projects
|
||||
*creator.user*
|
||||
|
||||
*_qmlcache.qrc
|
||||
|
||||
# ---> Python
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
# Python
|
||||
*/__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
*.py,cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
cover/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
.pybuilder/
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
# For a library or package, you might want to ignore these files since the code is
|
||||
# intended to run in multiple environments; otherwise, check them in:
|
||||
# .python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# UV
|
||||
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
||||
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||
# commonly ignored for libraries.
|
||||
#uv.lock
|
||||
|
||||
# poetry
|
||||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||
# commonly ignored for libraries.
|
||||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||
#poetry.lock
|
||||
|
||||
# pdm
|
||||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||
#pdm.lock
|
||||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||
# in version control.
|
||||
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
||||
.pdm.toml
|
||||
.pdm-python
|
||||
.pdm-build/
|
||||
|
||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||
__pypackages__/
|
||||
|
||||
# Celery stuff
|
||||
celerybeat-schedule
|
||||
celerybeat.pid
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# pytype static type analyzer
|
||||
.pytype/
|
||||
|
||||
# Cython debug symbols
|
||||
cython_debug/
|
||||
|
||||
# PyCharm
|
||||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
|
||||
# Ruff stuff:
|
||||
.ruff_cache/
|
||||
|
||||
# PyPI configuration file
|
||||
.pypirc
|
||||
|
||||
# 忽略.vscode文件夹
|
||||
.vscode/
|
||||
.VSCodeCounter
|
||||
|
||||
# 忽略工作区文件
|
||||
*.code-workspace
|
||||
.DS_Store
|
||||
|
||||
# 忽略 .idea
|
||||
# IDEs and editors
|
||||
.idea/
|
||||
.vscode/
|
||||
*.suo
|
||||
# *.ntvs*
|
||||
# *.njsproj
|
||||
# # *.sln
|
||||
# *.sw?
|
||||
|
||||
# 忽略python缓存文件
|
||||
*/__pycache__
|
||||
*.py[cod]
|
||||
# OS generated files
|
||||
# .DS_Store
|
||||
# .DS_Store?
|
||||
# ._*
|
||||
# .Spotlight-V100
|
||||
# .Trashes
|
||||
# ehthumbs.db
|
||||
# Thumbs.db
|
||||
|
||||
# 忽略日志文件
|
||||
# Logs
|
||||
log/
|
||||
*.log
|
||||
*.log.*
|
||||
|
||||
# 忽略测试文件
|
||||
test.py
|
||||
|
||||
# 忽略配置文件
|
||||
config.json
|
||||
# Temporary files
|
||||
# *.tmp
|
||||
# *.temp
|
||||
# .cache/
|
||||
|
||||
# 忽略下载文件夹
|
||||
download/
|
||||
# Test coverage
|
||||
# .coverage
|
||||
# .coverage.*
|
||||
# coverage.xml
|
||||
|
||||
# 忽略构建文件夹
|
||||
build/
|
||||
dist/
|
||||
PyQt_Fluent_Widgets.egg-info/
|
||||
PySide6_Fluent_Widgets.egg-info/
|
||||
PyQt6_Fluent_Widgets.egg-info/
|
||||
PySide2_Fluent_Widgets.egg-info/
|
||||
/COM/__pycache__
|
||||
/__pycache__
|
||||
/CU/__pycache__
|
||||
/EMV/__pycache__
|
||||
/Model/__pycache__
|
||||
/Trace/__pycache__
|
||||
/Util/__pycache__
|
||||
/view/__pycache__
|
||||
/log/log.log
|
||||
# Debug
|
||||
# *.pyc
|
||||
# *.pyd
|
||||
# *.so
|
||||
# *.dll
|
||||
# *.exe
|
||||
|
||||
# Runtime data
|
||||
# pids
|
||||
# *.pid
|
||||
# *.seed
|
||||
# *.pid.lock
|
||||
|
||||
# Project specific
|
||||
# test.py
|
||||
# test2.py
|
||||
# test3.py
|
||||
# test6.py
|
||||
# TEST3.py
|
||||
# workflow_test.py
|
||||
# MvFGSdkLog/
|
||||
# MvSDKLog/
|
||||
# Trace/com_pose.txt
|
||||
# Trace/com_pose2.txt
|
||||
3
.idea/.gitignore
generated
vendored
Normal file
3
.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
12
.idea/ailai.iml
generated
Normal file
12
.idea/ailai.iml
generated
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
<component name="PyDocumentationSettings">
|
||||
<option name="format" value="PLAIN" />
|
||||
<option name="myDocStringFormat" value="Plain" />
|
||||
</component>
|
||||
</module>
|
||||
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
4
.idea/misc.xml
generated
Normal file
4
.idea/misc.xml
generated
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="ailai" project-jdk-type="Python SDK" />
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/ailai.iml" filepath="$PROJECT_DIR$/.idea/ailai.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@ -1,7 +1,9 @@
|
||||
import logging
|
||||
from enum import Enum
|
||||
from turtle import Turtle
|
||||
# from numpy.array_api import trunc
|
||||
|
||||
from numpy.array_api import trunc
|
||||
|
||||
import Constant
|
||||
from COM.COM_TCP import TCPClient
|
||||
import queue
|
||||
@ -43,11 +45,17 @@ class RobotClient(TCPClient):
|
||||
def send_Command(self):
|
||||
try:
|
||||
if self.command_quene.qsize()!=0:
|
||||
log.log_message(logging.INFO, f'robot-command:从队列获取命令')
|
||||
command = self.command_quene.get()
|
||||
log.log_message(logging.INFO, f'robot-command:{command}')
|
||||
self.client_socket.send(command.encode())
|
||||
if True:
|
||||
response = self.client_socket.recv(1024).decode('utf-8')
|
||||
# response_message = json.loads(response)
|
||||
if response:
|
||||
log.log_message(logging.INFO, f'robot-command:{response},剩余:{self.command_quene.qsize()}条命令')
|
||||
else:
|
||||
log.log_message(logging.INFO, f'robot-command:无返回值,剩余:{self.command_quene.qsize()}条命令')
|
||||
return True
|
||||
else:
|
||||
return True
|
||||
@ -93,10 +101,10 @@ class RobotClient(TCPClient):
|
||||
log.log_message(logging.ERROR,Constant.str_tcp_robot_data_error)
|
||||
return True
|
||||
except json.JSONDecodeError as e:
|
||||
log.log_message(logging.WARNING,Constant.str_sys_json_error+response)
|
||||
log.log_message(logging.WARNING,Constant.str_sys_json_error+request_status_json)
|
||||
return True
|
||||
except Exception as e:
|
||||
log.log_message(logging.ERROR,f'{e}{response}')
|
||||
log.log_message(logging.ERROR,f'{e}{request_status_json}')
|
||||
raise
|
||||
|
||||
def send_emergency_sound(self):
|
||||
|
||||
@ -41,10 +41,11 @@ class TCPClient:
|
||||
if (self.send_Status() and self.send_Command()):
|
||||
self.error_count = 0
|
||||
except Exception as e:
|
||||
log.log_message(logging.ERROR,f'COM_TCP: {str(e)}')
|
||||
self.error_count += 1
|
||||
if self.error_count> 5:
|
||||
print("Error: 机械臂控制程序中TCPClient is not connected")
|
||||
log.log_message(logging.ERROR,Constant.str_tcp_connect_no_reply)
|
||||
# log.log_message(logging.ERROR,f'{Constant.str_tcp_connect_no_reply}:{str(e)}')
|
||||
try:
|
||||
self.CreatConnect()
|
||||
log.log_message(logging.INFO, Constant.str_tcp_reconnect)
|
||||
|
||||
@ -268,7 +268,7 @@ class Feeding(QObject):
|
||||
|
||||
# --- 新增: 用于码垛模式的投料点索引 ---
|
||||
self.current_drop_index = 0
|
||||
# self.drop_manager = DropPositionManager()
|
||||
self.drop_manager = DropPositionManager()
|
||||
pass
|
||||
|
||||
def close_feed(self):
|
||||
|
||||
287
CU/Feeding.py
287
CU/Feeding.py
@ -1,6 +1,8 @@
|
||||
import copy
|
||||
from dis import stack_effect
|
||||
import logging
|
||||
import math
|
||||
from pickle import FALSE
|
||||
import random
|
||||
import threading
|
||||
import time
|
||||
@ -29,12 +31,21 @@ from Util.util_log import log
|
||||
from Model.RobotModel import Instruction
|
||||
from EMV.EMV import RelayController
|
||||
from CU.drop import DropPositionManager
|
||||
# from Mv3D.CameraImg import CameraImg
|
||||
from Mv3D.CameraUtil import CameraUtil
|
||||
from Mv3D.calculate_diff2 import calculate_offset_from_image
|
||||
|
||||
class ResetStatus(Enum):
|
||||
RNone = 0
|
||||
#开始复位
|
||||
RStart = 1
|
||||
#复位向上移到最高点
|
||||
RRunging = 2
|
||||
#扔包点
|
||||
ROk =3
|
||||
#复位点
|
||||
RRestPoint = 5
|
||||
#复位完成
|
||||
RFinish = 4
|
||||
|
||||
class FeedStatus(IntEnum):
|
||||
FNone = 0
|
||||
@ -75,7 +86,7 @@ class FeedPosition:
|
||||
self.position = position
|
||||
|
||||
class FeedLine:
|
||||
def __init__(self, id, name, feed_positions:list,remain_count:int,drop_manage:DropPositionManager):
|
||||
def __init__(self, id, name, feed_positions:list,remain_count:int):
|
||||
self.feed_positions = copy.deepcopy(feed_positions)
|
||||
|
||||
self.feeding2end_pos_index = 0
|
||||
@ -83,7 +94,7 @@ class FeedLine:
|
||||
self.start2take_pos_index = 0
|
||||
self.name = name
|
||||
self.id = id
|
||||
self.drop_manager = drop_manage
|
||||
self.drop_manager = DropPositionManager()
|
||||
# 初始化各个阶段的位置列表
|
||||
self.feeding_to_end = []
|
||||
|
||||
@ -204,7 +215,7 @@ class FeedLine:
|
||||
f"✅ FDropBag 位置已更新: ({position.X}, {position.Y}, {position.Z}, {position.U}, {position.V}, {position.W})")
|
||||
break # 假设只有一个丢包点
|
||||
|
||||
def get_drop_path(self) -> list:
|
||||
def get_drop_path(self,offsetX) -> list:
|
||||
"""获取动态扔包路径"""
|
||||
|
||||
if self.drop_manager is None:
|
||||
@ -218,8 +229,11 @@ class FeedLine:
|
||||
self.id,
|
||||
self.current_index
|
||||
)
|
||||
|
||||
if pos_model is None:
|
||||
break
|
||||
if pos_model.status==FeedStatus.FDropBag.value:
|
||||
pos_model=self.get_offset_position(pos_model,self.current_index,offsetX)
|
||||
path.append(pos_model)
|
||||
return path
|
||||
|
||||
@ -245,21 +259,51 @@ class FeedLine:
|
||||
self.start_to_take = self.feed_positions[index_start:index_take+1]
|
||||
self.feeding_to_end = self.feed_positions[index_take:]
|
||||
|
||||
def set_feeding_to_end(self):
|
||||
|
||||
def set_feeding_to_end(self,offsetX)->bool:
|
||||
"""
|
||||
设置动态扔包路径
|
||||
:param image_path: 偏移量图像路径
|
||||
"""
|
||||
for i in range(len(self.feed_positions)):
|
||||
if self.feed_positions[i].status == FeedStatus.FPhoto.value:
|
||||
index_take = i
|
||||
break
|
||||
index_drop=self.current_dropbag_index
|
||||
test_path = self.get_drop_path()
|
||||
test_path = self.get_drop_path(offsetX)
|
||||
self.current_index+=1
|
||||
# 将总list的drop部分,替换为动态路径
|
||||
self.feed_positions = self.feed_positions[:index_drop] + test_path
|
||||
# self.feeding_to_end = self.feed_positions[index_take:index_drop]
|
||||
self.feeding_to_end = self.feed_positions[index_take:index_drop]+test_path
|
||||
|
||||
|
||||
|
||||
# 计算偏移量
|
||||
|
||||
def get_offset_position(self,point,_current_index,offsetX):
|
||||
"""
|
||||
获取偏移后的坐标。
|
||||
"""
|
||||
_current_index=_current_index-1
|
||||
if _current_index<0:
|
||||
_current_index=0
|
||||
loc_floor=(_current_index//5)+1
|
||||
loc_bag=(_current_index%5)+1
|
||||
if loc_floor in [1,3,5]:
|
||||
if loc_bag in [1,2,3]:
|
||||
point.X=round(point.X-offsetX, 3)
|
||||
elif loc_bag==4:
|
||||
point.Y=round(point.Y-offsetX, 3)
|
||||
elif loc_bag==5:
|
||||
point.Y=round(point.Y+offsetX, 3)
|
||||
elif loc_floor in [2,4,6]:
|
||||
if loc_bag in [1,2,3]:
|
||||
point.X=round(point.X+offsetX, 3)
|
||||
elif loc_bag==4:
|
||||
point.Y=round(point.Y-offsetX, 3)
|
||||
elif loc_bag==5:
|
||||
point.Y=round(point.Y+offsetX, 3)
|
||||
return point
|
||||
|
||||
|
||||
class FeedingConfig:
|
||||
def __init__(self, num: int, feedLine: FeedLine, photo_locs,remain_count:int):
|
||||
#需码垛数量,如50,或30
|
||||
@ -286,6 +330,10 @@ class Feeding(QObject):
|
||||
log_signal = Signal(int,str)
|
||||
#码垛完成通知
|
||||
stack_finish_signal=Signal()
|
||||
#误差过大,通知用户
|
||||
feed_error_signal=Signal(int,str)
|
||||
#数量保存信号
|
||||
feed_nums_signal=Signal(int)
|
||||
|
||||
def __init__(self, robotClient: RobotClient,relay_controller:RelayController):
|
||||
super().__init__()
|
||||
@ -326,7 +374,7 @@ class Feeding(QObject):
|
||||
#用于同步控制EMV相关
|
||||
self.relay_controller = relay_controller
|
||||
self.relay_controller.take_robot_signal.connect(self.take_feed_notice)
|
||||
# self.camera_img=CameraImg()
|
||||
self.camera_img=CameraUtil()
|
||||
# 启动传感器2线程
|
||||
# self.relay_controller._running = True
|
||||
# self.sensor2_thread = None
|
||||
@ -340,8 +388,8 @@ class Feeding(QObject):
|
||||
# self.detect_thread.join()
|
||||
if self.detect.detection:
|
||||
self.detect.detection.release()
|
||||
# if self.camera_img:
|
||||
# self.camera_img.close_camera()
|
||||
if self.camera_img:
|
||||
self.camera_img.release()
|
||||
|
||||
def run_detect(self):
|
||||
#图片相关线程
|
||||
@ -353,6 +401,8 @@ class Feeding(QObject):
|
||||
"""接收机器人信号通知"""
|
||||
self.take_sensor_signal = True
|
||||
|
||||
|
||||
|
||||
def run(self):
|
||||
self.catch.run()
|
||||
# 获取事件坐标
|
||||
@ -455,6 +505,10 @@ class Feeding(QObject):
|
||||
#self.catch.catch_status = CatchStatus.CTake
|
||||
|
||||
elif self.feedStatus == FeedStatus.FPhoto:
|
||||
|
||||
if not real_position.compare(self.robotClient.origin_position,is_action=True):
|
||||
return
|
||||
|
||||
#码垛的数量和配置的数量一致时
|
||||
if self.feedConfig.remain_count >=self.feedConfig.num:
|
||||
#关闭,暂停
|
||||
@ -465,7 +519,7 @@ class Feeding(QObject):
|
||||
self.feedConfig.feedLine.origin2start_pos_index = len(self.feedConfig.feedLine.origin_to_start) - 2
|
||||
#码垛数量重置
|
||||
self.feedConfig.remain_count=0
|
||||
self.next_position(self.is_reverse)
|
||||
# self.next_position(self.is_reverse)
|
||||
#码垛完成信号通知
|
||||
self.stack_finish_signal.emit()
|
||||
self.log_signal.emit(logging.INFO, Constant.str_feed_photo)
|
||||
@ -479,38 +533,66 @@ class Feeding(QObject):
|
||||
self.next_position()
|
||||
return
|
||||
#初始点无论如何先打开夹爪
|
||||
if self.relay_controller.close(clamp=True):
|
||||
#重新抓去信号料带
|
||||
self.take_sensor_signal=False
|
||||
self.relay_controller.sensor2_ready=True
|
||||
#去除list.ini读取抓取点20250915
|
||||
#self.feedConfig.feedLine.set_take_position(self.detect.detect_position, 0)
|
||||
#self.feedConfig.feedLine.set_take_position(real_position, 0)#必须设置
|
||||
# 一直等待传感器2信号,永不超时
|
||||
# TODO:逻辑需改变,不能用while循环
|
||||
if Constant.DebugPosition:
|
||||
self.take_sensor_signal=True
|
||||
while True:
|
||||
# sensors = self.relay_controller.get_all_device_status('sensors')
|
||||
# sensor2_value = sensors.get(self.relay_controller.SENSOR2, False)
|
||||
if self.take_sensor_signal:
|
||||
self.log_signal.emit(logging.INFO, "传感器2检测到料包到位开始执行抓取")
|
||||
break # ✅ 条件满足,跳出循环,继续执行下面的代码
|
||||
self.relay_controller.close(clamp=True)
|
||||
|
||||
self.relay_controller.close(blow_sensor2=True)
|
||||
#重新抓去信号料带
|
||||
self.take_sensor_signal=False
|
||||
self.relay_controller.sensor2_ready=True
|
||||
#去除list.ini读取抓取点20250915
|
||||
#self.feedConfig.feedLine.set_take_position(self.detect.detect_position, 0)
|
||||
#self.feedConfig.feedLine.set_take_position(real_position, 0)#必须设置
|
||||
# 一直等待传感器2信号,永不超时
|
||||
# TODO:逻辑需改变,不能用while循环
|
||||
if Constant.DebugPosition:
|
||||
self.take_sensor_signal=True
|
||||
while True:
|
||||
# sensors = self.relay_controller.get_all_device_status('sensors')
|
||||
# sensor2_value = sensors.get(self.relay_controller.SENSOR2, False)
|
||||
if self.take_sensor_signal:
|
||||
self.log_signal.emit(logging.INFO, "传感器2检测到料包到位开始执行抓取")
|
||||
break # ✅ 条件满足,跳出循环,继续执行下面的代码
|
||||
else:
|
||||
if self.feedStatus == FeedStatus.FNone:
|
||||
return
|
||||
time.sleep(1) # 每秒检查一次
|
||||
|
||||
loc_offsetX=0
|
||||
loc_is_next=False
|
||||
#第二次执行FeedStatus.FPhoto时,改变码垛点
|
||||
try:
|
||||
loc_image_path=self.camera_img.save_img()
|
||||
loc_model_result = calculate_offset_from_image(loc_image_path, visualize=False)
|
||||
if loc_model_result['success']:
|
||||
#置信度
|
||||
if loc_model_result['obj_conf']>0.5:
|
||||
loc_offsetX=loc_model_result['dx_mm']
|
||||
if abs(loc_model_result['dx_mm'])<200:
|
||||
loc_is_next=True
|
||||
print(f'{loc_image_path}:料带偏移{loc_offsetX}mm')
|
||||
else:
|
||||
print(f"{loc_image_path}:料带偏移过大,报警")
|
||||
self.feed_error_signal.emit(1,f"{loc_image_path}:料带偏移过大,报警")
|
||||
else:
|
||||
if self.feedStatus == FeedStatus.FNone:
|
||||
return
|
||||
time.sleep(1) # 每秒检查一次
|
||||
|
||||
#第二次执行FeedStatus.FPhoto时,改变码垛点
|
||||
# self.camera_img.save_frame_path()
|
||||
self.feedConfig.feedLine.set_feeding_to_end()
|
||||
# self.take_photo_sigal.emit()
|
||||
self.next_position()
|
||||
self.log_signal.emit(logging.INFO, Constant.str_sys_runing2)
|
||||
else:
|
||||
self.log_signal.emit(logging.ERROR, Constant.str_clamp_open_error)
|
||||
time.sleep(2)
|
||||
# self.feedStatus = FeedStatus.FTake
|
||||
print(f"{loc_image_path}:未检测到料带,置信度低")
|
||||
self.feed_error_signal.emit(2,f"{loc_image_path}:未检测到料带,置信度低")
|
||||
else:
|
||||
print(f"{loc_image_path}:计算偏移失败,视觉返回False")
|
||||
self.feed_error_signal.emit(2,f"{loc_image_path}:计算偏移失败,视觉返回False")
|
||||
# loc_is_next=False
|
||||
loc_offsetX=0
|
||||
except Exception as e:
|
||||
print(f"视频模型异常:{loc_image_path}",e)
|
||||
# loc_is_next=False
|
||||
loc_offsetX=0
|
||||
if not Constant.DebugPosition:
|
||||
self.feed_error_signal.emit(2,"视频模型异常")
|
||||
self.log_signal.emit(logging.ERROR, f"视频模型异常:{e}")
|
||||
finally:
|
||||
if loc_is_next or Constant.DebugPosition:
|
||||
self.feedConfig.feedLine.set_feeding_to_end(loc_offsetX)
|
||||
self.next_position()
|
||||
self.log_signal.emit(logging.INFO, Constant.str_sys_runing2)
|
||||
|
||||
elif self.feedStatus == FeedStatus.FTake:
|
||||
self.log_signal.emit(logging.INFO, Constant.str_feed_take)
|
||||
@ -537,11 +619,8 @@ class Feeding(QObject):
|
||||
# 移动到下一个抓取点
|
||||
# 更新丢包点: 如果需要根据放置情况调整下次抓取
|
||||
|
||||
if self.relay_controller.open(clamp=True):
|
||||
self.next_position(self.is_reverse)
|
||||
else:
|
||||
self.log_signal.emit(logging.ERROR, Constant.str_clamp_close_error)
|
||||
time.sleep(2)
|
||||
self.relay_controller.open(clamp=True)
|
||||
self.next_position(self.is_reverse)
|
||||
|
||||
#self.feedConfig.feedLine.set_drop_position(real_position)#我想在这里读取我的一个ini文件值里面有很多个drop点,每一次索引递增的点
|
||||
|
||||
@ -614,9 +693,10 @@ class Feeding(QObject):
|
||||
# (后续增加) 视觉确认: 拍照确认袋子已放置
|
||||
# self.detection.get_position(...)
|
||||
# self.feedConfig.feedLine.set_take_position(...)
|
||||
|
||||
self.relay_controller.open(blow_sensor2=True)
|
||||
# 码垛数量增加
|
||||
self.feedConfig.remain_count = self.feedConfig.remain_count + 1
|
||||
self.feed_nums_signal.emit(self.feedConfig.remain_count)
|
||||
# self.feedConfig.num = self.feedConfig.num - 1
|
||||
self.log_signal.emit(logging.INFO, f'{Constant.str_feed_feed_num}{self.feedConfig.remain_count}')
|
||||
# 5. *** 关键步骤 ***: 移动到路径中的下一个点
|
||||
@ -846,6 +926,7 @@ class Feeding(QObject):
|
||||
print(request_command)
|
||||
self.robotClient.add_sendQuene(request_command)
|
||||
pass
|
||||
|
||||
# def get_take_position(self):
|
||||
# if Constant.Debug:
|
||||
# return self.robotClient.status_model.getRealPosition()
|
||||
@ -970,3 +1051,109 @@ class Feeding(QObject):
|
||||
return True
|
||||
pass
|
||||
|
||||
class FeedReset(QObject):
|
||||
def __init__(self,robotClient: RobotClient,relay_controller:RelayController,positions):
|
||||
super().__init__()
|
||||
self.robotClient = robotClient
|
||||
self.relay_controller = relay_controller
|
||||
self.reversed_positions = positions
|
||||
self.reset_status = ResetStatus.RNone
|
||||
|
||||
def run_reset(self):
|
||||
if self.reset_status == ResetStatus.RNone:
|
||||
return
|
||||
|
||||
real_position = Real_Position()
|
||||
real_position.init_position_joint_and_world(self.robotClient.status_model.world_0,
|
||||
self.robotClient.status_model.world_1,
|
||||
self.robotClient.status_model.world_2,
|
||||
self.robotClient.status_model.world_3,
|
||||
self.robotClient.status_model.world_4,
|
||||
self.robotClient.status_model.world_5,
|
||||
self.robotClient.status_model.axis_0,
|
||||
self.robotClient.status_model.axis_1,
|
||||
self.robotClient.status_model.axis_2,
|
||||
self.robotClient.status_model.axis_3,
|
||||
self.robotClient.status_model.axis_4,
|
||||
self.robotClient.status_model.axis_5)
|
||||
|
||||
if self.reset_status == ResetStatus.RStart:
|
||||
#当前位置
|
||||
self.reverse_index = 0
|
||||
self.current_position = PositionModel()
|
||||
self.current_position.init_position(real_position)
|
||||
self.reset_status = ResetStatus.RRunging
|
||||
|
||||
elif self.reset_status == ResetStatus.RRunging:
|
||||
#到达当前位置-》移到机械臂最上方
|
||||
|
||||
if not real_position.compare(self.current_position.get_position(),is_action=True):
|
||||
return
|
||||
self.current_position.X=real_position.Axis_0
|
||||
self.current_position.Y=-59.997
|
||||
self.current_position.Z=real_position.Axis_2
|
||||
self.current_position.U=real_position.Axis_3
|
||||
self.current_position.V=real_position.Axis_4
|
||||
self.current_position.W=real_position.Axis_5
|
||||
self.current_position.lineType=4
|
||||
# pos_model.get_position().Y = pos_model.get_position().Y + 10000
|
||||
#linetype 4是关节移动
|
||||
self.sendTargPosition(pos_model= self.current_position,speed=60)
|
||||
self.reset_status=ResetStatus.ROk
|
||||
|
||||
elif self.reset_status == ResetStatus.ROk:
|
||||
#到达机械臂最上方--》扔包点
|
||||
if not real_position.compare(self.current_position.get_position(),is_action=True):
|
||||
return
|
||||
pos_model=self.reversed_positions[self.reverse_index]
|
||||
|
||||
self.current_position = pos_model
|
||||
self.sendTargPosition(pos_model=pos_model,speed=60)
|
||||
self.reverse_index = self.reverse_index + 1
|
||||
self.reset_status = ResetStatus.RRestPoint
|
||||
elif self.reset_status == ResetStatus.RRestPoint:
|
||||
#到达扔包点-》发送复位点
|
||||
if real_position.compare(self.current_position.get_position(),is_action=True):
|
||||
self.relay_controller.close(clamp=True)
|
||||
pos_model=self.reversed_positions[self.reverse_index]
|
||||
self.current_position = pos_model
|
||||
self.sendTargPosition(pos_model=pos_model,speed=60)
|
||||
self.reset_status = ResetStatus.RFinish
|
||||
elif self.reset_status == ResetStatus.RFinish:
|
||||
#到达复位点-》RNone
|
||||
if not real_position.compare(self.current_position.get_position(),is_action=True):
|
||||
return
|
||||
self.reset_status = ResetStatus.RNone
|
||||
|
||||
|
||||
def sendTargPosition(self, pos_model:PositionModel, speed=5):
|
||||
real_position=pos_model.get_position()
|
||||
position_instruction = Instruction()
|
||||
position_instruction.speed = speed
|
||||
position_instruction.m0 = real_position.X
|
||||
position_instruction.m1 = real_position.Y
|
||||
position_instruction.m2 = real_position.Z
|
||||
position_instruction.m3 = real_position.U
|
||||
position_instruction.m4 = real_position.V
|
||||
position_instruction.m5 = real_position.W
|
||||
position_instruction.smooth = self.robotClient.smooth
|
||||
|
||||
if pos_model.lineType == 4:
|
||||
#linetype 4是关节移动
|
||||
position_instruction.action = MoveType.AXIS.value
|
||||
else:
|
||||
position_instruction.action = MoveType.WORLD.value
|
||||
|
||||
if position_instruction.action == 17:
|
||||
position_instruction.m0_p = real_position1.X
|
||||
position_instruction.m1_p = real_position1.Y
|
||||
position_instruction.m2_p = real_position1.Z
|
||||
position_instruction.m3_p = real_position1.U
|
||||
position_instruction.m4_p = real_position1.V
|
||||
position_instruction.m5_p = real_position1.W
|
||||
instruction_command = CMDInstructRequest()
|
||||
instruction_command.instructions.append(position_instruction)
|
||||
request_command = instruction_command.toString()
|
||||
self.robotClient.add_sendQuene(request_command)
|
||||
pass
|
||||
|
||||
|
||||
68
CU/drop.py
68
CU/drop.py
@ -8,7 +8,7 @@ import Constant
|
||||
|
||||
|
||||
class DropPositionManager:
|
||||
def __init__(self, config_path):
|
||||
def __init__(self, config_path=Constant.dropLine_set_file):
|
||||
self.config_path = config_path
|
||||
self.config = configparser.ConfigParser()
|
||||
self._load_config()
|
||||
@ -167,14 +167,11 @@ class DropPositionManager:
|
||||
return None
|
||||
|
||||
|
||||
#region 前端UI编辑码垛点位调用方法
|
||||
|
||||
def load_path_points(self,lineid: int) ->Optional[LineModel]:
|
||||
"""根据lineid加载所有码垛的路径信息"""
|
||||
#默认码垛的lineid从10开始
|
||||
if self.config_path==Constant.dropLine_set_file_35:
|
||||
_lineid=lineid+11
|
||||
else:
|
||||
_lineid=lineid+10
|
||||
_lineid=lineid+10
|
||||
line_model = LineModel(_lineid)
|
||||
line_model.line_category = 2
|
||||
line_model.id = _lineid
|
||||
@ -258,13 +255,10 @@ class DropPositionManager:
|
||||
def save_path_points(self, line_model: LineModel):
|
||||
"""根据lineid保存所有码垛的路径信息"""
|
||||
#默认码垛的lineid从10开始,保存的时候减一
|
||||
if self.config_path==Constant.dropLine_set_file_35:
|
||||
_lineid=line_model.id-11
|
||||
else:
|
||||
_lineid=line_model.id-10
|
||||
_lineid=line_model.id-10
|
||||
if _lineid<=0:
|
||||
return
|
||||
self.config.read(self.config_path, encoding='utf-8')
|
||||
self.config.read(Constant.dropLine_set_file, encoding='utf-8')
|
||||
# 查找主表 DropLineX
|
||||
main_section = f"{Constant.dropLine_set_section}{_lineid}"
|
||||
if not self.config.has_section(main_section):
|
||||
@ -273,7 +267,7 @@ class DropPositionManager:
|
||||
self.config.set(main_section, "id", str(_lineid))
|
||||
_current_reset_index=1
|
||||
_current_mid_index=1
|
||||
_current_drop_section_val=self._get_max_drop_section()
|
||||
_current_drop_section_val=self._current_drop_section[main_section]
|
||||
# 保存每个DropPoints
|
||||
for i, pos in enumerate(line_model.positions):
|
||||
if pos.lineId == _lineid or pos.lineId == line_model.id:
|
||||
@ -306,25 +300,49 @@ class DropPositionManager:
|
||||
#保存数据
|
||||
pos.save_position_model(self.config)
|
||||
|
||||
with open(self.config_path, 'w', encoding='utf-8') as f:
|
||||
with open(Constant.dropLine_set_file, 'w', encoding='utf-8') as f:
|
||||
self.config.write(f)
|
||||
|
||||
def del_drop_point(self,section):
|
||||
self.config.read(self.config_path, encoding = 'utf-8')
|
||||
self.config.read(Constant.dropLine_set_file, encoding = 'utf-8')
|
||||
self.config.remove_section(section)
|
||||
with open(self.config_path, 'w', encoding='utf-8') as f:
|
||||
with open(Constant.dropLine_set_file, 'w', encoding='utf-8') as f:
|
||||
self.config.write(f)
|
||||
|
||||
def _get_max_drop_section(self):
|
||||
"""获取最大的DropPoints序号"""
|
||||
max_section = 1
|
||||
for section in self.config.sections():
|
||||
if section.startswith("DropPoints"):
|
||||
num_part = int(section.replace("DropPoints", "0"))
|
||||
if num_part > max_section:
|
||||
max_section = num_part
|
||||
return max_section
|
||||
#endregion
|
||||
def _get_point_debug_info(manager, pos, model):
|
||||
config = manager.config
|
||||
for sec in config.sections():
|
||||
if sec.startswith("DropPoints"):
|
||||
try:
|
||||
x, y, z = config.getfloat(sec, "x"), config.getfloat(sec, "y"), config.getfloat(sec, "z")
|
||||
if abs(x - pos.X) < 0.001 and abs(y - pos.Y) < 0.001 and abs(z - pos.Z) < 0.001:
|
||||
point_id = config.getint(sec, "id")
|
||||
return f"📌 DropPoints{point_id} | id={point_id}"
|
||||
except: pass
|
||||
|
||||
elif sec.startswith("DropMidPoint"):
|
||||
try:
|
||||
parts = sec.split('-')
|
||||
if len(parts) != 2: continue
|
||||
point_id = int(''.join(filter(str.isdigit, parts[0])))
|
||||
level = int(parts[1])
|
||||
x, y, z = config.getfloat(sec, "x"), config.getfloat(sec, "y"), config.getfloat(sec, "z")
|
||||
if abs(x - pos.X) < 0.001 and abs(y - pos.Y) < 0.001 and abs(z - pos.Z) < 0.001:
|
||||
return f"📍 DropMidPoint{point_id}-{level} | id={point_id}, level={level}"
|
||||
except: pass
|
||||
|
||||
elif sec.startswith("ResetPoint"):
|
||||
try:
|
||||
parts = sec.split('-')
|
||||
if len(parts) != 2: continue
|
||||
point_id = int(''.join(filter(str.isdigit, parts[0])))
|
||||
level = int(parts[1])
|
||||
x, y, z = config.getfloat(sec, "x"), config.getfloat(sec, "y"), config.getfloat(sec, "z")
|
||||
if abs(x - pos.X) < 0.001 and abs(y - pos.Y) < 0.001 and abs(z - pos.Z) < 0.001:
|
||||
return f"🔙 ResetPoint{point_id}-{level} | id={point_id}, level={level}"
|
||||
except: pass
|
||||
return "❓ 未知点位"
|
||||
|
||||
# 测试
|
||||
if __name__ == "__main__":
|
||||
# manager = DropPositionManager("drop.ini")
|
||||
|
||||
BIN
Config/.output_lineid2.txt.swp
Normal file
BIN
Config/.output_lineid2.txt.swp
Normal file
Binary file not shown.
34
Config/reset_line.ini
Normal file
34
Config/reset_line.ini
Normal file
@ -0,0 +1,34 @@
|
||||
[FeedLine1]
|
||||
id = 1
|
||||
name = 1号线
|
||||
|
||||
|
||||
[Position1]
|
||||
x = -24.063
|
||||
y = -42.650
|
||||
z = -52.472
|
||||
u = 21.969
|
||||
v = 0.0
|
||||
w = 0.0
|
||||
id = 1
|
||||
order = 1
|
||||
lineid = 1
|
||||
status = 1
|
||||
linetype = 4
|
||||
|
||||
[Position2]
|
||||
x = -44.430
|
||||
y = -59.997604
|
||||
z = -80.499
|
||||
u = 51.386665
|
||||
v = 0.0
|
||||
w = -0.0
|
||||
id = 2
|
||||
order = 2
|
||||
lineid = 1
|
||||
status = 2
|
||||
linetype = 4
|
||||
|
||||
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ import os
|
||||
# 调试变量
|
||||
Debug = False # 控制不加图像的Fphoto False是不加
|
||||
Debug1 = False # 打印很多日志节点
|
||||
DebugPosition = True # 调试位置,关闭机器人和传感器及判断
|
||||
DebugPosition = False # 调试位置,关闭机器人和传感器及判断
|
||||
# Debug2 = False
|
||||
feedStatus = True #feedStatus的状态打印
|
||||
|
||||
@ -20,9 +20,10 @@ manual_adjust_accuracy = 1
|
||||
feedLine_set_section = 'FeedLine'
|
||||
dropLine_set_section = 'DropLine'
|
||||
position_set_section = 'Position'
|
||||
reset_line_set_section = 'ResetLine'
|
||||
feedLine_set_file = f'.{os.sep}Config{os.sep}FeedLine.ini'
|
||||
dropLine_set_file = f'.{os.sep}Config{os.sep}drop.ini'
|
||||
dropLine_set_file_35 = f'.{os.sep}Config{os.sep}drop-35.ini'
|
||||
resetLine_set_file = f'.{os.sep}Config{os.sep}reset_line.ini'
|
||||
MAX_Position_num = 40
|
||||
MAX_Line_num = 10
|
||||
set_ini = 'Seting.ini'
|
||||
@ -54,6 +55,7 @@ str_feed_drop_mid = '移动到码垛中间点位置'
|
||||
str_feed_drop_reset = '移动到码垛复位位置'
|
||||
str_feed_broken = '移动到破袋位置'
|
||||
str_feed_takePhoto_fail = '识别图像失败'
|
||||
str_image_model_fail = '摄像头识别料带失败'
|
||||
str_feed_takePhoto_success = '识别图像成功'
|
||||
str_feed_takePhoto_new_line = '新的一排袋识别'
|
||||
str_feed_takePhoto_line = '一排袋最高的识别'
|
||||
@ -105,8 +107,7 @@ str_tcp_connect_no_reply = '无回复'
|
||||
str_tcp_connect_error = 'tcp连接错误'
|
||||
str_tcp_reconnect = '重连中'
|
||||
str_sys_json_error = 'json解析错误'
|
||||
str_clamp_open_error = '夹爪打开失败'
|
||||
str_clamp_close_error = '夹爪关闭失败'
|
||||
|
||||
|
||||
str_sys_runing = '运行到这里了!'
|
||||
str_sys_runing1 = '运行到这里2! '
|
||||
|
||||
487
EMV/EMV.py
487
EMV/EMV.py
@ -14,6 +14,8 @@ import Constant
|
||||
class RelayController(QObject):
|
||||
log_signal = Signal(int, str)
|
||||
take_robot_signal = Signal()
|
||||
emergency_signal = Signal(bool)
|
||||
|
||||
def __init__(self, host='192.168.0.18', port=50000):
|
||||
super().__init__()
|
||||
# ===================== 全局线程延时参数 =====================
|
||||
@ -32,11 +34,12 @@ class RelayController(QObject):
|
||||
self.delay_clamp = 0.5 # 夹爪动作延时
|
||||
self.delay_after_pusher = 5.0 # 推板推出后到重启传动带时间
|
||||
|
||||
self.emergency_is_pressed=False
|
||||
|
||||
# ===================== 传感器稳定检测参数 =====================
|
||||
self.sensor_stable_duration = 1.0 # 传感器状态稳定检测时间(秒)
|
||||
self.sensor_max_attempts = 3 # 连续检测次数达到此值判定有效
|
||||
self.sensor1_debounce_time = 1.0 # 传感器1防抖时间(秒)
|
||||
self.sensor2_debounce_time = 3.0 # 袋尾检测3秒有效信号
|
||||
|
||||
# ===================== 网络与设备映射 =====================
|
||||
self.host = host
|
||||
@ -50,8 +53,12 @@ class RelayController(QObject):
|
||||
self.PUSHER1 = 'pusher1'
|
||||
self.SENSOR1 = 'sensor1'
|
||||
self.SENSOR2 = 'sensor2'
|
||||
self.BELT = 'belt'
|
||||
self.ALARM = 'alarm'
|
||||
self.BLOW_SENSOR2 = 'blow_sensor2'
|
||||
|
||||
self.valve_commands = {
|
||||
#包装机皮带
|
||||
self.CONVEYOR1: {'open': '000000000006010500070000', 'close': '00000000000601050007FF00'},
|
||||
# self.CONVEYOR11: {'open': '00000000000601050000FF00', 'close': '000000000006010500000000'},
|
||||
self.PUSHER: {'open': '00000000000601050001FF00', 'close': '000000000006010500010000'},
|
||||
@ -61,6 +68,12 @@ class RelayController(QObject):
|
||||
self.CLAMP: {'open': '00000000000601050003FF00', 'close': '000000000006010500030000'},
|
||||
#DO5 回 DO2推
|
||||
self.PUSHER1: {'open': '00000000000601050004FF00', 'close': '000000000006010500040000'},
|
||||
#D07 长皮带
|
||||
self.BELT: {'open': '00000000000601050006FF00', 'close': '000000000006010500060000'},
|
||||
#D01 声控报警
|
||||
self.ALARM: {'open': '00000000000601050000FF00', 'close': '000000000006010500000000'},
|
||||
#DO6 吹传感器2
|
||||
self.BLOW_SENSOR2: {'open': '00000000000601050005FF00', 'close': '000000000006010500050000'},
|
||||
#滚筒反转
|
||||
self.CONVEYOR2_REVERSE: {'open': '000100000006020620000022', 'close': '000100000006020620000001'}
|
||||
}
|
||||
@ -78,7 +91,10 @@ class RelayController(QObject):
|
||||
self.CONVEYOR2: 2,
|
||||
self.CLAMP: 3,
|
||||
self.PUSHER1: 4,
|
||||
self.CONVEYOR2_REVERSE: 5
|
||||
self.CONVEYOR2_REVERSE: 5,
|
||||
self.BELT: 6,
|
||||
self.ALARM: 7,
|
||||
#self.BLOW_SENSOR2: 8
|
||||
}
|
||||
|
||||
self.sensor_bit_map = {
|
||||
@ -87,12 +103,15 @@ class RelayController(QObject):
|
||||
}
|
||||
|
||||
self.device_name_map = {
|
||||
self.CONVEYOR1: "传送带1",
|
||||
self.CONVEYOR1: "包装机皮带",
|
||||
self.PUSHER: "推板开",
|
||||
self.CONVEYOR2: "传送带2",
|
||||
self.CONVEYOR2: "滚筒",
|
||||
self.CLAMP: "机械臂夹爪",
|
||||
self.PUSHER1: "推板关",
|
||||
self.CONVEYOR2_REVERSE: "传送带2反转"
|
||||
self.CONVEYOR2_REVERSE: "滚筒反转",
|
||||
self.BELT: "皮带",
|
||||
self.ALARM: "声控报警",
|
||||
self.BLOW_SENSOR2: "吹传感器2"
|
||||
}
|
||||
|
||||
self.sensor_name_map = {
|
||||
@ -106,20 +125,19 @@ class RelayController(QObject):
|
||||
self._sensor1_thread = None
|
||||
self._sensor2_thread = None
|
||||
|
||||
self.required_codes = {'0101', '0103'} # 有效状态码(传感器1)
|
||||
self.required_codes_1 = {'0102', '0103'} # 有效状态码(传感器2)
|
||||
self.required_codes = {'0101', '0103','0105','0107'} # 有效状态码(传感器1)
|
||||
self.required_codes_1 = {'0102', '0103','0106','0107'} # 有效状态码(传感器2)
|
||||
|
||||
self.sensor1_triggered = False
|
||||
self.sensor1_last_time = 0
|
||||
|
||||
self.sensor2_ready = False #默认不打开
|
||||
self.motor_stopped_by_sensor2 = True
|
||||
self.is_drop_35=False #是否是35码
|
||||
|
||||
# ===================== 基础通信方法 =====================
|
||||
def send_command(self, command_hex, retry_count=2, source='unknown'):
|
||||
if Constant.DebugPosition:
|
||||
# print(f"[发送命令] {command_hex} ({source})")
|
||||
print(f"[发送命令] {command_hex} ({source})")
|
||||
return None
|
||||
byte_data = binascii.unhexlify(command_hex)
|
||||
for attempt in range(retry_count):
|
||||
@ -138,19 +156,20 @@ class RelayController(QObject):
|
||||
#print(f"[通信响应] {hex_response}")
|
||||
return response
|
||||
except Exception as e:
|
||||
# print(f"网络继电器通信错误 ({source}): {e}, 尝试重连... ({attempt + 1}/{retry_count})")
|
||||
self.log_signal.emit(logging.INFO,f"网络继电器通信错误 ({source}): {e}, 尝试重连... ({attempt + 1}/{retry_count})")
|
||||
print(f"网络继电器通信错误 ({source}): {e}, 尝试重连... ({attempt + 1}/{retry_count})")
|
||||
time.sleep(5)
|
||||
self.trigger_alarm()
|
||||
return None
|
||||
|
||||
def trigger_alarm(self):
|
||||
self.log_signal.emit(logging.ERROR,"警告:网络继电器连续多次通信失败,请检查设备连接!")
|
||||
print("警告:网络继电器连续多次通信失败,请检查设备连接!")
|
||||
|
||||
# ===================== 状态读取方法 =====================
|
||||
def get_all_device_status(self, command_type='devices'):
|
||||
if Constant.DebugPosition:
|
||||
return {self.SENSOR2:True}
|
||||
# if Constant.DebugPosition:
|
||||
# return {self.SENSOR2:True}
|
||||
command = self.read_status_command.get(command_type)
|
||||
if not command:
|
||||
print(f"未知的网络继电器读取类型: {command_type}")
|
||||
@ -164,7 +183,7 @@ class RelayController(QObject):
|
||||
status_byte = response[9]
|
||||
status_bin = f"{status_byte:08b}"[::-1]
|
||||
bit_map = self.device_bit_map if command_type == 'devices' else self.sensor_bit_map
|
||||
name_map = self.device_name_map if command_type == 'devices' else self.sensor_name_map
|
||||
# name_map = self.device_name_map if command_type == 'devices' else self.sensor_name_map
|
||||
|
||||
for key, bit_index in bit_map.items():
|
||||
status_dict[key] = status_bin[bit_index] == '1'
|
||||
@ -189,7 +208,6 @@ class RelayController(QObject):
|
||||
|
||||
if response and len(response) >= 10:
|
||||
hex_response = binascii.hexlify(response).decode('utf-8')
|
||||
|
||||
# print(f"[原始响应][{command_type}] {hex_response}")
|
||||
|
||||
# 假设传感器数据从第 9 字节开始,长度为 2 字节
|
||||
@ -203,6 +221,24 @@ class RelayController(QObject):
|
||||
print(f"[{command_type}] 无法获取响应数据")
|
||||
return responses
|
||||
|
||||
def get_emergency_is_pressed(self)->bool:
|
||||
"获取急停信号,DI 3 位为1,正常,DI 3为0时为按下急停状态,00000000000401020107 后四位01表示一个字节,最后一位(07)二进制对应开关量"
|
||||
"按下急停为"
|
||||
command = self.read_status_command.get("sensors")
|
||||
response = self.send_command(command)
|
||||
loc_is_pressed=False
|
||||
if response and len(response) >= 10:
|
||||
status_byte = response[9]
|
||||
#简单验证
|
||||
status_crc=response[8]
|
||||
loc_is_pressed =status_crc==1 and (status_byte & 0b100) == 0 # 0b100 表示第三位为1
|
||||
else:
|
||||
self.log_signal.emit(logging.ERROR,f"网络继电器[急停] 读取状态失败或响应无效")
|
||||
print(f"网络继电器[急停] 读取状态失败或响应无效")
|
||||
|
||||
return loc_is_pressed
|
||||
|
||||
|
||||
def parse_status_code(self, response):
|
||||
"""
|
||||
从 Modbus 响应字符串中提取状态码(后两位)
|
||||
@ -251,6 +287,27 @@ class RelayController(QObject):
|
||||
time.sleep(self.sensor2_loop_delay)
|
||||
return False
|
||||
|
||||
def is_valid_sensor2_status_lost(self, sensor_name):
|
||||
stable_count = 0
|
||||
_try_nums=5 # 尝试次数
|
||||
for _ in range(_try_nums):
|
||||
responses = self.get_all_sensor_responses('sensors')
|
||||
response = responses.get(sensor_name)
|
||||
|
||||
if not response:
|
||||
print(f"[警告] 无法获取 {sensor_name} 的响应,尝试重试...")
|
||||
stable_count = 0
|
||||
else:
|
||||
status_code = self.parse_status_code(response)
|
||||
if status_code not in self.required_codes_1:
|
||||
stable_count += 1
|
||||
if stable_count >= self.sensor_max_attempts:
|
||||
return True
|
||||
else:
|
||||
stable_count = 0
|
||||
time.sleep(self.sensor2_loop_lost)
|
||||
return False
|
||||
|
||||
def is_valid_sensor(self,sensor_name):
|
||||
"""
|
||||
检查传感器状态是否有效
|
||||
@ -260,19 +317,26 @@ class RelayController(QObject):
|
||||
True: 传感器状态有效
|
||||
False: 传感器状态无效
|
||||
"""
|
||||
responses = self.get_all_sensor_responses('sensors')
|
||||
response = responses.get(sensor_name)
|
||||
stable_count = 0
|
||||
_try_nums=5 # 尝试次数
|
||||
for _ in range(_try_nums):
|
||||
responses = self.get_all_sensor_responses('sensors')
|
||||
response = responses.get(sensor_name)
|
||||
|
||||
if not response:
|
||||
print(f"[警告] 无法获取 {sensor_name} 的响应,尝试重试...")
|
||||
return False
|
||||
else:
|
||||
temp_status_code = self.parse_status_code(response)
|
||||
if temp_status_code in self.required_codes_1:
|
||||
return True
|
||||
else:
|
||||
if not response:
|
||||
print(f"[警告] 无法获取 {sensor_name} 的响应,尝试重试...")
|
||||
return False
|
||||
|
||||
else:
|
||||
temp_status_code = self.parse_status_code(response)
|
||||
if temp_status_code in self.required_codes_1:
|
||||
stable_count += 1
|
||||
if stable_count >= 3:
|
||||
return True
|
||||
else:
|
||||
stable_count = 0
|
||||
time.sleep(self.sensor2_loop_lost)
|
||||
return False
|
||||
|
||||
def is_valid_sensor_signal_stable(self, sensor_name, detection_duration=3.0, stability_duration=2.5, check_interval=0.1):
|
||||
"""
|
||||
检测在指定时间窗口内是否存在持续稳定的有效信号
|
||||
@ -303,129 +367,67 @@ class RelayController(QObject):
|
||||
stable_start_time = None # 信号不稳定,重置计时
|
||||
time.sleep(check_interval)
|
||||
return False
|
||||
|
||||
def is_valid_sensor2_status_lost(self, sensor_name):
|
||||
"""
|
||||
检查传感器2是否丢失信号
|
||||
"""
|
||||
stable_count = 0
|
||||
_try_nums=5 # 尝试次数
|
||||
for _ in range(_try_nums):
|
||||
responses = self.get_all_sensor_responses('sensors')
|
||||
response = responses.get(sensor_name)
|
||||
|
||||
if not response:
|
||||
print(f"[警告] 无法获取 {sensor_name} 的响应,尝试重试...")
|
||||
stable_count = 0
|
||||
else:
|
||||
status_code = self.parse_status_code(response)
|
||||
if status_code not in self.required_codes_1:
|
||||
stable_count += 1
|
||||
if stable_count >= self.sensor_max_attempts:
|
||||
return True
|
||||
else:
|
||||
stable_count = 0
|
||||
time.sleep(self.sensor2_loop_lost)
|
||||
return False
|
||||
|
||||
# ===================== 动作控制方法 =====================
|
||||
def open(self, conveyor1=False, pusher=False, conveyor2=False, clamp=False, pusher1=False, conveyor2_reverse=False)->bool:
|
||||
"""将if改成elif,一次只能打开一个设备,否则会造成延时sleep时间不一致问题。并返回成功核验"""
|
||||
loc_ret=False
|
||||
loc_reponse=None
|
||||
loc_send_command=None
|
||||
status = self.get_all_device_status()
|
||||
def open(self, conveyor1=False, pusher=False, conveyor2=False, clamp=False, pusher1=False, conveyor2_reverse=False,belt=False,alarm=False,blow_sensor2=False):
|
||||
# if Constant.DebugPosition:
|
||||
# return
|
||||
# status = self.get_all_device_status()
|
||||
if conveyor1:
|
||||
if not status.get(self.CONVEYOR1, False):
|
||||
loc_send_command=self.valve_commands[self.CONVEYOR1]['open']
|
||||
loc_reponse=self.send_command(loc_send_command)
|
||||
time.sleep(self.delay_conveyor)
|
||||
else:
|
||||
loc_ret=True
|
||||
elif pusher:
|
||||
if not status.get(self.PUSHER, False):
|
||||
loc_send_command=self.valve_commands[self.PUSHER]['open']
|
||||
loc_reponse=self.send_command(loc_send_command)
|
||||
time.sleep(self.delay_pusher)
|
||||
else:
|
||||
loc_ret=True
|
||||
elif conveyor2:
|
||||
if not status.get(self.CONVEYOR2, False):
|
||||
loc_send_command=self.valve_commands[self.CONVEYOR2]['open']
|
||||
loc_reponse=self.send_command(loc_send_command)
|
||||
time.sleep(self.delay_conveyor)
|
||||
else:
|
||||
loc_ret=True
|
||||
elif clamp:
|
||||
if not status.get(self.CLAMP, False):
|
||||
loc_send_command=self.valve_commands[self.CLAMP]['open']
|
||||
loc_reponse=self.send_command(loc_send_command)
|
||||
time.sleep(self.delay_clamp)
|
||||
else:
|
||||
loc_ret=True
|
||||
elif pusher1:
|
||||
if not status.get(self.PUSHER1, False):
|
||||
loc_send_command=self.valve_commands[self.PUSHER1]['open']
|
||||
loc_reponse=self.send_command(loc_send_command)
|
||||
time.sleep(self.delay_pusher)
|
||||
else:
|
||||
loc_ret=True
|
||||
elif conveyor2_reverse:
|
||||
if not status.get(self.CONVEYOR2_REVERSE, False):
|
||||
loc_send_command=self.valve_commands[self.CONVEYOR2_REVERSE]['open']
|
||||
loc_reponse=self.send_command(loc_send_command)
|
||||
time.sleep(self.delay_conveyor)
|
||||
else:
|
||||
loc_ret=True
|
||||
|
||||
|
||||
if loc_reponse and len(loc_reponse) >= 10:
|
||||
lol_hex_response = binascii.hexlify(response).decode('utf-8')
|
||||
if lol_hex_response == loc_send_command:
|
||||
loc_ret=True
|
||||
|
||||
if Constant.DebugPosition:
|
||||
loc_ret=True
|
||||
return loc_ret
|
||||
|
||||
|
||||
def close(self, conveyor1=False, pusher=False, conveyor2=False, clamp=False, pusher1=False, conveyor2_reverse=False)->bool:
|
||||
loc_ret=False
|
||||
loc_reponse=None
|
||||
loc_send_command=None
|
||||
if conveyor1:
|
||||
loc_send_command=self.valve_commands[self.CONVEYOR1]['close']
|
||||
loc_reponse=self.send_command(loc_send_command)
|
||||
self.send_command(self.valve_commands[self.CONVEYOR1]['open'])
|
||||
time.sleep(self.delay_conveyor)
|
||||
if pusher:
|
||||
loc_send_command=self.valve_commands[self.PUSHER]['close']
|
||||
loc_reponse=self.send_command(loc_send_command)
|
||||
self.send_command(self.valve_commands[self.PUSHER]['open'])
|
||||
time.sleep(self.delay_pusher)
|
||||
if conveyor2:
|
||||
loc_send_command=self.valve_commands[self.CONVEYOR2]['close']
|
||||
loc_reponse=self.send_command(loc_send_command)
|
||||
self.send_command(self.valve_commands[self.CONVEYOR2]['open'])
|
||||
time.sleep(self.delay_conveyor)
|
||||
if clamp:
|
||||
loc_send_command=self.valve_commands[self.CLAMP]['close']
|
||||
loc_reponse=self.send_command(loc_send_command)
|
||||
self.send_command(self.valve_commands[self.CLAMP]['open'])
|
||||
time.sleep(self.delay_clamp)
|
||||
if pusher1:
|
||||
loc_send_command=self.valve_commands[self.PUSHER1]['close']
|
||||
loc_reponse=self.send_command(loc_send_command)
|
||||
self.send_command(self.valve_commands[self.PUSHER1]['open'])
|
||||
time.sleep(self.delay_pusher)
|
||||
if conveyor2_reverse:
|
||||
loc_send_command=self.valve_commands[self.CONVEYOR2_REVERSE]['close']
|
||||
loc_reponse=self.send_command(loc_send_command)
|
||||
self.send_command(self.valve_commands[self.CONVEYOR2_REVERSE]['open'])
|
||||
time.sleep(self.delay_conveyor)
|
||||
if belt:
|
||||
self.send_command(self.valve_commands[self.BELT]['open'])
|
||||
# time.sleep(self.delay_belt)
|
||||
if alarm:
|
||||
self.send_command(self.valve_commands[self.ALARM]['open'])
|
||||
# time.sleep(self.delay_alarm)
|
||||
if blow_sensor2:
|
||||
self.send_command(self.valve_commands[self.BLOW_SENSOR2]['open'])
|
||||
# time.sleep(self.delay_blow_sensor2)
|
||||
|
||||
if loc_reponse and len(loc_reponse) >= 10:
|
||||
lol_hex_response = binascii.hexlify(response).decode('utf-8')
|
||||
if lol_hex_response == loc_send_command:
|
||||
loc_ret=True
|
||||
if Constant.DebugPosition:
|
||||
loc_ret=True
|
||||
return loc_ret
|
||||
|
||||
def close(self, conveyor1=False, pusher=False, conveyor2=False, clamp=False, pusher1=False, conveyor2_reverse=False,belt=False,alarm=False,blow_sensor2=False):
|
||||
if conveyor1:
|
||||
self.send_command(self.valve_commands[self.CONVEYOR1]['close'])
|
||||
time.sleep(self.delay_conveyor)
|
||||
if pusher:
|
||||
self.send_command(self.valve_commands[self.PUSHER]['close'])
|
||||
time.sleep(self.delay_pusher)
|
||||
if conveyor2:
|
||||
self.send_command(self.valve_commands[self.CONVEYOR2]['close'])
|
||||
time.sleep(self.delay_conveyor)
|
||||
if clamp:
|
||||
self.send_command(self.valve_commands[self.CLAMP]['close'])
|
||||
time.sleep(self.delay_clamp)
|
||||
if pusher1:
|
||||
self.send_command(self.valve_commands[self.PUSHER1]['close'])
|
||||
time.sleep(self.delay_pusher)
|
||||
if conveyor2_reverse:
|
||||
self.send_command(self.valve_commands[self.CONVEYOR2_REVERSE]['close'])
|
||||
time.sleep(self.delay_conveyor)
|
||||
if belt:
|
||||
self.send_command(self.valve_commands[self.BELT]['close'])
|
||||
# time.sleep(self.delay_belt)
|
||||
if alarm:
|
||||
self.send_command(self.valve_commands[self.ALARM]['close'])
|
||||
# time.sleep(self.delay_alarm)
|
||||
if blow_sensor2:
|
||||
self.send_command(self.valve_commands[self.BLOW_SENSOR2]['close'])
|
||||
# time.sleep(self.delay_blow_sensor2)
|
||||
|
||||
# ===================== 传感器处理线程 =====================
|
||||
def handle_sensor1(self):
|
||||
@ -461,11 +463,11 @@ class RelayController(QObject):
|
||||
|
||||
time.sleep(1)
|
||||
# 5. 状态检查(可选)
|
||||
status = self.get_all_device_status()
|
||||
if status.get('conveyor1') and not status.get('pusher'):
|
||||
print("流程完成1:皮带运行中,推板已收回")
|
||||
else:
|
||||
print("状态异常,请检查设备")
|
||||
# status = self.get_all_device_status()
|
||||
# if status.get('conveyor1') and not status.get('pusher'):
|
||||
# print("流程完成1:皮带运行中,推板已收回")
|
||||
# else:
|
||||
# print("状态异常,请检查设备")
|
||||
# 流程结束,重置触发标志
|
||||
self.sensor1_triggered = False
|
||||
time.sleep(self.sensor1_loop_delay)
|
||||
@ -479,14 +481,6 @@ class RelayController(QObject):
|
||||
_is_pause_close=True
|
||||
#是否料袋尾部(有信号--》无信号)
|
||||
_is_signal=False
|
||||
|
||||
#正发转用
|
||||
_is_reverse_2=False
|
||||
#是否反转后正转信号消息
|
||||
_is_signal_2=False
|
||||
#是否首次正转信号
|
||||
_is_first_signal_2=False
|
||||
|
||||
while self._running:
|
||||
if self._ispause:
|
||||
#暂停
|
||||
@ -500,141 +494,30 @@ class RelayController(QObject):
|
||||
continue
|
||||
#开启线程
|
||||
_is_pause_close=True
|
||||
if self.is_drop_35:
|
||||
#region 35kg 正反转打平
|
||||
try:
|
||||
if _is_signal_2 or self.is_valid_sensor_status_1(self.SENSOR2):
|
||||
#反转要加个防抖动时间
|
||||
if _is_reverse_2:
|
||||
print('回退后检查到sensor2 35KG信号,正转')
|
||||
self.open(conveyor2=True)
|
||||
_is_reverse_2=False
|
||||
_is_signal_2=True
|
||||
elif _is_signal_2 and self.is_valid_sensor2_status_lost(self.SENSOR2):
|
||||
print('检查到sensor2正转35KG信号消失')
|
||||
self.close(conveyor2=True)
|
||||
#滚筒关闭标志
|
||||
self.motor_stopped_by_sensor2 = True
|
||||
# 发送信号通知机器人取走物品
|
||||
self.take_robot_signal.emit()
|
||||
_is_signal_2=False
|
||||
#停止后即使有信号了,也不能转,直到self.sensor2_ready=True
|
||||
# _is_first_signal=False
|
||||
self.sensor2_ready=False #打开滚洞标识
|
||||
elif not _is_first_signal_2:
|
||||
print('检查到正转sensor2 35KG信号')
|
||||
#检测到信号,5秒
|
||||
time.sleep(6)
|
||||
self.open(conveyor2_reverse=True)
|
||||
_is_reverse_2=True
|
||||
_is_first_signal_2=True
|
||||
time.sleep(0.1)
|
||||
continue
|
||||
elif self.sensor2_ready:
|
||||
#sensor2_ready:通过Feeding:FPhoto处控制是否启动
|
||||
if self.motor_stopped_by_sensor2:
|
||||
print('开滚筒')
|
||||
self.open(conveyor2=True)
|
||||
self.motor_stopped_by_sensor2 = False
|
||||
_is_first_signal=False
|
||||
# _is_reverse=False
|
||||
# _is_first_signal=False
|
||||
# _is_signal=False
|
||||
|
||||
if _is_reverse_2:
|
||||
time.sleep(0.1)
|
||||
else:
|
||||
time.sleep(2)
|
||||
except Exception as e:
|
||||
print(f"SENSOR3 处理错误: {e}")
|
||||
self.log_signal.emit(logging.ERROR,f"SENSOR3 处理错误: {e}")
|
||||
time.sleep(self.sensor2_error_delay)
|
||||
#endregion
|
||||
else:
|
||||
try:
|
||||
|
||||
if self.sensor2_ready:
|
||||
#sensor2_ready:通过Feeding:FPhoto处控制是否启动,到了,先启动
|
||||
if self.motor_stopped_by_sensor2:
|
||||
print('开滚筒')
|
||||
self.open(conveyor2=True)
|
||||
self.motor_stopped_by_sensor2 = False
|
||||
elif _is_signal or self.is_valid_sensor_signal_stable(self.SENSOR2,detection_duration=3,stability_duration=2.5,check_interval=0.5):
|
||||
#检测到信号,如果之前是没有信号,关闭滚筒
|
||||
print('检查到sensor2信号')
|
||||
if _is_signal and self.is_valid_sensor2_status_lost(self.SENSOR2):
|
||||
print('检查到sensor2信号消失')
|
||||
self.close(conveyor2=True)
|
||||
#滚筒关闭标志
|
||||
self.motor_stopped_by_sensor2 = True
|
||||
# 发送信号通知机器人取走物品
|
||||
self.take_robot_signal.emit()
|
||||
_is_signal=False
|
||||
self.sensor2_ready=False #打开滚洞标识
|
||||
else:
|
||||
_is_signal=True
|
||||
# time.sleep(0.1)
|
||||
continue
|
||||
|
||||
time.sleep(2)
|
||||
except Exception as e:
|
||||
print(f"SENSOR2 处理错误: {e}")
|
||||
self.log_signal.emit(logging.ERROR,f"SENSOR2 处理错误: {e}")
|
||||
time.sleep(self.sensor2_error_delay)
|
||||
|
||||
def handle_sensor3(self):
|
||||
"""
|
||||
正转--》反转--》正转
|
||||
"""
|
||||
_is_pause_close=True
|
||||
#是否反转
|
||||
_is_reverse=False
|
||||
#是否反转后正转信号消息
|
||||
_is_signal=False
|
||||
#是否首次正转信号
|
||||
_is_first_signal=False
|
||||
#是否料袋尾部(有信号--》无信号)
|
||||
while self._running:
|
||||
if self._ispause:
|
||||
#暂停
|
||||
if _is_pause_close:
|
||||
self.close(conveyor2=True)
|
||||
self.motor_stopped_by_sensor2 = True
|
||||
# self.sensor2_ready = True #初始值
|
||||
_is_pause_close=False
|
||||
|
||||
time.sleep(self.sensor2_error_delay)
|
||||
continue
|
||||
#开启线程
|
||||
_is_pause_close=True
|
||||
#滚动次数
|
||||
try:
|
||||
if _is_signal or self.is_valid_sensor_status_1(self.SENSOR2):
|
||||
#反转要加个防抖动时间
|
||||
if _is_reverse:
|
||||
print('回退后检查到sensor2信号,正转')
|
||||
self.open(conveyor2=True)
|
||||
_is_reverse=False
|
||||
_is_signal=True
|
||||
elif _is_signal and self.is_valid_sensor2_status_lost(self.SENSOR2):
|
||||
print('检查到sensor2正转信号消失')
|
||||
if _is_signal or self.is_valid_sensor_status_1(self.SENSOR2):
|
||||
#检测到信号,如果之前是没有信号,关闭滚筒
|
||||
print('检查到sensor2信号')
|
||||
if _is_signal and self.is_valid_sensor2_status_lost(self.SENSOR2):
|
||||
print('检查到sensor2信号消失')
|
||||
self.close(conveyor2=True)
|
||||
#滚筒关闭标志
|
||||
self.motor_stopped_by_sensor2 = True
|
||||
# 发送信号通知机器人取走物品
|
||||
self.take_robot_signal.emit()
|
||||
_is_signal=False
|
||||
#停止后即使有信号了,也不能转,直到self.sensor2_ready=True
|
||||
# _is_first_signal=False
|
||||
self.sensor2_ready=False #打开滚洞标识
|
||||
elif not _is_first_signal:
|
||||
print('检查到正转sensor2信号')
|
||||
#检测到信号,5秒
|
||||
time.sleep(6)
|
||||
self.open(conveyor2_reverse=True)
|
||||
_is_reverse=True
|
||||
_is_first_signal=True
|
||||
time.sleep(0.1)
|
||||
self.sensor2_ready=False #打开滚洞标识,FPhoto控制打开
|
||||
else:
|
||||
if self.sensor2_ready:
|
||||
#只有在FPhoto处才有效
|
||||
_is_signal=True
|
||||
if self.motor_stopped_by_sensor2:
|
||||
print('开滚筒')
|
||||
self.open(conveyor2=True)
|
||||
self.motor_stopped_by_sensor2 = False
|
||||
|
||||
# time.sleep(0.1)
|
||||
continue
|
||||
elif self.sensor2_ready:
|
||||
#sensor2_ready:通过Feeding:FPhoto处控制是否启动
|
||||
@ -642,33 +525,26 @@ class RelayController(QObject):
|
||||
print('开滚筒')
|
||||
self.open(conveyor2=True)
|
||||
self.motor_stopped_by_sensor2 = False
|
||||
_is_first_signal=False
|
||||
# _is_reverse=False
|
||||
# _is_first_signal=False
|
||||
# _is_signal=False
|
||||
|
||||
if _is_reverse:
|
||||
time.sleep(0.1)
|
||||
else:
|
||||
time.sleep(2)
|
||||
|
||||
time.sleep(2)
|
||||
except Exception as e:
|
||||
print(f"SENSOR3 处理错误: {e}")
|
||||
self.log_signal.emit(logging.ERROR,f"SENSOR3 处理错误: {e}")
|
||||
print(f"SENSOR2 处理错误: {e}")
|
||||
self.log_signal.emit(logging.ERROR,f"SENSOR2 处理错误: {e}")
|
||||
time.sleep(self.sensor2_error_delay)
|
||||
|
||||
|
||||
def pause_start_sensor(self,is_pause):
|
||||
"""
|
||||
暂停或开启传感器线程
|
||||
is_pause:True是,False否
|
||||
"""
|
||||
self._ispause = is_pause
|
||||
|
||||
def set_drop_35(self,is_drop_35):
|
||||
"""
|
||||
设置是否是35码
|
||||
is_drop_35:True是,False否
|
||||
"""
|
||||
self.is_drop_35=is_drop_35
|
||||
|
||||
if is_pause:
|
||||
"""暂停皮带"""
|
||||
self.close(belt=True)
|
||||
else:
|
||||
"""开启皮带"""
|
||||
self.open(belt=True)
|
||||
|
||||
|
||||
def stop_sensor(self,sensor1_thread,sensor2_thread):
|
||||
@ -682,3 +558,28 @@ class RelayController(QObject):
|
||||
if sensor2_thread and sensor2_thread.is_alive():
|
||||
sensor2_thread.join()
|
||||
print("传感器线程已终止。")
|
||||
|
||||
def handle_emergency_pressed(self):
|
||||
"处理急停按钮信号状态线程"
|
||||
print('检查急停按钮状态1')
|
||||
|
||||
while self._running:
|
||||
try:
|
||||
print('检查急停按钮状态')
|
||||
loc_is_pressed =self.get_emergency_is_pressed()
|
||||
if loc_is_pressed:
|
||||
# 处理急停按钮信号状态
|
||||
if not self.emergency_is_pressed:
|
||||
print('急停按钮被按下')
|
||||
self.log_signal.emit(logging.INFO,f"急停按钮被按下")
|
||||
self.emergency_is_pressed=True
|
||||
self.emergency_signal.emit(True)
|
||||
else:
|
||||
print('急停按钮未被按下')
|
||||
self.emergency_is_pressed=False
|
||||
self.emergency_signal.emit(False)
|
||||
time.sleep(0.5)
|
||||
except Exception as e:
|
||||
print(f"急停 处理错误: {e}")
|
||||
self.log_signal.emit(logging.ERROR,f"急停线程 处理错误: {e}")
|
||||
time.sleep(2)
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
|
||||
from EMV import RelayController
|
||||
import time
|
||||
import threading
|
||||
@ -35,6 +38,18 @@ def test_device(device_name, action):
|
||||
'clamp': {
|
||||
'open': lambda: relay_controller.open(clamp=True),
|
||||
'close': lambda: relay_controller.close(clamp=True)
|
||||
},
|
||||
'alarm': {
|
||||
'open': lambda: relay_controller.open(alarm=True),
|
||||
'close': lambda: relay_controller.close(alarm=True)
|
||||
},
|
||||
'belt': {
|
||||
'open': lambda: relay_controller.open(belt=True),
|
||||
'close': lambda: relay_controller.close(belt=True)
|
||||
},
|
||||
'blow_sensor2': {
|
||||
'open': lambda: relay_controller.open(blow_sensor2=True),
|
||||
'close': lambda: relay_controller.close(blow_sensor2=True)
|
||||
}
|
||||
}
|
||||
|
||||
@ -83,16 +98,18 @@ if __name__ == "__main__":
|
||||
# print(sensors)
|
||||
# time.sleep(3)
|
||||
# test_device('conveyor2', 'open')
|
||||
test_device('conveyor2_reverse', 'open')
|
||||
# test_device('belt', 'close')
|
||||
# time.sleep(3)
|
||||
# test_device('conveyor2', 'open')
|
||||
test_device('conveyor2', 'close')
|
||||
# test_device('belt', 'close')
|
||||
# sensors = relay_controller.get_all_device_status('sensors')
|
||||
# sensor2_value = sensors.get(relay_controller.SENSOR2, False)
|
||||
|
||||
# relay_controller._running=True
|
||||
# relay_controller.handle_sensor2()
|
||||
# test_device('conveyor2', 'close')
|
||||
test_device('blow_sensor2', 'close')
|
||||
|
||||
# test_device('blow_sensor2', 'close')
|
||||
# while True:
|
||||
# if relay_controller.is_valid_sensor_status_1('sensor2'):
|
||||
# test_device('conveyor2', 'close')
|
||||
@ -112,8 +129,10 @@ if __name__ == "__main__":
|
||||
# time.sleep(0.1)
|
||||
|
||||
|
||||
|
||||
# relay_controller._running=True
|
||||
# relay_controller.handle_emergency_pressed()
|
||||
|
||||
time.sleep(100)
|
||||
|
||||
print('aaaaa')
|
||||
|
||||
|
||||
@ -102112,31 +102112,31 @@ qt_resource_struct = b"\
|
||||
\x00\x00\x00\x0e\x00\x02\x00\x00\x00\x0d\x00\x00\x00\x03\
|
||||
\x00\x00\x00\x00\x00\x00\x00\x00\
|
||||
\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x01\x00\x03/R\
|
||||
\x00\x00\x01\x99\x8e\x16\x01I\
|
||||
\x00\x00\x01\x9a\x01M\x90X\
|
||||
\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
|
||||
\x00\x00\x01\x99\x8e\x16\x01R\
|
||||
\x00\x00\x01\x9a\x01M\x90h\
|
||||
\x00\x00\x008\x00\x00\x00\x00\x00\x01\x00\x00\x05\x9a\
|
||||
\x00\x00\x01\x99\x8e\x16\x01N\
|
||||
\x00\x00\x01\x9a\x01M\x90X\
|
||||
\x00\x00\x00~\x00\x00\x00\x00\x00\x01\x00\x03\x13\xe9\
|
||||
\x00\x00\x01\x99\x8e\x16\x01O\
|
||||
\x00\x00\x01\x9a\x01M\x90h\
|
||||
\x00\x00\x00\xe4\x00\x00\x00\x00\x00\x01\x00\x0ff\xaf\
|
||||
\x00\x00\x01\x99\x8e\x16\x01I\
|
||||
\x00\x00\x01\x9a\x01M\x90X\
|
||||
\x00\x00\x01\xbc\x00\x00\x00\x00\x00\x01\x00\x18\xcf\xe2\
|
||||
\x00\x00\x01\x99\x8e\x16\x01O\
|
||||
\x00\x00\x01\x9a\x01M\x90h\
|
||||
\x00\x00\x01\x88\x00\x00\x00\x00\x00\x01\x00\x16\xd0\xa3\
|
||||
\x00\x00\x01\x99\x8e\x16\x01N\
|
||||
\x00\x00\x01\x9a\x01M\x90X\
|
||||
\x00\x00\x01\xa6\x00\x00\x00\x00\x00\x01\x00\x16\xd7X\
|
||||
\x00\x00\x01\x99\x8e\x16\x01Q\
|
||||
\x00\x00\x01\x9a\x01M\x90h\
|
||||
\x00\x00\x01\x16\x00\x00\x00\x00\x00\x01\x00\x0f\xd3\xa7\
|
||||
\x00\x00\x01\x99\x8e\x16\x01L\
|
||||
\x00\x00\x01\x9a\x01M\x90X\
|
||||
\x00\x00\x00\x92\x00\x00\x00\x00\x00\x01\x00\x03\x1eU\
|
||||
\x00\x00\x01\x99\x8e\x16\x01P\
|
||||
\x00\x00\x01\x9a\x01M\x90h\
|
||||
\x00\x00\x00\xc2\x00\x00\x00\x00\x00\x01\x00\x0f\x5c\xad\
|
||||
\x00\x00\x01\x99\x8e\x16\x01O\
|
||||
\x00\x00\x01\x9a\x01M\x90X\
|
||||
\x00\x00\x01\xd6\x00\x00\x00\x00\x00\x01\x00\x18\xd4\xc0\
|
||||
\x00\x00\x01\x99\x8e\x16\x01O\
|
||||
\x00\x00\x01\x9a\x01M\x90h\
|
||||
\x00\x00\x01P\x00\x00\x00\x00\x00\x01\x00\x16\xbe\x07\
|
||||
\x00\x00\x01\x99\x8e\x16\x01N\
|
||||
\x00\x00\x01\x9a\x01M\x90X\
|
||||
"
|
||||
|
||||
def qInitResources():
|
||||
|
||||
204
Mv3D/CameraUtil.py
Normal file
204
Mv3D/CameraUtil.py
Normal file
@ -0,0 +1,204 @@
|
||||
# vision/camera.py
|
||||
import cv2
|
||||
import os
|
||||
import time
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
import numpy as np
|
||||
import shutil # 用于检查磁盘空间
|
||||
|
||||
class CameraUtil:
|
||||
"""
|
||||
海康摄像头工具类,用于初始化、设置配置、捕获图像等操作
|
||||
"""
|
||||
def __init__(self):
|
||||
self.camera = None
|
||||
self.camera_type = "ip"
|
||||
self.camera_ip = "192.168.0.234"
|
||||
self.camera_port = 554
|
||||
self.camera_username = "admin"
|
||||
self.camera_password = "ailaimiye123"
|
||||
self.camera_channel = 1
|
||||
|
||||
def set_config(self, camera_type="ip", ip=None, port=None, username=None, password=None, channel=1):
|
||||
"""
|
||||
设置摄像头配置
|
||||
"""
|
||||
self.camera_type = camera_type
|
||||
if ip:
|
||||
self.camera_ip = ip
|
||||
if port:
|
||||
self.camera_port = port
|
||||
if username:
|
||||
self.camera_username = username
|
||||
if password:
|
||||
self.camera_password = password
|
||||
self.camera_channel = channel
|
||||
|
||||
def setup_capture(self, camera_index=0):
|
||||
"""
|
||||
设置摄像头捕获
|
||||
"""
|
||||
try:
|
||||
rtsp_url = f"rtsp://{self.camera_username}:{self.camera_password}@{self.camera_ip}:{self.camera_port}/streaming/channels/{self.camera_channel}01"
|
||||
self.camera = cv2.VideoCapture(rtsp_url, cv2.CAP_FFMPEG)
|
||||
|
||||
if not self.camera.isOpened():
|
||||
print(f"无法打开网络摄像头: {rtsp_url}")
|
||||
return False
|
||||
print(f"网络摄像头初始化成功,地址: {rtsp_url}")
|
||||
# 关键优化:设置极低的缓冲区大小
|
||||
self.camera.set(cv2.CAP_PROP_BUFFERSIZE, 1)
|
||||
# 确保设置合理的帧率
|
||||
self.camera.set(cv2.CAP_PROP_FPS, 25)
|
||||
|
||||
# 设置超时参数
|
||||
self.camera.set(cv2.CAP_PROP_OPEN_TIMEOUT_MSEC, 5000) # 5秒超时
|
||||
self.camera.set(cv2.CAP_PROP_READ_TIMEOUT_MSEC, 1000) # 1秒读取超时
|
||||
return True
|
||||
except Exception as e:
|
||||
print(f"摄像头设置失败: {e}")
|
||||
return False
|
||||
|
||||
def capture_frame(self):
|
||||
"""捕获当前帧并返回numpy数组,设置5秒总超时"""
|
||||
try:
|
||||
if self.camera is None:
|
||||
print("摄像头未初始化")
|
||||
return None
|
||||
|
||||
# 设置总超时时间为5秒
|
||||
total_timeout = 5.0 # 5秒总超时时间
|
||||
start_time = time.time()
|
||||
|
||||
# 跳20帧,获取最新图像
|
||||
frames_skipped = 0
|
||||
while frames_skipped < 20:
|
||||
# 检查总超时
|
||||
if time.time() - start_time > total_timeout:
|
||||
print("捕获图像总超时")
|
||||
return None
|
||||
self.camera.grab()
|
||||
time.sleep(0.05) # 稍微增加延迟,确保有新帧到达
|
||||
frames_skipped += 1
|
||||
|
||||
# 尝试读取帧,使用同一超时计时器
|
||||
read_attempts = 0
|
||||
max_read_attempts = 3
|
||||
if self.camera.grab():
|
||||
while read_attempts < max_read_attempts:
|
||||
# 使用同一个超时计时器检查
|
||||
if time.time() - start_time > total_timeout:
|
||||
print("捕获图像总超时")
|
||||
return None
|
||||
|
||||
ret, frame = self.camera.retrieve()
|
||||
if ret:
|
||||
return frame
|
||||
else:
|
||||
print(f"尝试读取图像帧失败,重试 ({read_attempts+1}/{max_read_attempts})")
|
||||
read_attempts += 1
|
||||
# 短暂延迟后重试
|
||||
time.sleep(0.05)
|
||||
|
||||
print("多次尝试后仍无法捕获有效图像帧")
|
||||
return None
|
||||
except Exception as e:
|
||||
print(f"图像捕获失败: {e}")
|
||||
return None
|
||||
|
||||
def release(self):
|
||||
"""释放摄像头资源"""
|
||||
if self.camera is not None:
|
||||
self.camera.release()
|
||||
self.camera = None
|
||||
print("摄像头资源已释放")
|
||||
|
||||
def save_frame(self, frame, save_dir="captured_frames", filename=None):
|
||||
"""
|
||||
保存图像帧到指定目录,按日期创建子文件夹
|
||||
:param frame: 要保存的图像帧
|
||||
:param save_dir: 保存根目录
|
||||
:param filename: 保存的文件名,如果为None则使用时分秒格式
|
||||
:return: 保存的文件路径
|
||||
"""
|
||||
try:
|
||||
# 确保保存根目录存在
|
||||
if not os.path.exists(save_dir):
|
||||
os.makedirs(save_dir)
|
||||
print(f"创建保存根目录: {save_dir}")
|
||||
|
||||
# 检查磁盘可用空间 - 修复变量名称错误
|
||||
total, used, free = shutil.disk_usage(save_dir)
|
||||
if free < 1024 * 1024 * 20: # 小于 20MB 就停止
|
||||
print(f"❌ 磁盘空间严重不足(仅剩 {free / (1024**3):.2f} GB),停止运行。")
|
||||
return None
|
||||
|
||||
# 获取当前日期,创建日期子文件夹
|
||||
current_date = datetime.now().strftime("%Y%m%d")
|
||||
date_dir = os.path.join(save_dir, current_date)
|
||||
|
||||
# 确保日期子文件夹存在
|
||||
if not os.path.exists(date_dir):
|
||||
os.makedirs(date_dir)
|
||||
print(f"创建日期文件夹: {date_dir}")
|
||||
|
||||
# 生成文件名(时分秒格式)
|
||||
if filename is None:
|
||||
time_str = datetime.now().strftime("%Y%m%d%H%M%S")
|
||||
filename = f"{time_str}.jpg"
|
||||
|
||||
# 保存图像到日期子文件夹
|
||||
save_path = os.path.join(date_dir, filename)
|
||||
loc_status=cv2.imwrite(save_path, frame)
|
||||
if not loc_status:
|
||||
print(f"保存图像失败: {save_path}")
|
||||
return None
|
||||
print(f"图像已保存到: {save_path}")
|
||||
return save_path
|
||||
except Exception as e:
|
||||
print(f"保存图像失败: {e}")
|
||||
return None
|
||||
|
||||
def save_img(self)->Optional[str]:
|
||||
"""
|
||||
保存当前帧
|
||||
:return: 保存的文件路径
|
||||
"""
|
||||
if self.camera is None:
|
||||
self.setup_capture()
|
||||
frame = self.capture_frame()
|
||||
if frame is not None:
|
||||
loc_filepath=self.save_frame(frame)
|
||||
self.release()
|
||||
return loc_filepath
|
||||
else:
|
||||
print("无法捕获图像帧")
|
||||
return None
|
||||
|
||||
|
||||
def __del__(self):
|
||||
"""关闭
|
||||
"""
|
||||
self.release()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
camera = CameraUtil()
|
||||
for i in range(10):
|
||||
camera.save_img()
|
||||
time.sleep(5)
|
||||
camera.release()
|
||||
# camera.set_config(camera_type="ip", ip="192.168.0.234", port=554, username="admin", password="ailaimiye123", channel=1)
|
||||
# camera.setup_capture()
|
||||
# for i in range(10):
|
||||
# frame = camera.capture_frame()
|
||||
|
||||
# if frame is not None:
|
||||
# 保存当前帧
|
||||
# camera.save_frame(frame)
|
||||
# cv2.imshow("Camera Feed", frame)
|
||||
print('success')
|
||||
|
||||
# camera.release()
|
||||
# cv2.destroyAllWindows()
|
||||
237
Mv3D/calculate_diff2.py
Normal file
237
Mv3D/calculate_diff2.py
Normal file
@ -0,0 +1,237 @@
|
||||
import cv2
|
||||
import numpy as np
|
||||
import os
|
||||
|
||||
# ====================== 配置区 ======================
|
||||
|
||||
MODEL_PATH = "./Mv3D/point.rknn"
|
||||
OUTPUT_DIR = "./output_rknn"
|
||||
os.makedirs(OUTPUT_DIR, exist_ok=True)
|
||||
|
||||
# 固定参考点(像素坐标)
|
||||
FIXED_REF_POINT = (535, 605)
|
||||
|
||||
# mm/px 缩放因子(根据标定数据填写)
|
||||
width_mm = 70.0
|
||||
width_px = 42
|
||||
SCALE_X = width_mm / float(width_px)
|
||||
height_mm = 890.0
|
||||
height_px = 507
|
||||
SCALE_Y = height_mm / float(height_px)
|
||||
print(f"Scale factors: SCALE_X={SCALE_X:.3f} mm/px, SCALE_Y={SCALE_Y:.3f} mm/px")
|
||||
|
||||
# 输入尺寸
|
||||
IMG_SIZE = (640, 640)
|
||||
|
||||
|
||||
def letterbox_resize(image, size, bg_color=114):
|
||||
target_w, target_h = size
|
||||
h, w = image.shape[:2]
|
||||
scale = min(target_w / w, target_h / h)
|
||||
new_w, new_h = int(w * scale), int(h * scale)
|
||||
resized = cv2.resize(image, (new_w, new_h))
|
||||
canvas = np.full((target_h, target_w, 3), bg_color, dtype=np.uint8)
|
||||
dx, dy = (target_w - new_w) // 2, (target_h - new_h) // 2
|
||||
canvas[dy:dy + new_h, dx:dx + new_w] = resized
|
||||
return canvas, scale, dx, dy
|
||||
|
||||
|
||||
def safe_sigmoid(x):
|
||||
x = np.clip(x, -50, 50)
|
||||
return 1.0 / (1.0 + np.exp(-x))
|
||||
|
||||
|
||||
def softmax(x):
|
||||
x = x - np.max(x)
|
||||
e = np.exp(x)
|
||||
return e / e.sum()
|
||||
|
||||
|
||||
def dfl_to_xywh(loc, grid_x, grid_y, stride):
|
||||
"""将 DFL 输出解析为 xywh"""
|
||||
xywh_ = np.zeros(4)
|
||||
xywh = np.zeros(4)
|
||||
|
||||
# 每个维度 16 bins 做 softmax
|
||||
for i in range(4):
|
||||
l = loc[i * 16:(i + 1) * 16]
|
||||
l = softmax(l)
|
||||
xywh_[i] = sum([j * l[j] for j in range(16)])
|
||||
|
||||
# 对应公式
|
||||
xywh_[0] = (grid_x + 0.5) - xywh_[0]
|
||||
xywh_[1] = (grid_y + 0.5) - xywh_[1]
|
||||
xywh_[2] = (grid_x + 0.5) + xywh_[2]
|
||||
xywh_[3] = (grid_y + 0.5) + xywh_[3]
|
||||
|
||||
# 转成中心点 + 宽高
|
||||
xywh[0] = ((xywh_[0] + xywh_[2]) / 2) * stride
|
||||
xywh[1] = ((xywh_[1] + xywh_[3]) / 2) * stride
|
||||
xywh[2] = (xywh_[2] - xywh_[0]) * stride
|
||||
xywh[3] = (xywh_[3] - xywh_[1]) * stride
|
||||
|
||||
# 转为左上角坐标
|
||||
xywh[0] = xywh[0] - xywh[2] / 2
|
||||
xywh[1] = xywh[1] - xywh[3] / 2
|
||||
return xywh
|
||||
|
||||
|
||||
def parse_pose_outputs(outputs, conf_threshold=0.5, dx=0, dy=0, scale=1.0):
|
||||
"""
|
||||
完整解析 RKNN YOLO-Pose 输出
|
||||
返回 keypoints, class_id, obj_conf, bbox(已映射回原图)
|
||||
"""
|
||||
boxes = []
|
||||
obj_confs = []
|
||||
class_ids = []
|
||||
|
||||
# 遍历前三个输出 tensor (det 输出)
|
||||
for idx in range(3):
|
||||
det = np.array(outputs[idx])[0] # (C,H,W)
|
||||
C, H, W = det.shape
|
||||
num_classes = C - 64 # 前64通道为 DFL bbox
|
||||
stride = 640 // H
|
||||
|
||||
for h in range(H):
|
||||
for w in range(W):
|
||||
for c in range(num_classes):
|
||||
conf = safe_sigmoid(det[64 + c, h, w])
|
||||
if conf >= conf_threshold:
|
||||
loc = det[:64, h, w].astype(np.float32)
|
||||
xywh = dfl_to_xywh(loc, w, h, stride)
|
||||
boxes.append(xywh)
|
||||
obj_confs.append(conf)
|
||||
class_ids.append(c)
|
||||
|
||||
if not obj_confs:
|
||||
best_box = np.array([0, 0, 0, 0])
|
||||
class_id = -1
|
||||
obj_conf = 0.0
|
||||
else:
|
||||
max_idx = np.argmax(obj_confs)
|
||||
best_box = boxes[max_idx]
|
||||
class_id = class_ids[max_idx]
|
||||
obj_conf = obj_confs[max_idx]
|
||||
|
||||
# 🔹 bbox 坐标映射回原图
|
||||
x, y, w, h = best_box
|
||||
x = (x - dx) / scale
|
||||
y = (y - dy) / scale
|
||||
w = w / scale
|
||||
h = h / scale
|
||||
best_box = np.array([x, y, w, h])
|
||||
|
||||
# 🔹 关键点解析
|
||||
kpt_output = np.array(outputs[3])[0] # (num_kpts, 3, num_anchor)
|
||||
confs = kpt_output[:, 2, :]
|
||||
best_anchor_idx = np.argmax(np.mean(confs, axis=0))
|
||||
kpt_data = kpt_output[:, :, best_anchor_idx]
|
||||
|
||||
keypoints = []
|
||||
for i in range(kpt_data.shape[0]):
|
||||
x_img, y_img, vis_conf_raw = kpt_data[i]
|
||||
vis_prob = safe_sigmoid(vis_conf_raw)
|
||||
x_orig = (x_img - dx) / scale
|
||||
y_orig = (y_img - dy) / scale
|
||||
keypoints.append([x_orig, y_orig, vis_prob])
|
||||
|
||||
return np.array(keypoints), class_id, obj_conf, best_box
|
||||
|
||||
|
||||
def compute_offset(keypoints, fixed_point, scale_x, scale_y):
|
||||
if len(keypoints) < 2:
|
||||
return None
|
||||
p1, p2 = keypoints[0], keypoints[1]
|
||||
cx = (p1[0] + p2[0]) / 2.0
|
||||
cy = (p1[1] + p2[1]) / 2.0
|
||||
dx_mm = (cx - fixed_point[0]) * scale_x
|
||||
dy_mm = (cy - fixed_point[1]) * scale_y
|
||||
return cx, cy, dx_mm, dy_mm
|
||||
|
||||
|
||||
def visualize_result(image, keypoints, bbox, fixed_point, offset_info, save_path):
|
||||
vis = image.copy()
|
||||
colors = [(0, 0, 255), (0, 255, 255)]
|
||||
cx, cy, dx_mm, dy_mm = offset_info
|
||||
fx, fy = map(int, fixed_point)
|
||||
|
||||
# 绘制关键点
|
||||
for i, (x, y, conf) in enumerate(keypoints[:2]):
|
||||
if conf > 0.5:
|
||||
cv2.circle(vis, (int(x), int(y)), 6, colors[i], -1)
|
||||
if len(keypoints) >= 2:
|
||||
cv2.line(vis,
|
||||
(int(keypoints[0][0]), int(keypoints[0][1])),
|
||||
(int(keypoints[1][0]), int(keypoints[1][1])),
|
||||
(0, 255, 0), 2)
|
||||
|
||||
# 绘制 bbox
|
||||
x, y, w, h = bbox
|
||||
cv2.rectangle(vis, (int(x), int(y)), (int(x + w), int(y + h)), (255, 0, 0), 2)
|
||||
|
||||
# 绘制中心点
|
||||
cv2.circle(vis, (int(cx), int(cy)), 10, (0, 255, 0), 3)
|
||||
cv2.circle(vis, (fx, fy), 12, (255, 255, 0), 3)
|
||||
cv2.arrowedLine(vis, (fx, fy), (int(cx), int(cy)), (255, 255, 0), 2, tipLength=0.05)
|
||||
cv2.putText(vis, f"DeltaX={dx_mm:+.1f}mm", (fx + 30, fy - 30),
|
||||
cv2.FONT_HERSHEY_SIMPLEX, 0.8, (0, 255, 255), 2)
|
||||
cv2.putText(vis, f"DeltaY={dy_mm:+.1f}mm", (fx + 30, fy + 30),
|
||||
cv2.FONT_HERSHEY_SIMPLEX, 0.8, (0, 255, 255), 2)
|
||||
|
||||
cv2.imwrite(save_path, vis)
|
||||
|
||||
|
||||
def calculate_offset_from_image(image_path, visualize=False):
|
||||
from rknnlite.api import RKNNLite
|
||||
|
||||
orig = cv2.imread(image_path)
|
||||
if orig is None:
|
||||
return {'success': False, 'message': f'Failed to load image: {image_path}'}
|
||||
|
||||
img_resized, scale, dx, dy = letterbox_resize(orig, IMG_SIZE)
|
||||
infer_img = np.expand_dims(img_resized[..., ::-1], 0).astype(np.uint8)
|
||||
|
||||
rknn = RKNNLite(verbose=False)
|
||||
ret = rknn.load_rknn(MODEL_PATH)
|
||||
if ret != 0:
|
||||
return {'success': False, 'message': 'Failed to load RKNN model'}
|
||||
|
||||
try:
|
||||
rknn.init_runtime(core_mask=RKNNLite.NPU_CORE_0)
|
||||
outputs = rknn.inference([infer_img])
|
||||
finally:
|
||||
rknn.release()
|
||||
|
||||
try:
|
||||
keypoints, class_id, obj_conf, bbox = parse_pose_outputs(outputs, dx=dx, dy=dy, scale=scale)
|
||||
except Exception as e:
|
||||
return {'success': False, 'message': f'Parse error: {str(e)}'}
|
||||
|
||||
offset_info = compute_offset(keypoints, FIXED_REF_POINT, SCALE_X, SCALE_Y)
|
||||
if offset_info is None:
|
||||
return {'success': False, 'message': 'Not enough keypoints'}
|
||||
|
||||
cx, cy, dx_mm, dy_mm = offset_info
|
||||
|
||||
if visualize:
|
||||
vis_save_path = os.path.join(OUTPUT_DIR, f"result_{os.path.basename(image_path)}")
|
||||
visualize_result(orig, keypoints, bbox, FIXED_REF_POINT, offset_info, vis_save_path)
|
||||
|
||||
return {'success': True, 'dx_mm': dx_mm, 'dy_mm': dy_mm,
|
||||
'cx': cx, 'cy': cy, 'class_id': class_id,
|
||||
'obj_conf': obj_conf, 'bbox': bbox,
|
||||
'message': 'Success'}
|
||||
|
||||
|
||||
# ====================== 使用示例 ======================
|
||||
if __name__ == "__main__":
|
||||
image_path = "11.jpg"
|
||||
result = calculate_offset_from_image(image_path, visualize=True)
|
||||
|
||||
if result['success']:
|
||||
print(f"Center point: ({result['cx']:.1f}, {result['cy']:.1f})")
|
||||
print(f"Offset: DeltaX={result['dx_mm']:+.2f} mm, DeltaY={result['dy_mm']:+.2f} mm")
|
||||
print(f"Class ID: {result['class_id']}, Confidence: {result['obj_conf']:.3f}")
|
||||
print(f"BBox: {result['bbox']}")
|
||||
else:
|
||||
print("Error:", result['message'])
|
||||
BIN
Mv3D/point.rknn
Normal file
BIN
Mv3D/point.rknn
Normal file
Binary file not shown.
13
Seting.ini
13
Seting.ini
@ -21,12 +21,12 @@ photo_z1 = 1.0
|
||||
photo_u1 = 12.0
|
||||
photo_v1 = 0.0
|
||||
photo_w1 = 1.0
|
||||
photo_x2 = 0.0
|
||||
photo_y2 = 0.0
|
||||
photo_z2 = 0.0
|
||||
photo_u2 = 0.0
|
||||
photo_x2 = 7.0
|
||||
photo_y2 = 50.0
|
||||
photo_z2 = 1.0
|
||||
photo_u2 = 12.0
|
||||
photo_v2 = 0.0
|
||||
photo_w2 = 0.0
|
||||
photo_w2 = 1.0
|
||||
photo_x3 = 7.0
|
||||
photo_y3 = 50.0
|
||||
photo_z3 = 1.0
|
||||
@ -47,8 +47,7 @@ photo_v5 = 0.0
|
||||
photo_w5 = 1.0
|
||||
linecount = 2
|
||||
remain_linename = 1
|
||||
remain_dropweight_kg = 50
|
||||
remain_count = 18
|
||||
remain_count = 3
|
||||
maduo_count = 30
|
||||
io_take_addr = 8
|
||||
io_zip_addr = 11
|
||||
|
||||
@ -51,10 +51,11 @@ class Logger(QObject):
|
||||
|
||||
handler = TimedRotatingFileHandler(file_path, when='D', interval=1, backupCount=30,encoding='utf-8')
|
||||
handler.suffix = "%Y-%m-%d"
|
||||
formatter = logging.Formatter('%(asctime)s - %(levelname)s- %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
|
||||
formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
|
||||
handler.setFormatter(formatter)
|
||||
self.logger_file_info.addHandler(handler)
|
||||
# 添加错误专用日志文件
|
||||
|
||||
# 添加错误专用日志文件
|
||||
error_handler = TimedRotatingFileHandler(
|
||||
file_path.replace('.log', '_error.log'),
|
||||
when='D', interval=1, backupCount=30, encoding='utf-8')
|
||||
@ -62,7 +63,6 @@ class Logger(QObject):
|
||||
error_handler.setLevel(logging.ERROR) # 只处理错误级别
|
||||
error_handler.setFormatter(formatter)
|
||||
self.logger_file_info.addHandler(error_handler)
|
||||
|
||||
|
||||
def _process_logs(self):
|
||||
while True:
|
||||
|
||||
BIN
Vision/tool/__pycache__/CameraRVC.cpython-39.pyc
Normal file
BIN
Vision/tool/__pycache__/CameraRVC.cpython-39.pyc
Normal file
Binary file not shown.
@ -1,40 +0,0 @@
|
||||
2024-12-14 16:10:42 - INFO - <20><><EFBFBD><EFBFBD>ϵͳ
|
||||
2024-12-14 16:11:15 - ERROR - <20>ظ<DEBB>
|
||||
2024-12-14 16:14:02 - INFO - <20>ƶ<EFBFBD><C6B6><EFBFBD>λ<EFBFBD><CEBB>:<3A><><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>m0:1.0-m2:0.0-m3:0.0-m4:0.0-m5:0.0-m6:0.0
|
||||
2024-12-14 16:14:06 - ERROR - <20>ظ<DEBB>
|
||||
2024-12-14 16:14:10 - INFO - <20><><EFBFBD><EFBFBD>Ͷ<EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD>:1
|
||||
2024-12-14 16:14:11 - INFO - <20>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
2024-12-14 16:14:11 - INFO - <20>л<EFBFBD><D0BB><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>״̬
|
||||
2024-12-14 16:14:12 - INFO - <20><>һ<EFBFBD><D2BB>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
2024-12-14 16:14:12 - INFO - <20><>Ӧ<EFBFBD><D3A6>1:Ͷ<>Ͽ<EFBFBD>ʼ
|
||||
2024-12-14 16:14:12 - INFO - <20><><EFBFBD><EFBFBD>IO<49><4F><EFBFBD><EFBFBD>: 3<><33>1
|
||||
2024-12-14 16:14:14 - ERROR - <20>ظ<DEBB>
|
||||
2024-12-14 16:14:17 - INFO - <20><><EFBFBD><EFBFBD>IO<49><4F><EFBFBD><EFBFBD>: 3<><33>0
|
||||
2024-12-14 16:14:17 - INFO - Ͷ<>Ͽ<EFBFBD>ʼ
|
||||
2024-12-14 16:14:21 - ERROR - <20>ظ<DEBB>
|
||||
2024-12-14 16:21:15 - INFO - <20>˳<EFBFBD>ϵͳ
|
||||
2024-12-14 16:21:15 - ERROR - <20>ظ<DEBB>
|
||||
2024-12-14 16:21:15 - ERROR - model
|
||||
2024-12-14 16:21:27 - INFO - <20><><EFBFBD><EFBFBD>ϵͳ
|
||||
2024-12-14 16:21:59 - ERROR - <20>ظ<DEBB>
|
||||
2024-12-14 16:37:33 - INFO - <20>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
2024-12-14 16:37:33 - INFO - <20>л<EFBFBD><D0BB><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>״̬
|
||||
2024-12-14 16:37:34 - INFO - <20><>һ<EFBFBD><D2BB>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
2024-12-14 16:37:34 - INFO - <20><>Ӧ<EFBFBD><D3A6>1:Ͷ<>Ͽ<EFBFBD>ʼ
|
||||
2024-12-14 16:37:34 - INFO - <20><><EFBFBD><EFBFBD>IO<49><4F><EFBFBD><EFBFBD>: 3<><33>1
|
||||
2024-12-14 16:37:38 - ERROR - <20>ظ<DEBB>
|
||||
2024-12-14 16:37:39 - INFO - <20><><EFBFBD><EFBFBD>Ͷ<EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD>:10
|
||||
2024-12-14 16:37:39 - INFO - <20>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
2024-12-14 16:37:39 - INFO - <20>л<EFBFBD><D0BB><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>״̬
|
||||
2024-12-14 16:37:39 - INFO - <20><><EFBFBD><EFBFBD>IO<49><4F><EFBFBD><EFBFBD>: 3<><33>0
|
||||
2024-12-14 16:37:39 - INFO - Ͷ<>Ͽ<EFBFBD>ʼ
|
||||
2024-12-14 16:37:46 - ERROR - <20>ظ<DEBB>
|
||||
2024-12-14 16:39:27 - INFO - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
2024-12-14 16:39:27 - INFO - Ͷ<><CDB6>ֹͣ
|
||||
2024-12-14 16:39:28 - INFO - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
2024-12-14 16:39:28 - INFO - Ͷ<><CDB6>ֹͣ
|
||||
2024-12-14 16:39:30 - INFO - Ͷ<><CDB6><EFBFBD><EFBFBD>ͣ
|
||||
2024-12-14 16:39:30 - ERROR - <20>ظ<DEBB>
|
||||
2024-12-14 16:39:30 - INFO - Ͷ<><CDB6><EFBFBD><EFBFBD>ͣ
|
||||
2024-12-14 16:39:38 - ERROR - <20>ظ<DEBB>
|
||||
2024-12-14 16:41:47 - INFO - <20>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>
|
||||
581330
log/log.log.2025-07-30
581330
log/log.log.2025-07-30
File diff suppressed because it is too large
Load Diff
8075
log/log.log.bak
8075
log/log.log.bak
File diff suppressed because it is too large
Load Diff
804
log/log.logbak
804
log/log.logbak
@ -1,804 +0,0 @@
|
||||
2025-08-12 10:22:17 - INFO - 进入系统
|
||||
2025-08-12 10:22:25 - INFO - 第一层确认生产
|
||||
2025-08-12 10:22:25 - INFO - 反应釜1:投料开始
|
||||
2025-08-12 10:22:25 - INFO - 发送命令{"dsID":"HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"200","type":"0","io_status":"1","point":"2","delay":"0"}]}
|
||||
2025-08-12 10:22:25 - INFO - 发送IO控制: 2,1
|
||||
2025-08-12 10:22:30 - INFO - 第一层确认生产
|
||||
2025-08-12 10:22:30 - INFO - 反应釜1:投料开始
|
||||
2025-08-12 10:22:30 - INFO - 发送命令{"dsID":"HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"200","type":"0","io_status":"0","point":"2","delay":"0"}]}
|
||||
2025-08-12 10:22:30 - INFO - 发送IO控制: 2,0
|
||||
2025-08-12 10:22:30 - INFO - 投料开始
|
||||
2025-08-12 10:22:31 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:22:31 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:22:31 - ERROR - 启动传感器线程失败: log_message() missing 1 required positional argument: 'message'
|
||||
2025-08-12 10:22:32 - INFO - 投料开始
|
||||
2025-08-12 10:22:33 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:22:33 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:22:33 - INFO - 移动到中位位置
|
||||
2025-08-12 10:22:33 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:22:33 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:22:33 - INFO - [调试计数] 已进入 FMid 分支 1 次
|
||||
2025-08-12 10:22:33 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:22:33 - INFO - 检测是否安全投料
|
||||
2025-08-12 10:22:33 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:22:33 - INFO - 检测是否安全投料
|
||||
2025-08-12 10:22:34 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:22:34 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:22:34 - INFO - 拍照
|
||||
2025-08-12 10:22:34 - INFO - 识别图像成功
|
||||
2025-08-12 10:22:34 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:22:34 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:22:35 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:22:36 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:22:37 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:22:38 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:22:39 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:22:40 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:22:41 - INFO - 清除报警
|
||||
2025-08-12 10:22:41 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"1","instructions":[]}
|
||||
2025-08-12 10:22:41 - INFO - 投料停止
|
||||
2025-08-12 10:22:41 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:22:42 - INFO - ✅ 传感器2检测到料包到位,开始执行抓取
|
||||
2025-08-12 10:22:43 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:22:43 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:22:43 - INFO - 执行完成FPhoto
|
||||
2025-08-12 10:22:43 - INFO - 拍照
|
||||
2025-08-12 10:22:43 - INFO - 识别图像成功
|
||||
2025-08-12 10:22:43 - INFO - ✅ 传感器2检测到料包到位,开始执行抓取
|
||||
2025-08-12 10:22:43 - INFO - 移动到位置:姿势直线:X:-569.528625-Y:-1299.985718-Z:-413.431213-U:-151.127274-V:0.0-W:-0.0
|
||||
2025-08-12 10:22:43 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.528625","m1":"-1299.985718","m2":"-413.431213","m3":"-151.127274","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:22:43 - INFO - 执行完成FPhoto
|
||||
2025-08-12 10:22:44 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.531006","m1":"-1299.971069","m2":"-825.315613","m3":"-151.126694","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:22:44 - INFO - 移动到中位位置
|
||||
2025-08-12 10:22:44 - INFO - 移动到位置:姿势直线:X:-569.531006-Y:-1299.971069-Z:-825.315613-U:-151.126694-V:0.0-W:-0.0
|
||||
2025-08-12 10:22:44 - INFO - [调试计数] 已进入 FMid 分支 2 次
|
||||
2025-08-12 10:22:47 - INFO - 移动到中位位置
|
||||
2025-08-12 10:22:47 - INFO - 移动到位置:姿势直线:X:-569.543396-Y:-1299.659543-Z:-1269.931256-U:-151.12764-V:0.258-W:0.258
|
||||
2025-08-12 10:22:47 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.543396","m1":"-1299.659543","m2":"-1269.931256","m3":"-151.12764","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:22:47 - INFO - [调试计数] 已进入 FMid 分支 3 次
|
||||
2025-08-12 10:22:49 - INFO - 移动到中位位置
|
||||
2025-08-12 10:22:49 - INFO - 移动到位置:姿势直线:X:-569.543396-Y:-1299.659543-Z:-1269.931256-U:-151.12764-V:0.258-W:0.258
|
||||
2025-08-12 10:22:49 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.543396","m1":"-1299.659543","m2":"-1269.931256","m3":"-151.12764","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:22:49 - INFO - [调试计数] 已进入 FMid 分支 4 次
|
||||
2025-08-12 10:22:50 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:50 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:50 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:50 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:50 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:50 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:50 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:50 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:50 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:51 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:51 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:51 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:51 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:51 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:51 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:51 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:51 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:51 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:51 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:52 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:52 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:52 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:52 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:52 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:52 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:52 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:52 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:52 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:53 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:53 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:53 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:53 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:53 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:53 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:53 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:53 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:53 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:54 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:54 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:54 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:54 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:54 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:54 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:54 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:54 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:54 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:55 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:55 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:55 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:55 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:55 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:55 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:55 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:55 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:22:55 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:22:55 - INFO - 🟢 机器人已到达抓料点位
|
||||
2025-08-12 10:22:56 - INFO - 已设置放置点: X=-187.12
|
||||
2025-08-12 10:22:56 - INFO - 移动到位置:姿势直线:X:-569.543396-Y:-1299.659543-Z:-1269.931256-U:-151.12764-V:0.258-W:0.258
|
||||
2025-08-12 10:22:56 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.543396","m1":"-1299.659543","m2":"-1269.931256","m3":"-151.12764","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:22:56 - INFO - 移动到中位位置
|
||||
2025-08-12 10:22:56 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.524475","m1":"-1299.973877","m2":"-825.314453","m3":"-151.126846","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:22:56 - INFO - 移动到位置:姿势直线:X:-569.524475-Y:-1299.973877-Z:-825.314453-U:-151.126846-V:0.0-W:-0.0
|
||||
2025-08-12 10:22:56 - INFO - [调试计数] 已进入 FMid 分支 5 次
|
||||
2025-08-12 10:22:56 - INFO - 移动到中位位置
|
||||
2025-08-12 10:22:56 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.522156","m1":"-1299.988647","m2":"-413.430023","m3":"-151.126541","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:22:57 - INFO - 移动到位置:姿势直线:X:-569.522156-Y:-1299.988647-Z:-413.430023-U:-151.126541-V:0.0-W:-0.0
|
||||
2025-08-12 10:22:57 - INFO - [调试计数] 已进入 FMid 分支 6 次
|
||||
2025-08-12 10:22:57 - INFO - 移动到中位位置
|
||||
2025-08-12 10:22:57 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"1143.22937","m1":"-822.204346","m2":"-84.250801","m3":"-73.561378","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:22:57 - INFO - 移动到位置:姿势直线:X:1143.22937-Y:-822.204346-Z:-84.250801-U:-73.561378-V:0.0-W:-0.0
|
||||
2025-08-12 10:22:57 - INFO - [调试计数] 已进入 FMid 分支 7 次
|
||||
2025-08-12 10:23:05 - INFO - 移动到中位位置
|
||||
2025-08-12 10:23:05 - INFO - 移动到位置:姿势直线:X:890.821655-Y:-313.300446-Z:-691.557617-U:-63.248192-V:0.0-W:-0.0
|
||||
2025-08-12 10:23:05 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"890.821655","m1":"-313.300446","m2":"-691.557617","m3":"-63.248192","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:23:05 - INFO - [调试计数] 已进入 FMid 分支 8 次
|
||||
2025-08-12 10:23:09 - INFO - 移动到破袋位置
|
||||
2025-08-12 10:23:09 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:23:09 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:23:09 - INFO - 拍照
|
||||
2025-08-12 10:23:10 - INFO - 识别图像成功
|
||||
2025-08-12 10:23:10 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:10 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:11 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:12 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:13 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:14 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:16 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:17 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:18 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:19 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:20 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:21 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:22 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:23 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:24 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:25 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:26 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:27 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:28 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:29 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:30 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:31 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:32 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:33 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:23:34 - INFO - ✅ 传感器2检测到料包到位,开始执行抓取
|
||||
2025-08-12 10:23:34 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.528625","m1":"-1299.985718","m2":"-413.431213","m3":"-151.127274","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:23:35 - INFO - 移动到位置:姿势直线:X:-569.528625-Y:-1299.985718-Z:-413.431213-U:-151.127274-V:0.0-W:-0.0
|
||||
2025-08-12 10:23:35 - INFO - 执行完成FPhoto
|
||||
2025-08-12 10:23:35 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.531006","m1":"-1299.971069","m2":"-825.315613","m3":"-151.126694","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:23:35 - INFO - 移动到中位位置
|
||||
2025-08-12 10:23:35 - INFO - 移动到位置:姿势直线:X:-569.531006-Y:-1299.971069-Z:-825.315613-U:-151.126694-V:0.0-W:-0.0
|
||||
2025-08-12 10:23:35 - INFO - [调试计数] 已进入 FMid 分支 9 次
|
||||
2025-08-12 10:23:38 - INFO - 移动到中位位置
|
||||
2025-08-12 10:23:38 - INFO - 移动到位置:姿势直线:X:-569.543396-Y:-1299.659543-Z:-1269.931256-U:-151.12764-V:0.258-W:0.258
|
||||
2025-08-12 10:23:38 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.543396","m1":"-1299.659543","m2":"-1269.931256","m3":"-151.12764","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:23:38 - INFO - [调试计数] 已进入 FMid 分支 10 次
|
||||
2025-08-12 10:23:40 - INFO - 移动到中位位置
|
||||
2025-08-12 10:23:40 - INFO - 移动到位置:姿势直线:X:-569.543396-Y:-1299.659543-Z:-1269.931256-U:-151.12764-V:0.258-W:0.258
|
||||
2025-08-12 10:23:41 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.543396","m1":"-1299.659543","m2":"-1269.931256","m3":"-151.12764","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:23:41 - INFO - [调试计数] 已进入 FMid 分支 11 次
|
||||
2025-08-12 10:23:41 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:41 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:41 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:41 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:41 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:41 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:41 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:42 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:42 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:42 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:42 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:42 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:42 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:42 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:42 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:42 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:42 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:43 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:43 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:43 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:43 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:43 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:43 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:43 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:43 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:43 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:44 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:44 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:44 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:44 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:44 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:44 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:44 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:44 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:44 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:45 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:45 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:45 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:45 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:45 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:45 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:45 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:45 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:45 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:45 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:46 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:46 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:46 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:46 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:46 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:46 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:46 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:46 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:46 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:23:47 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:23:47 - INFO - 🟢 机器人已到达抓料点位
|
||||
2025-08-12 10:23:47 - INFO - 已设置放置点: X=1069.08
|
||||
2025-08-12 10:23:47 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.543396","m1":"-1299.659543","m2":"-1269.931256","m3":"-151.12764","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:23:47 - INFO - 移动到位置:姿势直线:X:-569.543396-Y:-1299.659543-Z:-1269.931256-U:-151.12764-V:0.258-W:0.258
|
||||
2025-08-12 10:23:47 - INFO - 移动到中位位置
|
||||
2025-08-12 10:23:47 - INFO - 移动到位置:姿势直线:X:-569.524475-Y:-1299.973877-Z:-825.314453-U:-151.126846-V:0.0-W:-0.0
|
||||
2025-08-12 10:23:47 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.524475","m1":"-1299.973877","m2":"-825.314453","m3":"-151.126846","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:23:47 - INFO - [调试计数] 已进入 FMid 分支 12 次
|
||||
2025-08-12 10:23:48 - INFO - 移动到中位位置
|
||||
2025-08-12 10:23:48 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.522156","m1":"-1299.988647","m2":"-413.430023","m3":"-151.126541","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:23:48 - INFO - 移动到位置:姿势直线:X:-569.522156-Y:-1299.988647-Z:-413.430023-U:-151.126541-V:0.0-W:-0.0
|
||||
2025-08-12 10:23:48 - INFO - [调试计数] 已进入 FMid 分支 13 次
|
||||
2025-08-12 10:23:48 - INFO - 移动到中位位置
|
||||
2025-08-12 10:23:48 - INFO - 移动到位置:姿势直线:X:1143.22937-Y:-822.204346-Z:-84.250801-U:-73.561378-V:0.0-W:-0.0
|
||||
2025-08-12 10:23:48 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"1143.22937","m1":"-822.204346","m2":"-84.250801","m3":"-73.561378","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:23:48 - INFO - [调试计数] 已进入 FMid 分支 14 次
|
||||
2025-08-12 10:23:56 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"890.821655","m1":"-313.300446","m2":"-691.557617","m3":"-63.248192","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:23:56 - INFO - 移动到中位位置
|
||||
2025-08-12 10:23:56 - INFO - 移动到位置:姿势直线:X:890.821655-Y:-313.300446-Z:-691.557617-U:-63.248192-V:0.0-W:-0.0
|
||||
2025-08-12 10:23:56 - INFO - [调试计数] 已进入 FMid 分支 15 次
|
||||
2025-08-12 10:24:00 - INFO - 移动到破袋位置
|
||||
2025-08-12 10:24:00 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:24:00 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:24:00 - INFO - 拍照
|
||||
2025-08-12 10:24:00 - INFO - 识别图像成功
|
||||
2025-08-12 10:24:01 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:01 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:02 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:03 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:04 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:05 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:06 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:07 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:08 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:10 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:11 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:12 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:13 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:14 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:15 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:16 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:17 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:18 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:19 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:20 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:21 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:22 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:23 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:23 - ERROR - 'str' object has no attribute 'release'
|
||||
2025-08-12 10:24:24 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:25 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:26 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:26 - ERROR - 'str' object has no attribute 'release'
|
||||
2025-08-12 10:24:27 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:28 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:29 - ERROR - 'str' object has no attribute 'release'
|
||||
2025-08-12 10:24:29 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:30 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:31 - ERROR - 'str' object has no attribute 'release'
|
||||
2025-08-12 10:24:31 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:32 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:24:33 - ERROR - 'str' object has no attribute 'release'
|
||||
2025-08-12 10:30:07 - INFO - 进入系统
|
||||
2025-08-12 10:30:12 - INFO - 发送命令{"dsID":"www.hc-system.com.RemoteMonitor","reqType":"command","cmdData":["switchTool","2"]}
|
||||
2025-08-12 10:30:12 - INFO - 切换到工具坐标
|
||||
2025-08-12 10:30:12 - INFO - 发送命令{"dsID":"www.hc-system.com.RemoteMonitor","reqType":"command","cmdData":["startButton","1"]}
|
||||
2025-08-12 10:30:12 - INFO - 切换到自动运行状态
|
||||
2025-08-12 10:30:13 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:13 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:13 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:13 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:14 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:14 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:14 - INFO - 第一层确认生产
|
||||
2025-08-12 10:30:14 - INFO - 反应釜1:投料开始
|
||||
2025-08-12 10:30:14 - INFO - 发送命令{"dsID":"HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"200","type":"0","io_status":"1","point":"2","delay":"0"}]}
|
||||
2025-08-12 10:30:14 - INFO - 发送IO控制: 2,1
|
||||
2025-08-12 10:30:14 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:15 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:15 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:15 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:15 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:15 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:15 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:15 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:16 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:16 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:16 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:16 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:16 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:17 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:17 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:17 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:17 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:17 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:18 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:18 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:18 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:18 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:18 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:19 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:19 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:19 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:19 - INFO - 发送命令{"dsID":"HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"200","type":"0","io_status":"0","point":"2","delay":"0"}]}
|
||||
2025-08-12 10:30:19 - INFO - 发送IO控制: 2,0
|
||||
2025-08-12 10:30:19 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:19 - INFO - 清除报警
|
||||
2025-08-12 10:30:20 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"1","instructions":[]}
|
||||
2025-08-12 10:30:20 - INFO - 投料停止
|
||||
2025-08-12 10:30:20 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:20 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:20 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:20 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:20 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:20 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:21 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:21 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:21 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:21 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:22 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:22 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:22 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:22 - ERROR - 发生报警:42
|
||||
2025-08-12 10:30:24 - INFO - 清除报警
|
||||
2025-08-12 10:30:24 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"1","instructions":[]}
|
||||
2025-08-12 10:30:24 - INFO - 投料停止
|
||||
2025-08-12 10:30:27 - INFO - 清除报警
|
||||
2025-08-12 10:30:27 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"1","instructions":[]}
|
||||
2025-08-12 10:30:27 - INFO - 开始复位
|
||||
2025-08-12 10:30:27 - INFO - 发送命令{"dsID":"HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"200","type":"0","io_status":"1","point":"2","delay":"0"}]}
|
||||
2025-08-12 10:30:28 - ERROR - 机械臂未按照实际路线点移动,未能寻找到适配路径点位
|
||||
2025-08-12 10:30:28 - INFO - 发送IO控制: 2,1
|
||||
2025-08-12 10:30:28 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.522156","m1":"-1299.988647","m2":"-413.430023","m3":"-151.126541","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:30:28 - INFO - 移动到位置:姿势直线:X:-569.522156-Y:-1299.988647-Z:-413.430023-U:-151.126541-V:0.0-W:-0.0
|
||||
2025-08-12 10:30:34 - INFO - 移动到位置:姿势直线:X:-569.524475-Y:-1299.973877-Z:-825.314453-U:-151.126846-V:0.0-W:-0.0
|
||||
2025-08-12 10:30:35 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.524475","m1":"-1299.973877","m2":"-825.314453","m3":"-151.126846","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:30:38 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.531006","m1":"-1299.971069","m2":"-825.315613","m3":"-151.126694","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:30:38 - INFO - 移动到位置:姿势直线:X:-569.531006-Y:-1299.971069-Z:-825.315613-U:-151.126694-V:0.0-W:-0.0
|
||||
2025-08-12 10:30:38 - INFO - 移动到位置:姿势直线:X:-569.528625-Y:-1299.985718-Z:-413.431213-U:-151.127274-V:0.0-W:-0.0
|
||||
2025-08-12 10:30:39 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.528625","m1":"-1299.985718","m2":"-413.431213","m3":"-151.127274","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:30:42 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:30:42 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:30:47 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:30:47 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:30:47 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:30:47 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:30:47 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:30:48 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:30:48 - INFO - 发送命令{"dsID":"HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"200","type":"0","io_status":"0","point":"2","delay":"0"}]}
|
||||
2025-08-12 10:30:48 - INFO - 发送IO控制: 2,0
|
||||
2025-08-12 10:30:57 - INFO - 投料暂停
|
||||
2025-08-12 10:30:57 - INFO - 发送命令{"dsID":"www.hc-system.com.RemoteMonitor","reqType":"command","cmdData":["actionPause","1"]}
|
||||
2025-08-12 10:30:58 - INFO - 发送命令{"dsID":"www.hc-system.com.RemoteMonitor","reqType":"command","cmdData":["actionPause","0"]}
|
||||
2025-08-12 10:30:58 - INFO - 投料继续
|
||||
2025-08-12 10:30:58 - INFO - 发送命令{"dsID":"www.hc-system.com.RemoteMonitor","reqType":"command","cmdData":["startButton","1"]}
|
||||
2025-08-12 10:30:58 - INFO - 切换到自动运行状态
|
||||
2025-08-12 10:30:58 - ERROR - 启动传感器线程失败: log_message() missing 1 required positional argument: 'message'
|
||||
2025-08-12 10:30:58 - INFO - 投料开始
|
||||
2025-08-12 10:30:59 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:30:59 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:30:59 - INFO - 投料开始
|
||||
2025-08-12 10:31:00 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:31:01 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:01 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:01 - INFO - 移动到中位位置
|
||||
2025-08-12 10:31:01 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:31:01 - INFO - [调试计数] 已进入 FMid 分支 1 次
|
||||
2025-08-12 10:31:01 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:01 - INFO - 检测是否安全投料
|
||||
2025-08-12 10:31:01 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:31:01 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:02 - INFO - 检测是否安全投料
|
||||
2025-08-12 10:31:02 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:31:02 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:02 - INFO - 投料结束
|
||||
2025-08-12 10:31:02 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:31:02 - INFO - 移动到拍照位置
|
||||
2025-08-12 10:31:02 - INFO - 复位成功
|
||||
2025-08-12 10:31:02 - ERROR - 关闭传感器线程异常: log_message() missing 1 required positional argument: 'message'
|
||||
2025-08-12 10:31:04 - INFO - 第一层确认生产
|
||||
2025-08-12 10:31:04 - INFO - 反应釜1:投料开始
|
||||
2025-08-12 10:31:04 - INFO - 发送命令{"dsID":"HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"200","type":"0","io_status":"1","point":"2","delay":"0"}]}
|
||||
2025-08-12 10:31:05 - INFO - 发送IO控制: 2,1
|
||||
2025-08-12 10:31:09 - INFO - 发送命令{"dsID":"HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"200","type":"0","io_status":"0","point":"2","delay":"0"}]}
|
||||
2025-08-12 10:31:10 - INFO - 发送IO控制: 2,0
|
||||
2025-08-12 10:31:10 - INFO - 投料开始
|
||||
2025-08-12 10:31:11 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:31:11 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:11 - ERROR - 启动传感器线程失败: log_message() missing 1 required positional argument: 'message'
|
||||
2025-08-12 10:31:11 - INFO - 投料开始
|
||||
2025-08-12 10:31:12 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:31:12 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:12 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:12 - INFO - 移动到中位位置
|
||||
2025-08-12 10:31:12 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:31:12 - INFO - [调试计数] 已进入 FMid 分支 2 次
|
||||
2025-08-12 10:31:13 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:13 - INFO - 检测是否安全投料
|
||||
2025-08-12 10:31:13 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:31:13 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:13 - INFO - 检测是否安全投料
|
||||
2025-08-12 10:31:13 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:31:13 - INFO - 拍照
|
||||
2025-08-12 10:31:13 - INFO - 识别图像成功
|
||||
2025-08-12 10:31:13 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:31:13 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:31:14 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:31:16 - INFO - ✅ 传感器2检测到料包到位,开始执行抓取
|
||||
2025-08-12 10:31:16 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:31:16 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:16 - INFO - 执行完成FPhoto
|
||||
2025-08-12 10:31:16 - INFO - 拍照
|
||||
2025-08-12 10:31:16 - INFO - 识别图像成功
|
||||
2025-08-12 10:31:16 - INFO - ✅ 传感器2检测到料包到位,开始执行抓取
|
||||
2025-08-12 10:31:16 - INFO - 移动到位置:姿势直线:X:-569.528625-Y:-1299.985718-Z:-413.431213-U:-151.127274-V:0.0-W:-0.0
|
||||
2025-08-12 10:31:16 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.528625","m1":"-1299.985718","m2":"-413.431213","m3":"-151.127274","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:17 - INFO - 执行完成FPhoto
|
||||
2025-08-12 10:31:17 - INFO - 移动到中位位置
|
||||
2025-08-12 10:31:17 - INFO - 移动到位置:姿势直线:X:-569.531006-Y:-1299.971069-Z:-825.315613-U:-151.126694-V:0.0-W:-0.0
|
||||
2025-08-12 10:31:17 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.531006","m1":"-1299.971069","m2":"-825.315613","m3":"-151.126694","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:17 - INFO - [调试计数] 已进入 FMid 分支 3 次
|
||||
2025-08-12 10:31:20 - INFO - 移动到中位位置
|
||||
2025-08-12 10:31:20 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.543396","m1":"-1299.659543","m2":"-1269.931256","m3":"-151.12764","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:20 - INFO - 移动到位置:姿势直线:X:-569.543396-Y:-1299.659543-Z:-1269.931256-U:-151.12764-V:0.258-W:0.258
|
||||
2025-08-12 10:31:20 - INFO - [调试计数] 已进入 FMid 分支 4 次
|
||||
2025-08-12 10:31:22 - INFO - 移动到中位位置
|
||||
2025-08-12 10:31:22 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.543396","m1":"-1299.659543","m2":"-1269.931256","m3":"-151.12764","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:22 - INFO - 移动到位置:姿势直线:X:-569.543396-Y:-1299.659543-Z:-1269.931256-U:-151.12764-V:0.258-W:0.258
|
||||
2025-08-12 10:31:23 - INFO - [调试计数] 已进入 FMid 分支 5 次
|
||||
2025-08-12 10:31:23 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:23 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:23 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:23 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:23 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:23 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:23 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:23 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:23 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:24 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:24 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:24 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:24 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:24 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:24 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:24 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:24 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:24 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:25 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:25 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:25 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:25 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:25 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:25 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:25 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:25 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:25 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:26 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:26 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:26 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:26 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:26 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:26 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:26 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:26 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:26 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:26 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:27 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:27 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:27 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:27 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:27 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:27 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:27 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:27 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:27 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:28 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:28 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:28 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:28 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:28 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:28 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:28 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:28 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:31:28 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.543396","m1":"-1299.659543","m2":"-1269.931256","m3":"-151.12764","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:29 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:31:29 - INFO - 🟢 机器人已到达抓料点位
|
||||
2025-08-12 10:31:29 - INFO - 已设置放置点: X=-187.12
|
||||
2025-08-12 10:31:29 - INFO - 移动到位置:姿势直线:X:-569.543396-Y:-1299.659543-Z:-1269.931256-U:-151.12764-V:0.258-W:0.258
|
||||
2025-08-12 10:31:29 - INFO - 移动到中位位置
|
||||
2025-08-12 10:31:29 - INFO - 移动到位置:姿势直线:X:-569.524475-Y:-1299.973877-Z:-825.314453-U:-151.126846-V:0.0-W:-0.0
|
||||
2025-08-12 10:31:29 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.524475","m1":"-1299.973877","m2":"-825.314453","m3":"-151.126846","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:29 - INFO - [调试计数] 已进入 FMid 分支 6 次
|
||||
2025-08-12 10:31:29 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.522156","m1":"-1299.988647","m2":"-413.430023","m3":"-151.126541","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:29 - INFO - 移动到中位位置
|
||||
2025-08-12 10:31:30 - INFO - 移动到位置:姿势直线:X:-569.522156-Y:-1299.988647-Z:-413.430023-U:-151.126541-V:0.0-W:-0.0
|
||||
2025-08-12 10:31:30 - INFO - [调试计数] 已进入 FMid 分支 7 次
|
||||
2025-08-12 10:31:30 - INFO - 移动到中位位置
|
||||
2025-08-12 10:31:30 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"1143.22937","m1":"-822.204346","m2":"-84.250801","m3":"-73.561378","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:30 - INFO - 移动到位置:姿势直线:X:1143.22937-Y:-822.204346-Z:-84.250801-U:-73.561378-V:0.0-W:-0.0
|
||||
2025-08-12 10:31:30 - INFO - [调试计数] 已进入 FMid 分支 8 次
|
||||
2025-08-12 10:31:38 - INFO - 移动到中位位置
|
||||
2025-08-12 10:31:38 - INFO - 移动到位置:姿势直线:X:890.821655-Y:-313.300446-Z:-691.557617-U:-63.248192-V:0.0-W:-0.0
|
||||
2025-08-12 10:31:38 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"890.821655","m1":"-313.300446","m2":"-691.557617","m3":"-63.248192","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:38 - INFO - [调试计数] 已进入 FMid 分支 9 次
|
||||
2025-08-12 10:31:42 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:31:42 - INFO - 移动到破袋位置
|
||||
2025-08-12 10:31:42 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:31:42 - INFO - 拍照
|
||||
2025-08-12 10:31:42 - INFO - 识别图像成功
|
||||
2025-08-12 10:31:42 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:31:43 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:31:44 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:31:45 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:31:46 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:31:47 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:31:48 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:31:49 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:31:50 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:31:51 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:31:52 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:31:53 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:31:54 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:31:55 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:31:57 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:31:58 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:31:59 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:00 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:01 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:02 - INFO - ✅ 传感器2检测到料包到位,开始执行抓取
|
||||
2025-08-12 10:32:02 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.528625","m1":"-1299.985718","m2":"-413.431213","m3":"-151.127274","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:32:02 - INFO - 移动到位置:姿势直线:X:-569.528625-Y:-1299.985718-Z:-413.431213-U:-151.127274-V:0.0-W:-0.0
|
||||
2025-08-12 10:32:02 - INFO - 执行完成FPhoto
|
||||
2025-08-12 10:32:02 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.531006","m1":"-1299.971069","m2":"-825.315613","m3":"-151.126694","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:32:02 - INFO - 移动到中位位置
|
||||
2025-08-12 10:32:02 - INFO - 移动到位置:姿势直线:X:-569.531006-Y:-1299.971069-Z:-825.315613-U:-151.126694-V:0.0-W:-0.0
|
||||
2025-08-12 10:32:03 - INFO - [调试计数] 已进入 FMid 分支 10 次
|
||||
2025-08-12 10:32:06 - INFO - 移动到中位位置
|
||||
2025-08-12 10:32:06 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.543396","m1":"-1299.659543","m2":"-1269.931256","m3":"-151.12764","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:32:06 - INFO - 移动到位置:姿势直线:X:-569.543396-Y:-1299.659543-Z:-1269.931256-U:-151.12764-V:0.258-W:0.258
|
||||
2025-08-12 10:32:06 - INFO - [调试计数] 已进入 FMid 分支 11 次
|
||||
2025-08-12 10:32:08 - INFO - 移动到中位位置
|
||||
2025-08-12 10:32:08 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.543396","m1":"-1299.659543","m2":"-1269.931256","m3":"-151.12764","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:32:08 - INFO - 移动到位置:姿势直线:X:-569.543396-Y:-1299.659543-Z:-1269.931256-U:-151.12764-V:0.258-W:0.258
|
||||
2025-08-12 10:32:08 - INFO - [调试计数] 已进入 FMid 分支 12 次
|
||||
2025-08-12 10:32:08 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:09 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:09 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:09 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:09 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:09 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:09 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:09 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:09 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:09 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:09 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:10 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:10 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:10 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:10 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:10 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:10 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:10 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:10 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:10 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:11 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:11 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:11 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:11 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:11 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:11 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:11 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:11 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:11 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:12 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:12 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:12 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:12 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:12 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:12 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:12 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:12 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:12 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:12 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:13 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:13 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:13 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:13 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:13 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:13 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:13 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:13 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:13 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:14 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:14 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:14 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:14 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:14 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:14 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:14 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:14 - INFO - 🟢 机器人已到达抓料点位
|
||||
2025-08-12 10:32:14 - INFO - 已设置放置点: X=1067.08
|
||||
2025-08-12 10:32:15 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.543396","m1":"-1299.659543","m2":"-1269.931256","m3":"-151.12764","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:32:15 - INFO - 移动到位置:姿势直线:X:-569.543396-Y:-1299.659543-Z:-1269.931256-U:-151.12764-V:0.258-W:0.258
|
||||
2025-08-12 10:32:15 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.524475","m1":"-1299.973877","m2":"-825.314453","m3":"-151.126846","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:32:15 - INFO - 移动到中位位置
|
||||
2025-08-12 10:32:15 - INFO - 移动到位置:姿势直线:X:-569.524475-Y:-1299.973877-Z:-825.314453-U:-151.126846-V:0.0-W:-0.0
|
||||
2025-08-12 10:32:15 - INFO - [调试计数] 已进入 FMid 分支 13 次
|
||||
2025-08-12 10:32:15 - INFO - 移动到中位位置
|
||||
2025-08-12 10:32:15 - INFO - 移动到位置:姿势直线:X:-569.522156-Y:-1299.988647-Z:-413.430023-U:-151.126541-V:0.0-W:-0.0
|
||||
2025-08-12 10:32:15 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.522156","m1":"-1299.988647","m2":"-413.430023","m3":"-151.126541","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:32:15 - INFO - [调试计数] 已进入 FMid 分支 14 次
|
||||
2025-08-12 10:32:16 - INFO - 移动到中位位置
|
||||
2025-08-12 10:32:16 - INFO - 移动到位置:姿势直线:X:1143.22937-Y:-822.204346-Z:-84.250801-U:-73.561378-V:0.0-W:-0.0
|
||||
2025-08-12 10:32:16 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"1143.22937","m1":"-822.204346","m2":"-84.250801","m3":"-73.561378","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:32:16 - INFO - [调试计数] 已进入 FMid 分支 15 次
|
||||
2025-08-12 10:32:23 - INFO - 移动到中位位置
|
||||
2025-08-12 10:32:24 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"890.821655","m1":"-313.300446","m2":"-691.557617","m3":"-63.248192","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:32:24 - INFO - 移动到位置:姿势直线:X:890.821655-Y:-313.300446-Z:-691.557617-U:-63.248192-V:0.0-W:-0.0
|
||||
2025-08-12 10:32:24 - INFO - [调试计数] 已进入 FMid 分支 16 次
|
||||
2025-08-12 10:32:28 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:32:28 - INFO - 移动到破袋位置
|
||||
2025-08-12 10:32:28 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:32:28 - INFO - 拍照
|
||||
2025-08-12 10:32:28 - INFO - 识别图像成功
|
||||
2025-08-12 10:32:28 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:29 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:30 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:31 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:32 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:33 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:34 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:35 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:36 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:37 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:38 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:39 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:40 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:41 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:42 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:43 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:44 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:32:45 - INFO - ✅ 传感器2检测到料包到位,开始执行抓取
|
||||
2025-08-12 10:32:46 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.528625","m1":"-1299.985718","m2":"-413.431213","m3":"-151.127274","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:32:46 - INFO - 移动到位置:姿势直线:X:-569.528625-Y:-1299.985718-Z:-413.431213-U:-151.127274-V:0.0-W:-0.0
|
||||
2025-08-12 10:32:46 - INFO - 执行完成FPhoto
|
||||
2025-08-12 10:32:46 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.531006","m1":"-1299.971069","m2":"-825.315613","m3":"-151.126694","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:32:46 - INFO - 移动到中位位置
|
||||
2025-08-12 10:32:46 - INFO - 移动到位置:姿势直线:X:-569.531006-Y:-1299.971069-Z:-825.315613-U:-151.126694-V:0.0-W:-0.0
|
||||
2025-08-12 10:32:46 - INFO - [调试计数] 已进入 FMid 分支 17 次
|
||||
2025-08-12 10:32:49 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.543396","m1":"-1299.659543","m2":"-1269.931256","m3":"-151.12764","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:32:49 - INFO - 移动到中位位置
|
||||
2025-08-12 10:32:49 - INFO - 移动到位置:姿势直线:X:-569.543396-Y:-1299.659543-Z:-1269.931256-U:-151.12764-V:0.258-W:0.258
|
||||
2025-08-12 10:32:50 - INFO - [调试计数] 已进入 FMid 分支 18 次
|
||||
2025-08-12 10:32:52 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.543396","m1":"-1299.659543","m2":"-1269.931256","m3":"-151.12764","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:32:52 - INFO - 移动到中位位置
|
||||
2025-08-12 10:32:52 - INFO - 移动到位置:姿势直线:X:-569.543396-Y:-1299.659543-Z:-1269.931256-U:-151.12764-V:0.258-W:0.258
|
||||
2025-08-12 10:32:52 - INFO - [调试计数] 已进入 FMid 分支 19 次
|
||||
2025-08-12 10:32:52 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:52 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:52 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:52 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:53 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:53 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:53 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:53 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:53 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:53 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:53 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:53 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:53 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:54 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:54 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:54 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:54 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:54 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:54 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:54 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:54 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:54 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:55 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:55 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:55 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:55 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:55 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:55 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:55 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:55 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:55 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:55 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:56 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:56 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:56 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:56 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:56 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:56 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:56 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:56 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:56 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:57 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:57 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:57 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:57 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:57 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:57 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:57 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:57 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:57 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:57 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:58 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:58 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:58 - INFO - 🟡 机器人尚未到达抓料点位
|
||||
2025-08-12 10:32:58 - INFO - str_feed_take移动到抓料位置
|
||||
2025-08-12 10:32:58 - INFO - 🟢 机器人已到达抓料点位
|
||||
2025-08-12 10:32:58 - INFO - 已设置放置点: X=-187.12
|
||||
2025-08-12 10:32:58 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.543396","m1":"-1299.659543","m2":"-1269.931256","m3":"-151.12764","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:32:58 - INFO - 移动到位置:姿势直线:X:-569.543396-Y:-1299.659543-Z:-1269.931256-U:-151.12764-V:0.258-W:0.258
|
||||
2025-08-12 10:32:58 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.524475","m1":"-1299.973877","m2":"-825.314453","m3":"-151.126846","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:32:59 - INFO - 移动到中位位置
|
||||
2025-08-12 10:32:59 - INFO - 移动到位置:姿势直线:X:-569.524475-Y:-1299.973877-Z:-825.314453-U:-151.126846-V:0.0-W:-0.0
|
||||
2025-08-12 10:32:59 - INFO - [调试计数] 已进入 FMid 分支 20 次
|
||||
2025-08-12 10:32:59 - INFO - 移动到中位位置
|
||||
2025-08-12 10:32:59 - INFO - 移动到位置:姿势直线:X:-569.522156-Y:-1299.988647-Z:-413.430023-U:-151.126541-V:0.0-W:-0.0
|
||||
2025-08-12 10:32:59 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-569.522156","m1":"-1299.988647","m2":"-413.430023","m3":"-151.126541","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:32:59 - INFO - [调试计数] 已进入 FMid 分支 21 次
|
||||
2025-08-12 10:32:59 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"1143.22937","m1":"-822.204346","m2":"-84.250801","m3":"-73.561378","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:32:59 - INFO - 移动到中位位置
|
||||
2025-08-12 10:33:00 - INFO - 移动到位置:姿势直线:X:1143.22937-Y:-822.204346-Z:-84.250801-U:-73.561378-V:0.0-W:-0.0
|
||||
2025-08-12 10:33:00 - INFO - [调试计数] 已进入 FMid 分支 22 次
|
||||
2025-08-12 10:33:07 - INFO - 移动到中位位置
|
||||
2025-08-12 10:33:07 - INFO - 移动到位置:姿势直线:X:890.821655-Y:-313.300446-Z:-691.557617-U:-63.248192-V:0.0-W:-0.0
|
||||
2025-08-12 10:33:07 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"890.821655","m1":"-313.300446","m2":"-691.557617","m3":"-63.248192","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:33:08 - INFO - [调试计数] 已进入 FMid 分支 23 次
|
||||
2025-08-12 10:33:11 - INFO - 发送命令{"dsID":"www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":"0","instructions":[{"oneshot":"1","action":"10","m0":"-828.689758","m1":"-1146.968872","m2":"-77.084404","m3":"-90.137154","ckStatus":"0x3F","speed":"100","delay":"0","smooth":"9","tool":"2"}]}
|
||||
2025-08-12 10:33:12 - INFO - 移动到破袋位置
|
||||
2025-08-12 10:33:12 - INFO - 移动到位置:姿势直线:X:-828.689758-Y:-1146.968872-Z:-77.084404-U:-90.137154-V:0.0-W:-0.0
|
||||
2025-08-12 10:33:12 - INFO - 拍照
|
||||
2025-08-12 10:33:12 - INFO - 识别图像成功
|
||||
2025-08-12 10:33:12 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:13 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:14 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:15 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:16 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:17 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:18 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:19 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:20 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:21 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:22 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:23 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:24 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:25 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:26 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:27 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:28 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:29 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:30 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:31 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:32 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:33 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:35 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:36 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:37 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:38 - INFO - ⏳ 等待传感器2料包信号...
|
||||
2025-08-12 10:33:39 - ERROR - 'str' object has no attribute 'release'
|
||||
2025-08-12 10:33:41 - ERROR - Feeding运行异常: Internal C++ object (Feeding) already deleted.
|
||||
2025-08-12 10:33:41 - ERROR - Feeding运行异常: Internal C++ object (Feeding) already deleted.
|
||||
2025-08-12 10:33:41 - ERROR - Feeding运行异常: Internal C++ object (Feeding) already deleted.
|
||||
@ -4260,7 +4260,7 @@ qt_resource_struct = b"\
|
||||
\x00\x00\x00\x0a\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\
|
||||
\x00\x00\x00\x00\x00\x00\x00\x00\
|
||||
\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
|
||||
\x00\x00\x01\x99\x8e\x16\x01P\
|
||||
\x00\x00\x01\x9a\x01M\x90h\
|
||||
"
|
||||
|
||||
def qInitResources():
|
||||
|
||||
37
test6.py
37
test6.py
@ -0,0 +1,37 @@
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
from Mv3D.CameraUtil import CameraUtil
|
||||
from Mv3D.calculate_diff2 import calculate_offset_from_image
|
||||
|
||||
if __name__=='__main__':
|
||||
|
||||
camera_img=CameraUtil()
|
||||
loc_image_path=camera_img.save_img()
|
||||
print(f"保存图片路径:{loc_image_path}")
|
||||
try:
|
||||
loc_model_result = calculate_offset_from_image(loc_image_path, visualize=False)
|
||||
if loc_model_result['success']:
|
||||
#置信度
|
||||
if loc_model_result['obj_conf']>0.5:
|
||||
loc_offsetX=loc_model_result['dx_mm']
|
||||
if abs(loc_model_result['dx_mm'])<200:
|
||||
loc_is_next=True
|
||||
print(f'{loc_image_path}:料带偏移{loc_offsetX}mm')
|
||||
else:
|
||||
print(f"{loc_image_path}:料带偏移过大,报警")
|
||||
# self.feed_error_signal.emit(1,f"{loc_image_path}:料带偏移过大,报警")
|
||||
else:
|
||||
print(f"{loc_image_path}:未检测到料带,置信度低")
|
||||
# self.feed_error_signal.emit(2,f"{loc_image_path}:未检测到料带,置信度低")
|
||||
else:
|
||||
print(f"{loc_image_path}:计算偏移失败,视觉返回False")
|
||||
# self.feed_error_signal.emit(2,f"{loc_image_path}:计算偏移失败,视觉返回False")
|
||||
# loc_is_next=False
|
||||
loc_offsetX=0
|
||||
except Exception as e:
|
||||
print(f"{loc_image_path}:计算偏移失败:{e}")
|
||||
|
||||
time.sleep(10)
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
101
ui_MainWin.py
101
ui_MainWin.py
@ -235,9 +235,9 @@ class Ui_MainWindow(object):
|
||||
sizePolicy1.setHeightForWidth(self.pushButton_exit.sizePolicy().hasHeightForWidth())
|
||||
self.pushButton_exit.setSizePolicy(sizePolicy1)
|
||||
self.pushButton_exit.setStyleSheet(u"*{\n"
|
||||
"color:#838992;\n"
|
||||
"color:#fff;\n"
|
||||
"background-color: #1B1F34;\n"
|
||||
"font: 9pt \"Microsoft YaHei UI\";\n"
|
||||
"font: 30pt \"Microsoft YaHei UI\";\n"
|
||||
"border: 1px solid #282B40;\n"
|
||||
"}\n"
|
||||
"*:pressed\n"
|
||||
@ -628,36 +628,7 @@ class Ui_MainWindow(object):
|
||||
"border-image: None;")
|
||||
self.frame_sign_2.setFrameShape(QFrame.Shape.StyledPanel)
|
||||
self.frame_sign_2.setFrameShadow(QFrame.Shadow.Raised)
|
||||
|
||||
|
||||
# 9/30 新增显示 投料的重量的信息
|
||||
self.verticalLayout_sign = QVBoxLayout(self.frame_sign_2)
|
||||
self.verticalLayout_sign.setObjectName(u"verticalLayout_sign")
|
||||
self.verticalLayout_sign.setContentsMargins(0, 0, 0, 0) # 清除边距
|
||||
self.verticalLayout_sign.setSpacing(5) # 新标签与下方网格布局的间距
|
||||
|
||||
# 1. 添加新的信息标签(放在上方)
|
||||
self.weight_label_info = QLabel(self.frame_sign_2)
|
||||
self.weight_label_info.setObjectName(u"label_info")
|
||||
# 设置标签样式 background-color: #2c2c2c;
|
||||
self.weight_label_info.setStyleSheet(u"""
|
||||
QLabel {
|
||||
background-color: rgba(255, 255, 255, 0);
|
||||
color: red;
|
||||
font: 11pt "Microsoft YaHei UI";
|
||||
padding: 5px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
""")
|
||||
self.weight_label_info.setText("显示当前的重量") # 初始信息
|
||||
# self.weight_label_info.setAlignment(Qt.AlignmentFlag.AlignLeft | Qt.AlignmentFlag.AlignVCenter)
|
||||
self.weight_label_info.setAlignment(Qt.AlignmentFlag.AlignCenter) # 居中
|
||||
self.verticalLayout_sign.addWidget(self.weight_label_info)
|
||||
|
||||
|
||||
# 9/10
|
||||
# self.gridLayout_4 = QGridLayout(self.frame_sign_2)
|
||||
self.gridLayout_4 = QGridLayout()
|
||||
self.gridLayout_4 = QGridLayout(self.frame_sign_2)
|
||||
self.gridLayout_4.setObjectName(u"gridLayout_4")
|
||||
self.pushButton_sign_go = QPushButton(self.frame_sign_2)
|
||||
self.pushButton_sign_go.setObjectName(u"pushButton_sign_go")
|
||||
@ -815,9 +786,6 @@ class Ui_MainWindow(object):
|
||||
|
||||
self.gridLayout_4.addWidget(self.label_sign_feed, 0, 7, 1, 1)
|
||||
|
||||
# 9/10 添加 取料中、拍照中等布局
|
||||
self.verticalLayout_sign.addLayout(self.gridLayout_4)
|
||||
|
||||
|
||||
self.verticalLayout_14.addWidget(self.frame_sign_2)
|
||||
|
||||
@ -3342,47 +3310,6 @@ class Ui_MainWindow(object):
|
||||
|
||||
self.verticalLayout_11.addWidget(self.comboBox_lineIndex)
|
||||
|
||||
# 9/29 新增重量选择框 和 选择投料重量提示
|
||||
weight_h_layout = QHBoxLayout()
|
||||
# weight_h_layout.setSpacing(10)
|
||||
self.weight_label = QLabel(self.frame_20)
|
||||
self.weight_label.setText("选择码垛重量:")
|
||||
self.weight_label.setStyleSheet("color: white;")
|
||||
weight_h_layout.addWidget(self.weight_label)
|
||||
|
||||
self.comboBox_dropWeight = QComboBox(self.frame_20)
|
||||
self.comboBox_dropWeight.setObjectName(u"comboBox_dropWeight")
|
||||
self.comboBox_dropWeight.setStyleSheet(u"QComboBox {\n"
|
||||
" border-radius: 10px;\n"
|
||||
" padding: 5px 5px 5px 5px;\n"
|
||||
" background-color: #2c2c2c;\n"
|
||||
" color: white;\n"
|
||||
" border: 1px solid #474747;\n"
|
||||
" min-width: 80px;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"QComboBox::drop-down {\n"
|
||||
" width: 0px;\n"
|
||||
" border: none;\n"
|
||||
"\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox::down-arrow {\n"
|
||||
" image: none;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QComboBox QAbstractItemView {\n"
|
||||
" border-bottom-right-radius: 10px;\n"
|
||||
" border-bottom-left-radius: 10px;\n"
|
||||
" background-color: #D3D3D3;\n"
|
||||
" border: 1px solid gray;\n"
|
||||
" padding: 4px 4px 4px 4px;\n"
|
||||
" outline: none;\n"
|
||||
"}")
|
||||
weight_h_layout.addWidget(self.comboBox_dropWeight)
|
||||
self.verticalLayout_11.addLayout(weight_h_layout)
|
||||
|
||||
self.stackedWidget_num = QStackedWidget(self.frame_20)
|
||||
self.stackedWidget_num.setObjectName(u"stackedWidget_num")
|
||||
self.stackedWidget_num.setStyleSheet(u"border:none;")
|
||||
@ -3518,7 +3445,7 @@ class Ui_MainWindow(object):
|
||||
self.lineEdit_num.setSizePolicy(sizePolicy1)
|
||||
self.lineEdit_num.setStyleSheet(u"color: rgb(255, 255, 255);\n"
|
||||
"border: 1px solid #dcdfe6;\n"
|
||||
"font: 9pt \"Microsoft YaHei UI\";")
|
||||
"font: 12pt \"Microsoft YaHei UI\";")
|
||||
|
||||
self.gridLayout.addWidget(self.lineEdit_num, 0, 0, 1, 4)
|
||||
|
||||
@ -3528,7 +3455,7 @@ class Ui_MainWindow(object):
|
||||
self.pushButton_numkeybord.setSizePolicy(sizePolicy1)
|
||||
self.pushButton_numkeybord.setStyleSheet(u"\n"
|
||||
"*{background-color: #101F3F;\n"
|
||||
"font: 11pt \"\u6977\u4f53\";\n"
|
||||
"font: 30pt \"\u6977\u4f53\";\n"
|
||||
"color:#ffffff\n"
|
||||
"}\n"
|
||||
"*:hover {\n"
|
||||
@ -3548,7 +3475,7 @@ class Ui_MainWindow(object):
|
||||
self.pushButton_num_confirm.setSizePolicy(sizePolicy1)
|
||||
self.pushButton_num_confirm.setStyleSheet(u"\n"
|
||||
"*{background-color: #101F3F;\n"
|
||||
"font: 11pt \"\u6977\u4f53\";\n"
|
||||
"font: 30pt \"\u6977\u4f53\";\n"
|
||||
"color:#ffffff\n"
|
||||
"}\n"
|
||||
"*:hover {\n"
|
||||
@ -3589,7 +3516,7 @@ class Ui_MainWindow(object):
|
||||
self.label_button_status.setStyleSheet(u"\n"
|
||||
"QLabel{\n"
|
||||
"background-color: rgba(255, 255, 255, 0);\n"
|
||||
"font: 700 16pt \"Microsoft YaHei UI\";\n"
|
||||
"font: 700 36pt \"Microsoft YaHei UI\";\n"
|
||||
"color:#FF0000;\n"
|
||||
"}")
|
||||
|
||||
@ -3618,7 +3545,7 @@ class Ui_MainWindow(object):
|
||||
self.pushButton_reset.setSizePolicy(sizePolicy5)
|
||||
self.pushButton_reset.setStyleSheet(u"*{\n"
|
||||
"background-color: #FFFFBF;\n"
|
||||
"font: 9pt \"\u6977\u4f53\";\n"
|
||||
"font: 30pt \"\u6977\u4f53\";\n"
|
||||
"border-radius: 10px;\n"
|
||||
"}\n"
|
||||
"*:pressed\n"
|
||||
@ -3657,7 +3584,7 @@ class Ui_MainWindow(object):
|
||||
self.pushButton_stopFeed.setSizePolicy(sizePolicy5)
|
||||
self.pushButton_stopFeed.setStyleSheet(u"*{\n"
|
||||
"background-color: #FF0000;\n"
|
||||
"font: 9pt \"\u6977\u4f53\";\n"
|
||||
"font: 30pt \"\u6977\u4f53\";\n"
|
||||
"border-radius: 10px;\n"
|
||||
"}\n"
|
||||
"*:pressed\n"
|
||||
@ -3676,7 +3603,7 @@ class Ui_MainWindow(object):
|
||||
self.pushButton_pauseFeed.setSizePolicy(sizePolicy5)
|
||||
self.pushButton_pauseFeed.setStyleSheet(u"*{\n"
|
||||
"background-color: #2196F3;\n"
|
||||
"font: 9pt \"\u6977\u4f53\";\n"
|
||||
"font: 30pt \"\u6977\u4f53\";\n"
|
||||
"border-radius: 10px;\n"
|
||||
"}\n"
|
||||
"*:pressed\n"
|
||||
@ -3695,7 +3622,7 @@ class Ui_MainWindow(object):
|
||||
self.pushButton_startFeed.setSizePolicy(sizePolicy5)
|
||||
self.pushButton_startFeed.setStyleSheet(u"*{\n"
|
||||
"background-color: #499C54;\n"
|
||||
"font: 9pt \"\u6977\u4f53\";\n"
|
||||
"font: 30pt \"\u6977\u4f53\";\n"
|
||||
"\n"
|
||||
"border-radius: 10px;\n"
|
||||
"}\n"
|
||||
@ -3715,7 +3642,7 @@ class Ui_MainWindow(object):
|
||||
self.pushButton_clearAlarm.setSizePolicy(sizePolicy5)
|
||||
self.pushButton_clearAlarm.setStyleSheet(u"*{\n"
|
||||
"background-color: #1CB2B1;\n"
|
||||
"font: 9pt \"\u6977\u4f53\";\n"
|
||||
"font: 30pt \"\u6977\u4f53\";\n"
|
||||
"border-radius: 10px;\n"
|
||||
"}\n"
|
||||
"*:pressed\n"
|
||||
@ -3886,7 +3813,7 @@ class Ui_MainWindow(object):
|
||||
self.label_remain_num = QLabel(self.frame_24)
|
||||
self.label_remain_num.setObjectName(u"label_remain_num")
|
||||
self.label_remain_num.setStyleSheet(u"color: rgb(0, 255, 0);\n"
|
||||
"font: 36pt \"Microsoft YaHei UI\";")
|
||||
"font: 66pt \"Microsoft YaHei UI\";")
|
||||
self.label_remain_num.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
||||
|
||||
self.horizontalLayout_12.addWidget(self.label_remain_num)
|
||||
@ -4116,7 +4043,7 @@ class Ui_MainWindow(object):
|
||||
# self.pushButton_num4.setText(QCoreApplication.translate("MainWindow", u"40", None))
|
||||
# self.pushButton_num5.setText(QCoreApplication.translate("MainWindow", u"50", None))
|
||||
# self.pushButton_num6.setText(QCoreApplication.translate("MainWindow", u"60", None))
|
||||
self.lineEdit_num.setPlaceholderText(QCoreApplication.translate("MainWindow", u"\u4ece\u7b2c\u51e0\u5305\u5f00\u59cb\u7801\u579b\u002c\u8f93\u5165\u540e\u70b9\u51fb\u786e\u5b9a", None))
|
||||
self.lineEdit_num.setPlaceholderText(QCoreApplication.translate("MainWindow", u"已码垛数量", None))
|
||||
self.pushButton_numkeybord.setText(QCoreApplication.translate("MainWindow", u"\u952e\u76d8", None))
|
||||
self.pushButton_num_confirm.setText(QCoreApplication.translate("MainWindow", u"\u786e\u5b9a", None))
|
||||
# self.pushButton_AddNum.setText(QCoreApplication.translate("MainWindow", u"\u8865\u4e00\u888b", None))
|
||||
|
||||
Reference in New Issue
Block a user