Mode change to LOITER failed: requires position with only PX4flow

I am facing the following error message while I am taking off my quadcopter with loiter mode. I am using Pixhawk 2.4.8 and use the PX4flow sensor. I have successfully completed all the steps till https://ardupilot.org/copter/docs/common-optical-flow-sensor-setup.html#first-flight

But when I am trying to fly my quadcopter as shown in the First flight step in the mission planner shows the error message that I mentioned.

Here is the screenshot:

I will be glad if someone please help me with this problem.

Thank you in advance,
Yash

1st Flash the correct firmware and troubleshoot from there.

Thank you so much for your reply but I think firmware is correct that’s why I’m able to get OF.xflow and OF.yflow data correctly.

Please correct me if I’m wrong.

The messages in your screenshot clearly display the firmware issue. Over…and over…

1 Like

Hello @Yuri_Rage,

Do you mean this message: 2M flash - use fmuv3 firmware
It actually also came before I installed PX4flow and the quadcopter work fine in loiter mode as well as with all mode with the GPS module. But Im ignoring it because all works fine.

But after updating to fmuv3 and Arducopter V4.3.7 I am facing similar error: Mode change to LOITER failed: requires position.

You need to complete the second flight section on the page you referenced earlier.

1 Like

Yes @Yuri_Rage I am trying to do the second flight only and in order to do the second flight as mentioned in 4th number I have to take off in loiter mode. So after ARM in stabilize mode, I change it to LOITER, and at that time this error occurs: Mode change to LOITER failed: requires position. Even after successfully followed 1,2 and 3rd steps.

Is there anything else that I am missing out?

Yes. But without a log or copy of parameters, we will have no idea what that might be.

Hello @Yuri_Rage ,

Here I have shared 3 files via Gdrive, 1st one is 3 1-1-1980 5-30-00 AM_1stF.bin which is the 1st test bin file. 2nd one 7 1-1-1980 5-30-00 AM_2ndF.bin which is 2nd test bin file where I am getting error and 3rd one is Quadcopter_P.param file.

https://drive.google.com/drive/folders/18xOWM-DT73u6TnqVTHRuWrZJYDz8_ThM?usp=sharing

It would be great if you can help me with this error.

This step:

  1. Set “EKF Origin” on Ground Control Station map. In Mission Planner, right click, select “Set Home here”, and choose to set “set EKF origin here”.

does not appear to have been followed correctly. I don’t see an origin set.

Hello @Yuri_Rage ,

I have successfully completed the 3rd step and after that only in the attached screenshot drone and coordinates visible are visible in the map(right side).

And Im not using GPS. I want to set up only PX4flow.

Still for reference here I have attached the before screenshot and then after the screenshot.


And in the previous reply where I shared the .bin file of the second flight test, only after successfully completing 3rd step.

Anything else that I have to look into?

Make sure you’re setting the EKF origin, not just the home position.

Yes @Yuri_Rage I m sure that I have set EKF origin only.

Make sure EKF2 is disabled. Beyond that, I’m out of ideas.

image
EKF2 is disabled only.

And thank you for looking into this problem.

Hey @dkemxr and @rmackay9 ,

Would you like to give your comments on this problem?

Actually, I have been working on to setup PX4flow to pixhawk for the last 2 months. After changing versions of the mission planner, and the firmware of Copter and also went through all the possible Ardupilot and GitHub discussions. When I finally didn’t get any solution then I have start this new discussion.

So I will be glad if anyone could help me with this problem.

I have not used a Flow sensor. Which one?

It will only be possible to use the loiter flight mode with the Px4 flow if you have also installed a Lidar facing downwards, without the Lidar it is not possible to use this mode. Test it out in FlowHold mode.

1 Like

Interesting. I see now that there’s a highlighted note on the PX4FLOW doc recommending the use of a rangefinder.

https://ardupilot.org/copter/docs/common-px4flow-overview.html

Hey @JDANILOM,

Thank you much for your reply I am actually not aware of FlowHold mode. But now I will try it.

And @Yuri_Rage I have seen that note just after I ordered that pX4flow. And I also regret that But then I thought somehow I can use that sonar as a separate rangefinder but now I don’t know exactly how.

So can anyone suggest that if I desolder that sonar and then I use it with the IC2 port as mentioned here so it will work or the whole PX4flow will be damaged? Because as of now I am not able to purchase a new lidar lite v3. This is the Sonar which use in PX4Flow.

I will be glad if someone can give their suggestions on it.