HTTP API v1.0

任务API

添加一个任务

简要描述:

  • 添加一个任务(任务的优先级只能传入0, 1, 2三种状态, 客户优先级分3等0,1,2,没有其他选项。其中1是运输任务,2是机器人紧急状况下低电充电任务,0是去休息区任务。)

请求URL:

  • http://<IP>:<PORT>/api/v1/task/add_task

请求方式:

  • POST

请求示例:

  • http://192.168.124.225:5000/api/v1/task/add_task

请求参数: json

{
    "start":"s1",
    "goal":"s2",
    "start_action": 0,
    "goal_action": 0,
    "item_type": "",
    "priority": "3",
    "preassignment": "yg00sim018042309002n00",
    "task_id":"",
    "plan_time":""
}

请求参数说明:

成功返回示例: json

{
   "errmsg": "Add_OK",
   "errno": "0",
   "id": 44
}

返回参数说明:

参数名 类型 说明
id int 任务id
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Add_Fail",
  "errno": "4001"
}

返回参数说明:

参数名 类型 说明
errno string API错误码
errmsg string 错误信息

重复添加任务

简要描述:

  • 重复添加多个任务,每个任务可以重复多次(重复任务默认优先级是0)

请求URL:

  • http://<IP>:<PORT>/api/v1/task/repeat_tasks

请求方式:

  • POST

请求示例:

  • http://192.168.124.225:5000/api/v1/task/repeat_tasks

请求参数: json

{
    "tasks":[
        {
            "repeat_num":2,
            "id": 77
        },
        {
            "repeat_num":2,
            "id": 78
        }
        ]
}

请求参数说明:

参数名 必选 类型 说明
repeat_num int 任务重复次数
id int 要重复的任务的id

成功返回示例: json

{
    "errmsg": "Repeat_OK",
    "errno": "0",
    "tasks": [
        {
            "id": 77,
            "repeat_num": 2
        },
        {
            "id": 78,
            "repeat_num": 2
        }
    ]
}

返回参数说明:

参数名 类型 说明
repeat_num int 任务重复次数
id int 要重复的任务的id
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg": "Task is not exists",
    "errno": "4002",
    "task": {
        "id": 77,
        "repeat_num": 2
    }
}

返回参数说明:

参数名 类型 说明
repeat_num int 任务重复次数
id int 要重复的任务的id
errno string API错误码
errmsg string 错误信息

删除某个任务

简要描述:

  • 删除某个任务(无法删除正在执行的任务)

请求URL:

  • http://<IP>:<PORT>/api/v1/task/delete_task/<id>

请求方式:

  • DELETE

请求示例:

  • http://192.168.124.225:5000/api/v1/task/delete_task/44

请求参数说明:

参数名 必选 类型 说明
id int 任务id

成功返回示例: json

{
    "errmsg": "Del_OK",
    "errno": "0",
    "id": 44
}

返回参数说明:

参数名 类型 说明
id int 任务id
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Del_Fail",
  "errno": "4001",
  "id": 44
}

返回参数说明:

参数名 类型 说明
id int 任务id
errno string API错误码
errmsg string 错误信息

强制删除所有任务

简要描述:

  • 强制删除所有任务

请求URL:

  • http://<IP>:<PORT>/api/v1/task/delete_all_tasks

请求方式:

  • DELETE

请求示例:

  • http://192.168.124.225:5000/api/v1/task/delete_all_tasks

请求参数:

成功返回示例: json

{
    "del_count": 20,
    "errmsg": "Del_OK",
    "errno": "0"
}

返回参数说明:

参数名 类型 说明
del_count int 成功删除条数
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Del_Fail",
  "errno": "4001"
}

返回参数说明:

参数名 类型 说明
errno string API错误码
errmsg string 错误信息

删除所有执行完成的任务

简要描述:

  • 删除所有执行完成或者中断的任务

请求URL:

  • http://<IP>:<PORT>/api/v1/task/delete_tasks

请求方式:

  • DELETE

请求示例:

  • http://192.168.124.225:5000/api/v1/task/delete_tasks

请求参数:

成功返回示例: json

{
    "errmsg": "Del_OK",
    "errno": "0",
    "del_count": 20
}

返回参数说明:

参数名 类型 说明
del_count int 成功删除条数
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Del_Fail",
  "errno": "4001"
}

返回参数说明:

参数名 类型 说明
errno string API错误码
errmsg string 错误信息

修改某个任务

简要描述:

  • 修改某个任务(只能修改刚创建但还未分配的任务,其他任务都不可以修改,修改优先级时任务的优先级只能传入0,1,2三种状态,客户优先级分3等0,1,2,没有其他选项。其中1是运输任务,2是机器人紧急状况下低电充电任务,0是去休息区任务。)

请求URL:

  • http://<IP>:<PORT>/api/v1/task/update_task

请求方式:

  • PUT

请求示例:

  • http://192.168.124.225:5000/api/v1/task/update_task

请求参数: json

{
    "id": 12,
    "start":"R2",
    "goal":"B1",
    "preassignment": "yg00a00017120415000n00"
}

备注:只传入要修改的数据

请求参数说明:

成功返回示例: json

{
    "errmsg": "Update_OK",
    "errno": "0",
    "id":12
}

返回参数说明:

参数名 类型 说明
id int 任务id
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Update_Fail",
  "errno": "4001",
  "id":12
}

返回参数说明:

参数名 类型 说明
errno string API错误码
errmsg string 错误信息

查询某个任务详情

简要描述:

  • 查询一个任务的运行详情

请求URL:

  • http://<IP>:<PORT>/api/v1/task/get_task/<id>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/task/get_task/1

请求参数说明:

参数名 必选 类型 说明
id int 任务id

成功返回示例: json

{
    "data": {
        "actual_time": "Mon, 19 Nov 2018 14:27:42 GMT",
        "assignment": "yg00sim018042309011n00",
        "complete_time": "Mon, 19 Nov 2018 14:28:51 GMT",
        "goal": "B4",
        "goal_action": 0,
        "id": 1,
        "item_type": "",
        "plan_time": "Wed, 01 Jan 1000 00:00:00 GMT",
        "preassignment": "",
        "priority": 0,
        "start": "A5",
        "start_action": 0,
        "status": 3,
        "task_id": ""
    },
    "errmsg": "Query_OK",
    "errno": "0"
}

返回参数说明:

错误返回示例: json

{
  "errmsg": "Query_Fail",
  "errno": "4001",
  "id": 1
}

返回参数说明:

参数名 类型 说明
id int 任务id
errno string API错误码
errmsg string 错误信息

查询所有任务详情

简要描述:

  • 查询所有任务的运行详情

请求URL:

  • http://<IP>:<PORT>/api/v1/task/get_all_tasks

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/task/get_all_tasks

或者

  • http://192.168.124.225:5000/api/v1/task/get_all_tasks?p=2

请求参数说明:

参数名 必选 类型 说明
p int 要查询的第几页数据,不传的情况下默认为1 ,当参数小于1时会显示第一页,当参数大于最大页数时会显示最大页的数据

成功返回示例: json

{
  "data": {
    "page": {
      "current_page": 2,
      "limit": 2,
      "total_count": 7,
      "total_page": 4
    },
    "tasks": [
      {
        "actual_time": "Wed, 01 Jan 1000 00:00:00 GMT",
        "assignment": "",
        "complete_time": "Wed, 01 Jan 1000 00:00:00 GMT",
        "goal": "PP",
        "goal_action": 0,
        "id": 3,
        "item_type": "",
        "plan_time": "Wed, 01 Jan 1000 00:00:00 GMT",
        "preassignment": "",
        "priority": 0,
        "start": "PQ",
        "start_action": 0,
        "status": 4,
        "task_id": ""
      },
      {
        "actual_time": "Wed, 01 Jan 1000 00:00:00 GMT",
        "assignment": "",
        "complete_time": "Wed, 01 Jan 1000 00:00:00 GMT",
        "goal": "PP",
        "goal_action": 0,
        "id": 4,
        "item_type": "",
        "plan_time": "Wed, 01 Jan 1000 00:00:00 GMT",
        "preassignment": "",
        "priority": 0,
        "start": "PQ",
        "start_action": 0,
        "status": 4,
        "task_id": ""
      }
    ]
  },
  "errmsg": "Query_OK",
  "errno": "0"
}

返回参数说明:

错误返回示例: json

{
  "errmsg": "Query_Fail",
  "errno": "4001"
}

返回参数说明:

