Today, I used my Navio2 quadcopter to takeoff in GUIDED mode using DroidPlanner ground station.
Taking-off was fine, but when I sent a GUIDED point, the drone started to go down until it crashed to the ground.
Here is a video of the scene
I also had this problem before with my own ground station, and it seems to be the same even with DroidPlanner that is commonly used with Ardupilot-based drones.
Can you help on this and how to send a GUIDED waypoint correctly to the flight stack of NAVIO2?
it seems your autopilot was descending on purpose;
your GPS signal is also not optimal - you need to have a better signal for loiter mode;
but I think the cause of the crash was that the autopilot was (mis-)led into a too low altitude;
(if you set Land_speed_high to a lower value you can reduce the damage of a crash during investigation)
maybe you can try latest missionplanner to rule out a problem with droidplanner?
However, I think the problem is not related to GPS or LAND speed (I already set it to low value), but this problem is related to sending a GUIDED waypoint to the autopilot.
I used the autopilot with AUTO mission and all was working fine.
When I switch to GUIDED mode and then send the waypoint to visit, the drone behaves as shown in the video.
I do not know whether this is due to a compatibility issue between the ardupilot used in Navio and the MAVLink protocol used in DroidPlanner?
Any idea?
Did anyone tried to send a GUIDED waypoint to Navio2 drone using DroidPlanner?
I solved the problem of the GUIDED mode.
It was a bug in the message frame, which was set to Global, which means altitude is going with respect to global GPS altitude, however, it was meant the relative altitude. See the code below:
public static void gotoWaypoint(Drone drone, Location location) {
msg_mission_item msg = new msg_mission_item();
msg.seq = 0;
msg.current = 2; // TODO use guided mode enum msg.frame = MAV_FRAME.MAV_FRAME_GLOBAL;
msg.command = MAV_CMD.MAV_CMD_NAV_WAYPOINT; //
msg.param1 = 0; // TODO use correct parameter
msg.param2 = 0; // TODO use correct parameter
msg.param3 = 0; // TODO use correct parameter
msg.param4 = 0; // TODO use correct parameter
msg.x = (float) location.getLatitude();
msg.y = (float) location.getLongitude();
msg.z = (float) location.getAltitude();
msg.autocontinue = 1; // TODO use correct parameter
msg.target_system = drone.getSystemID();
msg.target_component = 1;
try {
//code used for sending the mission for the drone
âŚ
} catch (UnknownHostException e) {
e.printStackTrace();
}
}
I just had to change the frame to
msg.frame = MAV_FRAME.MAV_FRAME_RELATIVE;
And now it is working fine.
For example, in my area, the GPS altitude is 600 m.
When you sent a altitude of 10 in the global frame, the copter think it needs to go down for 590 meters, that is why it was going to ground.
When we specify the frame as relative, then it will take the relative altitude found by the Baro.
So, most likely, your difficulties are related to some other reasons. However, DroidPlanner is an Android app, and I donât know what settings it requires. But I checked that they have a theme on the ArduPilot forum. I suppose you can reach out there.