Unable to get any geometry data from lighthouse v2 (valve)

Topics related to the Lighthouse positioning system, configuration and use
Johannes214
Beginner
Posts: 13
Joined: Tue Nov 03, 2020 12:52 pm

Re: Unable to get any geometry data from lighthouse v2 (valve)

Post by Johannes214 »

Hey,

That helped, thanks for that! Stupid mistake from me, I was confused with python import, I was trying to add lib to wrong place. Deleting cflib and downloading it again worked.

Now I am able to run the persist_bs_data.py file but I am getting following error, can you give guide how I can fix it?

Code: Select all

Connecting to radio://0/80/2M
Connected to radio://0/80/2M
Write geometry 0 to RAM
Write geometry 1 to RAM
ERROR:cflib.crazyflie:Exception while doing callback on port [4]

Traceback (most recent call last):
  File "C:\Users\...\lib\site-packages\cflib\crazyflie\__init__.py", line 403, in run
    cb.callback(pk)
  File "C:\Users\...\lib\site-packages\cflib\crazyflie\mem\__init__.py", line 524, in _new_packet_cb
    self.mem_write_failed_cb.call(wreq.mem, wreq.addr)
  File "C:\Users\...\lib\site-packages\cflib\utils\callbacks.py", line 55, in call
    cb(*args)
  File "C:\Users\...\lib\site-packages\cflib\crazyflie\mem\lighthouse_memory.py", line 260, in write_failed
    self._write_failed_cb(self, addr)
  File "C:/Users/.../tools/lighthouse/persist_bs_data.py", line 90, in _data_failed
    raise Exception('Write to RAM failed')
Exception: Write to RAM failed

EDIT:
Documentation notes that calibration data is not overwritten if there exist old data. I tried to change geo0 and geo1 from True to .valid = False but it didn´t change anything.
I tried to use the PC client and console gives quickly following lines:
LH: Locking to V2 system
Got calibration from 6D48B202
Got calibration from BB575DDE
State estimation also looks good and manual flight feels stable with altitude hold. But automatic flying doesn't start because wait_for_position_estimator() can't break the loop and it keeps waiting for estimator to find the position. So I assume that the calibration is not done properly.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Unable to get any geometry data from lighthouse v2 (valve)

Post by kimberly »

Hi!

If the state estimate looks good on the cfclient, then wait_for_position_estimator() is supposed to work. Did you try to higher the threshold a bit?

And have you tried to use write_lighthouse_mem.py script before the autonomous flight script (and not turning the crazyflie off). Does this change anything then?
Post Reply