Multiranger deck wrong distance measurement

Firmware/software/electronics/mechanics
Post Reply
Barry
Beginner
Posts: 28
Joined: Tue Apr 06, 2021 9:19 am

Multiranger deck wrong distance measurement

Post by Barry »

Dear all,

I got some issues with the multiranger deck:

When I used the python scripts as below: I put the crazyflie in the corridor without any obstacle. The distance to the wall is far than 4m.

Code: Select all

cflib.crtp.init_drivers()
with SyncCrazyflie(URI, cf=Crazyflie(rw_cache='./cache')) as scf:
	with Multiranger(scf) as multiranger:
		for _ in range(100):
			print(multiranger.front)
			time.sleep(0.05)
The printed outputs were not all None but started with three None and then some value between 0.249 to 0.259

However When I did not add the time delay like:

Code: Select all

cflib.crtp.init_drivers()
with SyncCrazyflie(URI, cf=Crazyflie(rw_cache='./cache')) as scf:
	with Multiranger(scf) as multiranger:
		for _ in range(100):
			print(multiranger.front)
The outputs were None.

Could anyone tell me the reasons?

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

Re: Multiranger deck wrong distance measurement

Post by kristoffer »

I have also seen some odd behavior when our of range. It needs more investigation and I created an issue for it https://github.com/bitcraze/crazyflie-f ... issues/874
Please feel free to add any information you know of to the issue.
RafaelGB
Beginner
Posts: 3
Joined: Thu Jan 31, 2019 9:37 pm

Re: Multiranger deck wrong distance measurement

Post by RafaelGB »

We are also seeing strange behavior when the multiranger is out of range. The attached image is an experiment I made, where I moved the crazyflie from one wall (left sensor - green line) to the other (right sensor - blue line). The left sensor starts at a small value and increases as I move away from the wall. When I reach the maximum range (around 395 on the horizontal axis) there is a high increase in the noise and then the sensor starts to report a short range, which increases as I keep moving farther and farther. This behavior is mirrored by the opossite sensor.
Attachments
crazyflie_range.png
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: Multiranger deck wrong distance measurement

Post by kristoffer »

Thanks!
Post Reply