Page 1 of 1

Doubts about the lighthouse project implementation

Posted: Wed Nov 04, 2020 1:21 am
by alienado
Hey guys,
I'm new here in crazyflie family, so I'm sorry if some questions are basic.

After spent some time reading documentation, tutorial and videos about the use of Lighthouse base station with crazyflies, I'm now blocked starting the use of the scripts for testing.

Before that, and just to resume, I followed this tutorial (https://www.bitcraze.io/documentation/r ... etting_up/), I was able to activate the Lighthouse deck on crazyflie and detect the HTC Hive.

Before moving to scripts to test flights, there's some infos I would like your help with:
- How do I know crazyflie is using lighthouse base station to set it's position and movements?
- Is there any log parameters got from lighthouse deck where we could get some useful information it?
- For my project I have 3 crazyflies and the base station, I want to create autonomous flights with the drones, Is it done with Python scripts? or is it done in the firmware?

Thanks for the help.

Re: Doubts about the lighthouse project implementation

Posted: Thu Nov 05, 2020 9:42 am
by arnaud
Hi,
- How do I know crazyflie is using lighthouse base station to set it's position and movements?
If you only have the lighthouse deck connected and when you connect using the client, you can look at the state estimate in the flight tab. If X,Y,Z makes sense and do not drift you are positioning with the lighthouse.
- Is there any log parameters got from lighthouse deck where we could get some useful information it?
If you want to see more details about what is happening you can graph the "lighthouse.angle*" variable, they will show you the raw angle measurement taken by the lighthouse deck. The lighthouse log group has a lot of variables that can be useful for debugging but as long as you have stable angles for all the sensors of the deck and your position estimate is clean, lighthouse is working fine.
- For my project I have 3 crazyflies and the base station, I want to create autonomous flights with the drones, Is it done with Python scripts? or is it done in the firmware?
This has to be done as a python script on the PC, at least as a first approach. If your specific goal is to make the Crazyflies completely autonomous it is possible to add code in the firmware and we are currently working on stabilizing APIs to do so. But working on autonomous systems will be harder than controlling them from a central python script so python is likely the fist step in any case.

Re: Doubts about the lighthouse project implementation

Posted: Fri Nov 06, 2020 6:01 am
by Johannes214
If you want to see more details about what is happening you can graph the "lighthouse.angle*" variable, they will show you the raw angle measurement taken by the lighthouse deck. The lighthouse log group has a lot of variables that can be useful for debugging but as long as you have stable angles for all the sensors of the deck and your position estimate is clean, lighthouse is working fine.
Is there somewhere a more detailed description for each of the variables? Including different kalman filter variables and so on.

Re: Doubts about the lighthouse project implementation

Posted: Fri Nov 06, 2020 9:49 am
by arnaud
No, there is no documentation out of the code for these variables other than the code. For the EKF you can start by looking at the firmware doc and look in the C files for what each variable represents in the EKF: https://www.bitcraze.io/documentation/r ... man-filter.

For the lighthouse, there is some backgound info in the firmware doc: https://www.bitcraze.io/documentation/r ... ighthouse/ and the variables are declared there in the C file: https://github.com/bitcraze/crazyflie-f ... #L350-L400. The best for now is to follow the variables you are interested into to see what they represents.

Re: Doubts about the lighthouse project implementation

Posted: Sun Nov 08, 2020 8:43 am
by alienado
Thank you @Arnaud, your information was very helpful.

I managed to work Crazyflie and the base station, creating autonomous flights with a great stability.

Our Crazyflies have also a led-ring deck, using the drones memory I was able to create a led sequence but I was unable to write this mem to the drone (Via mem[0].write_data(self._upload_done)).

Maybe my mistake, but I'm having difficulty to find documentation about working with memory api. I would like your help in understanding how can I write a led sequence to the drone and, when starting with trajectory, how can I send start the led sequence?

Thanks.

Re: Doubts about the lighthouse project implementation

Posted: Mon Nov 09, 2020 12:19 pm
by kimberly
hi!

Could you please start a new forum thread about the mem-write? Its a different issue then the topic of this thread.

Its just to improve the readability for the rest of our users :)

Re: Doubts about the lighthouse project implementation

Posted: Mon Nov 09, 2020 8:24 pm
by alienado
Hi @kimberly,
You're right, this second part is off-topic.
I opened a new thread.

Thanks

Re: Doubts about the lighthouse project implementation

Posted: Tue Nov 10, 2020 7:20 am
by kimberly
Thanks!