航点任务中获取当前航点:wpMissionOperator?.addListener(object : Waypo...

Completed

Comments

9 comments

  • DJI Developer Support
    能不能把你其他的航点代码给我看看呢,targetWaypointIndex的取值范围是0到WaypointMission.MAX_WAYPOINT_COUNT - 1,你的WaypointMission.MAX_WAYPOINT_COUNT是多少呢呢?
    0
    Comment actions Permalink
  • 虞青

    其他的什么航点代码?

    0
    Comment actions Permalink
  • DJI Developer Support
    你的航点的定义代码,或者说你上传了多少个航点,有70多个吗?你的MAX_WAYPOINT_COUNT是多少?
    0
    Comment actions Permalink
  • 虞青

    MAX_WAYPOINT_COUNT取出来是99

    0
    Comment actions Permalink
  • 虞青

    航点定义的对象:

    {"missionName":"任务冲突测试02","altitude":60,"headingMode":"USING_WAYPOINT_HEADING","gimbalPitchRotationEnabled":"false","finishedAction":"GO_HOME","wayPointList":[{"altitude":60,"gimbalPitch":0,"heading":0,"speed":6,"longitude":120.18028205874413,"latitude":30.21741099586849,"turnMode":"顺时针旋转","actionRepeatTimes":1,"actionTimeoutInSeconds":999,"cornerRadiusInMeters":0,"isUseCustomDirection":false,"shootPhotoDistanceInterval":0,"shootPhotoTimeInterval":0,"waypointActions":[]},{"altitude":60,"gimbalPitch":0,"heading":0,"speed":6,"longitude":120.17691412655728,"latitude":30.216560756149235,"turnMode":"顺时针旋转","actionRepeatTimes":1,"actionTimeoutInSeconds":999,"cornerRadiusInMeters":0,"isUseCustomDirection":false,"shootPhotoDistanceInterval":0,"shootPhotoTimeInterval":0,"waypointActions":[]},{"altitude":60,"gimbalPitch":0,"heading":0,"speed":6,"longitude":120.17687083054706,"latitude":30.218564554648122,"turnMode":"顺时针旋转","actionRepeatTimes":1,"actionTimeoutInSeconds":999,"cornerRadiusInMeters":0,"isUseCustomDirection":false,"shootPhotoDistanceInterval":0,"shootPhotoTimeInterval":0,"waypointActions":[]},{"altitude":60,"gimbalPitch":0,"heading":0,"speed":6,"longitude":120.1773923949653,"latitude":30.219037985710514,"turnMode":"顺时针旋转","actionRepeatTimes":1,"actionTimeoutInSeconds":999,"cornerRadiusInMeters":0,"isUseCustomDirection":false,"shootPhotoDistanceInterval":0,"shootPhotoTimeInterval":0,"waypointActions":[]},{"altitude":60,"gimbalPitch":0,"heading":0,"speed":6,"longitude":120.17888279925135,"latitude":30.218693127718808,"turnMode":"顺时针旋转","actionRepeatTimes":1,"actionTimeoutInSeconds":999,"cornerRadiusInMeters":0,"isUseCustomDirection":false,"shootPhotoDistanceInterval":0,"shootPhotoTimeInterval":0,"waypointActions":[]}],"pointOfInterestList":[],"number":"ct-02","status":1,"remark":"高度60","speed":6,"autoFlightSpeed":5,"exitMissionOnRCSignalLostEnabled":false,"maxFlightSpeed":0,"repeatTimes":1,"isWayPointV2":false,"sync":false,"wayPointV2":false,"flightPathMode":"NORMAL","gotoFirstWayPointMode":"SAFELY"}

    0
    Comment actions Permalink
  • DJI Developer Support
    我测试了一下都是从1-2-3-4开始,怎么会出现70多的数字呢?你的航点也都不到10个。你测试下这个Sample看看是否有问题。 Link:https://github.com/dji-sdk/Mobile-SDK-Android/blob/master/Sample%20Code/app/src/main/java/com/dji/sdk/sample/demo/missionoperator/WaypointMissionOperatorView.java
    0
    Comment actions Permalink
  • 虞青

    对比了一下代码,我们调用的是:

    WaypointMission.Builder().addWaypoint
    demo里是:
    WaypointMission.Builder().waypointList(waypointList).waypointCount(waypointList.size());
    是不是这两种用法导致的?
    0
    Comment actions Permalink
  • DJI Developer Support
    这个我也无法确定,你可以先跑一下Sample看看有没有问题,如果你怀疑是这个函数的使用方法导致的可以测试一下。
    0
    Comment actions Permalink
  • 虞青

    已经好了

    0
    Comment actions Permalink

Please sign in to leave a comment.