Developing forward facing optical flow in sitl

#1

Hi all, I would like to develop a simulation in px4 using optical flow sensor which is facing forward in order to do some tracking of front images of the UAV. However, when I rotate the camera to face forward, px4 is not able to takeoff.

When I use the command: commander takeoff, it shows the error:
error message: WARN [commander] rejecting takeoff, no position lock yet. Please retry…

#2

Hi,

maybe someone can answer your question if you clarify:

  • which simulation you use
  • what kind of optical flow you use

Usually, optical flow is acquired from a downwards-facing camera for numerous reasons like approximate ground flatness.
If you want to use a SLAM/odometry-like localization, you could look into https://dev.px4.io/en/ros/external_position_estimation.html

Good luck!

#3

Hi! Thanks for the reply!

I was using posix gazebo iris_opt_flow model for simulation.
The optical flow I was using was lidar and px4flow camera, available in px4 database.