参数名 类型 说明
errno string API错误码
errmsg string 错误信息

查询所有未预分配任务

简要描述:

  • 查询所有未预分配任务

请求URL:

  • http://<IP>:<PORT>/api/v1/task/get_unpreassignment_tasks

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/task/get_unpreassignment_tasks

或者

  • http://192.168.124.225:5000/api/v1/task/get_unpreassignment_tasks?p=2

请求参数说明:

参数名 必选 类型 说明
p int 要查询的第几页数据,不传的情况下默认为1 ,当参数小于1时会显示第一页,当参数大于最大页数时会显示最大页的数据

成功返回示例: json

{
  "data": {
    "page": {
      "current_page": 2,
      "limit": 2,
      "total_count": 7,
      "total_page": 4
    },
    "tasks": [
      {
        "actual_time": "Wed, 01 Jan 1000 00:00:00 GMT",
        "assignment": "",
        "complete_time": "Wed, 01 Jan 1000 00:00:00 GMT",
        "goal": "PP",
        "goal_action": 0,
        "id": 3,
        "item_type": "",
        "plan_time": "Wed, 01 Jan 1000 00:00:00 GMT",
        "preassignment": "",
        "priority": 0,
        "start": "PQ",
        "start_action": 0,
        "status": 4,
        "task_id": ""
      },
      {
        "actual_time": "Wed, 01 Jan 1000 00:00:00 GMT",
        "assignment": "",
        "complete_time": "Wed, 01 Jan 1000 00:00:00 GMT",
        "goal": "PP",
        "goal_action": 0,
        "id": 4,
        "item_type": "",
        "plan_time": "Wed, 01 Jan 1000 00:00:00 GMT",
        "preassignment": "",
        "priority": 0,
        "start": "PQ",
        "start_action": 0,
        "status": 4,
        "task_id": ""
      }
    ]
  },
  "errmsg": "Query_OK",
  "errno": "0"
}

返回参数说明:

错误返回示例: json

{
  "errmsg": "Query_Fail",
  "errno": "4001"
}

返回参数说明:

参数名 类型 说明
errno string API错误码
errmsg string 错误信息

查询所有已预分配任务

简要描述:

  • 查询所有已预分配任务

请求URL:

  • http://<IP>:<PORT>/api/v1/task/get_preassignment_tasks

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/task/get_preassignment_tasks

或者

  • http://192.168.124.225:5000/api/v1/task/get_preassignment_tasks?p=2

请求参数说明:

参数名 必选 类型 说明
p int 要查询的第几页数据,不传的情况下默认为1 ,当参数小于1时会显示第一页,当参数大于最大页数时会显示最大页的数据

成功返回示例: json

{
  "data": {
    "page": {
      "current_page": 1,
      "limit": 2,
      "total_count": 1,
      "total_page": 1
    },
    "tasks": [
      {
        "actual_time": "Wed, 01 Jan 1000 00:00:00 GMT",
        "assignment": "",
        "complete_time": "Wed, 01 Jan 1000 00:00:00 GMT",
        "goal": "R1",
        "goal_action": 0,
        "id": 8,
        "item_type": "",
        "plan_time": "Wed, 01 Jan 1000 00:00:00 GMT",
        "preassignment": "yg00sim018042309003n00",
        "priority": 0,
        "start": "T1",
        "start_action": 0,
        "status": 0,
        "task_id": ""
      }
    ]
  },
  "errmsg": "Query_OK",
  "errno": "0"
}

返回参数说明:

错误返回示例: json

{
  "errmsg": "Query_Fail"
  "errno": "4001"
}

返回参数说明:

参数名 类型 说明
errno string API错误码
errmsg string 错误信息

查询某个任务运行状态

简要描述:

  • 查询某个任务的状态

请求URL:

  • http://<IP>:<PORT>/api/v1/task/get_task_status/<id>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/task/get_task_status/25

请求参数说明:

参数名 必选 类型 说明
id int 任务id

成功返回示例: json

{
  "errno": "0",
  "errmsg": "OK"
  "data": {
      "id": 25,
      "status": 3
  }
}

返回参数说明:

参数名 类型 说明
status int 任务状态码 :(0=新建,待处理(此状态任务可任意修改);1=已分配,待执行;2=执行中;3=任务完成,4=任务失败中断 ;5=任务取消;6=移动到运输起始点;7=进行运输起始点动作;8=移动到运输终止点;9=进行运输终止点动作;)
id int 任务id
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Query_Fail",
  "errno": "4001",
  "id": 25
}

返回参数说明:

参数名 类型 说明
id int 任务id
errno string API错误码
errmsg string 错误信息

查询所有处于某一状态的任务

简要描述:

  • 查询所有处于某一状态的任务(0=新建,待处理(此状态任务可任意修改);1=已分配,待执行;2=执行中;3=任务完成,4=任务失败中断 ;5=任务取消;6=移动到运输起始点;7=进行运输起始点动作;8=移动到运输终止点;9=进行运输终止点动作)

请求URL:

  • http://<IP>:<PORT>/api/v1/task/get_tasks_by_status/<int:status>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/task/get_tasks_by_status/3

或者

  • http://192.168.124.225:5000/api/v1/task/get_tasks_by_status/3?p=2

请求参数说明:

参数名 必选 类型 说明
status int 任务的状态 :(0=新建,待处理(此状态任务可任意修改);1=已分配,待执行;2=执行中;3=任务完成,4=任务失败中断 ;5=任务取消;6=移动到运输起始点;7=进行运输起始点动作;8=移动到运输终止点;9=进行运输终止点动作)
p int 要查询的第几页数据,不传的情况下默认为1 ,当参数小于1时会显示第一页,当参数大于最大页数时会显示最大页的数据

成功返回示例: json

{
  "data": {
    "page": {
      "current_page": 2,
      "limit": 2,
      "total_count": 3,
      "total_page": 2
    },
    "tasks": [
      {
        "actual_time": "Thu, 22 Nov 2018 16:39:31 GMT",
        "assignment": "yg00sim018042309012n00",
        "complete_time": "Thu, 22 Nov 2018 16:42:39 GMT",
        "goal": "PQ",
        "goal_action": 0,
        "id": 7,
        "item_type": "",
        "plan_time": "Wed, 01 Jan 1000 00:00:00 GMT",
        "preassignment": "",
        "priority": 0,
        "start": "PP",
        "start_action": 0,
        "status": 3,
        "task_id": ""
      }
    ]
  },
  "errmsg": "Query_OK",
  "errno": "0"
}

返回参数说明:

错误返回示例: json

{
  "errmsg": "Query_Fail",
  "errno": "4001"
}

返回参数说明:

参数名 类型 说明
errno string API错误码
errmsg string 错误信息

查询某个机器人正在执行的任务

简要描述:

  • 查询某一机器人正在执行的任务

请求URL:

  • http://<IP>:<PORT>/api/v1/task/get_robot_perform_task/<serial>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/task/get_robot_perform_task/yg00sim018042309011n00

请求参数说明:

参数名 必选 类型 说明
serial string 机器人序列号

成功返回示例: json

{
    "data": {
        "serial": "yg00sim018042309011n00",
        "tasks": [
            {
                "actual_time": "Thu, 22 Nov 2018 14:34:11 GMT",
                "assignment": "yg00sim018042309012n00",
                "complete_time": "Wed, 01 Jan 1000 00:00:00 GMT",
                "goal": "B1",
                "goal_action": 0,
                "id": 10,
                "item_type": "",
                "plan_time": "Wed, 01 Jan 1000 00:00:00 GMT",
                "preassignment": "yg00sim018042309012n00",
                "priority": 0,
                "start": "WA1",
                "start_action": 0,
                "status": 6,
                "task_id": ""
            }
        ]
    },
    "errmsg": "Query_OK",
    "errno": "0"
}

返回参数说明:

错误返回示例: json

