Pozyx with ArduPilot for non-GPS navigation

Hi, I am attempting a school project based on this tutorial. The outcome of the project is to try and display the Pozyx measurement outputs as pictured in the screenshot in the mission planner application…how can I do this ? … ( I am new to Ardupilot Pozyx and mission planner ). Thanks

Hello,

I am having some problems regarding the UWB positioning. At startup the position calculated by the EKF3 gains a random offset, I describe this problem in depth in the following post:

https://discuss.ardupilot.org/t/ekf3-large-position-offset-after-startup-using-uwb-beacons/85037/5

I would appreciate it if someone could take a look at it.

I am trying to use Pozyx for indoor non-gps navigation. I followed all the passages listed on the docs wiki (Pozyx for Non-GPS Navigation — Copter documentation). However, i have some problems. first of all, while using the telemetry module, the copter doesn’t appear on the map, while using the usb connection it does, any suggestion on how to fix this?. Then, trying the ground test, it doesn’t move on the map, even if i walk 5 meters away frome the home position given by BCN_ALTITUDE, LATITUDE, LONGITUDE. And, in fact, when i try to move from stabilize to auto, it returns the error “position required”. What can i do?

And how can i start an AUTO mission with Mission Planner with Pozyx devices?

You need to read the documentation again, and this time do set the home location.

@amilcarlucas, just to be sure, the loiter attempt, from Mission Planner in this case, how must be lunched? Have I to set it in ‘setup->flight modes’? Or can i just plan a mission by waypoints? Is this something relevant for making the drone flying indoor?

Moreover, i tried setting the Home origin but says “the command failed to execute” and also the EKF origin where i am, but it returns “EKF3 refuses set origin”.

You need to fix that. Without origin, nothing will work.

Ok, i solved this. I modified EK3_SRC1_POSXY from 3 (GPS) to 4 (beacon). Now i can fix the origin of the EKF on the map. However, it works only if i am using USB connection, if i try the telemetry, it doesn’t work. Could it be beacuase of the baude rate?

Another doubt about this. I am looking at the arduino code provided to make evrything work. Why after one minute, when we pass in stage_1, the code always do the get_ranges() function, but just every 2 secs the get_position() function? Is there any reason? This explains why looking at the PosX,PosY logs i have values that are null sometimes

I’ve noticed this too. Furthermore, since I am not using a Pozyx system I had to adapt the arduino code to make my Decawave hardware appear to be a Pozyx system to Ardupilot. Doing this I remove the two stages you are talking about, because I could not understand what its function was. So my system is always refreshing positions only at 0.5Hz. You can see this in the logs I posted here:

https://discuss.ardupilot.org/t/ekf3-large-position-offset-after-startup-using-uwb-beacons/85037/11

If someone could explain in more depth how this code works, I would appreciate it.

I was looking at the code before. If I did not get it wrong, the 0.5Hz (having removed the two stages part from the code) is due to the counter variable, which goes from 0 to 20 and then reset to zero in the loop function. In my case it appears after the board is acrivated from 1 minute. But if you removed the stage 0 part, you will just have 0.5Hz. I did not try to remove it yet. If you want to try and test it let me know how it goes.

A few more points:

  1. i suggest you to use the manual configuration of the anchors, the automatic one is not as good. This is my personal opinion.

  2. i noticed that the measures (x,y) oscillates a lot even if the drone is not moving and on the ground. I want to try to to improve this ignoring slight variations. Since i noticed this behaviour also on PosX and PosY values from logs i believe the KF doesn’t improve the estimate. Do you suggest to modify directly the measure from arduino? Or let the work to EK maybe modifying something?
    P.S. this last behaviour doesn’t seem to affect the the stability during loiter mode, but i haven’t tested it enough yet; thoughts?