Navio2 + Ground Station + GUIDED mode

Hello

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?

Thanks
Anis

a log file from your drone’s rpi would help!

i recommend implementing “Emergency motor off” switch on your RC; for hardware protection and safety!

Thank you.
Here is the log file in this link
http://wiki.coins-lab.org/log/20170125-guided-crash.BIN

When I analyzed it, I noticed that it consider the GUIDED waypoint sent from DROIDPLANNER as an unknown event.

When I used DroidPlanner in SITL simulator, the GUIDED waypoint navigation work very well with no flaws, but with Navio2 drone, it did not.

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?

Thanks for the feedback

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.

hi, I am new in this, I have the same issue, I have a question

where I can find this configuration, please

i have navio2 and raspberry pi 4.

Hi @tobi.cr7.4 ,

I found that this issue was fixed in August of 2016. You don’t need to change this configuration yourself. Here’s a GitHub closed issue if you’re interested.

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.

1 Like

Thank you, I think that my problem was the next code line I disarmed when the
vehicle arrives the ground

vehicle.mode = VehicleMode(‘LAND’)
time.sleep(2)
vehicle.armed = False
vehicle.close()

So, does it work without issues now?

1 Like

mm not exactly, I have a question.

I must connect the telemetry module? even though the code is running on the Raspberry pi because I connect via wifi between pc and raspberry pi

Hi,

I think so. The Wi-Fi connection is low-range and usually isn’t enough for drone flights.

1 Like