{
  "errmsg": "Query_Fail",
  "errno": "4001",
  "serial": "yg00sim018042309011n00"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

查询所有已分配给某个机器人的任务

简要描述:

  • 查询所有已分配给某一机器人的任务

请求URL:

  • http://<IP>:<PORT>/api/v1/task/get_robot_assigned_tasks/<serial>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/task/get_robot_assigned_tasks/yg00sim018042309012n00

或者

  • http://192.168.124.225:5000/api/v1/task/get_robot_assigned_tasks/yg00sim018042309012n00?p=2

请求参数说明:

参数名 必选 类型 说明
p int 要查询的第几页数据,不传的情况下默认为1 ,当参数小于1时会显示第一页,当参数大于最大页数时会显示最大页的数据

成功返回示例: json

{
  "data": {
    "serial": "yg00sim018042309012n00",
    "page": {
      "current_page": 1,
      "limit": 2,
      "total_count": 1,
      "total_page": 1
    },
    "tasks": [
      {
        "actual_time": "Thu, 22 Nov 2018 16:39:31 GMT",
        "assignment": "yg00sim018042309012n00",
        "complete_time": "Thu, 22 Nov 2018 16:42:39 GMT",
        "goal": "PQ",
        "goal_action": 0,
        "id": 7,
        "item_type": "",
        "plan_time": "Wed, 01 Jan 1000 00:00:00 GMT",
        "preassignment": "",
        "priority": 0,
        "start": "PP",
        "start_action": 0,
        "status": 3,
        "task_id": ""
      }
    ]
  },
  "errmsg": "Query_OK",
  "errno": "0"
}

返回参数说明:

错误返回示例: json

{
  "errmsg": "Query_Fail",
  "errno": "4001",
  "serial": "yg00sim018042309012n00"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

取消某个任务

简要描述:

  • 取消某个任务

请求URL:

  • http://<IP>:<PORT>/api/v1/task/cancel_task/<id>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/task/cancel_task/193

请求参数说明:

参数名 必须 类型 说明
id int 任务id

成功返回示例: json

{
    "errmsg": "Abort_OK",
    "errno": "0",
    "id": 193
}

返回参数说明:

参数名 类型 说明
id int 任务id
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Abort_Fail",
  "errno": "4005",
  "id": 193
}

返回参数说明:

参数名 类型 说明
id int 任务id
errno string API错误码
errmsg string 错误信息

机器人API

查询机器人急停状态

简要描述:

  • 查询某一个机器人的急停状态

请求URL:

  • http://<IP>:<PORT>/api/v1/robot/get_urgent_stop_status/<serial>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/robot/get_urgent_stop_status/yg00sim018042309001n00

请求参数:

参数名 必须 类型 说明
serial string 机器人序列号

成功返回示例:json

{
    "data": {
        "ib_ready": "False",
        "serial": "yg00sim018042309001n00"
    },
    "errmsg": "OK",
    "errno": "0"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
ib_ready bool 是否有智能盒子
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg": "Robot serial is not exists",
    "errno": "4002",
    "serial": "yg00sim018042309001n01"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

查询机器人电池状态

简要描述:

  • 查询某一个机器人的电池状态(即电池剩余量)

请求URL:

  • http://<IP>:<PORT>/api/v1/robot/get_battery_status/<serial>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/robot/get_battery_status/yg00sim018042309001n00

请求参数:

参数名 必须 类型 说明
serial string 机器人序列号

成功返回示例: json

{
    "data": {
        "battery_percent": 13.5,
        "serial": "yg00sim018042309001n00"
    },
    "errmsg": "OK",
    "errno": "0"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
battery_percent float 电池剩余量百分比
errno string API错误码
errmsg string 错误信息

错误返回示例: json

 {
    "errmsg": "Robot serial is not exists",
    "errno": "4002",
    "serial": "yg00sim018042309001n01"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

查询机器人速度

简要描述:

  • 查询某个机器人当前的速度

请求URL:

  • http://<IP>:<PORT>/api/v1/robot/get_robot_speed/<serial>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/robot/get_robot_speed/yg00sim018042309001n01

请求参数:

参数名 类型 说明
serial string 机器人序列号

成功返回示例: json

{
    "data": {
        "angular_x": "0.0",
        "angular_y": "0.0",
        "angular_z": "0.0",
        "linear_x": "0.0",
        "linear_y": "0.0",
        "linear_z": "0.0",
        "serial": "yg00sim018042309001n00"
    },
    "errmsg": "Query_OK",
    "errno": "0"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
linear_x float 机器人x坐标线速度
linear_y float 机器人y坐标线速度
linear_z float 机器人z坐标线速度
angular_x float 机器人x坐标角速度
angular_y float 机器人y坐标角速度
angular_z float 机器人z坐标角速度
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg": "Robot serial is not exists",
    "errno": "4002",
    "serial": "yg00sim018042309001n01"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

查询机器人位置

简要描述:

  • 查询一个机器人所在的位置信息

请求URL:

  • http://<IP>:<PORT>/api/v1/robot/get_robot_pose/<serial>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/robot/get_robot_pose/yg00sim018042309001n00

请求参数:

参数名 必选 类型 说明
serial string 机器人序列号

成功返回示例: json

{
    "data": {
        "orientation_w": "0.0",
        "orientation_x": "0.0",
        "orientation_y": "0.0",
        "orientation_z": "0.0",
        "position_x": "-1.98469904009",
        "position_y": "-1.51566477423",
        "position_z": "0.0",
        "serial": "yg00sim018042309001n00"
    },
    "errmsg": "Query_OK",
    "errno": "0"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
position_x float 机器人所在位置x坐标
position_y float 机器人所在位置y坐标
position_z float 机器人所在位置z坐标
orientation_x float 机器人所在角度x坐标
orientation_y float 机器人所在角度y坐标
orientation_z float 机器人所在角度z坐标
orientation_w float 机器人所在角度w坐标
errno string API错误码
errmsg string 错误信息

错误返回示例: json

 {
    "errmsg": "Robot serial is not exists",
    "errno": "4002",
    "serial": "yg00sim018042309001n01"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

查询机器人激光扫描设备

简要描述:

  • 查询某一个机器人的机器人激光扫描设备(即是否有激光扫描设备)

请求URL:

  • http://<IP>:<PORT>/api/v1/robot/get_laser_point/<serial>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/robot/get_laser_point/yg00sim018042309001n00

请求参数:

参数名 必须 类型 说明
serial string 机器人序列号

成功返回示例: json

{
    "data": {
        "scan_ready": "False",
        "serial": "yg00sim018042309001n00"
    },
    "errmsg": "OK",
    "errno": "0"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
scan_ready bool 机器人是否有激光扫描设备
errno string API错误码
errmsg string 错误信息

错误返回示例: json

 {
    "errmsg": "Robot serial is not exists",
    "errno": "4002",
    "serial": "yg00sim018042309001n01"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

查询机器人数量

简要描述:

  • 查询机器人数量

请求URL:

  • http://<IP>:<PORT>/api/v1/robot/get_robot_num

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/robot/get_robot_num

请求参数:

成功返回示例: json

{
    "data": {
        "robots_num": 2
    },
    "errmsg": "Query_OK",
    "errno": "0"
}

返回参数说明:

参数名 类型 说明
robots_num int 机器人数量
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Query_Fail",
  "errno": "4005"
}

返回参数说明:

参数名 类型 说明
errno string API错误码
errmsg string 错误信息

查询机器人调度状态

简要描述:

  • 查询某个机器人的调度状态

请求URL:

  • http://<IP>:<PORT>/api/v1/robot/get_robot_dispatch_status/<serial>

请求方式:

  • GET

请求示例:

-http://192.168.124.225:5000/api/v1/robot/get_robot_dispatch_status/yg00a00017071020003n00

请求参数:

参数名 必选 类型 说明
serial string 机器人序列号

成功返回示例: json

{
    "data": {
        "serial": "yg00a00017071020003n00",
        "state_id": 0,
        "state_name": "OnlineState"
    },
    "errmsg": "OK",
    "errno": "0"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
state_id int 机器人调度状态编码
state_name string 机器人调度状态名
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Query_Fail",
  "errno": "4005",
  "serial": "yg00a00017071020003n00"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

查询某种状态下的所有机器人

简要描述:

  • 查询处于某种状态下的所有机器人(1 = online, 2 = registered, 3 = registered and vacant)

请求URL:

  • http://<IP>:<PORT>/api/v1/robot/get_robots_by_status/<status>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/robot/get_robots_by_status/1

请求参数:

参数名 必选 类型 说明
status int 状态类型(1 = online, 2 = registered, 3 = registered and vacant)

成功返回示例: json

{
    "data": {
        "status": 1,
        "agents": [
            "yg00a00017071020003n00",
            "yg00rvz017120415001n00",
            "yg00sim018042309011n00"
        ]
    },
    "errmsg": "Query_OK",
    "errno": "0"
}

返回参数说明:

参数名 类型 说明
agents list 机器人序列号列表
status int 状态类型(1 = online, 2 = registered, 3 = registered and vacant)
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Query_Fail",
  "errno": "4005",
  "status": 1
}

返回参数说明:

参数名 类型 说明
status int 状态类型(1 = online, 2 = registered, 3 = registered and vacant)
errno string API错误码
errmsg string 错误信息

暂停某个机器人

简要描述:

  • 暂停某一个机器人

请求URL:

  • http://<IP>:<PORT>/api/v1/robot/pause_robot/<serial>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/robot/pause_robot/yg00a00017071020003n00

请求参数:

参数名 必须 类型 说明
serial string 机器人序列号

成功返回示例: json

{
    "errmsg": "Pause_OK",
    "errno": "0",
    "serial": "yg00a00017071020003n00"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Pause_Fail",
  "errno": "4005",
  "serial": "yg00a00017071020003n00"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

暂停所有机器人

简要描述:

  • 暂停所有的机器人

请求URL:

  • http://<IP>:<PORT>/api/v1/robot/pause_all_robots

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/robot/pause_all_robots

请求参数:

成功返回示例: json

{
    "errmsg": "Pause_OK",
    "errno": "0",
    "serial_lst": [
        "yg00sim018042309011n00"
    ]
}

返回参数说明:

参数名 类型 说明
serial_lst list 暂停的所有机器人序列号集合
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Pause_Fail",
  "errno": "4005",
  "serial":  "yg00sim018042309011n00"
}

返回参数说明:

参数名 类型 说明
serial string 暂停失败的机器人的序列号
errno string API错误码
errmsg string 错误信息

恢复某个机器人

简要描述:

  • 恢复某一个机器人

请求URL:

  • http://<IP>:<PORT>/api/v1/robot/resume_robot/<serial>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/robot/resume_robot/yg00a00017071020003n00

请求参数:

参数名 必须 类型 说明
serial string 机器人序列号

成功返回示例: json

{
    "errmsg": "Resume_OK",
    "errno": "0",
    "serial": "yg00a00017071020003n00"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Resume_Fail",
  "errno": "4005",
  "serial": "yg00a00017071020003n00"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

恢复所有机器人

简要描述:

  • 恢复所有机器人

请求URL:

  • http://<IP>:<PORT>/api/v1/robot/resume_all_robots

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/robot/resume_all_robots

请求参数:

成功返回示例: json

{
    "errmsg": "Resume_OK",
    "errno": "0",
    "serial_lst": [
        "yg00sim018042309011n00"
    ]
}

返回参数说明:

参数名 类型 说明
serial_lst list 恢复的所有机器人的序列号集合
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Resume_Fail",
  "errno": "4005",
  "serial": "yg00sim018042309011n00"
}

返回参数说明:

参数名 类型 说明
serial string 恢复失败的机器人序列号
errno string API错误码
errmsg string 错误信息

机器人重定位

简要描述:

  • 对某个机器人进行重定位

请求URL:

  • http://<IP>:<PORT>/api/v1/robot/robot_relocate/<serial>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/robot/robot_relocate/yg00a00017071020003n00

请求参数:

参数名 必须 类型 说明
serial string 机器人序列号

成功返回示例: json

{
    "errmsg": "Relocate_OK",
    "errno": "0",
    "sreial": "yg00a00017071020003n00"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Relocate_Fail",
  "errno": "4005",
  "sreial": "yg00a00017071020003n00"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

查询所有未注册机器人

简要描述:

  • 查询所有未注册机器人

请求URL:

  • http://<IP>:<PORT>/api/v1/robot/get_unregister_robots

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:7777/api/v1/robot/get_unregister_robots

请求参数说明:

成功返回示例: json

{
    "data":{
        "agents":[
            "yg00sim018042309012n00",
            "yg00sim018042309011n00"
        ]
    },
    "errmsg":"Query_OK",
    "errno":"0"
}

返回参数说明:

参数名 类型 说明
agents list 未注册机器人序列号集合
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Query_Fail",
  "errno": "4005"
  }

返回参数说明:

参数名 类型 说明
errno string API错误码
errmsg string 错误信息

查询所有机器人状态

简要描述:

  • 查询所有机器人状态

请求URL:

  • http://<IP>:<PORT>/api/v1/robot/get_all_robots_status

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:7777/api/v1/robot/get_all_robots_status

请求参数说明:

成功返回示例: json

{
    "data":[
        {
            "serial":"yg00sim018042309011n00",
            "status_name":"OnlineState"
        },
        {
            "serial":"yg00sim018042309012n00",
            "status_name":"RegisteredState"
        }
    ],
    "errmsg":"Query_OK",
    "errno":"0"
}

返回参数说明:

参数名 类型 说明
status_name string 机器人状态名
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Query_Fail",
  "errno": "4005"
  }

返回参数说明:

参数名 类型 说明
errno string API错误码
errmsg string 错误信息

挂起机器人

简要描述:

  • 挂起机器人(机器人挂起后,在该任务之后将不会为该机器人分配新任务)

请求URL:

  • http://<IP>:<PORT>/api/v1/robot/suspend_robot/<serial>

or

  • http://<IP>:<PORT>/api/v1/robot/suspend_robot/<serial>?other=dandan

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:7777/api/v1/robot/suspend_robot/yg00b10018071913000n00

or

-http://192.168.124.225:7777/api/v1/robot/suspend_robot/yg00b10018071913000n00?other=dandan

请求参数说明:

参数名 必须 类型 说明
serial string 机器人序列号
other string 挂起的调用者

成功返回示例: json

{
    "errmsg":"Suspend_OK",
    "errno":"4005",
    "serial":"yg00b10018071913000n00"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Suspend_Fail",
  "errno": "4005",
  "serial": "yg00b10018071913000n00"
  }

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

取消机器人挂起

简要描述:

  • 取消机器人挂起

请求URL:

  • http://<IP>:<PORT>/api/v1/robot/unsuspend_robot/<serial>

or

  • http://<IP>:<PORT>/api/v1/robot/unsuspend_robot/<serial>?other=dandan

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:7777/api/v1/robot/unsuspend_robot/yg00b10018071913000n00

or

-http://192.168.124.225:7777/api/v1/robot/unsuspend_robot/yg00b10018071913000n00?other=dandan

请求参数说明:

参数名 必须 类型 说明
serial string 机器人序列号
other string 取消挂起的调用者

成功返回示例: json

{
    "errmsg":"Unsuspend_OK",
    "errno":"0",
    "serial":"yg00b10018071913000n00"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg":"Robot is not registered or Robot serial is not exists",
    "errno":"4002",
    "serial":"yg00b10018071913000n00"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

中控API

上线机器人

简要描述:

  • 韩信上线一个机器人

请求URL:

  • http://<IP>:<PORT>/api/v1/monitor/robot_register/<serial>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/monitor/robot_register/yg00a00017071020003n00

请求参数:

参数名 必选 类型 说明
serial string 机器人序列号

成功返回示例: json

{
    "errmsg": "Register_OK",
    "errno": "0",
    "serial": "yg00a00017071020003n00"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Register_Fail",
  "errno": "4005",
  "serial": "yg00a00017071020003n00"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

下线机器人

简要描述:

  • 韩信下线一个机器人

请求URL:

  • http://<IP>:<PORT>/api/v1/monitor/robot_unregister/<serial>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/monitor/robot_unregister/yg00a00017071020003n00

请求参数:

参数名 必选 类型 说明
serial string 机器人序列号

成功返回示例: json

{
    "errmsg": "Unregister_OK",
    "errno": "0",
    "serial": "yg00a00017071020003n00"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Unregister_Fail",
  "errno": "4005",
  "serial": "yg00a00017071020003n00"
}

返回参数说明:

参数名 类型 说明
serial string 机器人序列号
errno string API错误码
errmsg string 错误信息

关闭韩信

简要描述:

  • 关闭韩信

请求URL:

  • http://<IP>:<PORT>/api/v1/monitor/hanxin_stop

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/monitor/hanxin_stop

请求参数:

成功返回示例: json

{
    "errmsg": "Stop_OK",
    "errno": "0"
}

返回参数说明:

参数名 类型 说明
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Stop_Fail",
  "errno": "4005"
}

返回参数说明:

参数名 类型 说明
errno string API错误码
errmsg string 错误信息

开启韩信

简要描述:

  • 开启韩信

请求URL:

  • http://<IP>:<PORT>/api/v1/monitor/hanxin_start

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/monitor/hanxin_start

请求参数:

成功返回示例: json

{
    "errmsg": "Start_OK",
    "errno": "0"
}

返回参数说明:

参数名 类型 说明
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Start_Fail",
  "errno": "4005"
}

返回参数说明:

参数名 类型 说明
errno string API错误码
errmsg string 错误信息

上线所有机器人

简要描述:

  • 上线所有的机器人

请求URL:

  • http://<IP>:<PORT>/api/v1/monitor/register_all_robots

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:7777/api/v1/monitor/register_all_robots

请求参数说明:

成功返回示例: json

{
    "errmsg":"Register_OK",
    "errno":"0",
    "robots":[
        "yg00sim018042309012n00",
        "yg00sim018042309011n00"
    ]
}

返回参数说明:

参数名 类型 说明
robots list 成功注册的机器人序列号集合
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Register_all_Fail",
  "errno": "4005"
  }

返回参数说明:

参数名 类型 说明
errno string API错误码
errmsg string 错误信息

下线所有机器人

简要描述:

  • 下线所有的机器人

请求URL:

  • http://<IP>:<PORT>/api/v1/monitor/unregister_all_robots

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:7777/api/v1/monitor/unregister_all_robots

请求参数说明:

成功返回示例: json

{
    "errmsg":"Unregister_OK",
    "errno":"0",
    "robots":[
        "yg00sim018042309011n00",
        "yg00sim018042309012n00"
    ]
}

返回参数说明:

参数名 类型 说明
robots list 成功取消注册的机器人序列号集合
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Unregister_all_Fail",
  "errno": "4005"
  }

返回参数说明:

参数名 类型 说明
errno string API错误码
errmsg string 错误信息

二维码地图API

创建二维码地图方式一

简要描述:

  • 创建一张二维码地图

请求URL:

  • http://<IP>:<PORT>/api/v1/tag_map/create_tag_map

请求方式:

  • POST

请求示例:

  • http://192.168.124.225:5000/api/v1/tag_map/create_tag_map

请求参数: json

{
    "table_name": "dandan_test_tag_map",
    "tags": [
        {
            "tagId": 2,
            "tagSize": 0.08,
            "tagOrientationZ": 0,
            "tagOrientationX": 0,
            "tagOrientationY": 0,
            "tagPositionX": 1,
            "tagPositionY": 2,
            "tagPositionZ": 0
        },
        {
            "tagId": 3,
            "tagSize": 0.08,
            "tagOrientationZ": 0,
            "tagOrientationX": 0,
            "tagOrientationY": 0,
            "tagPositionX": 1,
            "tagPositionY": 1,
            "tagPositionZ": 0
        },
        {
            "tagId": 4,
            "tagSize": 0.08,
            "tagOrientationZ": 0,
            "tagOrientationX": 0,
            "tagOrientationY": 0,
            "tagPositionX": 1,
            "tagPositionY": 3,
            "tagPositionZ": 0
        },
        {
            "tagId": 5,
            "tagSize": 0.08,
            "tagOrientationZ": 0,
            "tagOrientationX": 0,
            "tagOrientationY": 0,
            "tagPositionX": 1,
            "tagPositionY": 4,
            "tagPositionZ": 0
        },
        {
            "tagId": 6,
            "tagSize": 0.08,
            "tagOrientationZ": 0,
            "tagOrientationX": 0,
            "tagOrientationY": 0,
            "tagPositionX": 1,
            "tagPositionY": 5,
            "tagPositionZ": 0
        },
        {
            "tagId": 0,
            "tagSize": 0.08,
            "tagOrientationZ": 0,
            "tagOrientationX": 0,
            "tagOrientationY": 0,
            "tagPositionX": 1,
            "tagPositionY": 6,
            "tagPositionZ": 0
        },
        {
            "tagId": 7,
            "tagSize": 0.08,
            "tagOrientationZ": 0,
            "tagOrientationX": 0,
            "tagOrientationY": 0,
            "tagPositionX": 1,
            "tagPositionY": 7,
            "tagPositionZ": 0
        }
    ]
}

请求参数:

成功返回示例: json

{
    "errmsg": "Create_OK",
    "errno": "0",
    "table_name": "dandan_test_tag_map"
}

返回参数说明:

参数名 类型 说明
table_name string 创建的地图表名
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Create_Fail",
  "errno": "4001",
  "table_name": "dandan_test_tag_map"
}

返回参数说明:

参数名 类型 说明
table_name string 创建的地图表名
errno string API错误码
errmsg string 错误信息

创建二维码地图方式二

简要描述:

  • 创建一张二维码地图的第二种方式(如果tagSize相同,可以统一设置一个tagSize,不需要一个一个设置)

请求URL:

  • http://<IP>:<PORT>/api/v1/tag_map/create_tag_map1

请求方式:

  • POST

请求示例:

  • http://192.168.124.225:5000/api/v1/tag_map/create_tag_map1

请求参数: json

{
    "table_name": "dandan_test_tag_map",
    "tagSize": 0.08,
    "tags": [
        {
            "tagId": 0,
            "tagOrientationZ": 0,
            "tagOrientationX": 0,
            "tagOrientationY": 0,
            "tagPositionX": 1,
            "tagPositionY": 1,
            "tagPositionZ": 0
        },
        {
            "tagId": 1,
            "tagOrientationZ": 0,
            "tagOrientationX": 0,
            "tagOrientationY": 0,
            "tagPositionX": 1,
            "tagPositionY": 2,
            "tagPositionZ": 0
        },
        {
            "tagId": 2,
            "tagOrientationZ": 0,
            "tagOrientationX": 0,
            "tagOrientationY": 0,
            "tagPositionX": 1,
            "tagPositionY": 3,
            "tagPositionZ": 0
        }
    ]
}

请求参数:

成功返回示例: json

{
    "errmsg": "Create_OK",
    "errno": "0",
    "table_name": "dandan_test_tag_map"
}

返回参数说明:

参数名 类型 说明
table_name string 创建的地图表名
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Create_Fail",
  "errno": "4001",
  "table_name": "dandan_test_tag_map"
}

返回参数说明:

参数名 类型 说明
table_name string 创建的地图表名
errno string API错误码
errmsg string 错误信息

加载二维码地图

简要描述:

  • 加载二维码地图

请求URL:

  • http://<IP>:<PORT>/api/v1/tag_map/load_tag_map

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/tag_map/load_tag_map/sim_world_840

请求参数说明:

参数名 必选 类型 说明
table_name string 要加载的二维码地图表名

成功返回示例: json

{
    "errmsg": "Load_OK",
    "errno": "0",
    "table_name": "sim_world_840"
}

返回参数说明:

参数名 类型 说明
table_name string 要加载的二维码地图表名
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg": "Load_Fail",
    "errno": "0",
    "table_name": "sim_world_840"
}

返回参数说明:

参数名 类型 说明
table_name string 要加载的二维码地图表名
errno string API错误码
errmsg string 错误信息

添加二维码地图中二维码标记

简要描述:

  • 在二维码地图中添加一个或者多个二维码标记

请求URL:

  • http://<IP>:<PORT>/api/v1/tag_map/add_map_tags

请求方式:

  • POST

请求示例:

  • http://192.168.124.225:5000/api/v1/tag_map/add_map_tags

请求参数: json

{
    "table_name": "dandan_test_tag_map",
    "tags": [
        {
            "tagId": 10,
            "tagSize": 0.08,
            "tagOrientationZ": 0,
            "tagOrientationX": 0,
            "tagOrientationY": 0,
            "tagPositionX": 2,
            "tagPositionY": 3,
            "tagPositionZ": 0
        },
        {
            "tagId": 11,
            "tagSize": 0.08,
            "tagOrientationZ": 0,
            "tagOrientationX": 0,
            "tagOrientationY": 0,
            "tagPositionX": 1,
            "tagPositionY": 1,
            "tagPositionZ": 0
        },
        {
            "tagId": 12,
            "tagSize": 0.08,
            "tagOrientationZ": 0,
            "tagOrientationX": 0,
            "tagOrientationY": 0,
            "tagPositionX": 1,
            "tagPositionY": 6,
            "tagPositionZ": 0
        },
        {
            "tagId": 13,
            "tagSize": 0.08,
            "tagOrientationZ": 0,
            "tagOrientationX": 0,
            "tagOrientationY": 0,
            "tagPositionX": 2,
            "tagPositionY": 4,
            "tagPositionZ": 0
        },
        {
            "tagId": 14,
            "tagSize": 0.08,
            "tagOrientationZ": 0,
            "tagOrientationX": 0,
            "tagOrientationY": 0,
            "tagPositionX": 1,
            "tagPositionY": 5,
            "tagPositionZ": 0
        }
    ]
}

请求参数:

成功返回示例: json

{
    "errmsg": "Add_OK",
    "errno": "0",
    "table_name": "dandan_test_tag_map",
    "tag_id_lst": [
        10,
        11,
        12,
        13,
        14
    ]
}

返回参数说明:

参数名 类型 说明
table_name string 二维码地图的表名
tag_id_lst list 添加成功后的二维码标签id集合
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Add_Fail",
  "errno": "4001"
}

返回参数说明:

参数名 类型 说明
errno string API错误码
errmsg string 错误信息

删除二维码地图

简要描述:

  • 删除一张二维码地图

请求URL:

  • http://<IP>:<PORT>/api/v1/tag_map/delete_tag_map

请求方式:

  • DELETE

请求示例:

  • http://192.168.124.225:5000/api/v1/tag_map/delete_tag_map

请求参数: json

{
    "table_name": "dandan_test_tag_map"
}

请求参数:

参数名 必选 类型 说明
table_name string 删除的地图表名

成功返回示例: json

{
    "errmsg": "Del_OK",
    "errno": "0",
    "table_name": "dandan_test_tag_map"
}

返回参数说明:

参数名 类型 说明
table_name string 删除的地图表名
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Del_Fail",
  "errno": "4001",
  "table_name": "dandan_test_tag_map"
}

