Fly indoor without GPS by using stereo camera


#1

How can we fly the drone without GPS since Flytos need GPS to take off. I have one stereo camera (ZED Camera) but I have no idea how to use it for indoor navigation. I am using PX4 stack and i need to change any settings in QGroundControl to enable the position estimator by using vision? Please help, I have searched for many days and still couldn’t get the answer. Thank you


#2

Hi @Por_Yu_Kheng,

You would have to install the ZED Camera ROS-SDK.
From this SDK, you should get odometry data.
Feed this odometry data to PX4 via mavros via topic -> /flytos/mavros/vision_pose/pose

Edit 2 PX4 parameters:
EKF2_AID_MASK: vision position fusion
EKF2_HGT_MODE: vision

Open QGC and check that you are getting vision data and local position data in MAVlink Inspector in QGC.


#3

@srv-admin
Thank you, I am able to get the 2 parameters (vision and local position data), but the GPS is still not lock so it is unable to takeoff. So it still need to depends on the GPS to get the global position. I tried using LPE to fake the GPS by using QGroundcontrol instead of EKF2 but it still have many bugs and the GPS Lock is not stable. Is there anyway to bypass or ignore the GPS, please help and thank you for your time.


#4

Did you do this? Using EKF2 (instead of LPE) is just fine from our experience.

Also, You do not need to fake GPS.


#5

Hi @srv-admin

Yes we try to echo the rostopic of flytos and able to see the zed odometry data. We subscribed to the zed topic and published it to the flytos topic. Yes we tried using EKF2 in the beginning but show no sign of gps lock. Is there any more setting do I need to configure? I am currently using PX4 flight stack.


#6

Ok.
From previous comments, I understand you can verify this:

If that be the case, and local position (x and y) is being updated as you move the drone from Point A to Point B.
Then can you please explain what you mean by:

How are you sending the take off command? Did you try to takeoff via RC in MANUAL mode and tried switching to POSHOLD mode in air.

You will definitely NOT get a GPS lock, because you simple do not have a GPS. But PX4 would still fly if it has valid local position estimate using vision sensor as long as these parameters are set correctly:


#7

@srv-admin

  1. Without the GPS, no matter how we cannot do any offboard command and also cant even to takeoff unless we use fake GPS.
  2. We tried using the take off command provided on the flytOS console. If we use RC in manual mode, we are able to takeoff.
  3. Actually we are trying to write some simple code in ROS using flytOS api which allow the pixhawk to arm and take off to a certain altitude and then land , all using an on board computer. But when we ran the codes, pixhawk rejected the commands( LED flashed red).

#8

Hi @Por_Yu_Kheng,

It seems like when the drone in placed at ground, the sensor is not being able to estimate position.
Please post a Px4log file, with just keeping the drone at ground and trying to send takeoff command via FlytOS. Also, share FlytOS runlog of that instance.