联动天眼系统进行装卸车

来自MDCS wiki2
Artheru讨论 | 贡献2026年5月16日 (六) 19:15的版本 (Initial bilingual draft (auto-published))
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳到导航 跳到搜索


概述 / Overview

"联动天眼系统进行装卸车"是 AGV 与 天眼系统(高位俯拍 3D 视觉系统)协作完成装车 / 卸车的方案:天眼提供货物在车厢内的全局位姿与堆码状况,AGV 据此规划自身的取 / 放策略,完成传统单车感知无法解决的盲区作业。

"Loading / unloading coupled with the Skyeye system" describes the workflow where one or more AGVs cooperate with an overhead 3D vision rig (the Skyeye). Skyeye gives the AGVs a global view of cargo inside the truck bed; AGVs use it to plan a pick / place strategy in regions their own sensors can't see.

参见 天眼系统 了解天眼本身。 See 天眼系统 for Skyeye itself.

应用场景 / Scenarios

  • 半挂车装车 / Loading a semi-trailer: 货架 / 托盘按指定堆码顺序装入 12 m 半挂车厢;AGV 在地面,天眼俯拍车厢全局。
  • 集装箱卸货 / Unloading a container: 箱体内堆码复杂、AGV 自身视场只能看到最前排。
  • 缓冲区拆码并装车 / Yard-to-truck transfer: 缓冲区与车厢之间多次往返,调度由天眼根据车厢剩余空位实时规划。

系统组成 / Components

模块 / Module 功能 / Function 接入点 / Integration
天眼相机 / Skyeye camera 高位(≥ 4 m)的固定 3D 视觉 / Fixed overhead 3D vision Medulla camera plugin(见 3D相机适配
天眼推理服务 / Skyeye inference 把 3D 点云转成 堆码格点 + 朝向 + 占用度 HTTP / WebSocket,发布到 SimpleComposer
AGV 自身感知 / On-AGV sensing 局部 3D 感知用于精对位 / Local detection for fine pose `2D激光` + `3D激光`
SimpleComposer 调度 / Fleet scheduler 综合两路信息生成任务 `SimpleComposer.RCS` + SkyeyeStrategy 插件

工作原理 / How it works

数据流 / Data flow

 天眼 3D 帧 → 推理服务 → 全局堆码格点 (GridCell[])
 ┌──────────────────────────────────────────────────────┐
 │ SimpleComposer SkyeyeStrategy:                       │
 │   - 比对当前堆码与目标堆码                              │
 │   - 输出 NextAction = (binId, fromCell, toCell)        │
 └──────────────────────────────────────────────────────┘
 → AGV.Queue(approach → onboard-detect → fine-place → withdraw)

协议契约 / Protocol contract

天眼每秒发布一次堆码描述(JSON 或 protobuf): Skyeye broadcasts a stack description ~1 Hz:

{
  "ts": 1715843200,
  "truckId": "T-12",
  "bed": { "x": 12000, "y": 2400 },
  "cells": [
    { "id": 17, "x": 850, "y": 600, "z": 230, "theta": 0.04,
      "occupied": true, "type": "wood_pallet", "conf": 0.91 },
    { "id": 18, "x": 850, "y": 1800, "z": 230, "theta": -0.02,
      "occupied": false, "conf": 0.88 }
    // ...
  ]
}

SimpleComposer 把这条消息映射到 仓位坐标系,并发布到所有订阅的 AGV。 SimpleComposer maps the message into the warehouse coordinate frame and republishes to subscribing AGVs.

AGV 侧 / On the AGV side

联动天眼装卸的车上动作通常是这样组合: The Movement composition on the AGV side is typically:

public async Task LoadTruck(SkyeyeStrategy strategy)
{
    while (!strategy.IsDone)
    {
        var step = await strategy.NextStep();   // (binId, fromCell, toCell)
        // 1. 从缓冲区拿货
        await PickAtBuffer(step.fromCell);
        // 2. 巡线到车尾
        await DriveTask.WaitDriveTask(new SteeringLineFollowing
        { dstX = step.truckStaging.X, dstY = step.truckStaging.Y }.Follow());
        // 3. 联动天眼放料
        var place = await strategy.GetPlacePose(step.toCell);
        await DriveTask.WaitDriveTask(new SkyeyeGuidedPlace
        {
            targetX = place.X, targetY = place.Y,
            targetTheta = place.Theta,
            stopDist = 30
        }.Get());
        // 4. 上报完成给天眼,让它确认 cell occupancy
        await strategy.Confirm(step.toCell);
    }
}

关键问题 / Key trade-offs

  • 时间同步 / Time sync: 天眼帧与 AGV 位姿必须用同一时钟(NTP / PTP)。误差 > 100 ms 会导致目标格点漂移到错误位置。
  • 视觉与激光分歧 / Vision-lidar disagreement: 当天眼说 cell-17 空、AGV 局部激光看到障碍物,以局部激光为准并触发"天眼重扫"。
  • 半挂车定位 / Trailer localisation: 半挂车每次停的位置略有不同;上线前要先用 AGV 车尾激光 + AprilTag / V 槽确认车厢的实际坐标。
  • 光照与雨水 / Light & rain: 天眼属于光学传感,强光 / 雨水 / 雪都会显著降低 conf;要设置回退策略(停止派单或切到单车感知)。

调度策略 / Scheduling strategies

策略 / Strategy 说明 / Notes
`Greedy` 按 Skyeye 给出的空格优先级取,AGV 数 ≤ 2 用这个
`RowSweep` 按车厢 Y 方向逐排装;AGV 数 3+ 时减少互相等待
`Bipartite` 缓冲区货 → 车厢格 的最小成本匹配;混型货物多时用

策略实现为 `SimpleComposer.SkyeyeStrategy` 子类,调度运行时可热切换。

Strategies are `SkyeyeStrategy` subclasses; the scheduler can hot-swap between them.

安全 / Safety

  • 装卸过程中卡车驾驶员必须 下车 + 钥匙带走;卡车启动信号要进 AGV 的 e-stop。
  • 半挂车厢门未完全打开 → 天眼必须能识别并阻止 AGV 进入。

相关页面 / See also