返回参数说明:

参数名 类型 说明
table_name string 删除的地图表名
errno string API错误码
errmsg string 错误信息

删除二维码地图中二维码标记

简要描述:

  • 删除二维码地图中的一个或者多个二维码标记

请求URL:

  • http://<IP>:<PORT>/api/v1/tag_map/delete_tags

请求方式:

  • DELETE

请求示例:

  • http://192.168.124.225:5000/api/v1/tag_map/delete_tags

请求参数: json

{
    "table_name": "dandan_test_tag_map",
    "tags": [
        {
            "tagId": 0
        },
        {
            "tagId": 2
        },
        {
            "tagId": 4
        }
    ]
}

请求参数:

参数名 必选 类型 说明
table_name string 创建的地图表名
tagId int 二维码id

成功返回示例: json

{
    "errmsg": "Del_OK",
    "errno": "0",
    "table_name": "dandan_test_tag_map",
    "tags": [
        {
            "tagId": 0
        },
        {
            "tagId": 2
        },
        {
            "tagId": 4
        }
    ]
}

返回参数说明:

参数名 类型 说明
table_name string 创建的地图表名
tagId int 二维码id
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg": "Del_Fail",
    "errno": "4001",
    "table_name": "dandan_test_tag_map5",
    "tags": [
        {
            "tagId": 0
        },
        {
            "tagId": 2
        },
        {
            "tagId": 4
        }
    ]
}

