merge: dev → lab_2_isacc_sim(设备锁/action-lock 上报 + 调度)#297
Open
Skyzuo9 wants to merge 19 commits into
Open
Conversation
Normalize missing init_param_enforce to an empty object so registry schema contracts do not prevent devices from loading. Co-authored-by: Cursor <cursoragent@cursor.com>
…evice discovery Co-authored-by: Cursor <cursoragent@cursor.com>
…d in action locks Action locks now report the full invokable action set from _action_value_mappings, including @action(auto_prefix=True) 'auto-*' actions (e.g. workbench prepare_materials/heating/move) that were previously dropped by the 'auto-' filter. Only the generic _execute_driver_command[_async] command channels are excluded. Applied across all three lock-report paths: report_all_action_locks (host_ready full snapshot), _create_action_clients_for_device (device discovery), and initialize_device (local device startup, which previously reported zero locks for JsonCommand/auto- only devices like workbench). Co-authored-by: Cursor <cursoragent@cursor.com>
Use action lock reports as the source of callable actions so host readiness does not publish mismatched action sets. Co-authored-by: Cursor <cursoragent@cursor.com>
Default resources land at 000 and falsely match by position; rely on occupied_by instead. Co-authored-by: Cursor <cursoragent@cursor.com>
将 dev 的调度/设备锁子系统合入 lab_2:后端已强制 device_lock,edge 需向后端 上报 report_action_lock 快照(含 UniLabJsonCommand 动作),否则 acquire device lock 失败(30052)。 冲突解决: - ws_client.py: 取 dev 版设备锁协议(report_all_action_locks/report_action_lock/ is_action_busy),删除 lab_2 已被 dev 机制取代的 JobInfo.set_ready_timeout/ is_ready_timeout(dev 用 refresh_ready_timeouts,且无 ready_timeout 字段)。 - host_node.py: 保留双方——lab_2(PR#292) 本地图设备补建 _execute_driver_command (_async) 基础 ActionClient + dev 的 new_action_pairs 全量锁上报。 - registry.py: 同时保留 apply_simulation_meta(lab_2 sim)与 validate_init_param_enforce(dev)。 - initialize_device.py: 取 lab_2 版(sim real/twin/pair 关键路径);dev 的 init_enforce merge 对未声明 init_param_enforce 的设备无影响,registry 侧 validate 仍独立生效。 - main.py: 去重 lab_2 Plan09 外源 registry 发现块 + 恢复丢失的 if workflow_upload: + 合入 dev 的 use_remote_resource 检查。 Co-authored-by: Cursor <cursoragent@cursor.com>
非 moveit 设备(STX110/PF400)的 --visual rviz 走 view_robot_lite.rviz, 但该文件从未创建 -> rviz2 -d 缺失文件回退默认配置(Fixed Frame=map/无 RobotModel)。 补一个含 Grid+TF+RobotModel(topic /robot_description)、Fixed Frame=world 的精简配置, 使单条 --visual rviz 命令即可显示模型。 Co-authored-by: Cursor <cursoragent@cursor.com>
initialize_device._lookup_registry_class 在 class 不在注册表时 import unilabos.registry.community_alias.normalize_community_class,但该模块从未创建 (lab_2/dev 均无)-> 社区/别名设备(如 community.pylabrobot_unilab.liconic_stx110 经短别名 liconic_stx110 引用)初始化时 ModuleNotFoundError 崩溃。 补上双向归一化(短别名<->community.<ns>.<id>)。 Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
test 后端已升级为强制 device_lock(执行前获取设备锁)。edge 需向后端上报
report_action_lock快照(含 UniLabJsonCommand 动作),否则acquire device lock failed (30052)。该子系统在
dev上,lab_2_isacc_sim缺失(lab_2 只有always_free队列、无 action-lock 上报)。本 PR 将
dev合入lab_2_isacc_sim,补齐设备锁/调度。冲突解决(5 文件)
app/ws_client.py:取 dev 设备锁协议(report_all_action_locks/report_action_lock/is_action_busy,host_ready 前先发锁快照);删除 lab_2 已被 dev 取代的JobInfo.set_ready_timeout/is_ready_timeout(无ready_timeout字段、无调用;dev 用refresh_ready_timeouts)。ros/nodes/presets/host_node.py:两侧都留——lab_2(PR#292)本地图设备补建_execute_driver_command(_async)基础 ActionClient + dev 的new_action_pairs全量锁上报。registry/registry.py:同时保留apply_simulation_meta(lab_2 sim)与validate_init_param_enforce(dev,registry.py:1907有调用)。ros/initialize_device.py:取 lab_2 版(real/sim/twin/pair 关键路径);dev 的init_enforcemerge 对未声明init_param_enforce的设备无影响,registry 侧 validate 仍独立生效。app/main.py:去重 lab_2 Plan09 外源 registry 发现块 + 恢复被合并吞掉的if workflow_upload:+ 合入 dev 的use_remote_resource检查(用.get()防 KeyError)。验证
app/registry/ros/sim全区域py_compile/compileall通过。成功注册 109 设备/135 资源、连上wss://.../ws/schedule,dev 新增client/*依赖无 import 报错。report_action_lock、不再 30052、RViz 联动。备注
feat/pf400-fullstack,领先 lab_2 1 提交)未含;lab_2 合入本 PR 后需将 PF400 rebase 到新 lab_2。Made with Cursor