communicate between lighthouse and PC directly?

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
Baoasi
Beginner
Posts: 9
Joined: Mon Feb 08, 2021 10:52 am

communicate between lighthouse and PC directly?

Post by Baoasi »

Hallo,
ich want to send 10 log data back to PC(3 position,3 velocity and 4 Quaternion), but that is impossible due to the limit of packet. So I want to know, can lighthouse and PC communicate directly? if possible,then I can get the some data direct from lighthouse instead of from crazyradio.
Thanks!
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: communicate between lighthouse and PC directly?

Post by arnaud »

Can you tell us a bit more about your setup and goal since I do not understand the link between lighthouse and the logs.

For lighthouse: there is no communication from the deck to the basestation, so you cannot get data from the lighthouse basestation. You can get data from the deck directly if you attach a 3.0V serial port to it, but the data are raw IR pulse data and needs to be decoded and interpreted which is a non-trivial task.

You could use 2 log blocks if perfect synchronization between your data is not a hard requirement. The log subsystem has support for converting data to 16bit float which could help fitting everything in a single packet, but unfortunately lib/client support for it has never been implemented.

If you absolutely need a single samples to be sent back, you can implement an app that is using the app channel to send the data back. Either you sample and send the sampled data in 2 different packet, or you can compress the data before sending them. There is code in the Crazyflie to convert float to half-float (16 bit floats), those are well adapted to represent quaternions for example. The Crazyflie repos contains app example that uses the app channel as well some that log variables from within the Crazyflie.
Post Reply