返回参数说明:

参数名 类型 说明
table_name string 创建的地图表名
tagId int 二维码id
errno string API错误码
errmsg string 错误信息

修改二维码地图中二维码标记

简要描述:

  • 修改二维码地图中的一个或者多个二维码标记信息

请求URL:

  • http://<IP>:<PORT>/api/v1/tag_map/update_tags

请求方式:

  • PUT

请求示例:

  • http://192.168.124.225:5000/api/v1/tag_map/update_tags

请求参数: json

{
    "table_name": "dandan_test_tag_map",
    "tags": [
        {
            "tagId": 0,
            "tagSize": 0.09,
            "tagOrientationZ": 0,
            "tagOrientationX": 0,
            "tagOrientationY": 0,
            "tagPositionX": 1,
            "tagPositionY": 2,
            "tagPositionZ": 0
        },
        {
            "tagId": 1,
            "tagSize": 0.08,
            "tagOrientationZ": 0,
            "tagOrientationX": 0,
            "tagOrientationY": 0,
            "tagPositionX": 2,
            "tagPositionY": 2,
            "tagPositionZ": 0
        },
        {
            "tagId": 2,
            "tagSize": 0.02,
            "tagOrientationZ": 0,
            "tagOrientationX": 0,
            "tagOrientationY": 0,
            "tagPositionX": 1,
            "tagPositionY": 3,
            "tagPositionZ": 0
        }
    ]
}

