How do you set the home position to fly with optical flow navigation?

Hi. I am complete unable to fly with optical flow navigation. The same problem always arises, that there is not home position set.
How are you able to set this home position?
Or, alternative, is there any way to go about this issue?
I am currently trying to fly the iris_opt_flow model in SITL and it is completely imposible.

Please, any help would be so welcome.
Thank you!

What flow sensors are you using?
Did you turn off GPS?

For visual navigation I am using lidar + px4flow (the ones in the iris_opt_flow model).
GPS is indeed OFF.

Ok, well you can not “navigate” with lidar.
How would you expect that the distance from something will give you a position? The lidar has no way to know what that distance is from. If it is pointing down it would be your altitude, but you need at least 3 coordinates for a position. Can work for a more actuate altitude, and obstacle detection but not position.

I said I am using visual navigation via lidar and px4flow. Not just lidar.
Besides, the iris_opt_flow is a complete model that includes IMU and other sensors. I did not create the model, it is an existing one.

@Xun An optical flow sensor outputs velocity measurements and not position. Therefore the position will eventually drift and you cannot “visually navigate” with only optical flow without GPS.

How is it done for indoors flying then when GPS is not available? @Jaeyoung-Lim

Hi again @Jaeyoung-Lim. Is it no specified here: Optical Flow | PX4 User Guide that Optical Flow can be used for indoors navigation? If so, I don’t understand how you cannot navigate via optical flow without GPS.

@Xun I don’t think the documentation mentions anything about indoor navigation.

Flying indoors and navigating indoors are two different topics.

You can fly manually (e.g. position mode) so that the vehicle stays in one place and you can command stick inputs. Optical flow sensors are helpful for this use case since the velocity information is useful for stabilizing the drone

Navigating means that you can specify goals that the vehicle is supposed to reach. Since you cannot estimate the position with velocity information, you cannot navigate through indoor environments with just an optical flow.

For indoor navigation, normally a vision based positioning system is used which can estimate your position through camera data.

Hope this answer is helpful

1 Like

Thank you @Jaeyoung-Lim. Indeed, your answer is very helpful. Just for reassurance, VIO would be an option for GPS-less navigation, correct?

Yes, Visual Inertial Odometry (VIO) is a vision based positioning system and is therefore suited for indoor navigation (if light conditions are acceptable).

Hello, I am also interested in indoor work but I do not have a MOCAP. For the moment, I am doing my tests outdoors with the optical flow of a px4 vision drone. I would like to use it indoors, without having to go through VIO. Is it possible to carry out control in offboard mode indoors with optical flow (GPS disabled)?
Otherwise, is it possible to bypass the GPS as MOCAP does via the fake_gps message, to use optical flow?

@Johan_Faure Optical flow measures velocity, not position. Therefore you cannot replace mocap’s position estimate with optical flow

1 Like

@Jaeyoung-Lim Hello, I am dealing with a similar issue. I have both a distance sensor and an optical flow sensor on my drone and it can fly in position mode. I’m aware this is essentially a velocity controller which is seeking V=0 to stabilize in a given position. My question is based on the fact that there is a local position frame and local position estimator that is outputting valid data. Is it not possible to command a position in the local frame, say with mavlink message SET_POSITION_TARGET_LOCAL_NED ?