Integration of ArduPilot and VIO tracking camera (Part 3): Indoor autonomous flights and performance tests

very nice !
About the 20cm delta with Rangefinder, isn’t that the offset of the ground distance offset for the rangefinder ?

Thank you @khancyr for your comment!
Indeed the 20cm is the offset from ground distance for the rangefinder. The Realsense T265, on the other hand, uses the starting point as the origin.

@rmackay9 that was in fact a copy-paste error in my original post. Thanks for the edit!

Hi @LuckyBird

Which rangefinder are you using?


Hi @Nilantha_Saluwadana, so sorry for the late reply. If you are still interested, I used the teraranger one on the copter.

1 Like

@LuckyBird ,does drone avoided obstacles in same setup you tested ???

I believe you also ask the same question on this post? Integration of ArduPilot and VIO tracking camera (Part 2): Complete installation and indoor non-GPS flights
Keep the discussion in one place would be easier for others to follow.

Hello LuckyBird

Could the VIO tracking camera be used for path recording and a sort of teach and repeat for drones?

Thanks. Regards.


Hi Andrea,

The VIO tracking camera itself does not provide those features. Here’s a detailed description of what it can and cannot do.
Of course, you can use it as a localization and raw data sensor for the software that can provide the things you are looking for, for example this Teach-Repeat-Replan work from HKUST.

Hope this helps.

Hi @LuckyBird I’m new to this and I’m currently working on flying the drone indoor autonomously. As of now, the intel realsense T265 looks like a good alternative and I’m planning to get this to start working with my project. I have a pixhawk 4 flight controller and raspberry pi 4 as my other pieces of hardware. Any piece of advise? My goal is to fly the drone indoors autonomously to achieve inventory scanning inside a warehouse.

Hi @gauravshukla914, sorry for the late reply. I suggest to start with Randy’s detailed blog post that is almost exactly the same setup as yours: Easier setup for Intel RealSense T265

Thanks @LuckyBird. I’ll check that. But I could still use these scripts right of python? I mean sending waypoints through python?

Yes, the other parts should work fine. You might want to separate the waypoints and other parts when testing to make sure each part works.

Hi @LuckyBird . Another question - I have currently installed the latest apsync image provided by Randy i.e Ubuntu 18.04.4 LTS. For the installation of librealsense, its redirecting me to the installation page of librealsense on Ubuntu 16.04. Will these installation steps work for Ubunti 18.04 as well?

I believe the installation on Ubuntu 16.04 and 18.04 differs mostly on the dependencies etc. Anyway, following the official instructions is always recommended:

@LuckyBird I believe, the official instruction is not for RPI running ubuntu. Currently, I have an RPI 4 running ubuntu 18.04.4 (latest apsync image provided by Randy).

I see. In that case I can only say you need to try them out and see what actually works. And if you don’t mind, comment your experience on @rmackay9’s blog post for other to follow up on would be greatly appreciated.


I’m using python+dronekit with GUIDED_NOGPS mode to control the FCU over MavLink.
I now have the T265 and would like to add it so I get better stability. With the T265 installed, Can I switch to GUIDED mode and tell the Ardupilot to use VIO while I sent it movement commands over dronekit/MavLink?


Hello @LuckyBird
Great project!
I am doing almost the same (Indoor Flight) but in my case, I am using PX4 and QGroundControl. I have seen the code for flying the drone and I have simulated it into Gazebo but it is not simulating it’s only arming the vehicle and not takeoff. Any suggestion I will appreciate.

Hi @DiegoHerrera1890,

It’s hard to say what the problem is given the scarce information. My suggestion is to verify that everything is done correctly according to PX4 wiki ( Following hands-on guide (for example can be a good starting point.

I have upload in detail the issue I am facing here, May you please help me?