atomgomba / orangebox Goto Github PK
View Code? Open in Web Editor NEWA Cleanflight/Betaflight blackbox log parser written in Python 3.
License: GNU General Public License v3.0
A Cleanflight/Betaflight blackbox log parser written in Python 3.
License: GNU General Public License v3.0
I'm trying to use orangebox to get rid of .exe files to make my own blackbox tool become not that platform needed.
The target format of data is having each variation in a 1-d array, so I can easily operate them with numpy.
But it seems my code is not performed that well. Can you take a look?
https://github.com/DusKing1/PID-Evaluator/blob/master/orangebox-approach.ipynb
Hi, I appreciate your lib and like to use it to load it for plots, qgis or kdenlive visualisation.
Unfortunatly the blackbox logs created by INAV 3 are .TXT files which cause the error message
~/.virtualenvs/orangebox/lib/python3.8/site-packages/orangebox/reader.py in _build_field_defs(self)
211 if prop == "predictor":
212 if framedef_value not in predictors:
--> 213 raise RuntimeError("No predictor found for {:d}".format(framedef_value))
214 else:
215 field_defs[frame_type][i].predictorfun = predictors[framedef_value]RuntimeError: No predictor found for 10
To my understanding, as another fork of cleanflight, the blackbox structures should be compatible?
The rendering using the official blackbox-viewer by betaflight works fine so far.
When I try and run bb2csv against my logfile I get the following error:
:~$ bb2csv -v BTFL_BLACKBOX_LOG_20200827_190605.BBL
Traceback (most recent call last):
File "/usr/local/bin/bb2csv", line 4, in
import('pkg_resources').run_script('orangebox==0.2.0', 'bb2csv')
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 667, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 1470, in run_script
exec(script_code, namespace, namespace)
File "/usr/local/lib/python3.8/dist-packages/orangebox-0.2.0-py3.8.egg/EGG-INFO/scripts/bb2csv", line 57, in
File "/usr/local/lib/python3.8/dist-packages/orangebox-0.2.0-py3.8.egg/EGG-INFO/scripts/bb2csv", line 29, in main
File "/usr/local/lib/python3.8/dist-packages/orangebox-0.2.0-py3.8.egg/orangebox/parser.py", line 77, in load
File "/usr/local/lib/python3.8/dist-packages/orangebox-0.2.0-py3.8.egg/orangebox/reader.py", line 59, in init
File "/usr/local/lib/python3.8/dist-packages/orangebox-0.2.0-py3.8.egg/orangebox/reader.py", line 82, in set_log_index
File "/usr/local/lib/python3.8/dist-packages/orangebox-0.2.0-py3.8.egg/orangebox/reader.py", line 146, in _build_field_defs
RuntimeError: No predictor found for 10
The log decodes in blackbox_decode fine and produces the csv, gps csv & gpx files
Platform is Ubuntu 20.04 and install was from source.
log attached and renamed as .txt for attachment (sorry if there is a better way I cant see it).
BTFL_BLACKBOX_LOG_20200827_190605.txt
Thanks for this amazing project!
I came across this bug when actually using exactly 8 group for the TAG8_8SVB encoding. This occurs in a betaflight fork (github.com/tblaha/indiflight).
If exactly 8 fields are found in a TAG8_8SVB encoding group (the maximum), then group_count to 0, if 8 groups are found. This gets the parser get stuck in an endless loop, because next(data)
is never called.
orangebox/orangebox/decoders.py
Lines 54 to 75 in ef39128
Setting group_count = 8
in line 57 seems to fix the issue in my logfiles.
AFAIK blackbox-log-viewer also has a similar bugs, will also raise an issue there.
Sidenote: TAG8_8SVB itself is already broken by definition if you use less than 8 fields and the next field is also encoded with TAG8_8SVB. If I have a TAG8_8SVB group with less than 8 values, followed by another TAG8_8SVB group, there is no way to know where the boundary is, as the number of values is not written in the logs. We only know which ones are zero or not, so if the first TAG8_8SVB has 4 values, then the last 4 are declared 0 in its header. The parser simply checks up to 8 fields for TAG8_8SVB encoding (and in this case will then also accept up to 4 fields from the next TAG8_8SVB group, which are then zero'd even though they may not be).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.