请求参数:

参数名 必选 类型 说明
table_name string 创建的地图表名
tagId int 二维码id
tagSize float 二维码尺寸
tagOrientationX float 二维码x方向旋转角度
tagOrientationY float 二维码y方向旋转角度
tagOrientationZ float 二维码z方向旋转角度
tagPositionX float 二维码x方向位置
tagPositionY float 二维码y方向位置
tagPositionZ float 二维码z方向位置

成功返回示例: json

{
    "errmsg": "Update_OK",
    "errno": "0",
    "table_name": "dandan_test_tag_map",
    "tag_id_lst": [
        0,
        1,
        2
    ]
}

返回参数说明:

参数名 类型 说明
table_name string 创建的地图表名
tag_id_lst list 更新的二维码id列表
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg": "Update_Fail",
    "errno": "4001",
    "table_name": "dandan_test_tag_map5",
    "tag_id_lst": [
        0,
        1,
        2
    ]
}

返回参数说明:

参数名 类型 说明
table_name string 创建的地图表名
tag_id_lst list 更新的二维码id列表
errno string API错误码
errmsg string 错误信息

查询二维码地图信息

简要描述:

  • 查询某个二维码地图

请求URL:

  • http://<IP>:<PORT>/api/v1/tag_map/get_tag_map/<table_name>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/tag_map/get_tag_map/dandan_test_tag_map

请求参数:

请求参数:

参数名 必选 类型 说明
table_name string 查询的二维码地图表名

成功返回示例: json

{
    "data": {
        "table_name": "dandan_test_tag_map",
        "tags": [
            {
                "tagId": 0,
                "tagOrientationX": 0,
                "tagOrientationY": 0,
                "tagOrientationZ": 0,
                "tagPositionX": 1,
                "tagPositionY": 1,
                "tagPositionZ": 0,
                "tagSize": 0.08
            },
            {
                "tagId": 1,
                "tagOrientationX": 0,
                "tagOrientationY": 0,
                "tagOrientationZ": 0,
                "tagPositionX": 1,
                "tagPositionY": 2,
                "tagPositionZ": 0,
                "tagSize": 0.08
            },
            {
                "tagId": 2,
                "tagOrientationX": 0,
                "tagOrientationY": 0,
                "tagOrientationZ": 0,
                "tagPositionX": 1,
                "tagPositionY": 3,
                "tagPositionZ": 0,
                "tagSize": 0.08
            },
            {
                "tagId": 3,
                "tagOrientationX": 0,
                "tagOrientationY": 0,
                "tagOrientationZ": 0,
                "tagPositionX": 1,
                "tagPositionY": 4,
                "tagPositionZ": 0,
                "tagSize": 0.08
            }
        ]
    },
    "errmsg": "Query_OK",
    "errno": "0"
}

返回参数说明:

参数名 类型 说明
table_name string 查询的二维码地图表名
tagId int 二维码id
tagSize float 二维码尺寸
tagOrientationX float 二维码x方向旋转角度
tagOrientationY float 二维码y方向旋转角度
tagOrientationZ float 二维码z方向旋转角度
tagPositionX float 二维码x方向位置
tagPositionY float 二维码y方向位置
tagPositionZ float 二维码z方向位置
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Query_Fail",
  "errno": "4001",
  "table_name": "dandan_test_tag_map"
}

返回参数说明:

参数名 类型 说明
table_name string 查询的二维码地图表名
errno string API错误码
errmsg string 错误信息

查询二维码地图中二维码标记

简要描述:

  • 查询二维码地图中某个二维码的信息

请求URL:

  • http://<IP>:<PORT>/api/v1/tag_map/get_tag/<table_name>/<tag_id>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/tag_map/get_tag/dandan_test_tag_map/3

请求参数:

成功返回示例: json

{
    "data": {
       "table_name": "dandan_test_tag_map",
        "tags": [
            {
                "tagId": 3,
                "tagOrientationX": 0,
                "tagOrientationY": 0,
                "tagOrientationZ": 0,
                "tagPositionX": 1,
                "tagPositionY": 4,
                "tagPositionZ": 0,
                "tagSize": 0.08
            }
        ]
    },
    "errmsg": "Query_OK",
    "errno": "0"
}

返回参数说明:

