Nicely done. Strange that EK2 didn’t work, it should.
I just want to be clear to others reading this thread that I recommend EKx_ALT_SOURCE be left at the default of 0 (for barometer). It should not be set to “1” for Rangefinder.
Yes I agree about usage of the rangefinder as the primary altitude source is not recommended for normal flights.
I generally start tests in stabilize , doing the usual trim and PID land, check the logs, confirm rangefinder reading and stability and then use it as primary source.
Start in stabilize, takeoff and then switch to alt hold, check for stability and response. Land and takeoff in alt hold mode to confirm.
As for loiter, set ekf home , hold quad a simulate a flight , confirm that vehicle movements ate showned on map. Takeoff in AltHold , make sure vehicle is stable and switch to Loiter, get ready to switch back.
Last test I did is takeoff in guided an did different guided “fly to” and land.
Any kind soul able to nudge me in the correct direction for downloading 3.7 Dev?
I have a few CX-OF sensors that I would love to integrate to a pixracer to offer more test results.
… when I switch from Loiter to FlowHold I see the Copter oscillate quickly in roll and pitch (like if the Roll / Pitch PID was bad tuned), then if I move the quad a little bit around (with RC) the oscillation disappear and the Copter remain stable.
should be a normal behavior from what I read in the wiki:
Because no Lidar is used in this mode, the optical flow sensor is used both to estimate the vehicle’s height above the surface and the vehicle’s speed. Soon after takeoff or after there have been large changes in the height above the surface the vehicle may wobble as it learns the new height and velocity.
I must admit that I don’t actually know exactly what’s required to make it available for all boards. Perhaps it’s moving this chunk to be below the “#end”
if (backend == nullptr) {
backend = AP_OpticalFlow_CXOF::detect(*this);
}
I can confirm it does not get detected on MiniPix either.
Apparently AP_FEATURE_BOARD_DETECT is 0 on a number of ChibiOS boards. Moving detection outside of the #if AP_FEATURE_BOARD_DETECT makes it detected.
@Amit, yes, but like the ZED camera there will be some position drift and that drift increases if the vehicle flies higher… so it will probably work OK if the vehicle stays below 20m and the mission isn’t too long.
@anbello, with optical flow + range finder all modes should work without GPS including Auto mode. FlowHold mode will work even without the rangefinder.
Hello everybody ,
I don’t know if this is the right place , i’d like to share my idea and to know if have some chance of success or viceversa i’m wasting my time
I have an OpenMV Cam and recently i modified the script called “mavlink_opticalFlow.py” to send the information in the same way as Cheerson CX-OF serial protocol
First question:
How is calculated the CXOF_PIXEL_SCALING ?
It’s possible to use the FLOW_F…SCALER instead of CXOF_PIXEL_SCALING ?
As result of first real test with my quadcopter I logged these data. The copter was in oscillation in roll and pitch axis. FlowX vs BodyX is uncorrelated but viceversa FlowY vs BodyY is correlated
Could be only a problem of orientation ?
The data from flow sensor are not linear ( i didn’t set EK2_FLOW_DELAY ) or scale problem ?