Flying in OFFBOARD mode without GPS using PX4FLOW

Hello @LorenzMeier @Mzahana @jimdgit @adipandas
I am trying to fly my drone outside without using GPS and want to use PX4flow as optical flow data. I have successfully completed mission in offboard mode but many a time either GPS signal is very weak or not available at all.
I am trying to switch to LPE+Q attitute estimator as it gives me option to introduce fake_gps and allow me to takeoff without GPS signal.
After takeoff, i am switching my drone to offboard mode, it is drifting towards some target but soon throws a message lpe flow timeout. Can someone guide me on this?

Or, is there any way to fly in offboard mode without GPS, using optical flow with EKF2 as estimator.

Any help is appreciated.

I would strongly discourage the use of the LPE estimator, and focus on enabling your setup on EKF2, it sounds like you are having trouble configuring your PX4FLOW, since its designed to do exactly what you are trying to accomplish.

Have you has a chance to read our docs on the PX4FLOW? and if you have, what step are you getting stuck on? what have you tried so far?

1 Like

hello @rroche i have followed the tutorial you referred to setup the px4flow, its quality is also showing above 200 when i move my quad at around 2 meter above grassy surface.

Moreover, it seems that external vision positional system has been used in the example video you referred for position estimates, but there is not such system outside, so only optical flow is there to be used if GPS is absent.

I tried to fly my quad without GPS using LPE estimator, I set the LAT and LON parameters in LPE. In the first flight my quad strongly drifted in horizontal direction. In 2nd flight it suddenly flew vertically upward. I was using optical flow, LIDAR distance sensors and all were working fine.

I had attached lightweight rope to my quad so that it is still with me.
Can you suggest some way to fly without GPS using optical flow with EKF2 estimator. I tried to find but did not get any parameter that allows me to do so. I can arm without GPS, takeoff and switch into OFFBOARD mode. But, quadcopter disarms automatically when GPS is not there, my code arms it, then it gets disarmed again and this toggling goes on.

Can you tell me what to do in this case.

I will be thankful if you can help, my work is stuck for around 1 month due to this issue, GPS is not so good in my location, it rarely connects. Thank you.

Ok, so you want to make sure the EKF is taking height data from a source other than the GPS, the parameter you need to change is EKF2_HGT_MODE

Please read more on the topic of our documentation for EKF here.

Well, EKF2_HGT_MODE was set to use barometer as primary height sensor.

I am able to arm without GPS (setting COM_ARM_WO_GPS parameter).

I have a rpi sitting on UAV that populated the topic /mavros/local_position/local, I am using mavros to connect pixhawk4 flight controller and rpi

My question is: - Is it possible to fly missions in OFFBOARD mode using an external computer (I have already flown when GPS is present) when there is no GPS, not even a single statellite using only LIDAR (downward facing distance sensor) combined with PX4FLOW(not using any external vision position system)? Does PX4 provides this option? (I am excluding the option of using LPE)

adding more people who have worked on this in this conversation will also be a help.


1 Like

Have you tried the PX4 Avoidance packages for MAVROS? they are doing exactly what you are describing

Okay, will surely have a look at that. thanks @rroche .

Hi @Ranjeet, did you manage to solve your problem and fly with no GPS and just PX4FLOW?