参数名 类型 说明
table_name string 查询的二维码地图表名
tagId int 二维码id
tagSize float 二维码尺寸
tagOrientationX float 二维码x方向旋转角度
tagOrientationY float 二维码y方向旋转角度
tagOrientationZ float 二维码z方向旋转角度
tagPositionX float 二维码x方向位置
tagPositionY float 二维码y方向位置
tagPositionZ float 二维码z方向位置
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errno": "4001",
  "errmsg": "Query_Fail"
  "table_name": "dandan_test_tag_map",
  "tag_id": 3
}

返回参数说明:

参数名 类型 说明
table_name string 查询的二维码地图表名
tagId int 二维码id
errno string API错误码
errmsg string 错误信息

查询所有二维码地图表名

简要描述:

  • 查询所有二维码地图名列表

请求URL:

  • http://<IP>:<PORT>/api/v1/tag_map/get_tag_map_list

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/tag_map/get_tag_map_list

请求参数:

成功返回示例: json

{
    "data": {
        "tag_map_lst": [
            "sim_world_840",
            "zizhu_1m_20180614",
            "zizhu_20180508",
            "zizhu_refine_20180904",
            "zizhu_tag_mat_20180502"
        ]
    },
    "errmsg": "Query_OK",
    "errno": "0"
}

返回参数说明:

参数名 类型 说明
tag_map_lst list 所有二维码地图的表名集合
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
  "errmsg": "Query_Fail",
  "errno": "4001"
}

返回参数说明:

参数名 类型 说明
errno string API错误码
errmsg string 错误信息

备注: 数据库中的tag_map是系统默认使用的二维码地图表,不可进行增删改查任何操作

路网API

创建路网

简要描述:

  • 创建一个路网

请求URL:

  • http://<IP>:<PORT>/api/v1/roadmap/create_roadmap/

请求方式:

  • POST

请求示例:

  • http://192.168.124.225:5000/api/v1/roadmap/create_roadmap

请求参数: json

{
    "table_name": "dandan",
    "nodes": [
        {
            "node_id": 1,
            "x": 12,
            "y": 25,
            "theta": "3.14",
            "logical_pose": ""
        },
        {
            "node_id": 2,
            "x": 9,
            "y": 25,
            "theta": "3.14",
            "logical_pose": "h2"
        },
        {
            "node_id": 3,
            "x": 12,
            "y": 5,
            "theta": "3.14",
            "logical_pose": ""
        },
        {
            "node_id": 4,
            "x": 2,
            "y": 5,
            "theta": "3.14",
            "logical_pose": "h1"
        }
        ],
    "edges": [
        {
            "source": 1,
            "target": 2
        },
        {
            "source": 2,
            "target": 4
        }
        ]
}

请求参数:

参数名 必选 类型 说明
table_name string 新建路网表名
node_id int 节点id
x int 节点x坐标
y int 节点y坐标
theta string 节点角度
logical_pose string 逻辑库位名
source int 路径起始节点id
target int 路径到达节点id

成功返回示例: json

