# Using VISION\_POSITION\_ESTIMATE to send uwb's positioning data to pixhawk

**URL:** <https://discuss.px4.io/t/using-vision-position-estimate-to-send-uwbs-positioning-data-to-pixhawk/10025>\
**Category:** Pixhawk\
**Created:** [March 17, 2019, 11:49am UTC](https://discuss.px4.io/t/using-vision-position-estimate-to-send-uwbs-positioning-data-to-pixhawk/10025 "2019-03-17T11:49:21Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![LShikang](https://discuss.px4.io/user_avatar/discuss.px4.io/lshikang/32/21364_2.png) [@LShikang](https://discuss.px4.io/u/LShikang)\
**Post date:** [March 17, 2019, 11:49am UTC](https://discuss.px4.io/t/using-vision-position-estimate-to-send-uwbs-positioning-data-to-pixhawk/10025/1 "2019-03-17T11:49:21Z")

</div>

Hello everyone!

We are trying to achieve indoor autonomous flight in a drone we are developing. For this, we want to use Ultra-Wide Band (UWB) beacons. We are already able to track the location (not orientation) of an UWB beacon quite accurately. The next step for us is to have the Pixhawk (original Pixhawk, FMUv2, running PX4 v1.8.1) that we are using make use of this location. For this, we have set up a UP board with mavros, which sends the xy-data from the tracked UWB beacon to the Pixhawk over the /mavros/vision\_pose/pose topic.

Pixhawk seems to have correctly received this location, as we saw in VISION\_POSITION\_ESTIMATE.  
However, we can’t reliably LOCAL\_POSITION\_NED follow the ultra-wideband position: when the drone’s ground is stationary, the position is correct, but when we take off (using position control, for safety), the VISION\_POSITION\_ESTIMATE still receives the correct, but ekf2 fusion Local\_position/pose data cannot follow the data published by vision\_pose/pose  
Set EKF2\_AID\_MASK to 8vision position fusion in qgc, EKF2\_HGT\_MODE to 2Range sensor, lidar gives height information,  
EKF2\_EV\_DELAY is 23ms, EKF2\_ACC\_NOISE is 0.7, EKF2\_GYR\_NOISE is 0.03, my uwb is 9Hz or masquerading is 50Hz (the status\_vision/pose is sent by timing regardless of the location information is not updated)

---

<div class="post-metadata">

**Author:** ![JulianOes](https://discuss.px4.io/user_avatar/discuss.px4.io/julianoes/32/30_2.png) [@JulianOes](https://discuss.px4.io/u/JulianOes)\
**Post date:** [March 18, 2019, 7:28am UTC](https://discuss.px4.io/t/using-vision-position-estimate-to-send-uwbs-positioning-data-to-pixhawk/10025/2 "2019-03-18T07:28:13Z")

</div>

@LShikang do you have a log to show this? Or can you do `listener estimator_status` for more information during flight?

@Paul_Riseborough do you have an idea what is happening here?

---

<div class="post-metadata">

**Author:** ![LShikang](https://discuss.px4.io/user_avatar/discuss.px4.io/lshikang/32/21364_2.png) [@LShikang](https://discuss.px4.io/u/LShikang)\
**Post date:** [March 18, 2019, 1:16pm UTC](https://discuss.px4.io/t/using-vision-position-estimate-to-send-uwbs-positioning-data-to-pixhawk/10025/3 "2019-03-18T13:16:29Z")

</div>

Here is the log under static conditions:[https://logs.px4.io/plot\_app?log=b237dbc9-afc4-4dee-9947-de31f08a5ba8](https://logs.px4.io/plot_app?log=b237dbc9-afc4-4dee-9947-de31f08a5ba8)  
Here is the position control:[https://logs.px4.io/plot\_app?log=96dbd27b-863a-4547-9e24-d722d2e3cec4](https://logs.px4.io/plot_app?log=96dbd27b-863a-4547-9e24-d722d2e3cec4)

---

<div class="post-metadata">

**Author:** ![JulianOes](https://discuss.px4.io/user_avatar/discuss.px4.io/julianoes/32/30_2.png) [@JulianOes](https://discuss.px4.io/u/JulianOes)\
**Post date:** [March 19, 2019, 8:24am UTC](https://discuss.px4.io/t/using-vision-position-estimate-to-send-uwbs-positioning-data-to-pixhawk/10025/4 "2019-03-19T08:24:12Z")

</div>

Hm, could it be that the yaw of the drone is off and therefore the position estimate diverges? I see that the magnetic measurements correlate a lot with thrust meaning that you have interference from the motors/ESCs to the mag. The easiest is usually to use an external mag far away, e.g. the ones that come with the GPS.

---

<div class="post-metadata">

**Author:** ![LShikang](https://discuss.px4.io/user_avatar/discuss.px4.io/lshikang/32/21364_2.png) [@LShikang](https://discuss.px4.io/u/LShikang)\
**Post date:** [March 20, 2019, 9:53am UTC](https://discuss.px4.io/t/using-vision-position-estimate-to-send-uwbs-positioning-data-to-pixhawk/10025/5 "2019-03-20T09:53:40Z")

</div>

> [@JulianOes](#):
>
> Hm, could it be that the yaw of the drone is off and therefore the position estimate diverges? I see that the magnetic measurements correlate a lot with thrust meaning that you have interference from the motors/ESCs to the mag. The easiest is usually to use an external mag far away, e.g. the ones that come with the GPS.

According to what you said, I removed the magnetometer on the gps and used the magnetometer on the px4 alone. Since the x-axis of the UWB coordinate system has an angular difference from the north, the magnetic declination EKF2\_MAG\_DECL is corrected to 23.  
It is worth mentioning that the /mavros/vision\_pose/pose orientation we published is read from the orientation of the imu/data topic published by px4, and the z-axis value uses the distance data of the lidar pointing to the ground.

This is the log of our experiment yesterday, px4 uses gps magnetic compass and the coordinates have been corrected：[https://logs.px4.io/plot\_app?log=ffa3edf5-6a44-47ef-9ebc-1026ab9008df](https://logs.px4.io/plot_app?log=ffa3edf5-6a44-47ef-9ebc-1026ab9008df)

This is the experiment we did today, px4 removes the gps magnetic compass and the coordinates have been corrected:[https://logs.px4.io/plot\_app?log=3e98c1f2-3fc1-40b1-836e-761d052baaf5](https://logs.px4.io/plot_app?log=3e98c1f2-3fc1-40b1-836e-761d052baaf5)

---

<div class="post-metadata">

**Author:** ![JulianOes](https://discuss.px4.io/user_avatar/discuss.px4.io/julianoes/32/30_2.png) [@JulianOes](https://discuss.px4.io/u/JulianOes)\
**Post date:** [March 21, 2019, 10:59am UTC](https://discuss.px4.io/t/using-vision-position-estimate-to-send-uwbs-positioning-data-to-pixhawk/10025/6 "2019-03-21T10:59:18Z")

</div>

I’m confused. My suggestion was to use a mag far away from power wiring, so to use the one on the GPS in the best case out on a GPS mast.

I’m not sure what to look at in your logs and what the problem is (if there is still a problem).

---

<div class="post-metadata">

**Author:** ![boyiss](https://discuss.px4.io/letter_avatar_proxy/v4/letter/b/977dab/32.png) [@boyiss](https://discuss.px4.io/u/boyiss)\
**Post date:** [March 25, 2019, 4:51am UTC](https://discuss.px4.io/t/using-vision-position-estimate-to-send-uwbs-positioning-data-to-pixhawk/10025/7 "2019-03-25T04:51:20Z")

</div>

Anyone have any ideas?🙂 @Nielesonimusso, @MarLi

---

<div class="post-metadata">

**Author:** ![MarLi](https://discuss.px4.io/letter_avatar_proxy/v4/letter/m/57b2e6/32.png) [@MarLi](https://discuss.px4.io/u/MarLi)\
**Post date:** [March 29, 2019, 7:22am UTC](https://discuss.px4.io/t/using-vision-position-estimate-to-send-uwbs-positioning-data-to-pixhawk/10025/8 "2019-03-29T07:22:25Z")

</div>

@LShikang  
Did you double check that the position data is correctly transformed from the UWB coordinate system to the NED coordinate system of the FCU?  
Using the magnetometer indoors didn’t work for us due to interferences and dampening. We therefore use two UWB-Tags to determine the orientation of the UAV which works quite well.

---

<div class="post-metadata">

**Author:** ![LShikang](https://discuss.px4.io/user_avatar/discuss.px4.io/lshikang/32/21364_2.png) [@LShikang](https://discuss.px4.io/u/LShikang)\
**Post date:** [March 29, 2019, 8:58am UTC](https://discuss.px4.io/t/using-vision-position-estimate-to-send-uwbs-positioning-data-to-pixhawk/10025/9 "2019-03-29T08:58:32Z")

</div>

In order to protect the magnetic compass from interference, we went to a more spacious place to do the test, but the effect was similar. We really use the NED frame.

---

<div class="post-metadata">

**Author:** ![kiti1013](https://discuss.px4.io/user_avatar/discuss.px4.io/kiti1013/32/5140_2.png) [@kiti1013](https://discuss.px4.io/u/kiti1013)\
**Post date:** [November 25, 2019, 1:54am UTC](https://discuss.px4.io/t/using-vision-position-estimate-to-send-uwbs-positioning-data-to-pixhawk/10025/10 "2019-11-25T01:54:43Z")

</div>

Has this problem been finally solved?

I think you are also a Chinese developer. I am trying to use UWB for indoor positioning.

---

<div class="post-metadata">

**Author:** ![Ablenking](https://discuss.px4.io/user_avatar/discuss.px4.io/ablenking/32/5796_2.png) [@Ablenking](https://discuss.px4.io/u/Ablenking)\
**Post date:** [November 25, 2019, 7:20am UTC](https://discuss.px4.io/t/using-vision-position-estimate-to-send-uwbs-positioning-data-to-pixhawk/10025/11 "2019-11-25T07:20:24Z")

</div>

I’m Shikang’s classmate.  
This problem has been solved.  
Thanks ! @JulianOes @MarLi @boyiss

we found the delay of location by testing with optitrack .  
At last ,we change the parameters of EKF .

---

<div class="post-metadata">

**Author:** ![Ablenking](https://discuss.px4.io/user_avatar/discuss.px4.io/ablenking/32/5796_2.png) [@Ablenking](https://discuss.px4.io/u/Ablenking)\
**Post date:** [November 25, 2019, 7:23am UTC](https://discuss.px4.io/t/using-vision-position-estimate-to-send-uwbs-positioning-data-to-pixhawk/10025/12 "2019-11-25T07:23:47Z")

</div>

Yeah, we spent months

---

<div class="post-metadata">

**Author:** ![haozi6](https://discuss.px4.io/user_avatar/discuss.px4.io/haozi6/32/9647_2.png) [@haozi6](https://discuss.px4.io/u/haozi6)\
**Post date:** [November 7, 2021, 3:06am UTC](https://discuss.px4.io/t/using-vision-position-estimate-to-send-uwbs-positioning-data-to-pixhawk/10025/13 "2021-11-07T03:06:23Z")

</div>

change EKF2\_EV\_DELAY?  
我的UWB输出频率是10HZ，具体是修改了多少呢？

---

<div class="post-metadata">

**Author:** ![flyhunter](https://discuss.px4.io/user_avatar/discuss.px4.io/flyhunter/32/865_2.png) [@flyhunter](https://discuss.px4.io/u/flyhunter)\
**Post date:** [November 3, 2022, 9:27am UTC](https://discuss.px4.io/t/using-vision-position-estimate-to-send-uwbs-positioning-data-to-pixhawk/10025/15 "2022-11-03T09:27:16Z")

</div>

就是实际数据读取的时间，你用的是是不是nooploop ,交流一下

---

<div class="post-metadata">

**Author:** ![haozi6](https://discuss.px4.io/user_avatar/discuss.px4.io/haozi6/32/9647_2.png) [@haozi6](https://discuss.px4.io/u/haozi6)\
**Post date:** [November 3, 2022, 11:21am UTC](https://discuss.px4.io/t/using-vision-position-estimate-to-send-uwbs-positioning-data-to-pixhawk/10025/16 "2022-11-03T11:21:39Z")

</div>

不是，用的其它的。后来用空循环，不过最后没调好，飞起来不稳。

---

<div class="post-metadata">

**Author:** ![2311450936](https://discuss.px4.io/user_avatar/discuss.px4.io/2311450936/32/16527_2.png) [@2311450936](https://discuss.px4.io/u/2311450936)\
**Post date:** [May 30, 2024, 11:53am UTC](https://discuss.px4.io/t/using-vision-position-estimate-to-send-uwbs-positioning-data-to-pixhawk/10025/17 "2024-05-30T11:53:27Z")

</div>

可以交流一下嘛，大佬，我最近也遇到这个问题了
