请选择 进入手机版 | 继续访问电脑版
正在上传图片(0/1)

2.3版本 SDK DEMO 里 takeoff失败

 0
手机看帖 6 4084
DEMO 里上传航点后执takeoff时返回GS_RESULT_MISSION_NOT_INIT,openStation是成功的,上传航点也是成功的,用日志输出,movingSpeed是3,remoteControllerSpeed是5,waypoint个数是3,模拟器里飞机也已经起飞。
和这个帖子现象一模一样http://bbs.dji.com/forum.php?mod ... 73&page=1#pid246959,但是帖子里官方给的方法没用啊,

除了回退2.1 还有解决办法吗 ?

评论
上传
你需要登录之后才能回帖    登录 | 注册
DJI SDK Support  Mavic Pro认证用户 2015-8-26 2#
Hi,你可以把航点的信息贴出来么,这样方便我们复现这个问题。
楼主   2015-8-27 3#
DJI SDK Support 发表于 2015-8-26 18:28
Hi,你可以把航点的信息贴出来么,这样方便我们复现这个问题。
就是最新的2.3.0 SDK-DEMO 里的Ground Station Protocol 里的航点功能,takeoff时失败,没有改DEMO的代码我用的是M100,权限是2级,openStation可以成功
case R.id.AddWaypointButton:
    if(!checkGetHomePoint()) return;
   
    if(DJIDrone.getDroneType() == DJIDroneType.DJIDrone_Vision){
      //north
        DJIGroundStationWaypoint mWayPoint1 = new DJIGroundStationWaypoint(homeLocationLatitude+0.0000899322, homeLocationLongitude);
        mWayPoint1.altitude = 15f;
        mWayPoint1.speed = 2; // slow 2
        mWayPoint1.heading = 0;
        mWayPoint1.maxReachTime = 999;
        mWayPoint1.stayTime = 10;      
        mWayPoint1.turnMode = 1;

        //east
        DJIGroundStationWaypoint mWayPoint2 = new DJIGroundStationWaypoint(homeLocationLatitude, homeLocationLongitude+0.0000899322);
        mWayPoint2.altitude = 5f;
        mWayPoint2.speed = 2; // slow 2
        mWayPoint2.heading = 80;
        mWayPoint2.maxReachTime = 999;
        mWayPoint2.stayTime = 20;  
        mWayPoint2.turnMode = 1;

        mTask.addWaypoint(mWayPoint2);

        //south
        DJIGroundStationWaypoint mWayPoint3 = new DJIGroundStationWaypoint(homeLocationLatitude-0.0000899322, homeLocationLongitude);
        mWayPoint3.altitude = 30f;
        mWayPoint3.speed = 2; // slow 2
        mWayPoint3.heading = -60;
        mWayPoint3.maxReachTime = 999;
        mWayPoint3.stayTime = 25;     
        mWayPoint3.turnMode = 1;
        
        mTask.addWaypoint(mWayPoint3);
        mTask.wayPointCount = mTask.getAllWaypoint().size();
    }
    else{
        //north
        DJIGroundStationWaypoint mWayPoint1 = new DJIGroundStationWaypoint(homeLocationLatitude+0.0000899322, homeLocationLongitude);
        mWayPoint1.action.actionRepeat = 1;
        mWayPoint1.altitude = 15f;
        mWayPoint1.heading = 0;
        mWayPoint1.actionTimeout = 10;      
        mWayPoint1.turnMode = 1;
        mWayPoint1.dampingDistance = 1.5f;
        mWayPoint1.hasAction = true;
        
        mWayPoint1.addAction(GroundStationOnWayPointAction.Way_Point_Action_Simple_Shot, 1);
        mWayPoint1.addAction(GroundStationOnWayPointAction.Way_Point_Action_Video_Start, 0);
        mWayPoint1.addAction(GroundStationOnWayPointAction.Way_Point_Action_Video_Stop,  0);
        mTask.addWaypoint(mWayPoint1);
        
        //east
        DJIGroundStationWaypoint mWayPoint2 = new DJIGroundStationWaypoint(homeLocationLatitude, homeLocationLongitude+0.0000899322);
        mWayPoint2.action.actionRepeat = 1;
        mWayPoint2.altitude = 20f;
        mWayPoint2.heading = 80;
        mWayPoint2.actionTimeout = 20;  
        mWayPoint2.turnMode = 1;
        mWayPoint2.dampingDistance = 2.5f;
        mWayPoint2.hasAction = true;
        
        mWayPoint2.addAction(GroundStationOnWayPointAction.Way_Point_Action_Craft_Yaw, -130);
        
        mTask.addWaypoint(mWayPoint2);

        //south
        DJIGroundStationWaypoint mWayPoint3 = new DJIGroundStationWaypoint(homeLocationLatitude-0.0000899322, homeLocationLongitude);
        mWayPoint3.action.actionRepeat = 1;
        mWayPoint3.altitude = 30f;
        mWayPoint3.heading = -60;
        mWayPoint3.actionTimeout = 25;     
        mWayPoint3.turnMode = 1;
        mWayPoint3.dampingDistance = 1.0f;
        mWayPoint3.hasAction = true;
        
        mWayPoint3.addAction(GroundStationOnWayPointAction.Way_Point_Action_Gimbal_Pitch, -89);
        mTask.addWaypoint(mWayPoint3);
        
        mTask.finishAction = DJIGroundStationFinishAction.Go_Home;
        mTask.movingMode = DJIGroundStationMovingMode.GSHeadingUsingWaypointHeading;
        mTask.pathMode = DJIGroundStationPathMode.Point_To_Point;
        mTask.wayPointCount = mTask.getAllWaypoint().size();
        handler.sendMessage(handler.obtainMessage(SHOWDIALOG,"task:\n"
                +"finishAction="+String.valueOf(mTask.finishAction)+"\n"
                +"isLoop="+String.valueOf(mTask.isLoop)
                +"movingMode="+String.valueOf(mTask.movingMode)+"\n"
                +"movingSpeed="+String.valueOf(mTask.movingSpeed)+"\n"
                +"remoteControlSpeed="+String.valueOf(mTask.remoteControlSpeed)+"\n"
                +"wayPointsListSize="+String.valueOf(mTask.mWaypointsList.size())+"\n"
                +"pathMode="+String.valueOf(mTask.pathMode)+"\n"
                +"repeatNum="+String.valueOf(mTask.repeatNum)+"\n"
                +"startIndex="+String.valueOf(mTask.startWaypointIndex)+"\n"
                +"wayPointCount="+String.valueOf(mTask.wayPointCount)));
    }    break;
DJI SDK Support  Mavic Pro认证用户 2015-8-27 4#
behap 发表于 2015-8-27 10:22
就是最新的2.3.0 SDK-DEMO 里的Ground Station Protocol 里的航点功能,takeoff时失败,没有改DEMO的代码 ...
您好,您使用的是M100,目前我们的SDK是不支持M100的。目前SDK支持的机型有Inspire 1, Phantom 3 P, Phantom 3 A, 和 Phantom 2 VIsion Plus
楼主   2015-8-27 5#
DJI SDK Support 发表于 2015-8-27 10:31
您好,您使用的是M100,目前我们的SDK是不支持M100的。目前SDK支持的机型有Inspire 1, Phantom 3 P, Phan ...
2.1可以啊 ,那我还是用2.1吧
wxjdjsdk   2015-10-5 6#
2.1可以实现航点飞行?
haiyifenga4   2016-6-13 7#
学习SDK开发,还有很长的路要走
收藏 点赞 评论
分享至:
回复:
上传
取消 评论
快速回复 返回顶部 返回列表