# GPS denied / Fully indoor Navigation with VIO

**URL:** <https://discuss.px4.io/t/gps-denied-fully-indoor-navigation-with-vio/15707>\
**Category:** PX4 Autopilot\
**Created:** [March 16, 2020, 8:09am UTC](https://discuss.px4.io/t/gps-denied-fully-indoor-navigation-with-vio/15707 "2020-03-16T08:09:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pedro](https://discuss.px4.io/letter_avatar_proxy/v4/letter/p/919ad9/32.png) [@pedro](https://discuss.px4.io/u/pedro)\
**Post date:** [March 16, 2020, 8:09am UTC](https://discuss.px4.io/t/gps-denied-fully-indoor-navigation-with-vio/15707/1 "2020-03-16T08:09:30Z")

</div>

Hi px4 developers and Users,  
we are currently having issues with PX4 to do fully indoor autonomous navigation as if it would be in outdoor (with GPS). Bellow you may find a description of the setup and issue we are facing.

**Setup** :

- Nvidia Jetson Tx2 running ROS Melodic
- Hollybro Durandal(v1.0 w/ STM32H743) running PX4 from Master.

**Objective** :  
The main objective is to do navigation with VIO(provided by intel T265) over an on-board companion computer(in my case Nvidia Jetson) in fully indoor environment(no GPS connected at all).

**Issue Description:**  
I have all setup correctly and as advised in several forums and [External Position Estimation (Vision/Motion based) · PX4 Developer Guide](https://dev.px4.io/v1.9.0/en/ros/external_position_estimation.html)  
For the purpose I used the VIO ros package from [GitHub - Auterion/VIO: Interface PX4 with Realsense T265](https://github.com/Auterion/VIO) to do the transformation from the T265 coordinates to ENU and finally to NED.  
The pose data is transmitted and received proper by PX4. Its possible to see the frames arriving on the LOCAL\_POSITION\_NED.  
On Rviz is possible to see the drone moving around and coordinates are properly displayed.

The issue seems to be that all the PX4 autonomous flight behavior are performed in global coordinates(@baumanta correct me if I am wrong).  
So, of course, I am not able to get the global position or home position(unless this is faked, I assume ).  
So at the moment, we are kinda stuck on what could be done in order to achieve our objectives with PX4. I know that with **Ardupilot** this is already possible.

> **[Integration of ArduPilot and VIO tracking camera (Part 1): Getting started...](https://discuss.ardupilot.org/t/integration-of-ardupilot-and-vio-tracking-camera-part-1-getting-started-with-the-intel-realsense-t265-on-rasberry-pi-3b/43162)**
>
> Introduction The Intel RealSense Tracking Camera T265 is a type of smart camera that uses proprietary V-SLAM (Visual-Inertial Simultaneous Localization and Mapping) technology to combine data from cameras and Inertial Measurement Units (IMU) to track...

**Alternative solution** :  
An alternative would be to perform all operations in Offboard mode. But then I assume I cannot use QGroundControl to upload missions(as easy at least) directly to the FC. This would have to be done through the companion pc.

Any hints or help would be appreciated.

Greeting,  
Pedro

---

<div class="post-metadata">

**Author:** ![dazKind](https://discuss.px4.io/user_avatar/discuss.px4.io/dazkind/32/5242_2.png) [@dazKind](https://discuss.px4.io/u/dazKind)\
**Post date:** [March 16, 2020, 9:10am UTC](https://discuss.px4.io/t/gps-denied-fully-indoor-navigation-with-vio/15707/2 "2020-03-16T09:10:52Z")

</div>

Hi, you might be fine if you set `LPE_FAKE_ORIGIN` to 1. See the discussion [here](https://github.com/mavlink/mavros/issues/1050#issuecomment-450585332).

As for designing and uploading missions via QGC: The coords(waypoints, etc) are also global. So not sure if that would work without pre-/post-processing the mission-data for your setup/use-case. But somebody correct me here if im wrong.

In my projects I run missions & flight path planning completely offboard. It’s more work but that way I’m in control of all the nasty bits.

---

<div class="post-metadata">

**Author:** ![nicovanduijn](https://discuss.px4.io/user_avatar/discuss.px4.io/nicovanduijn/32/2318_2.png) [@nicovanduijn](https://discuss.px4.io/u/nicovanduijn)\
**Post date:** [March 31, 2020, 8:07am UTC](https://discuss.px4.io/t/gps-denied-fully-indoor-navigation-with-vio/15707/3 "2020-03-31T08:07:40Z")

</div>

Yes, currently PX4 does not support any of tha AUTO (Mission, RTL, etc…) modes in local coordinate frame. I believe the reason being that they are fundamentally handled in the navigator module, which operates in global coordinates (I could be wrong there, I’m not too familiar with navigator).

You mention that you’re stuck in “achieving your objectives”, but you didn’t explicitly state what those are. Flying an indoor mission? Then maybe just faking GPS will be easier than re-writing the whole mission pipeline to support local missions. How would you plan such a mission? It starts with the missing UI on QGC, which would need to make some assumptions on local origin in a global context. (Or just on empty background?)

---

<div class="post-metadata">

**Author:** ![pedro](https://discuss.px4.io/letter_avatar_proxy/v4/letter/p/919ad9/32.png) [@pedro](https://discuss.px4.io/u/pedro)\
**Post date:** [April 20, 2020, 2:01pm UTC](https://discuss.px4.io/t/gps-denied-fully-indoor-navigation-with-vio/15707/4 "2020-04-20T14:01:11Z")

</div>

@nicovanduijn Thanks for your reply. My idea was to use in a preliminary stage the Qgroundcontrol to establish missions. But since that is yet not possible in PX4 I move on to perform everything int OffBoard mode. All the mapping, route planning, collision avoidance etc is going to be made under ROS.