{
    "errmsg": "Create_OK",
    "errno": "0",
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 新建路网表名
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg": "Create_Fail",
    "errno": "4001",
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 新建路网表名
errno string API错误码
errmsg string 错误信息

加载路网

简要描述:

  • 加载某个路网

请求URL:

  • http://<IP>:<PORT>/api/v1/roadmap/load_roadmap/<table_name>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/roadmap/load_roadmap/roadmap_node_table_dandan

请求参数:

请求参数说明:

参数名 必选 类型 说明
table_name string 要加载的路网表名

成功返回示例: json

{
    "errmsg": "Load_OK",
    "errno": "0",
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要加载的路网表名
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg": "Load_Fail",
    "errno": "4001",
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要加载的路网表名
errno string API错误码
errmsg string 错误信息

添加路网节点

简要描述:

  • 添加一个或者多个路网节点

请求URL:

  • http://<IP>:<PORT>/api/v1/roadmap/add_nodes

请求方式:

  • POST

请求示例:

  • http://192.168.124.225:5000/api/v1/roadmap/add_nodes

请求参数: json

{
    "table_name": "roadmap_node_table_dandan",
    "nodes": [
        {
            "x":22.37,
            "y":20.44,
            "theta": 2.1
        },
        {
            "x":27.37,
            "y":10.44,
            "theta": 2.1
        }
        ]
}

请求参数说明:

参数名 必选 类型 说明
table_name string 要添加节点的路网表名
x float 路网节点x坐标
y float 路网节点y坐标
theta float 路网节点theta坐标,表示该节点的方向

成功返回示例: json

{
    "errmsg": "Add_OK",
    "errno": "0",
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要添加节点的路网表名
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg": "Add_Fail",
    "errno": "4001",
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要添加节点的路网表名
errno string API错误码
errmsg string 错误信息

添加路网通道

简要描述:

  • 添加一个或者多个路网通道

请求URL:

  • http://<IP>:<PORT>/api/v1/roadmap/add_edges

请求方式:

  • POST

请求示例:

  • http://192.168.124.225:5000/api/v1/roadmap/add_edges

请求参数: json

{
    "table_name": "roadmap_node_table_dandan",
    "edges": [
        {
            "source":1,
            "target":5
        },
        {
            "source":2,
            "target":3
        }
        ]
}

请求参数说明:

参数名 必选 类型 说明
table_name string 要添加的路网通道的路网表名
source int 路网通道的起始节点id号
target int 路网通道的终止节点id号

成功返回示例: json

{
    "errmsg": "Add_OK",
    "errno": "0",
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要添加的路网通道的路网表名
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg": "Add_Fail",
    "errno": "4001",
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要添加的路网通道的路网表名
errno string API错误码
errmsg string 错误信息

添加路网逻辑库位

简要描述:

  • 添加一个或者多个路网节点

请求URL:

  • http://<IP>:<PORT>/api/v1/roadmap/add_logics

请求方式:

  • POST

请求示例:

  • http://192.168.124.225:5000/api/v1/roadmap/add_logics

请求参数: json

{
    "table_name": "roadmap_node_table_dandan",
    "logics": [
        {
            "logical_pose":"A3",
            "x":12,
            "y":25,
            "theta":3.14,
            "node_id":1
        },
        {
            "logical_pose":"A4",
            "x":4.39,
            "y":23.68,
            "theta":0,
            "node_id":5
        }
        ]
}

请求参数说明:

参数名 必选 类型 说明
table_name string 要添加逻辑库位的路网表名
x float 路网真实逻辑库位节点x坐标
y float 路网真实逻辑库位节点y坐标
theta float 路网真实逻辑库位节点theta坐标,表示该节点的方向
node_id int 路网真实逻辑库位节点id号

成功返回示例: json

{
    "errmsg": "Add_OK",
    "errno": "0",
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要添加逻辑库位的路网表名
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg": "Add_Fail",
    "errno": "4001",
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要添加逻辑库位的路网表名
errno string API错误码
errmsg string 错误信息

删除路网

简要描述:

  • 删除某个路网

请求URL:

  • http://<IP>:<PORT>/api/v1/roadmap/delete_roadmap

请求方式:

  • DELETE

请求示例:

  • http://192.168.124.225:5000/api/v1/roadmap/delete_roadmap

请求参数: json

{
    "table_name": "roadmap_node_table_dandan"
}

请求参数说明:

参数名 必选 类型 说明
table_name string 要加载的路网表名

成功返回示例: json

{
    "errmsg": "Del_OK",
    "errno": "0",
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要删除的路网表名
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg": "Del_OK",
    "errno": "4001",
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要删除的路网表名
errno string API错误码
errmsg string 错误信息

删除路网节点

简要描述:

  • 删除某个节点

请求URL:

  • http://<IP>:<PORT>/api/v1/roadmap/delete_node

请求方式:

  • DELETE

请求示例:

  • http://192.168.124.225:5000/api/v1/roadmap/delete_node

请求参数: json

{
    "table_name": "roadmap_node_table_dandan",
    "node_id": 4
}

请求参数说明:

参数名 必选 类型 说明
table_name string 要删除节点的路网表名
node_id int 节点id

成功返回示例: json

{
    "errmsg": "Del_OK",
    "errno": "0",
    "node_id": 4,
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要删除的路网节点的路网表名
node_id int 路网节点id
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg": "Del_Fail",
    "errno": "4001",
    "node_id": 4,
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要删除的路网节点的路网表名
node_id int 路网节点id
errno string API错误码
errmsg string 错误信息

删除路网通道

简要描述:

  • 删除某个路网通道

请求URL:

  • http://<IP>:<PORT>/api/v1/roadmap/delete_edge

请求方式:

  • DELETE

请求示例:

  • http://192.168.124.225:5000/api/v1/roadmap/delete_edge

请求参数: json

{
    "table_name": "roadmap_node_table_dandan",
    "edge_id": 2
}

请求参数说明:

参数名 必选 类型 说明
table_name string 要删除的路网通道的路网表名
edge_id int 路网通道的id

成功返回示例: json

{
    "errmsg": "Del_OK",
    "errno": "0",
    "edge_id": 2,
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要删除的路网通道的路网表名
edge_id int 路网通道的id
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg": "Del_Fail",
    "errno": "4001",
    "edge_id": 2,
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要删除的路网通道的路网表名
edge_id int 路网通道的id
errno string API错误码
errmsg string 错误信息

删除路网逻辑库位

简要描述:

  • 删除某个路网的某个逻辑库位

请求URL:

  • http://<IP>:<PORT>/api/v1/roadmap/delete_logic

请求方式:

  • DELETE

请求示例:

  • http://192.168.124.225:5000/api/v1/roadmap/delete_logic

请求参数: json

{
    "table_name": "roadmap_node_table_dandan",
    "logical_pose": "h2"
}

请求参数说明:

参数名 必选 类型 说明
table_name string 要删除的逻辑库位的路网表名
logical_pose int 逻辑库位名

成功返回示例: json

{
    "errmsg": "Del_OK",
    "errno": "0",
    "logical_pose": "h2",
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要删除的逻辑库位的路网表名
logical_pose int 逻辑库位名
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg": "Del_Fail",
    "errno": "4001",
    "logical_pose": "h2",
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要删除的逻辑库位的路网表名
logical_pose int 逻辑库位名
errno string API错误码
errmsg string 错误信息

修改逻辑库位名

简要描述:

  • 修改某个逻辑库位名

请求URL:

  • http://<IP>:<PORT>/api/v1/road_map/update_logic_name

请求方式:

  • PUT

请求示例:

  • http://192.168.124.225:5000/api/v1/roadmap/update_logic_name

请求参数: json

{
    "table_name": "roadmap_node_table_dandan",
    "old_logical_pose": "h2",
    "new_logical_pose": "H8"
}

请求参数说明:

参数名 必选 类型 说明
table_name string 要修改的逻辑库位名的路网表名
old_logical_pose string 原逻辑库位名
new_logical_pose string 新逻辑库位名

成功返回示例: json

{
    "errmsg": "Update_OK",
    "errno": "0",
    "new_logical_pose": "H8",
    "old_logical_pose": "h2",
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要修改的逻辑库位名的路网表名
old_logical_pose string 原逻辑库位名
new_logical_pose string 新逻辑库位名
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg": "Update_Fail",
    "errno": "4001",
    "new_logical_pose": "H8",
    "old_logical_pose": "h2",
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要修改的逻辑库位名的路网表名
old_logical_pose string 原逻辑库位名
new_logical_pose string 新逻辑库位名
errno string API错误码
errmsg string 错误信息

修改路网节点

简要描述:

  • 修改某个路网节点

请求URL:

  • http://<IP>:<PORT>/api/v1/road_map/update_node

请求方式:

  • PUT

请求示例:

  • http://192.168.124.225:5000/api/v1/roadmap/update_node

请求参数: json

{
    "table_name": "roadmap_node_table_dandan",
    "node_id": 2,
    "data": {
        "x": 18,
        "y":20
    }
}

或者

{
    "table_name": "roadmap_node_table_dandan",
    "node_id": 2,
    "data": {
        "x": 18,
        "y":20,
        "theta": 3.14,
        "cost": 2.1,
        "type": 1
    }
}

请求参数说明:

参数名 必选 类型 说明
table_name string 要修改的路网节点的路网表名
node_id int 路网节点id
x float 路网节点的x坐标
y float 路网节点的y坐标
theta float 路网节点的theta角度,节点的方向
cost float 路网节点成本
type int 路网节点的类型(暂时无用)

成功返回示例: json

{
    "errmsg": "Update_OK",
    "errno": "0",
    "node_id": 2,
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要修改的路网节点的路网表名
node_id int 路网节点id
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg": "Update_Fail",
    "errno": "0",
    "node_id": 2,
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要修改的路网节点的路网表名
node_id int 路网节点id
errno string API错误码
errmsg string 错误信息

查询所有路网表名

简要描述:

  • 查询所有的路网表名列表

请求URL:

  • http://<IP>:<PORT>/api/v1/roadmap/get_roadmap_list

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/roadmap/get_roadmap_list

请求参数:

成功返回示例: json

{
    "data": {
        "road_map_lst": [
            "roadmap_node_table_0",
            "roadmap_node_table_1",
            "roadmap_node_table_1114",
            "roadmap_node_table_1114_2",
            "roadmap_node_table_1116_cc",
            "roadmap_node_table_2",
            "roadmap_node_table_3",
            "roadmap_node_table_3d_6",
            "roadmap_node_table_3d_zhuzaochang",
            "roadmap_node_table_4",
            "roadmap_node_table_5",
            "roadmap_node_table_6",
            "roadmap_node_table_7",
            "roadmap_node_table_8",
            "roadmap_node_table_9",
            "roadmap_node_table_dandan",
            "roadmap_node_table_zizhu_pv_road"
        ]
    },
    "errmsg": "Query_OK",
    "errno": "0"
}

返回参数说明:

参数名 类型 说明
road_map_lst list 所有路网表名集合
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg": "Query_Fail",
    "errno": "4001"
}

返回参数说明:

参数名 类型 说明
road_map_lst list 所有路网表名集合
errno string API错误码
errmsg string 错误信息

查询路网详情

简要描述:

  • 查询某个路网详细信息

请求URL:

  • http://<IP>:<PORT>/api/v1/roadmap/get_roadmap/<table_name>

请求方式:

  • GET

请求示例:

  • http://192.168.124.225:5000/api/v1/roadmap/get_roadmap/roadmap_node_table_dandan

请求参数:

请求参数说明:

参数名 必选 类型 说明
table_name string 要查看的路网表名

成功返回示例: json

{
    "data": {
        "edges": [
            {
                "cost": -1,
                "edge_id": 1,
                "source": 1,
                "target": 4,
                "type": 0
            },
            {
                "cost": -1,
                "edge_id": 2,
                "source": 2,
                "target": 4,
                "type": 0
            }
        ],
        "logicals": [
            {
                "id": 1,
                "logical_pose": "h2",
                "real_pose_id": 2
            },
            {
                "id": 2,
                "logical_pose": "h1",
                "real_pose_id": 4
            }
        ],
        "nodes": [
            {
                "cost": 0,
                "node_id": 1,
                "status": 1,
                "theta": 3.14,
                "type": 0,
                "x": 1,
                "y": 25
            },
            {
                "cost": 0,
                "node_id": 2,
                "status": 1,
                "theta": 3.14,
                "type": 0,
                "x": 10,
                "y": 25
            },
            {
                "cost": 0,
                "node_id": 3,
                "status": 1,
                "theta": 3.14,
                "type": 0,
                "x": 12,
                "y": 5
            },
            {
                "cost": 0,
                "node_id": 4,
                "status": 1,
                "theta": 3.14,
                "type": 0,
                "x": 2,
                "y": 5
            }
        ]
    },
    "errmsg": "Query_OK",
    "errno": "0",
    "table_name": "roadmap_node_table_dandan"

返回参数说明:

参数名 类型 说明
nodes list 路网节点集合
node_id int 路网节点id
x float 路网节点x坐标
y float 路网节点y坐标
theta float 路网节点theta坐标,表示该节点的方向
cost float 路网节点成本
type int 路网节点类型(暂时无用)
status int 路网节点被占据(=1),路网节点空闲(=0)
参数名 类型 说明
edges list 路网通道集合
edge_id int 路网通道id
source int 路网通道的起始节点id号
target int 路网通道的终止节点id号
cost float 路网通道的成本
type int 路网通道类型(暂时无用)
参数名 类型 说明
logicals list 逻辑库位集合
id int 逻辑库位id
logical_pose string 逻辑库位名(不允许重复)
real_pose_id int 逻辑库位真实位置路网节点id号
table_name string 要加载的路网表名
errno string API错误码
errmsg string 错误信息

错误返回示例: json

{
    "errmsg": "Query_Fail",
    "errno": "4001",
    "table_name": "roadmap_node_table_dandan"
}

返回参数说明:

参数名 类型 说明
table_name string 要查看的路网表名
errno string API错误码
errmsg string 错误信息