Multiranger is producing near random data

Post here to get support
Post Reply
cronos000
Beginner
Posts: 4
Joined: Fri May 15, 2020 8:43 pm

Multiranger is producing near random data

Post by cronos000 »

I'm running into an odd issue when I use the multiranger deck. Instead of mapping clear distances a near random map is made with huge variance in the distance perceived with no movement of the environment. In the below example the drone rotated 720 degrees, and flew up 2 feet and then back down. The LED's, and logs all suggest that the drone is working correctly, and I've tried two different multiranger decks and crazyflie 2.1 drone bases. Currently, I also have flow v2 attached as well, but the errors happen regardless of the attached flow deck.

Image

I've also tried changing the size of the walls from roughly 10'x10' to down to roughly 3'x3', in both cases the variance was large enough to make the data look random.

Does anyone know if there is something that needs to be set for the multiranger to work correctly? Or if I need to use a different firmware? So far I've tried 2020.06, 2020.09, 2020.04, and the default firmware installed on the drone (I'm not sure which one that would be).
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: Multiranger is producing near random data

Post by kristoffer »

Hi,
that looks weird

Try to set up logging for the multiranger sensors
range.left
range.right
range.front
range.back
range.up

and graph them in the Plotter tab to see if the values make sense when putting your hand in front of them.
cronos000
Beginner
Posts: 4
Joined: Fri May 15, 2020 8:43 pm

Re: Multiranger is producing near random data

Post by cronos000 »

Hi,

Thanks for the help!

The data looks better on the plotter, it jumps around just a bit, but it doesn't seem as erratic. Some of the values are jumping for no reason. In the attached image I was moving my hand around on the front sensor, but nothing else had moved or changed for either the left or back sensors. I'm not sure why moving the one back and forth quickly causes the other sensors to break.
Plotter.PNG
When it starts flying it gets increasingly erratic over the course of a few seconds and then loses control. as far as I can tell this is because the sensor data on the flow and the multiranger don't line up with reality and as it tries to adjust it goes in the wrong direction.

I'm not sure why that would happen.
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Multiranger is producing near random data

Post by tobias »

That is a bit weird. So you are saying that the blue log is showing your hand waved in front of the sensor and then you have not moved the crazyflie and the other sensors also start changing? Maybe there could be a glitch. Try pushing the multiranger while measuring to investigate if there is any glitch and see if this triggers the behavior.
cronos000
Beginner
Posts: 4
Joined: Fri May 15, 2020 8:43 pm

Re: Multiranger is producing near random data

Post by cronos000 »

I've worked on finding the trigger for the failure, but as far as I can tell the sensors will sporadically give off bad info. The wrongness of the distances seems to scale with distance to the object, but other than that I can't seem to find any patterns. Occasionally it will happen when the drone is still, and far more often when the drone is being moved or objects are moving near it. It also happens with about the same level of regularity on both of the multiranger decks that I have, so I don't think its a mechanical issue.

Is there any sort of calibration that needs to happen to get a multiranger deck working that I might have missed?
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Multiranger is producing near random data

Post by tobias »

Since the VL53L1x sensor sees in a cone the distance values can jump a bit over edges but when you describe the problem I get a feeling it is something else, especially if other sensors are behaving strange as well when their distance hasn't changed.

There is no special calibration needed, but distance accuracy can be improved by calibrating it. You can read more about it in the VL53L1x datasheet.

What I thinking is a power supply problem. Maybe one of the connector "tongues" inside the female connector is a bit week so the sensors doesn't get enough power. There are some instruction in this post. Check both the crazyflie and multiranger connectors.
Post Reply