Local planner not working without hold mode

Hi there,
I am trying to use local planner indoor with px4flow.
I am doing my tests on simulation and hardware and getting similar results.

On simulation there is the yellow ball indicating the target point of local planner.
When I takeoff in offboard mode and send the trajectory, drone is trying to reach the first target point but even if it is around that point, it cannot switch to the second point. However, if I switch the drone to hold mode manually, suddenly that first yellow ball disappears (even the drone is really far from it) then drone is going according to the trajectory, at this point everything is fine, after this point on offboard mode is also drone acting as expected.
I am sharing the video also from the simulation

https://drive.google.com/file/d/1a9Ofyu4HksrYN5n9reiB9rXJVKW9EHZf/view?usp=sharing

In short, for everything to work as expected Drone need to switch to the hold mode for once, then I can switch to offboard but I am planning to fly indoor with px4flow and I cannot switch the mode to hold.

What I need is;
1-A way to switch to hold mode when there is no gps, only with px4flow (I am thinking about sending fake gps data for some time to switch to the hold mode)
2-A way to use local planner without any need of hold mode

Any help would be greatly appreciated, thanks in advance

Hi @halilsirin
What are you thinking of using the local_planner for? It can’t really navigate.
Hold mode requires GPS because flow does not provide and position.
" The local_planner requires less computational power but it doesn’t compute optimal paths towards the goal since it doesn’t store information about the already explored environment."
and
" The global_planner is computationally more expensive since it builds a map of the environment. For the map to be good enough for navigation, accurate global position and heading are required."

Quoted from the readme here:

Flow is only for avoidance and will only work in certain environments.

Hi,
Thanks for the reply. I will go inside a narrow tunnel with local planner, which I can do on simulation. What do you mean that it cannot really navigate ? I have done many tests with local planner on hardware and simulation and it was really successful.

What do you mean that flow doesn’t provide with position ? Then what is the purpose of optical flow ? I can fly on hold mode with px4flow, however I need initial gps lock.

“I need initial gps lock.” Because flow does not provide position. How do you expect to know your position from distance/velocity data? Or from a point cloud of surrounding objects? You could do dead reckoning from a starting position, but that drifts.

"Then what is the purpose of optical flow ? " Good question. I would say avoidance.

hi,
After the inital gps lock I am stopping the GPS.
Px4flow provides with position data.
Purpose of optical flow is not avoidance, it is about positioning.
It seems that you don’t know much about these things, If you want to contribute please do your research beforehand.
https://docs.px4.io/master/en/sensor/optical_flow.html
Good luck

Ok calm down.
Thing is what I am trying to say is that flow can not provide global positioning, just local positioning which means relative vs absolute position. Which is why you need the initial GPS fix.
It can do a good job of holding positions, but that is not the same as having global position.
It can also be used for collision prevention.
That’s why you have to first get a GPS (global) position fix. And then you can move relative to that fix, but the problem is it’s relative, not absolute.
So if you fly over a house, for example, the flow altitude will jump down.
Also this type of navigation drifts, and if you don’t update your position from GPS it will be inaccurate.

Also, you can not do a waypoint mission, as it requires global position.

Thanks for the link to the article, but I can’t find where is says that flow PROVIDES position vs holds position.