LibrePilot Forum
General Category => General Discussion => Topic started by: sonium on May 20, 2016, 10:14:48 pm
-
Hi, I'm working on a touch based GCS for Raspberry Pi using the Python code from Alessio Morale [1]. One problem I have been running into is that different uavobject need varying times to retrieve. For example the AttitudeState is really quick to get and can be read at about 10Hz. On the other hand OPLinkStatus is really slow and takes almost a second to read. If I poll both of them in a loop it makes things really unresponsive since I cannot read the AttitudeState with 10Hz anymore.
Is there any recommendation on how this should be dealt with?
[1] https://bitbucket.org/alessiomorale/librepilot/src/812babc4406e8063f04997e9f5214efe66ca4cac/ground/pyuavtalk/openpilot/uavtalk/?at=amorale/lp_python_porting
-
Maybe set/check the metadata ?
Go to UavoBrowser, click on the big eye icon and check "Metadata", next you can see the timing (in milliseconds) for every uavo.
Indeed the OPLinkStatus is more slow (no need to be fast) compared to the AttitudeState.
Current defaults rates are set to reduce bandwidth using Oplink.
-
Does this mean the entire collection of uavobjects is always sent by the UAV all the time? I thought that the GCS would only request specific UAVobjects? Is this wrong?
-
You should also look at modes:
(https://forum.librepilot.org/index.php?action=dlattach;topic=1661.0;attach=3118)
-
Once you completed the handshake, the telemetry objects will be send automatically.
When I implemented UAVTalk I saved the received objects, even if I request them explicitly, in an appropriate collection.
I poll that collection in another thread to display the values.
-
Hi sonium,
Could you please elaborate on how you managed establish a physical connection between RPi and Openlink software? Are you using a USB port? If so, I remember the documentation was saying that if you connect a PC (Mac, Linux, whatever) to the USB port, the CC3D hardware (LibrePilot) will shutdown all other rest of the external connections in order to maker sure that you don't burn your PC. If so, how can you gather information while flying?
Thank you!