I am willing to use the data logger CLI tool a.k.a. tlm-data-logger to provide feedback to ML models. Despite I know there are parsing tools available for logs recorded with the --datalog option at Sphinx, I know no script with the same functionality for tlm-data-logger.
Do you use or know any? Do you mind sharing it? If not, what would be the easiest way to parse its output in a nearly-real-time fashion? I’d run it like tlm-data-logger ... | script.py.
You probably want to look at the telemetry library itself:
You need a workspace to build this library. You can use the ARSDK workspace if you already have it installed: https://developer.parrot.com/docs/SDK3/#how-to-build-the-sdk
The ARSDK workspace does not contain the telemetry library but you can clone it inside the packages directory along with its dependencies (I believe libshdata is required).
Then, inside your workspace, you can build tlm-data-logger:
Now, you can have a look at the source code in telemetry/tools/gndctrl_datalogger.cpp. Basically, GndCtrlApp::sample is called each time a new sample is received. The parameters sectionId and varId can help you identify the variables you are interested in.
If you plan on parsing your data in python, you may prefer to reproduce the code contained in this file directly in your application:
However, this way is quite inefficient. With this knowledge, am I able to reproduce some of your code or toolings in a such a way that the telemetry datalogs can be directly inputted in a Python script (without using intermediate files) ?
Also, this script has heavy dependencies on pomp Py module, which seems to be somewhat related to Parrot’s libpomp. I tried installing both and running the script, but I’m still getting pomp-related errors. Is there any documentation available?
No, but I will try.
I have also tried to use SDK (POSITIONCHANGED) to get the position. But the time between events is very long (about 1 second). How can I decrease this time? I would like 100 milliseconds of time between measurements.
Equivalent to the command “tlm-data-logger -s 100 inet: 127.0.0.1: 9060”
thanks