mirror of
https://github.com/deepmodeling/Uni-Lab-OS
synced 2026-03-28 08:05:09 +00:00
P1 Edge: 关节桥接重构 — 直接订阅 /joint_states + 资源跟随 + 吞吐优化
- HostNode 直接订阅 /joint_states (JointStateMsg),绕过 JointRepublisher 中间人 - 新增 resource_pose 订阅,实现资源夹取跟随 (gripper attach/detach) - 吞吐优化:死区过滤 (1e-4 rad)、抑频 (~20Hz)、增量 resource_poses - JointRepublisher 修复 str→json.dumps (E1) - communication.py 新增 publish_joint_state 抽象方法 - ws_client.py 实现 push_joint_state action 发送 - 57 项测试覆盖:关节分组、资源跟随、同类型多设备、优化行为 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -50,6 +50,17 @@ class BaseCommunicationClient(ABC):
|
||||
"""
|
||||
pass
|
||||
|
||||
def publish_joint_state(self, node_uuid: str, joint_states: dict, resource_poses: dict = None) -> None:
|
||||
"""
|
||||
发布高频关节状态数据(push_joint_state action,不写 DB)
|
||||
|
||||
Args:
|
||||
node_uuid: 设备节点的云端 UUID
|
||||
joint_states: 关节名 → 角度/位置 的映射
|
||||
resource_poses: 物料附着映射(可选)
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def publish_job_status(
|
||||
self, feedback_data: dict, job_id: str, status: str, return_info: Optional[dict] = None
|
||||
|
||||
Reference in New Issue
Block a user