Servers by jDrones

Ekf3 optical flow sensor problem ( in loiter mode )

Please help me out , I didn’t understand how to solve this problem, When I want to flying with only Hereflow and TF02 Lidar then it was showing ‘’ PreArm : Need Position Estimate ‘’ in Loiter mode.
I’m using Copter 4.1 Beta6.
This Parameters I’ll set in AP EK3_SRC1_POSXY = 0
EK3_SRC1_POSZ = 2
EK3_SRC1_VELXY = 5
EK3_SRC1_VELZ = 0
EK3_SRC1_YAW = 1
I’m sharing the critical massage screenshot image link below;
https://drive.google.com/file/d/10eCXjH6eyzuujUmFp_Xa7DgrRrbnXoYY/view?usp=drivesdk

Maybe it is this?

To allow arming and taking off in Loiter without a GPS the GPS arming check should be turned off as shown below. Unchecking “All” and “GPS” and leave all other options checked.


https://ardupilot.org/copter/docs/common-optical-flow-sensor-setup.html

Thanks Derek :blush:. But this procedure didn’t work, that’s why posted it on forum.

Good evening,

Do you have a log, may be with LOG_DISARMED=1? I had some issues in the past that were associated to configuration. Three things to keep in mind:

  • Make sure that you set a home and an initial position. It can be done through MP or through Mavlink using a companion computer.
  • Check the orientation of your LiDAR. The RNGFNDx_ORIENT parameter must be set to 25.
  • The range finder measurement must be valid before starting to fly. For example, I was using at some point a sonar that required me to set RNGFNDx_MIN_CM=50. However, the sonar was only 40cm far from ground before take off, so it was not providing useful measurements. This triggered the position arming check message.

Also, be aware that if you use the LiDAR for altitude correction, your flight surface should be generally flat.

Hey Sergio,
Thanks for your opinion. But you told me another thing and I asked other thing. You’re answer is not expedient my question.

ok, I apologize. May be I was not very clear how what I mentioned was related to your issue. The first point is that when you use optical flow, the position for loiter mode is not provided directly by the sensor. So setting up an origin, or initial position is key. I have had the same message you have when I don’t do it. The position estimation does not happen without this. The second and third points are because, it also does not work if the range finder is not properly configured or it does not provide valid measurements. The distance to scene, provided by the range finder, is important for transforming pixel per seconds measurements from optical flow to m/s. It is important that your range finder works properly even before taking off. I also got the same message as you in the past because of that. The sonar case that I mentioned was an example; since the measurement was not valid because it was out of range, it did not have the distance to scene and it was not able to use the information from the optical flow. Finally, I got the same message once because I forgot to set the orientation of the range finder properly. It is improbable that this is your case, but it can happen.

Hi @Rohan,

Have you put an onboard log somewhere? Sorry if I’ve missed it somehow.

I suspect the issue is that you haven’t set the EKF origin. If you’re using Mission Planner you can right-mouse-button click on the map and set “Set Home Here” >> “Set EKF Origin Here”.

Hi @rmackay9
I have set the EKF origin, but facing same issue.
Here I am sharing the snap and data log,
Please find,
https://drive.google.com/file/d/119HOO8ubL9JxQl78CiETAOVgSP7AfiL7/view?usp=drivesdk
2 1-1-1980 5-30-00 AM.bin (564 KB)

Hi Rohan,

It doesn’t appear that the origin has been set. If the origin has been set we see an ORGN message in the log but it’s not there.

Could you set LOG_DISARMED = 1 and try again? This this is done then we should be able to see in the logs if the origin is being set or not or if it is failing for some reason.

-Randy

@rmackay9

I have done this modification, suggested from you. But still the problem exists. I am attaching the snap , please find.

https://drive.google.com/file/d/152isCimQUQvJER5UGJDcc18ycW8xrROy/view?usp=sharing

Hi @Rohan,

Thanks for your persistence. I really need a log though. A screen shot is helpful but it just doesn’t give me enough information to investigate the issue.

Hi @rmackay9
Sorry for that,
Here is my data log , please find,
https://drive.google.com/file/d/1nDRwd3IEvJ3-elRy2i2GkG-_5lcWvcRd/view?usp=sharing

@Rohan,

Txs for the log.

I think that the rangefinder is too close to the ground because its distance is being reported as 0.13m but the RNGFND1_MIN_CM is set to 30cm. I think this will stop the EKF from consuming its data.

Could you try reducing the RNGFND1_MIN_CM to 10 and try again?

Hey @rmackay9
Thank you.
Now my drone is working perfectly and smooth with HereFlow😌.

1 Like
Servers by jDrones