Ranging Light on Anchors Flickers, Connection Intermittent

All discussions related to the Loco Positioning system
DM7299
Member
Posts: 31
Joined: Sat Jun 05, 2021 6:04 pm

Ranging Light on Anchors Flickers, Connection Intermittent

Post by DM7299 »

I have been conducting the setup process for the Loco Positioning System (up to positioning the 6 anchors in the room and attempting to configure the system - most specifically, at 'Check Anchor Status' in https://www.bitcraze.io/documentation/t ... ng-system/), but when I scan and connect into the system, not all of the anchors turn green. My anchors 3 and 4 (both ceiling mounted) are clearly getting power, as the lights turn on, but the red light on the anchor next to 'Ranging' flickers, rather than holding steady like it does on the other 4 anchors. These 2 anchors will swap from red to green (in the program, as I've attached below) seemingly at random, even though their locations are known to the crazyflie. Since they are clearly unobscured (and nothing is moving around in the lab) and getting power (as the other lights do not flicker) is this likely a hardware problem? Or is there perhaps some further calibration I could conduct to get more stable signals? Or perhaps this doesn't matter at all, and the occasional interruption of an anchor or two won't affect flight too much?

Thanks again!

[Attached are screenshots showing the system at various states of connection]
Attachments
Screen Shot 2021-06-07 at 2.35.17 PM.png
Screen Shot 2021-06-07 at 2.35.04 PM.png
Screen Shot 2021-06-07 at 2.35.28 PM.png
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: Ranging Light on Anchors Flickers, Connection Intermittent

Post by kristoffer »

Hi!

The reason the indicators flicker between green and red is that the ranging with the anchors is not successful all the time. The question is why?
One common problem is that that the anchor is too far away, possibly combined with other factors such as interference with other radio sources. The antennas on the Nodes/Deck also have different characteristics in different directions and the placement/room can also have an effect.

The first thing to test is to move the Crazyflie closer to the anchors 3 and 4 to see if makes any difference.

A common solution is to increase the transmit power of the UWB radios (both on the Crazyflie and the Anchors). you can find some instructions here viewtopic.php?f=16&t=4731
DM7299
Member
Posts: 31
Joined: Sat Jun 05, 2021 6:04 pm

Re: Ranging Light on Anchors Flickers, Connection Intermittent

Post by DM7299 »

Hi,

Thanks for responding. I tried moving the CF closer to the anchors, but this doesn't seem to effect the signal at all. I remeasured my space, and I actually have the anchors set up in a slightly smaller space than recommended (one dimension of the rectangle is less than 2 meters), so I doubt the distances being too far was the problem. I also noticed another peculiar detail, which is that the CF always believes itself to be at location (0.00, 0.00, 0.00), regardless of movement - the anchor identification worked fine, as the appropriate green circles would grow when it was moved near any of the six anchors, but there was never any response or change while in the position estimate tab. I also tried to fly in this state, which was not possible.

After conducting these further tests and observations I tried to follow your instructions on increasing the power from the anchors, but after trying this with 2 of them I realized that I could no longer get the red RANGING light on those to turn on at all - and further attempts to get the anchor identification tool to work have failed. Now anchor 0 (one of the anchors I attempted to increase the power of) is also marked in red on the program, and I worry I have made some error and worsened my problems.

So, my questions are now two-fold - is there a way to reset the system to back before I attempted to raise the power, as something has clearly gone awry? And does the fact that the crazyflie is oblivious to its location, yet could tell the location of the other anchors help solve the original problem at all?

Thank you!
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: Ranging Light on Anchors Flickers, Connection Intermittent

Post by kristoffer »

It all sounds a bit weird, I'm not sure what is happening.

First, it is easy to reset the nodes so getting back to a clean state is no problem. When connected to an anchor using a terminal just press 'd', this will reset all settings factory settings. From the help menu:

Code: Select all

Help
-------------------
0-9 - set address (node ID)
i   - set node ID from 0 to 255
a   - anchor mode
t   - tag mode
s   - sniffer mode
m   - List and change mode
r   - List and change UWB radio settings
p   - change power mode
d   - reset configuration
u   - enter BSL (DFU mode)
h   - This help
---- For machine only
b   - Switch to binary mode (sniffer only)

Secondly, have you updated all software/firmware to the latest versions, especially the nodes and crazyflie?
Loco Nodes: https://github.com/bitcraze/lps-node-fi ... ag/2020.09
Crazyflie: https://github.com/bitcraze/crazyflie-f ... ag/2021.03
And does the fact that the crazyflie is oblivious to its location, yet could tell the location of the other anchors help solve the original problem at all?
It is not surprising that the anchor positions are displayed correctly, they are stored in the anchors and are transferred to the Crazyflie (in UWB packets) and then to the client (via Crazyradio). This shows that you have set reasonable anchor positions and that communication works all the way. That is good!

What I find odd is that it seems as the Crazyflie is ranging with most of the anchors (since the indicators are green) but your estimated position is still (0.0, 0.0, 0.0). The estimated position is based on input from the Loco system but also from the IMU and the noise only from the sensors should move the estimated position.

At this point I would suggest to make sure all firmware is updated, reset the anchors and reconfigure the system as a first step. Let us know what the result is and we will take it from there.
DM7299
Member
Posts: 31
Joined: Sat Jun 05, 2021 6:04 pm

Re: Ranging Light on Anchors Flickers, Connection Intermittent

Post by DM7299 »

Kristoffer,

Thanks for sticking with me on this. I went through the steps you listed, and I was able to reset the nodes back to their original settings, and went through with the setup procedures again. I also replaced my anchor 4 with a spare, thinking its lack of connection might have been a hardware problem. The new anchor seems to be more reliable, but it, 3, and 0 still occasionally flicker in and out. As far as I can tell I've updated all of the firmware (using the 'Update all Projects' tool on the VM Desktop) and updated the CF and the anchors to their most recent versions (as attached below), and I'm largely back where I started. The anchor identification tool works with this rebooted setup, and position estimate still does not - with a constant readout of (0.00, 0.00, 0.00).

At this point I feel like I can probably live with the flickering anchors, and I'm more stumped by the lack of position data. I will say, however, that out of curiosity I attempted to fly the crazyflie (using a controller) using this current setup, and it was able to fly and hold its altitude using the 'position hold' button. I'm not sure if this is even an LPS specific functionality, but perhaps that suggests some level of communication?

Thanks for the help.
Attachments
Screen Shot 2021-06-09 at 10.46.58 AM.png
Screen Shot 2021-06-09 at 9.47.23 AM.png
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: Ranging Light on Anchors Flickers, Connection Intermittent

Post by kristoffer »

Great, now we have a known software state!

This problem is slightly confusing and I have a hard time understanding what the root cause might be. I get the feeling that the distance measurement to the anchors is (sort of) working since the anchor identification functionality works, and my guess is that the Crazyflie actually manages to estimate its position as well since you could fly. It is very weird though that the position is not displayed correctly in the client.

I would like you to do the following:

1. Switch to the "Flight control" tab and check if the position is 0,0,0 in the State Estimate section at the bottom as well. This section also shows the estimated position and it would be interesting to know if it works.

2. Reboot the Crazyflie, connect to the client and switch to the console tab. Copy/paste the log here to enable investigation of the start up provcess.

3. Set up logging of the measured distance to the anchors. This requires a few steps, you can read about how to configure the logging here: https://www.bitcraze.io/documentation/r ... t/#logging and how to plot it here: https://www.bitcraze.io/documentation/r ... otter_tab/
The logging variables to use are ranging.distance0, ranging.distance1 and so on, they will show the distance that are measured to all the anchors.
Switch to the plot tab and plot the ranges while you move the Crazyflie around a bit and check if the plotted distances makes sense.
Note: The maximum number of ranging logs that can be added to a log configuration is 6.
DM7299
Member
Posts: 31
Joined: Sat Jun 05, 2021 6:04 pm

Re: Ranging Light on Anchors Flickers, Connection Intermittent

Post by DM7299 »

Alright, let's see what we can figure out.

1. State Estimate for X, Y, Z, Pitch, Yaw, and Roll remains blank, not even showing a zero. The 'Gamepad Input' tab changes, as do the Thrust and M1-M4 bars, but the state estimate shows no reading when I fly the CF (pic attached).

2. Here's the log - I hope this is helpful! (Attached)

3. The plotter works! It didn't when I first booted up the system, but I restarted everything and it is very clearly showing the distances to each of the anchors. The signals aren't exact, and there are points where they drop out and then recover, but overall it's an accurate estimation of the CF's location. The anchor identification tool still works, and the position estimate still does not - It will show a constant location at (0.00, 0.00, 0.00) despite the fact that the plotter is accurately describing the distances in the next tab. (Picture of the plotter while I walk around with the CF is attached)

I'd call this progress!
Attachments
Screen Shot 2021-06-10 at 5.22.37 PM.png
Screen Shot 2021-06-10 at 4.44.49 PM.png
Screen Shot 2021-06-10 at 4.45.30 PM.png
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: Ranging Light on Anchors Flickers, Connection Intermittent

Post by kristoffer »

Perfect, thanks!

The console log looks OK, no problem there.
I also think the plot looks pretty OK.
My guess is that the Crazyflie is working but the main problem is the client

I think the first thing to do is to get the client stable, it seems to be a bit shaky which makes it hard to understand if the Loco system is working or not. It is a bit weird that the plot works but not the estimated position, they pretty much use the same mechanism.

As far as I understand you are using the VM? Which version are you on?

We have seen problems where the python lib and client are our of synch, you could try to completely un-install both cfclient and cflib and then re-install from pip.

Another option is to run the client on your native OS and skip the VM to see if that makes a difference.

It could also be interesting to set up logging/plot for stateEstimate.x, stateEstimate.y and stateEstimate.z which are what is supposed to be displayed as the position in the client.
DM7299
Member
Posts: 31
Joined: Sat Jun 05, 2021 6:04 pm

Re: Ranging Light on Anchors Flickers, Connection Intermittent

Post by DM7299 »

I set up logging for stateEstimate x, y, and z, and they work exactly as one would expect. Low values near the origin I've set, which increase when moved away.

I am indeed using the virtual machine - it looks to be using Xubuntu 20.04, if that's what you mean by version. I only installed it two weeks ago, so it shouldn't be too far out of date.

I'll try downloading the client on my main computer as well and see if there any discrepancies, and keep you updated.
Attachments
Screen Shot 2021-06-11 at 9.37.16 AM.png
DM7299
Member
Posts: 31
Joined: Sat Jun 05, 2021 6:04 pm

Re: Ranging Light on Anchors Flickers, Connection Intermittent

Post by DM7299 »

Just as a followup - the client works exactly the same when re-downloaded on a mac. The plotters work, the anchor identification tool works, but the reading of the position estimate stays at (0,0,0)
Post Reply