Cannot get gazebo_iris_opt_flow to work

So I’m trying to fly the drone using only optical flow (EKF2_AID_MASK = 2 in qgroundcontrol). The first time i try to use commander takeoff it throws a failsafe no manual control stick input, even when having ground control open, the second time i use commander takeoff (same make) it starts flying for around 10 seconds and then lands saying invalid set_points and no local position. I don’t understand why it says no local position because when i use record the topic /mavros/local_position/odom and plot it in matlab i can see it does have an estimated position of the drone. The error occurs when the Z-position starts rapidly dropping.Furthermore I can only get it to fly using the built in commander takeoff function, when switching the drone to offboard mode and and asking it go to to a specific location nothing happens at all, the drone just stays on the groundDo you have any ideas because I really don’t know why it is happening.

Steps to reproduce:

  1. Install PX4-autopilot, ros-melodic, mavros, qgroundcontrol
    2. cd PX4-autopilot
    3. make px4_sitl gazebo_iris_opt_flow

Expected result:
The drone flies using optical flow due to EKF_AID_MASK = 2Observed result:
Using commander takeoff the first time
WARN [commander] Failsafe enabled: No manual control stick input
Using commander takeoff again in the same simulation
Drones flies for 5-10 seconds then gives the errors
WARN [commander] Failsafe enabled: No local position

call1

The failsafe warning you are getting is triggered when the RC transmitter link is lost in manual modes. If you are commanding using an off-board PC and you want to disable it, you can set the NAV_RCL_ACT parameter to 0. You can check out the failsafe documention for more information.
PX4 Failsafe Documentation

Hello @Harrock

Hope you got successful with your task. I am facing right now this same exact problem… how did you manage to get iris_opt_flow to work?

The main problem I am currently getting is the

WARN [mc_pos_control] invalid setpoints

WARN [commander] Failsafe enabled: no local position

I could “fix” some other failsafes by setting these parameters: NAV_RCL_ACT = 0; NAV_DLL_ACT= 0, COM_RCL_EXCEPT=4

1 Like

Hi @Harrock:
I am curious to know if you managed to use iris_opt_flow.
Whenever I try to run the MAVSDK takeoff and land or offboard scripts, I get stuck in the pre-flight checks. More specifically the is_home_position_ok check returns a 0 and thus prevents the vehicle from arming and taking off.
Further insight into my issue: Example scripts on SITL: model iris_opt_flow does not respond well to example scripts 'offboard' and 'take off and land'