大疆机场通过MQTT下发任务并执行,返回结果为成功,但是无人机并没有执行任务

Completed

Comments

14 comments

  • 1211481202

    我们之前都是基于遥控器进行飞行,现在基于大疆机场,在上云api中的

    StateRouter类中
    case DOCK:
    case DOCK2:
    return DockStateDataKeyEnum.find(keys).getClassType();报出了DockStateDataKeyEnum中无commander_flight_height、commander_mode_lost_action
    、current_commander_flight_mode、current_rth_mode
    0
    Comment actions Permalink
  • 胡权智

    无人机和机场是匹配的吗?

    0
    Comment actions Permalink
  • DJI Developer Support
    机场1和机场2下发航线的参数有一点区别的。您对照的API文档看一下。
    0
    Comment actions Permalink
  • 1211481202

    我是按照大疆机场1下发的任务和执行任务,返回的都是成功{result=0}

    0
    Comment actions Permalink
  • 1211481202

    但是机场没有执行任务

    0
    Comment actions Permalink
  • DJI Developer Support
    下发成功,航线状态上报也有可能有报错。需要看下具体错误码是什么。
    0
    Comment actions Permalink
  • 13439983901

    这是下发后,机场返回飞行状态通知,flighttask_progress-{"bid":"10819ede-752e-468d-8637-3c7d83405b5f","data":{"output":{"ext":{"current_waypoint_index":0,"flight_id":"368c8599-aad4-4716-9b0b-adbe14e2c099","media_count":0,"track_id":"","wayline_id":65535,"wayline_mission_state":2},"progress":{"current_step":31,"percent":15},"status":"failed"},"result":314013},"method":"flighttask_progress","need_reply":1,"tid":"c7ec7a1a-6942-4f46-9352-1f7d5c10d4a4","timestamp":1710914507322,"gateway":"4TADL2P001004R"}

    0
    Comment actions Permalink
  • 13439983901

     执行航线任务前,需要保证上云api中的wayline_job表中有对应的航线数据吗,我理解基于MQTT进行任务执行,应该不依赖与大疆上云API,但是我看机场执行任务时调用了

    flighttaskResourceGet方法,这个方法时通过下发任务的flight_id 去查询wayline_job表中的数据,如果没有,就返回
    ILLEGAL_ARGUMENT(200001, "illegal argument")
    0
    Comment actions Permalink
  • 13439983901

    我现在在添加航线时,对wayline_job表中的数据按照逻辑进行了插入,机场执行任务不再返回314013了,变成了314007,也就是

    机场传输航线至飞行器失败,请重启机场后重试,但是我重启机场后,仍然不行,还是报

    flighttask_progress-{"bid":"60f965fb-b54e-45f9-adba-741777cd68b7","data":{"output":{"ext":{"current_waypoint_index":0,"flight_id":"77889910","media_count":0,"track_id":"","wayline_id":65535,"wayline_mission_state":2},"progress":{"current_step":31,"percent":15},"status":"failed"},"result":314007},"method":"flighttask_progress","need_reply":1,"tid":"75634e5f-c1ea-48b9-b448-45c44becd102","timestamp":1710929593451,"gateway":"4TADL2P001004R"}

    0
    Comment actions Permalink
  • DJI Developer Support
    314007是因为图传信号受到干扰,导致无人机拿不到航线文件。 可以尝试重启,如果重启还不行可以检测下周围是否有干扰。
    0
    Comment actions Permalink
  • 13439983901

    没有信号干扰,机场下发任务后,无人机本来在开机状态,会自动关机,然后开机,请问是什么原因

    0
    Comment actions Permalink
  • 13439983901

    目前通过司空2平台是可以起飞的,通过我们自己的任务下发,返回的flighttask_progress为

    flighttask_progress-{"bid":"03807d25-d00d-44c6-ab6b-bc921077adef","data":{"output":{"ext":{"current_waypoint_index":0,"flight_id":"8d31d1e1-db27-4490-8272-c6fb7a9cb155","media_count":0,"track_id":"","wayline_id":65535,"wayline_mission_state":2},"progress":{"current_step":33,"percent":15},"status":"failed"},"result":314007},"method":"flighttask_progress","need_reply":1,"tid":"68413e41-06e9-4ae8-a7b9-d36667b2458e","timestamp":1711008822514,"gateway":"4TADL2P001004R"}

    还是314007,机场上传航线至无人机的问题,已经排查,目前没有图传信号干扰

    0
    Comment actions Permalink
  • DJI Developer Support
    可以用我们的示例代码试下有没有问题。开始执行航线后需要通过 **任务资源获取 接口把航线文件地址回复给机场。**
    0
    Comment actions Permalink

Please sign in to leave a comment.