查询机器人当前载入地图中的站点信息

该 API 用于获得地图中所有站点的坐标、角度以及类型信息

请求

  • 编号: 1301 (0x0515)
  • 名称: robot_status_station_req
  • 描述: 查询机器人当前载入地图中的站点信息
  • JSON 数据区: 无

请求示例

响应

  • 编号: 11301 (0x2C25)
  • 名称: robot_status_station_res
  • 描述: 查询机器人当前载入地图中的站点信息的响应
  • JSON 数据区: 见下表
字段名 类型 描述 可缺省
stations array[object] 站点数组, 若地图中没有站点, 则为空数组, object 形式见下文
ret_code number API 错误码
err_msg string 错误信息

object 形式如下:

{
    "id": "LM1",        // 站点的ID
    "type": "LandMark", // 站点的类型 LandMark, RobotHome, ChargePoint, GyrocaliPoint, ReturnPoint
    "x": 1.23,          // 站点在世界坐标系中的 x 坐标(m)
    "y": 4.56,          // 站点在世界坐标系中的 y 坐标(m)
    "r": 1.57           // 站点在世界坐标系中的朝向角(rad)
}

数据示例:

{
    "stations": [
        {
            "id": "LM1",
            "type": "LandMark",
            "x": 1.23,
            "y": 4.56,
            "r": 1.57
        },
        {
            "id": "LM2",
            "type": "LandMark",
            "x": -1.23,
            "y": 4.56,
            "r": 3.14
        },
        {
            "id": "GP3",
            "type": "GyrocaliPoint",
            "x": -1.23,
            "y": -4.56,
            "r": 0
        }
    ],
}

响应示例

results matching ""

    No results matching ""