From 6ac510dcd262026d7bbad63f72520eaaa820f45c Mon Sep 17 00:00:00 2001 From: Xianwei Qi Date: Thu, 11 Dec 2025 23:26:11 +0800 Subject: [PATCH 1/6] mix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改了mix,仿真流程报错问题 --- .../liquid_handler_abstract.py | 12 +++++++++ .../devices/liquid_handling/prcxi/prcxi.py | 26 ++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/unilabos/devices/liquid_handling/liquid_handler_abstract.py b/unilabos/devices/liquid_handling/liquid_handler_abstract.py index 9bc56d4..e849ffb 100644 --- a/unilabos/devices/liquid_handling/liquid_handler_abstract.py +++ b/unilabos/devices/liquid_handling/liquid_handler_abstract.py @@ -988,6 +988,18 @@ class LiquidHandlerAbstract(LiquidHandlerMiddleware): dis_vols = [float(dis_vols)] else: dis_vols = [float(v) for v in dis_vols] + + # 统一混合次数为标量,防止数组/列表与 int 比较时报错 + if mix_times is not None and not isinstance(mix_times, (int, float)): + try: + mix_times = mix_times[0] if len(mix_times) > 0 else None + except Exception: + try: + mix_times = next(iter(mix_times)) + except Exception: + pass + if mix_times is not None: + mix_times = int(mix_times) # 识别传输模式 num_sources = len(sources) diff --git a/unilabos/devices/liquid_handling/prcxi/prcxi.py b/unilabos/devices/liquid_handling/prcxi/prcxi.py index cca11f8..cd20f4c 100644 --- a/unilabos/devices/liquid_handling/prcxi/prcxi.py +++ b/unilabos/devices/liquid_handling/prcxi/prcxi.py @@ -5,6 +5,7 @@ import json import os import socket import time +import uuid from typing import Any, List, Dict, Optional, Tuple, TypedDict, Union, Sequence, Iterator, Literal from pylabrobot.liquid_handling import ( @@ -856,7 +857,30 @@ class PRCXI9300Api: def _raw_request(self, payload: str) -> str: if self.debug: - return " " + # 调试/仿真模式下直接返回可解析的模拟 JSON,避免后续 json.loads 报错 + try: + req = json.loads(payload) + method = req.get("MethodName") + except Exception: + method = None + + data: Any = True + if method in {"AddSolution"}: + data = str(uuid.uuid4()) + elif method in {"AddWorkTabletMatrix", "AddWorkTabletMatrix2"}: + data = {"Success": True, "Message": "debug mock"} + elif method in {"GetErrorCode"}: + data = "" + elif method in {"RemoveErrorCodet", "Reset", "Start", "LoadSolution", "Pause", "Resume", "Stop"}: + data = True + elif method in {"GetStepStateList", "GetStepStatus", "GetStepState"}: + data = [] + elif method in {"GetLocation"}: + data = {"X": 0, "Y": 0, "Z": 0} + elif method in {"GetResetStatus"}: + data = False + + return json.dumps({"Success": True, "Msg": "debug mock", "Data": data}) with contextlib.closing(socket.socket()) as sock: sock.settimeout(self.timeout) sock.connect((self.host, self.port)) From 02afafd42332e86750bfaba94bb77ac70bbbef78 Mon Sep 17 00:00:00 2001 From: Haohui Date: Fri, 12 Dec 2025 23:55:38 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=90=9B=20fix:=20config=20file=20is=20?= =?UTF-8?q?overwrited=20by=20default=20args=20even=20if=20not=20be=20set.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- unilabos/app/main.py | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/unilabos/app/main.py b/unilabos/app/main.py index f888f6f..4fb4776 100644 --- a/unilabos/app/main.py +++ b/unilabos/app/main.py @@ -195,9 +195,10 @@ def parse_args(): def main(): """主函数""" # 解析命令行参数 - args = parse_args() - convert_argv_dashes_to_underscores(args) - args_dict = vars(args.parse_args()) + parser = parse_args() + convert_argv_dashes_to_underscores(parser) + args = parser.parse_args() + args_dict = vars(args) # 环境检查 - 检查并自动安装必需的包 (可选) if not args_dict.get("skip_env_check", False): @@ -255,17 +256,18 @@ def main(): logger.info(f"Log level set to '{BasicConfig.log_level}' from config file.") configure_logger(loglevel=BasicConfig.log_level, working_dir=working_dir) - if args_dict["addr"] == "test": - print_status("使用测试环境地址", "info") - HTTPConfig.remote_addr = "https://uni-lab.test.bohrium.com/api/v1" - elif args_dict["addr"] == "uat": - print_status("使用uat环境地址", "info") - HTTPConfig.remote_addr = "https://uni-lab.uat.bohrium.com/api/v1" - elif args_dict["addr"] == "local": - print_status("使用本地环境地址", "info") - HTTPConfig.remote_addr = "http://127.0.0.1:48197/api/v1" - else: - HTTPConfig.remote_addr = args_dict.get("addr", "") + if args.addr != parser.get_default("addr"): + if args.addr == "test": + print_status("使用测试环境地址", "info") + HTTPConfig.remote_addr = "https://uni-lab.test.bohrium.com/api/v1" + elif args.addr == "uat": + print_status("使用uat环境地址", "info") + HTTPConfig.remote_addr = "https://uni-lab.uat.bohrium.com/api/v1" + elif args.addr == "local": + print_status("使用本地环境地址", "info") + HTTPConfig.remote_addr = "http://127.0.0.1:48197/api/v1" + else: + HTTPConfig.remote_addr = args.addr # 设置BasicConfig参数 if args_dict.get("ak", ""): From d23e85ade4a650a4c3ca1b7b8eda5229d520ad9d Mon Sep 17 00:00:00 2001 From: Xuwznln <18435084+Xuwznln@users.noreply.github.com> Date: Sun, 14 Dec 2025 01:17:24 +0800 Subject: [PATCH 3/6] =?UTF-8?q?fix=20"=F0=9F=90=9B=20fix"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- unilabos/config/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unilabos/config/config.py b/unilabos/config/config.py index 223d12c..1e40966 100644 --- a/unilabos/config/config.py +++ b/unilabos/config/config.py @@ -42,7 +42,7 @@ class WSConfig: # HTTP配置 class HTTPConfig: - remote_addr = "http://127.0.0.1:48197/api/v1" + remote_addr = "https://uni-lab.bohrium.com/api/v1" # ROS配置 From 5d5569121c0f638f229afbd7ff5a53ce1fbce2b2 Mon Sep 17 00:00:00 2001 From: Xuwznln <18435084+Xuwznln@users.noreply.github.com> Date: Sun, 14 Dec 2025 12:55:25 +0800 Subject: [PATCH 4/6] fix "laiyu" missing init file. --- .../devices/liquid_handling/laiyu/__init__.py | 307 ++++++++++++++++++ 1 file changed, 307 insertions(+) create mode 100644 unilabos/devices/liquid_handling/laiyu/__init__.py diff --git a/unilabos/devices/liquid_handling/laiyu/__init__.py b/unilabos/devices/liquid_handling/laiyu/__init__.py new file mode 100644 index 0000000..8935252 --- /dev/null +++ b/unilabos/devices/liquid_handling/laiyu/__init__.py @@ -0,0 +1,307 @@ +""" +LaiYu_Liquid 液体处理工作站集成模块 + +该模块提供了 LaiYu_Liquid 工作站与 UniLabOS 的完整集成,包括: +- 硬件后端和抽象接口 +- 资源定义和管理 +- 协议执行和液体传输 +- 工作台配置和布局 + +主要组件: +- LaiYuLiquidBackend: 硬件后端实现 +- LaiYuLiquid: 液体处理器抽象接口 +- 各种资源类:枪头架、板、容器等 +- 便捷创建函数和配置管理 + +使用示例: + from unilabos.devices.laiyu_liquid import ( + LaiYuLiquid, + LaiYuLiquidBackend, + create_standard_deck, + create_tip_rack_1000ul + ) + + # 创建后端和液体处理器 + backend = LaiYuLiquidBackend() + lh = LaiYuLiquid(backend=backend) + + # 创建工作台 + deck = create_standard_deck() + lh.deck = deck + + # 设置和运行 + await lh.setup() +""" + +# 版本信息 +__version__ = "1.0.0" +__author__ = "LaiYu_Liquid Integration Team" +__description__ = "LaiYu_Liquid 液体处理工作站 UniLabOS 集成模块" + +# 驱动程序导入 +from .drivers import ( + XYZStepperController, + SOPAPipette, + MotorAxis, + MotorStatus, + SOPAConfig, + SOPAStatusCode, + StepperMotorDriver +) + +# 控制器导入 +from .controllers import ( + XYZController, + PipetteController, +) + +# 后端导入 +from .backend.rviz_backend import ( + LiquidHandlerRvizBackend, +) + +# 资源类和创建函数导入 +from .core.laiyu_liquid_res import ( + LaiYuLiquidDeck, + LaiYuLiquidContainer, + LaiYuLiquidTipRack +) + +# 主设备类和配置 +from .core.laiyu_liquid_main import ( + LaiYuLiquid, + LaiYuLiquidConfig, + LaiYuLiquidDeck, + LaiYuLiquidContainer, + LaiYuLiquidTipRack, + create_quick_setup +) + +# 后端创建函数导入 +from .backend import ( + LaiYuLiquidBackend, + create_laiyu_backend, +) + +# 导出所有公共接口 +__all__ = [ + # 版本信息 + "__version__", + "__author__", + "__description__", + + # 驱动程序 + "SOPAPipette", + "SOPAConfig", + "StepperMotorDriver", + "XYZStepperController", + + # 控制器 + "PipetteController", + "XYZController", + + # 后端 + "LiquidHandlerRvizBackend", + + # 资源创建函数 + "create_tip_rack_1000ul", + "create_tip_rack_200ul", + "create_96_well_plate", + "create_deep_well_plate", + "create_8_tube_rack", + "create_standard_deck", + "create_waste_container", + "create_wash_container", + "create_reagent_container", + "load_deck_config", + + # 后端创建函数 + "create_laiyu_backend", + + # 主要类 + "LaiYuLiquid", + "LaiYuLiquidConfig", + "LaiYuLiquidBackend", + "LaiYuLiquidDeck", + + # 工具函数 + "get_version", + "get_supported_resources", + "create_quick_setup", + "validate_installation", + "print_module_info", + "setup_logging", +] + +# 别名定义,为了向后兼容 +LaiYuLiquidDevice = LaiYuLiquid # 主设备类别名 +LaiYuLiquidController = XYZController # 控制器别名 +LaiYuLiquidDriver = XYZStepperController # 驱动器别名 + +# 模块级别的便捷函数 + +def get_version() -> str: + """ + 获取模块版本 + + Returns: + str: 版本号 + """ + return __version__ + + +def get_supported_resources() -> dict: + """ + 获取支持的资源类型 + + Returns: + dict: 支持的资源类型字典 + """ + return { + "tip_racks": { + "LaiYuLiquidTipRack": LaiYuLiquidTipRack, + }, + "containers": { + "LaiYuLiquidContainer": LaiYuLiquidContainer, + }, + "decks": { + "LaiYuLiquidDeck": LaiYuLiquidDeck, + }, + "devices": { + "LaiYuLiquid": LaiYuLiquid, + } + } + + +def create_quick_setup() -> tuple: + """ + 快速创建基本设置 + + Returns: + tuple: (backend, controllers, resources) 的元组 + """ + # 创建后端 + backend = LiquidHandlerRvizBackend() + + # 创建控制器(使用默认端口进行演示) + pipette_controller = PipetteController(port="/dev/ttyUSB0", address=4) + xyz_controller = XYZController(port="/dev/ttyUSB1", auto_connect=False) + + # 创建测试资源 + tip_rack_1000 = create_tip_rack_1000ul("tip_rack_1000") + tip_rack_200 = create_tip_rack_200ul("tip_rack_200") + well_plate = create_96_well_plate("96_well_plate") + + controllers = { + 'pipette': pipette_controller, + 'xyz': xyz_controller + } + + resources = { + 'tip_rack_1000': tip_rack_1000, + 'tip_rack_200': tip_rack_200, + 'well_plate': well_plate + } + + return backend, controllers, resources + + +def validate_installation() -> bool: + """ + 验证模块安装是否正确 + + Returns: + bool: 安装是否正确 + """ + try: + # 检查核心类是否可以导入 + from .core.laiyu_liquid_main import LaiYuLiquid, LaiYuLiquidConfig + from .backend import LaiYuLiquidBackend + from .controllers import XYZController, PipetteController + from .drivers import XYZStepperController, SOPAPipette + + # 尝试创建基本对象 + config = LaiYuLiquidConfig() + backend = create_laiyu_backend("validation_test") + + print("模块安装验证成功") + return True + + except Exception as e: + print(f"模块安装验证失败: {e}") + return False + + +def print_module_info(): + """打印模块信息""" + print(f"LaiYu_Liquid 集成模块") + print(f"版本: {__version__}") + print(f"作者: {__author__}") + print(f"描述: {__description__}") + print(f"") + print(f"支持的资源类型:") + + resources = get_supported_resources() + for category, types in resources.items(): + print(f" {category}:") + for type_name, type_class in types.items(): + print(f" - {type_name}: {type_class.__name__}") + + print(f"") + print(f"主要功能:") + print(f" - 硬件集成: LaiYuLiquidBackend") + print(f" - 抽象接口: LaiYuLiquid") + print(f" - 资源管理: 各种资源类和创建函数") + print(f" - 协议执行: transfer_liquid 和相关函数") + print(f" - 配置管理: deck.json 和加载函数") + + +# 模块初始化时的检查 +def _check_dependencies(): + """检查依赖项""" + try: + import pylabrobot + import asyncio + import json + import logging + return True + except ImportError as e: + import logging + logging.warning(f"缺少依赖项 {e}") + return False + + +# 执行依赖检查 +_dependencies_ok = _check_dependencies() + +if not _dependencies_ok: + import logging + logging.warning("某些依赖项缺失,模块功能可能受限") + + +# 模块级别的日志配置 +import logging + +def setup_logging(level: str = "INFO"): + """ + 设置模块日志 + + Args: + level: 日志级别 (DEBUG, INFO, WARNING, ERROR) + """ + logger = logging.getLogger("LaiYu_Liquid") + logger.setLevel(getattr(logging, level.upper())) + + if not logger.handlers: + handler = logging.StreamHandler() + formatter = logging.Formatter( + '%(asctime)s - %(name)s - %(levelname)s - %(message)s' + ) + handler.setFormatter(formatter) + logger.addHandler(handler) + + return logger + + +# 默认日志设置 +_logger = setup_logging() \ No newline at end of file From ef1473783928cf482343c638e9e2bba4f2aa6be7 Mon Sep 17 00:00:00 2001 From: Xuwznln <18435084+Xuwznln@users.noreply.github.com> Date: Sun, 14 Dec 2025 13:08:27 +0800 Subject: [PATCH 5/6] update "laiyu" missing init file. --- .../devices/laiyu_liquid_test/__init__.py | 0 .../devices/liquid_handling/laiyu/__init__.py | 307 ------------------ .../devices/bioyond_dispensing_station.yaml | 29 -- 3 files changed, 336 deletions(-) create mode 100644 unilabos/devices/laiyu_liquid_test/__init__.py diff --git a/unilabos/devices/laiyu_liquid_test/__init__.py b/unilabos/devices/laiyu_liquid_test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/unilabos/devices/liquid_handling/laiyu/__init__.py b/unilabos/devices/liquid_handling/laiyu/__init__.py index 8935252..e69de29 100644 --- a/unilabos/devices/liquid_handling/laiyu/__init__.py +++ b/unilabos/devices/liquid_handling/laiyu/__init__.py @@ -1,307 +0,0 @@ -""" -LaiYu_Liquid 液体处理工作站集成模块 - -该模块提供了 LaiYu_Liquid 工作站与 UniLabOS 的完整集成,包括: -- 硬件后端和抽象接口 -- 资源定义和管理 -- 协议执行和液体传输 -- 工作台配置和布局 - -主要组件: -- LaiYuLiquidBackend: 硬件后端实现 -- LaiYuLiquid: 液体处理器抽象接口 -- 各种资源类:枪头架、板、容器等 -- 便捷创建函数和配置管理 - -使用示例: - from unilabos.devices.laiyu_liquid import ( - LaiYuLiquid, - LaiYuLiquidBackend, - create_standard_deck, - create_tip_rack_1000ul - ) - - # 创建后端和液体处理器 - backend = LaiYuLiquidBackend() - lh = LaiYuLiquid(backend=backend) - - # 创建工作台 - deck = create_standard_deck() - lh.deck = deck - - # 设置和运行 - await lh.setup() -""" - -# 版本信息 -__version__ = "1.0.0" -__author__ = "LaiYu_Liquid Integration Team" -__description__ = "LaiYu_Liquid 液体处理工作站 UniLabOS 集成模块" - -# 驱动程序导入 -from .drivers import ( - XYZStepperController, - SOPAPipette, - MotorAxis, - MotorStatus, - SOPAConfig, - SOPAStatusCode, - StepperMotorDriver -) - -# 控制器导入 -from .controllers import ( - XYZController, - PipetteController, -) - -# 后端导入 -from .backend.rviz_backend import ( - LiquidHandlerRvizBackend, -) - -# 资源类和创建函数导入 -from .core.laiyu_liquid_res import ( - LaiYuLiquidDeck, - LaiYuLiquidContainer, - LaiYuLiquidTipRack -) - -# 主设备类和配置 -from .core.laiyu_liquid_main import ( - LaiYuLiquid, - LaiYuLiquidConfig, - LaiYuLiquidDeck, - LaiYuLiquidContainer, - LaiYuLiquidTipRack, - create_quick_setup -) - -# 后端创建函数导入 -from .backend import ( - LaiYuLiquidBackend, - create_laiyu_backend, -) - -# 导出所有公共接口 -__all__ = [ - # 版本信息 - "__version__", - "__author__", - "__description__", - - # 驱动程序 - "SOPAPipette", - "SOPAConfig", - "StepperMotorDriver", - "XYZStepperController", - - # 控制器 - "PipetteController", - "XYZController", - - # 后端 - "LiquidHandlerRvizBackend", - - # 资源创建函数 - "create_tip_rack_1000ul", - "create_tip_rack_200ul", - "create_96_well_plate", - "create_deep_well_plate", - "create_8_tube_rack", - "create_standard_deck", - "create_waste_container", - "create_wash_container", - "create_reagent_container", - "load_deck_config", - - # 后端创建函数 - "create_laiyu_backend", - - # 主要类 - "LaiYuLiquid", - "LaiYuLiquidConfig", - "LaiYuLiquidBackend", - "LaiYuLiquidDeck", - - # 工具函数 - "get_version", - "get_supported_resources", - "create_quick_setup", - "validate_installation", - "print_module_info", - "setup_logging", -] - -# 别名定义,为了向后兼容 -LaiYuLiquidDevice = LaiYuLiquid # 主设备类别名 -LaiYuLiquidController = XYZController # 控制器别名 -LaiYuLiquidDriver = XYZStepperController # 驱动器别名 - -# 模块级别的便捷函数 - -def get_version() -> str: - """ - 获取模块版本 - - Returns: - str: 版本号 - """ - return __version__ - - -def get_supported_resources() -> dict: - """ - 获取支持的资源类型 - - Returns: - dict: 支持的资源类型字典 - """ - return { - "tip_racks": { - "LaiYuLiquidTipRack": LaiYuLiquidTipRack, - }, - "containers": { - "LaiYuLiquidContainer": LaiYuLiquidContainer, - }, - "decks": { - "LaiYuLiquidDeck": LaiYuLiquidDeck, - }, - "devices": { - "LaiYuLiquid": LaiYuLiquid, - } - } - - -def create_quick_setup() -> tuple: - """ - 快速创建基本设置 - - Returns: - tuple: (backend, controllers, resources) 的元组 - """ - # 创建后端 - backend = LiquidHandlerRvizBackend() - - # 创建控制器(使用默认端口进行演示) - pipette_controller = PipetteController(port="/dev/ttyUSB0", address=4) - xyz_controller = XYZController(port="/dev/ttyUSB1", auto_connect=False) - - # 创建测试资源 - tip_rack_1000 = create_tip_rack_1000ul("tip_rack_1000") - tip_rack_200 = create_tip_rack_200ul("tip_rack_200") - well_plate = create_96_well_plate("96_well_plate") - - controllers = { - 'pipette': pipette_controller, - 'xyz': xyz_controller - } - - resources = { - 'tip_rack_1000': tip_rack_1000, - 'tip_rack_200': tip_rack_200, - 'well_plate': well_plate - } - - return backend, controllers, resources - - -def validate_installation() -> bool: - """ - 验证模块安装是否正确 - - Returns: - bool: 安装是否正确 - """ - try: - # 检查核心类是否可以导入 - from .core.laiyu_liquid_main import LaiYuLiquid, LaiYuLiquidConfig - from .backend import LaiYuLiquidBackend - from .controllers import XYZController, PipetteController - from .drivers import XYZStepperController, SOPAPipette - - # 尝试创建基本对象 - config = LaiYuLiquidConfig() - backend = create_laiyu_backend("validation_test") - - print("模块安装验证成功") - return True - - except Exception as e: - print(f"模块安装验证失败: {e}") - return False - - -def print_module_info(): - """打印模块信息""" - print(f"LaiYu_Liquid 集成模块") - print(f"版本: {__version__}") - print(f"作者: {__author__}") - print(f"描述: {__description__}") - print(f"") - print(f"支持的资源类型:") - - resources = get_supported_resources() - for category, types in resources.items(): - print(f" {category}:") - for type_name, type_class in types.items(): - print(f" - {type_name}: {type_class.__name__}") - - print(f"") - print(f"主要功能:") - print(f" - 硬件集成: LaiYuLiquidBackend") - print(f" - 抽象接口: LaiYuLiquid") - print(f" - 资源管理: 各种资源类和创建函数") - print(f" - 协议执行: transfer_liquid 和相关函数") - print(f" - 配置管理: deck.json 和加载函数") - - -# 模块初始化时的检查 -def _check_dependencies(): - """检查依赖项""" - try: - import pylabrobot - import asyncio - import json - import logging - return True - except ImportError as e: - import logging - logging.warning(f"缺少依赖项 {e}") - return False - - -# 执行依赖检查 -_dependencies_ok = _check_dependencies() - -if not _dependencies_ok: - import logging - logging.warning("某些依赖项缺失,模块功能可能受限") - - -# 模块级别的日志配置 -import logging - -def setup_logging(level: str = "INFO"): - """ - 设置模块日志 - - Args: - level: 日志级别 (DEBUG, INFO, WARNING, ERROR) - """ - logger = logging.getLogger("LaiYu_Liquid") - logger.setLevel(getattr(logging, level.upper())) - - if not logger.handlers: - handler = logging.StreamHandler() - formatter = logging.Formatter( - '%(asctime)s - %(name)s - %(levelname)s - %(message)s' - ) - handler.setFormatter(formatter) - logger.addHandler(handler) - - return logger - - -# 默认日志设置 -_logger = setup_logging() \ No newline at end of file diff --git a/unilabos/registry/devices/bioyond_dispensing_station.yaml b/unilabos/registry/devices/bioyond_dispensing_station.yaml index 38a0ae3..ecc0c87 100644 --- a/unilabos/registry/devices/bioyond_dispensing_station.yaml +++ b/unilabos/registry/devices/bioyond_dispensing_station.yaml @@ -174,35 +174,6 @@ bioyond_dispensing_station: title: query_resource_by_name参数 type: object type: UniLabJsonCommand - auto-transfer_materials_to_reaction_station: - feedback: {} - goal: {} - goal_default: - target_device_id: null - transfer_groups: null - handles: {} - placeholder_keys: {} - result: {} - schema: - description: '' - properties: - feedback: {} - goal: - properties: - target_device_id: - type: string - transfer_groups: - type: array - required: - - target_device_id - - transfer_groups - type: object - result: {} - required: - - goal - title: transfer_materials_to_reaction_station参数 - type: object - type: UniLabJsonCommand auto-workflow_sample_locations: feedback: {} goal: {} From 152d3a75630ea6331bb5e589f6ef00dc3a96e107 Mon Sep 17 00:00:00 2001 From: Xuwznln <18435084+Xuwznln@users.noreply.github.com> Date: Sun, 14 Dec 2025 13:12:19 +0800 Subject: [PATCH 6/6] Update docs --- README.md | 4 +++- README_zh.md | 4 +++- docs/user_guide/installation.md | 39 --------------------------------- 3 files changed, 6 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 10552d6..2e0288f 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,9 @@ Uni-Lab-OS recommends using `mamba` for environment management. Choose the appro ```bash # Create new environment -mamba create -n unilab uni-lab::unilabos -c robostack-staging -c conda-forge +mamba create -n unilab python=3.11.11 +mamba activate unilab +mamba install -n unilab uni-lab::unilabos -c robostack-staging -c conda-forge ``` ## Install Dev Uni-Lab-OS diff --git a/README_zh.md b/README_zh.md index 810e2c5..76976eb 100644 --- a/README_zh.md +++ b/README_zh.md @@ -41,7 +41,9 @@ Uni-Lab-OS 建议使用 `mamba` 管理环境。根据您的操作系统选择适 ```bash # 创建新环境 -mamba create -n unilab uni-lab::unilabos -c robostack-staging -c conda-forge +mamba create -n unilab python=3.11.11 +mamba activate unilab +mamba install -n unilab uni-lab::unilabos -c robostack-staging -c conda-forge ``` 2. 安装开发版 Uni-Lab-OS: diff --git a/docs/user_guide/installation.md b/docs/user_guide/installation.md index 6513150..d3fd498 100644 --- a/docs/user_guide/installation.md +++ b/docs/user_guide/installation.md @@ -317,45 +317,6 @@ unilab --help 如果所有命令都正常输出,说明开发环境配置成功! -### 开发工具推荐 - -#### IDE - -- **PyCharm Professional**: 强大的 Python IDE,支持远程调试 -- **VS Code**: 轻量级,配合 Python 扩展使用 -- **Vim/Emacs**: 适合终端开发 - -#### 推荐的 VS Code 扩展 - -- Python -- Pylance -- ROS -- URDF -- YAML - -#### 调试工具 - -```bash -# 安装调试工具 -pip install ipdb pytest pytest-cov -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple - -# 代码质量检查 -pip install black flake8 mypy -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple -``` - -### 设置 pre-commit 钩子(可选) - -```bash -# 安装 pre-commit -pip install pre-commit -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple - -# 设置钩子 -pre-commit install - -# 手动运行检查 -pre-commit run --all-files -``` - --- ## 验证安装