天天看點

夜光精講 Opentcs 架構與實際AGV方案(二)

夜光序言:

A little more persistence, a little more effort, and what seemed hopeless failure may turn to glorious success

再多一點點毅力,多付出一點點努力,看似無望的失敗也會轉化成輝煌的成功。

夜光精講 Opentcs 架構與實際AGV方案(二)

正文:

排程系統與機器人的通訊

任何系統與實體之間通訊都需要協定,排程系統與機器人的通訊通過Kernel中的Adapter實作,資訊傳輸格式采用JS0N格式,資料交換的載體為Redis資料庫。

排程系統通過Kernel的Adapter向Redis伺服器發送運輸訂單資訊,而該資訊由客戶的MES系統生成,通過通訊協定存放到Redis伺服器中,供Adapter從中取用,Adapter擷取到訂單後會計算出該訂單的靜态路由,以及路由成本,進而選擇最優路徑,并為該車比對,将攜帶路由指令的訂單存放到Redis伺服器,并從Redis伺服器中取回移動機器人的狀态資訊,在用戶端Viewer上顯示。

JS0N 格式樣例:

// Genius:Retrieves a single named transport order.

[
  {
    "name": "TOrder-01",
    "category": "Park",
    "state": "RAW",
    "intendedVehicle": "Vehicle-0001",
    "processingVehicle": "Vehicle-0002",
    "destinations": [
      {
        "locationName": "Storage-01",
        "operation": "Store",
        "state": "PRISTINE",
        "properties": [
          {
            "key": "key1",
            "value": "value1"
          }
        ]
      }
    ]
  }
]
           
// Genius:The details of the transport order to be created.
{
  "deadline": "2018-05-17T06:42:40.396Z",
  "intendedVehicle": "Vehicle-01",
  "destinations": [
    {
      "locationName": "Storage 01",
      "operation": "Load cargo",
      "properties": [
        {
          "key": "key1",
          "value": "value1"
        }
      ]
    }
  ],
  "properties": [
    {
      "key": "key1",
      "value": "value1"
    }
  ],
  "dependencies": [
    "TOrder-002"
  ]
}
           
// Genius:Retrieves a set of vehicles.

[
  {
    "name": "Vehicle-0001",
    "properties": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    },
    "length": "1000",
    "energyLevelGood": "90",
    "energyLevelCritical": "30",
    "energyLevel": "60",
    "integrationLevel": "TO_BE_IGNORED",
    "procState": "UNAVAILABLE",
    "transportOrder": "TOrder-01",
    "currentPosition": "Point-0001",
    "state": "UNKNOWN"
  }
]
           
// Genius:Retrieves the vehicle with the given name.

{
  "name": "Vehicle-0001",
  "properties": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "length": "1000",
  "energyLevelGood": "90",
  "energyLevelCritical": "30",
  "energyLevel": "60",
  "integrationLevel": "TO_BE_IGNORED",
  "procState": "UNAVAILABLE",
  "transportOrder": "TOrder-01",
  "currentPosition": "Point-0001",
  "state": "UNKNOWN"
}
           
// Genius:Retrieving status updates

{
  "timeStamp": "2019-05-21T01:52:56.770Z",
  "statusMessages": [
    {
      "type": "TransportOrder",
      "sequenceNumber": "123",
      "creationTimeStamp": "2018-05-14T07:42:00.343Z",
      "orderName": "TOrder-0001",
      "processingVehicleName": "Vehicle-0001",
      "orderState": "RAW",
      "destinations": [
        {
          "locationName": "Storage-01",
          "operation": "Store",
          "state": "PRISTINE",
          "properties": [
            {
              "key": "key1",
              "value": "value1"
            }
          ]
        }
      ],
      "properties": [
        {
          "key": "key1",
          "value": "value1"
        }
      ]
    },
    {
      "type": "Vehicle",
      "sequenceNumber": "123",
      "creationTimeStamp": "2018-05-14T07:42:00.343Z",
      "vehicleName": "Vehicle-0001",
      "transportOrderName": "TOrder-0001",
      "position": "Point-0001",
      "precisePosition": {
        "x": "60",
        "y": "40",
        "z": "0"
      },
      "state": "UNKNOWN",
      "procState": "UNAVAILABLE"
    }
  ]
}
           
夜光精講 Opentcs 架構與實際AGV方案(二)

繼續閱讀