Multiranger deck wrong distance measurement

Firmware/software/electronics/mechanics
Post Reply
Barry
Beginner
Posts: 22
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: 529
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.
Post Reply