mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2025-12-18 05:21:19 +00:00
新增direct_end参数
This commit is contained in:
@@ -139,6 +139,11 @@ def parse_args():
|
||||
action="store_true",
|
||||
help="跳过启动时的环境依赖检查",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--direct_end",
|
||||
action="store_true",
|
||||
help="直接结束任务",
|
||||
)
|
||||
return parser
|
||||
|
||||
|
||||
@@ -212,6 +217,7 @@ def main():
|
||||
|
||||
# 设置BasicConfig参数
|
||||
BasicConfig.working_dir = working_dir
|
||||
BasicConfig.direct_end = args_dict.get("direct_end", False)
|
||||
BasicConfig.is_host_mode = not args_dict.get("without_host", False)
|
||||
BasicConfig.slave_no_host = args_dict.get("slave_no_host", False)
|
||||
BasicConfig.upload_registry = args_dict.get("upload_registry", False)
|
||||
|
||||
@@ -17,6 +17,7 @@ class BasicConfig:
|
||||
machine_name = "undefined"
|
||||
vis_2d_enable = False
|
||||
enable_resource_load = True
|
||||
direct_end = False
|
||||
|
||||
|
||||
# MQTT配置
|
||||
|
||||
@@ -619,6 +619,9 @@ class HostNode(BaseROS2DeviceNode):
|
||||
goal_uuid: 目标UUID,如果为None则自动生成
|
||||
server_info: 服务器发送信息,包含发送时间戳等
|
||||
"""
|
||||
if BasicConfig.direct_end:
|
||||
raise ValueError("direct_end")
|
||||
|
||||
if action_type.startswith("UniLabJsonCommand"):
|
||||
if action_name.startswith("auto-"):
|
||||
action_name = action_name[5:]
|
||||
|
||||
Reference in New Issue
Block a user