首页 > 解决方案 > DJI MSDK Waypoint 任务不跟随航点

问题描述

问题

开始新的航点任务时,无人机最多起飞 2 米,并一直悬停在该位置。此外,当这种情况发生时,我只能将无人机抬高或降低(最多 2 米)。

预期行为

开始新的航点任务时,无人机将完成任务指定的路径。

环境

测试过的低血压

更多信息

我的应用程序日志和 DJI 日志没有显示任何错误、异常或类似情况。

如有需要,我可以提供飞行记录。

WaypointMission 对象

{
   "autoFlightSpeed":0.0,
   "finishedAction":"GO_HOME",
   "flightPathMode":"CURVED",
   "gotoFirstWaypointMode":"SAFELY",
   "headingMode":"AUTO",
   "maxFlightSpeed":15.0,
   "missionID":8,
   "pointOfInterest":null,
   "repeatTimes":1,
   "waypointCount":8,
   "waypointList":[
      {
         "actionRepeatTimes":1,
         "actionTimeoutInSeconds":999,
         "altitude":30.0,
         "coordinate":{
            "latitude":-23.16001469396617,
            "longitude":-45.79311885279432,
            "valid":true
         },
         "cornerRadiusInMeters":0.2,
         "gimbalPitch":0.0,
         "heading":0,
         "isUseCustomDirection":false,
         "shootPhotoDistanceInterval":0.0,
         "shootPhotoTimeInterval":0.0,
         "speed":12.5,
         "turnMode":"CLOCKWISE",
         "waypointActions":[
            
         ],
         "headingInner":0
      },
      {
         "actionRepeatTimes":1,
         "actionTimeoutInSeconds":999,
         "altitude":26.325867,
         "coordinate":{
            "latitude":-23.159431407395395,
            "longitude":-45.79282463259898,
            "valid":true
         },
         "cornerRadiusInMeters":0.2,
         "gimbalPitch":0.0,
         "heading":0,
         "isUseCustomDirection":false,
         "shootPhotoDistanceInterval":0.0,
         "shootPhotoTimeInterval":0.0,
         "speed":12.5,
         "turnMode":"CLOCKWISE",
         "waypointActions":[
            
         ],
         "headingInner":0
      },
      {
         "actionRepeatTimes":1,
         "actionTimeoutInSeconds":999,
         "altitude":27.596802,
         "coordinate":{
            "latitude":-23.1596132304213,
            "longitude":-45.79270070336531,
            "valid":true
         },
         "cornerRadiusInMeters":0.2,
         "gimbalPitch":0.0,
         "heading":0,
         "isUseCustomDirection":false,
         "shootPhotoDistanceInterval":0.0,
         "shootPhotoTimeInterval":0.0,
         "speed":12.5,
         "turnMode":"CLOCKWISE",
         "waypointActions":[
            
         ],
         "headingInner":0
      },
      {
         "actionRepeatTimes":1,
         "actionTimeoutInSeconds":999,
         "altitude":31.782654,
         "coordinate":{
            "latitude":-23.160196385773006,
            "longitude":-45.792994857230866,
            "valid":true
         },
         "cornerRadiusInMeters":0.2,
         "gimbalPitch":0.0,
         "heading":0,
         "isUseCustomDirection":false,
         "shootPhotoDistanceInterval":0.0,
         "shootPhotoTimeInterval":0.0,
         "speed":12.5,
         "turnMode":"CLOCKWISE",
         "waypointActions":[
            
         ],
         "headingInner":0
      },
      {
         "actionRepeatTimes":1,
         "actionTimeoutInSeconds":999,
         "altitude":33.06659,
         "coordinate":{
            "latitude":-23.160295942933544,
            "longitude":-45.79282943102868,
            "valid":true
         },
         "cornerRadiusInMeters":0.2,
         "gimbalPitch":0.0,
         "heading":0,
         "isUseCustomDirection":false,
         "shootPhotoDistanceInterval":0.0,
         "shootPhotoTimeInterval":0.0,
         "speed":12.5,
         "turnMode":"CLOCKWISE",
         "waypointActions":[
            
         ],
         "headingInner":0
      },
      {
         "actionRepeatTimes":1,
         "actionTimeoutInSeconds":999,
         "altitude":28.96344,
         "coordinate":{
            "latitude":-23.15979505344721,
            "longitude":-45.79257677379519,
            "valid":true
         },
         "cornerRadiusInMeters":0.2,
         "gimbalPitch":0.0,
         "heading":0,
         "isUseCustomDirection":false,
         "shootPhotoDistanceInterval":0.0,
         "shootPhotoTimeInterval":0.0,
         "speed":12.5,
         "turnMode":"CLOCKWISE",
         "waypointActions":[
            
         ],
         "headingInner":0
      },
      {
         "actionRepeatTimes":1,
         "actionTimeoutInSeconds":999,
         "altitude":30.748169,
         "coordinate":{
            "latitude":-23.159976876473113,
            "longitude":-45.79245284388858,
            "valid":true
         },
         "cornerRadiusInMeters":0.2,
         "gimbalPitch":0.0,
         "heading":0,
         "isUseCustomDirection":false,
         "shootPhotoDistanceInterval":0.0,
         "shootPhotoTimeInterval":0.0,
         "speed":12.5,
         "turnMode":"CLOCKWISE",
         "waypointActions":[
            
         ],
         "headingInner":0
      },
      {
         "actionRepeatTimes":1,
         "actionTimeoutInSeconds":999,
         "altitude":32.18518,
         "coordinate":{
            "latitude":-23.160136265174536,
            "longitude":-45.792533242035404,
            "valid":true
         },
         "cornerRadiusInMeters":0.2,
         "gimbalPitch":0.0,
         "heading":0,
         "isUseCustomDirection":false,
         "shootPhotoDistanceInterval":0.0,
         "shootPhotoTimeInterval":0.0,
         "speed":12.5,
         "turnMode":"CLOCKWISE",
         "waypointActions":[
            
         ],
         "headingInner":0
      }
   ],
   "exitMissionOnRCSignalLostEnabled":false,
   "gimbalElevationOptimizeEnabled":false,
   "gimbalPitchRotationEnabled":false
}

更新 1

我刚刚做了以下测试:

  1. 在我的应用程序中开始飞行
  2. 打开GO4

从那里,我可以看到我所有的航路点都正确加载,但速度设置为 0。一旦我拉动滑块以提高速度,飞机就开始移动并按照预期的方式跟随航路点,但我不知道为什么会发生这种情况.

标签: androidflutterdji-sdk

解决方案


正如在WaypointMission 对象中看到的那样,autoFlightSpeed 设置为 0。我已通过将 autoFlightSpeed 从 0 更改为第一个航路点中定义的速度来解决此问题,现在一切正常。

根据文档,当autoFlightSpeed设置为0时,“实际速度仅由遥控器操纵杆控制”,这很奇怪,因为它与我一个月前的代码相同,我可以不接触飞行操纵杆。这就解释了为什么我认为我唯一能做的就是“让无人机飞得更高或更低”。可能如果我继续向前推动左操纵杆,飞机就会完成它的路径。剩下的唯一问题是:为什么我一个月前的代码过去可以在不接触操纵杆的情况下工作。


推荐阅读