我是DJI OSDK的新手。我目前正在做一个项目,我需要将某个位置的GPS坐标提供给我的M100,然后它将飞到该位置。
我目前正在关注Ubntu Linux的DJI OSDK文档。我尝试使用Waypoints Mission。
在“ Waypoints”任务中,如果我将变量“ wayptPolygonSides”设置为1,然后在用于生成路标的迭代算法中将所需的GPS坐标设置为:
STATUS/1 @ getErrorCodeMessage, L656: runWaypointMission
STATUS/1 @ getCMDSetMissionMSG, L883: MISSION_OBTAIN_CONTROL_REQUIRED
STATUS/1 @ printInfo, L204: Mission Manager status:
STATUS/1 @ printInfo, L205: There are 1 waypt missions and 0 hotpoint missions
Initializing Waypoint Mission..
Waypoint created at (LLA): 0.534897 -1.680698 10.000000
Creating Waypoints..
Waypoint created at (LLA): 0.534897 -1.680698 10.000000
STATUS/1 @ getErrorCodeMessage, L656: uploadWaypoints
STATUS/1 @ getCMDSetMissionMSG, L883: WAYPOINT_MISSION_DATA_NOT_ENOUGH
Waypoint created at (LLA): 0.534900 -1.681000 15.000000
STATUS/1 @ getErrorCodeMessage, L656: uploadWaypoints
STATUS/1 @ getCMDSetMissionMSG, L883: WAYPOINT_MISSION_DATA_NOT_ENOUGH
Waypoint created at (LLA): 0.534897 -1.680698 10.000000
STATUS/1 @ getErrorCodeMessage, L656: uploadWaypoints
STATUS/1 @ getCMDSetMissionMSG, L883: WAYPOINT_MISSION_DATA_NOT_ENOUGH
Uploading Waypoints..
STATUS/1 @ getErrorCodeMessage, L656: runWaypointMission
STATUS/1 @ getCMDSetMissionMSG, L883: MISSION_OBTAIN_CONTROL_REQUIRED
答案 0 :(得分:0)
关于最小航路点数量的评论不正确,据我所知,所需的最小wp =2。此日志语句很明显表明您的问题:
STATUS/1 @ getCMDSetMissionMSG, L883: MISSION_OBTAIN_CONTROL_REQUIRED
如果您在DJI OSDK中关注该示例,则会在main.cpp文件中看到Linux平台下的任务示例,版本3.9.0的第54行请求引用的控件:
vehicle->obtainCtrlAuthority(functionTimeout);
我想您会丢失此行,或者无法确保其正常运行。
此外,请确保在DJI Assistant应用程序的飞行控制器/矩阵上选择了正确的控制模式。有关控制模式的更多信息,请参见this页。