mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-04 13:25:13 +00:00
修复可能的web template找不到的问题
新增联网获取json启动 删除非-g传入启动json的方式 兼容传参参数名短横线与下划线 更新版本到0.10.1 修复Upload Registry镜像不匹配
This commit is contained in:
69
.conda/recipe.yaml
Normal file
69
.conda/recipe.yaml
Normal file
@@ -0,0 +1,69 @@
|
||||
package:
|
||||
name: unilabos
|
||||
version: 0.10.1
|
||||
|
||||
build:
|
||||
noarch: python
|
||||
number: 0
|
||||
script:
|
||||
- python -m pip install paho-mqtt opentrons_shared_data
|
||||
- python -m pip install git+https://github.com/Xuwznln/pylabrobot.git
|
||||
|
||||
requirements:
|
||||
host:
|
||||
- python >=3.11
|
||||
- pip
|
||||
- setuptools
|
||||
run:
|
||||
- conda-forge::python =3.11.11
|
||||
- compilers
|
||||
- cmake
|
||||
- make
|
||||
- ninja
|
||||
- sphinx
|
||||
- sphinx_rtd_theme
|
||||
- numpy
|
||||
- scipy
|
||||
- pandas
|
||||
- networkx
|
||||
- matplotlib
|
||||
- pint
|
||||
- pyserial
|
||||
- pyusb
|
||||
- pylibftdi
|
||||
- pymodbus
|
||||
- python-can
|
||||
- pyvisa
|
||||
- opencv
|
||||
- pydantic
|
||||
- fastapi
|
||||
- uvicorn
|
||||
- gradio
|
||||
- flask
|
||||
- websocket
|
||||
- ipython
|
||||
- jupyter
|
||||
- jupyros
|
||||
- colcon-common-extensions
|
||||
- robostack-staging::ros-humble-desktop-full
|
||||
- robostack-staging::ros-humble-control-msgs
|
||||
- robostack-staging::ros-humble-sensor-msgs
|
||||
- robostack-staging::ros-humble-trajectory-msgs
|
||||
- ros-humble-navigation2
|
||||
- ros-humble-ros2-control
|
||||
- ros-humble-robot-state-publisher
|
||||
- ros-humble-joint-state-publisher
|
||||
- ros-humble-rosbridge-server
|
||||
- ros-humble-cv-bridge
|
||||
- ros-humble-tf2
|
||||
- ros-humble-moveit
|
||||
- ros-humble-moveit-servo
|
||||
- ros-humble-simulation
|
||||
- ros-humble-tf-transformations
|
||||
- transforms3d
|
||||
- uni-lab::ros-humble-unilabos-msgs
|
||||
|
||||
about:
|
||||
repository: https://github.com/dptech-corp/Uni-Lab-OS
|
||||
license: GPL-3.0
|
||||
description: "Uni-Lab-OS"
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
configs/
|
||||
temp/
|
||||
output/
|
||||
## Python
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
|
||||
12
README.md
12
README.md
@@ -40,21 +40,11 @@ Uni-Lab-OS recommends using `mamba` for environment management. Choose the appro
|
||||
|
||||
```bash
|
||||
# Create new environment
|
||||
mamba env create -f unilabos-[YOUR_OS].yaml
|
||||
mamba activate unilab
|
||||
mamba create -n unilab unilab -c unilab -c robostack -c robostack-staging -c conda-forge
|
||||
|
||||
# Or update existing environment
|
||||
# Where `[YOUR_OS]` can be `win64`, `linux-64`, `osx-64`, or `osx-arm64`.
|
||||
conda env update --file unilabos-[YOUR_OS].yml -n environment_name
|
||||
|
||||
# Currently, you need to install the `unilabos_msgs` package
|
||||
# You can download the system-specific package from the Release page
|
||||
conda install ros-humble-unilabos-msgs-0.10.0-xxxxx.tar.bz2
|
||||
|
||||
# Install PyLabRobot and other prerequisites
|
||||
git clone https://github.com/PyLabRobot/pylabrobot plr_repo
|
||||
cd plr_repo
|
||||
pip install .[opentrons]
|
||||
```
|
||||
|
||||
2. Install Uni-Lab-OS:
|
||||
|
||||
12
README_zh.md
12
README_zh.md
@@ -40,21 +40,11 @@ Uni-Lab-OS 建议使用 `mamba` 管理环境。根据您的操作系统选择适
|
||||
|
||||
```bash
|
||||
# 创建新环境
|
||||
mamba env create -f unilabos-[YOUR_OS].yaml
|
||||
mamba activate unilab
|
||||
mamba create -n unilab unilab -c unilab -c robostack -c robostack-staging -c conda-forge
|
||||
|
||||
# 或更新现有环境
|
||||
# 其中 `[YOUR_OS]` 可以是 `win64`, `linux-64`, `osx-64`, 或 `osx-arm64`。
|
||||
conda env update --file unilabos-[YOUR_OS].yml -n 环境名
|
||||
|
||||
# 现阶段,需要安装 `unilabos_msgs` 包
|
||||
# 可以前往 Release 页面下载系统对应的包进行安装
|
||||
conda install ros-humble-unilabos-msgs-0.10.0-xxxxx.tar.bz2
|
||||
|
||||
# 安装PyLabRobot等前置
|
||||
git clone https://github.com/PyLabRobot/pylabrobot plr_repo
|
||||
cd plr_repo
|
||||
pip install .[opentrons]
|
||||
```
|
||||
|
||||
2. 安装 Uni-Lab-OS:
|
||||
|
||||
@@ -1,46 +1,58 @@
|
||||
package:
|
||||
name: ros-humble-unilabos-msgs
|
||||
version: 0.10.0
|
||||
version: 0.10.1
|
||||
|
||||
source:
|
||||
path: ../../unilabos_msgs
|
||||
folder: ros-humble-unilabos-msgs/src/work
|
||||
target_directory: ros-humble-unilabos-msgs/src/work
|
||||
|
||||
build:
|
||||
script:
|
||||
sel(win): bld_ament_cmake.bat
|
||||
sel(unix): build_ament_cmake.sh
|
||||
- if: win
|
||||
then:
|
||||
- call %RECIPE_DIR%/bld_ament_cmake.bat
|
||||
- if: unix
|
||||
then:
|
||||
- bash $RECIPE_DIR/build_ament_cmake.sh
|
||||
number: 5
|
||||
about:
|
||||
home: https://www.ros.org/
|
||||
repository: https://github.com/dptech-corp/Uni-Lab-OS
|
||||
license: BSD-3-Clause
|
||||
summary: |
|
||||
Robot Operating System
|
||||
|
||||
extra:
|
||||
recipe-maintainers:
|
||||
- ros-forge
|
||||
description: "ros-humble-unilabos-msgs is a package that provides message definitions for Uni-Lab-OS."
|
||||
|
||||
requirements:
|
||||
build:
|
||||
- "{{ compiler('cxx') }}"
|
||||
- "{{ compiler('c') }}"
|
||||
- sel(linux64): sysroot_linux-64 2.17
|
||||
- ${{ compiler('cxx') }}
|
||||
- ${{ compiler('c') }}
|
||||
- if: linux and x86_64
|
||||
then:
|
||||
- sysroot_linux-64 2.17
|
||||
- ninja
|
||||
- setuptools
|
||||
- sel(unix): make
|
||||
- sel(unix): coreutils
|
||||
- sel(osx): tapi
|
||||
- sel(build_platform != target_platform): pkg-config
|
||||
- cmake
|
||||
- cython
|
||||
- sel(win): vs2022_win-64
|
||||
- sel(build_platform != target_platform): python
|
||||
- sel(build_platform != target_platform): cross-python_{{ target_platform }}
|
||||
- sel(build_platform != target_platform): numpy
|
||||
- cmake
|
||||
- if: unix
|
||||
then:
|
||||
- make
|
||||
- coreutils
|
||||
- if: osx
|
||||
then:
|
||||
- tapi
|
||||
- if: win
|
||||
then:
|
||||
- vs2022_win-64
|
||||
- if: build_platform != target_platform
|
||||
then:
|
||||
- pkg-config
|
||||
- python
|
||||
- cross-python_${{ target_platform }}
|
||||
- numpy
|
||||
host:
|
||||
- numpy
|
||||
- pip
|
||||
- sel(build_platform == target_platform): pkg-config
|
||||
- if: build_platform == target_platform
|
||||
then:
|
||||
- pkg-config
|
||||
- robostack-staging::ros-humble-action-msgs
|
||||
- robostack-staging::ros-humble-ament-cmake
|
||||
- robostack-staging::ros-humble-ament-lint-auto
|
||||
@@ -50,12 +62,14 @@ requirements:
|
||||
- robostack-staging::ros-humble-rosidl-default-generators
|
||||
- robostack-staging::ros-humble-std-msgs
|
||||
- robostack-staging::ros-humble-geometry-msgs
|
||||
- robostack-staging::ros2-distro-mutex=0.5.*
|
||||
- robostack-staging::ros2-distro-mutex=0.6
|
||||
run:
|
||||
- robostack-staging::ros-humble-action-msgs
|
||||
- robostack-staging::ros-humble-ros-workspace
|
||||
- robostack-staging::ros-humble-rosidl-default-runtime
|
||||
- robostack-staging::ros-humble-std-msgs
|
||||
- robostack-staging::ros-humble-geometry-msgs
|
||||
# - robostack-staging::ros2-distro-mutex=0.6.*
|
||||
- sel(osx and x86_64): __osx >={{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }}
|
||||
- robostack-staging::ros2-distro-mutex=0.6
|
||||
- if: osx and x86_64
|
||||
then:
|
||||
- __osx >= {{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }}
|
||||
@@ -1,6 +1,6 @@
|
||||
package:
|
||||
name: unilabos
|
||||
version: "0.10.0"
|
||||
version: "0.10.1"
|
||||
|
||||
source:
|
||||
path: ../..
|
||||
|
||||
2
setup.py
2
setup.py
@@ -4,7 +4,7 @@ package_name = 'unilabos'
|
||||
|
||||
setup(
|
||||
name=package_name,
|
||||
version='0.10.0',
|
||||
version='0.10.1',
|
||||
packages=find_packages(),
|
||||
include_package_data=True,
|
||||
install_requires=['setuptools'],
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
name: unilab
|
||||
channels:
|
||||
- unilab
|
||||
- robostack
|
||||
- robostack-staging
|
||||
- conda-forge
|
||||
@@ -61,7 +62,8 @@ dependencies:
|
||||
- transforms3d
|
||||
# ros-humble-gazebo-ros // ignored because of the conflict with ign-gazebo
|
||||
# ilab equipments
|
||||
# - ros-humble-unilabos-msgs
|
||||
- uni-lab::ros-humble-unilabos-msgs
|
||||
- pip:
|
||||
- paho-mqtt
|
||||
- opentrons_shared_data
|
||||
- opentrons_shared_data
|
||||
- git+https://github.com/Xuwznln/pylabrobot
|
||||
@@ -1,5 +1,6 @@
|
||||
name: unilab
|
||||
channels:
|
||||
- unilab
|
||||
- robostack
|
||||
- robostack-staging
|
||||
- conda-forge
|
||||
@@ -60,7 +61,8 @@ dependencies:
|
||||
- transforms3d
|
||||
# ros-humble-gazebo-ros // ignored because of the conflict with ign-gazebo
|
||||
# ilab equipments
|
||||
# - ros-humble-unilabos-msgs
|
||||
- uni-lab::ros-humble-unilabos-msgs
|
||||
- pip:
|
||||
- paho-mqtt
|
||||
- opentrons_shared_data
|
||||
- opentrons_shared_data
|
||||
- git+https://github.com/Xuwznln/pylabrobot
|
||||
@@ -1,5 +1,6 @@
|
||||
name: unilab
|
||||
channels:
|
||||
- unilab
|
||||
- robostack
|
||||
- robostack-staging
|
||||
- conda-forge
|
||||
@@ -63,7 +64,8 @@ dependencies:
|
||||
- transforms3d
|
||||
# ros-humble-gazebo-ros // ignored because of the conflict with ign-gazebo
|
||||
# ilab equipments
|
||||
# - ros-humble-unilabos-msgs
|
||||
- uni-lab::ros-humble-unilabos-msgs
|
||||
- pip:
|
||||
- paho-mqtt
|
||||
- opentrons_shared_data
|
||||
- opentrons_shared_data
|
||||
- git+https://github.com/Xuwznln/pylabrobot
|
||||
@@ -1,5 +1,6 @@
|
||||
name: unilab
|
||||
channels:
|
||||
- unilab
|
||||
- robostack
|
||||
- robostack-staging
|
||||
- conda-forge
|
||||
@@ -61,12 +62,13 @@ dependencies:
|
||||
- transforms3d
|
||||
# ros-humble-gazebo-ros // ignored because of the conflict with ign-gazebo
|
||||
# ilab equipments
|
||||
# ros-humble-unilabos-msgs
|
||||
- uni-lab::ros-humble-unilabos-msgs
|
||||
# driver
|
||||
#- crcmod
|
||||
- pip:
|
||||
- paho-mqtt
|
||||
- opentrons_shared_data
|
||||
- git+https://github.com/Xuwznln/pylabrobot
|
||||
# driver
|
||||
#- ur-rtde # set PYTHONUTF8=1
|
||||
#- pyautogui
|
||||
|
||||
@@ -34,9 +34,6 @@ def register_devices_and_resources(mqtt_client, lab_registry):
|
||||
logger.info(f"[UniLab Register] 成功通过HTTP注册 {len(resources_to_register)} 个资源 {cost_time}ms")
|
||||
else:
|
||||
logger.error(f"[UniLab Register] HTTP注册资源失败: {response.status_code}, {response.text} {cost_time}ms")
|
||||
|
||||
time.sleep(10)
|
||||
|
||||
logger.info("[UniLab Register] 设备和资源注册完成.")
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ from unilabos_msgs.srv import (
|
||||
) # type: ignore
|
||||
from unique_identifier_msgs.msg import UUID
|
||||
|
||||
from unilabos.app.register import register_devices_and_resources
|
||||
from unilabos.config.config import BasicConfig
|
||||
from unilabos.registry.registry import lab_registry
|
||||
from unilabos.resources.graphio import initialize_resource
|
||||
@@ -150,11 +151,7 @@ class HostNode(BaseROS2DeviceNode):
|
||||
self.device_status_timestamps = {} # 用来存储设备状态最后更新时间
|
||||
if BasicConfig.upload_registry:
|
||||
from unilabos.app.mq import mqtt_client
|
||||
|
||||
for device_info in lab_registry.obtain_registry_device_info():
|
||||
mqtt_client.publish_registry(device_info["id"], device_info)
|
||||
for resource_info in lab_registry.obtain_registry_resource_info():
|
||||
mqtt_client.publish_registry(resource_info["id"], resource_info)
|
||||
register_devices_and_resources(mqtt_client, lab_registry)
|
||||
else:
|
||||
self.lab_logger().warning("本次启动注册表不报送云端,如果您需要联网调试,请使用unilab-register命令进行单独报送,或者在启动命令增加--upload_registry")
|
||||
time.sleep(1) # 等待MQTT连接稳定
|
||||
|
||||
Reference in New Issue
Block a user