May 17, 2016 at 5:44 pm #1106
I’ve been working on a python package for the UM7 that handles serial com and data parsing. Right now it only handles processed accel, gyro, and euler angle/rate data but it can both catch broadcast data or request data from specific registers on demand (though the latter is generally much slower). It also has functions to zero the gyros, reset the EKF, and check on the serial buffer. As of now broadcast rates still need to be set via the CHR Interface or some other library.
It’s moderately documented so I recommend looking through the source code and comments before jumping in, and there are a few quirks here and there. Most notably the grabsample() function doesn’t work unless the requested data type broadcast rates have been set to zero, but apart from that it should be pretty straightforward.
I’m not a programmer by trade and this is my first python project so feedback is welcome and appreciated! You can find the library at https://pypi.python.org/pypi/um7 or run ‘pip install um7’ from your terminal.
June 3, 2016 at 9:37 am #1120
We are currently looking at developing a cross platform interface for the UM7.
Basically the functionality of the current CHR serial interface software, which runs as Python web/gui application. If all goes to plan, will release in a few months from now!
I would be interested in looking at your work.
Thanks for sharing, keep it up.
September 21, 2016 at 5:32 am #1184
thanks for your work! it has made my entry to UM7 with python easy.
you might consider pulling some of my commits:
my first commit updates to version 0.9 as found on pip. the second commit adds python3 compatibility and improves packet parsing performance and robustness by correcting packet length interpretation, calculating and comparing checksums, passing only the payload as data and avoiding binary to hex-string conversions.
the following commits further improve different aspects of the UM7 module, but also modify the logic of state updates.
i always keep the complete state of all values requested through statevars in UM7.state, updating it as packets come in. in my app i have a separate thread that does only little more than:
while True: sensor.catchsample()
following this logic the code will further diverge from the original, replacing host time by time values reported from the UM7. by checking for (plausibly) increasing time values it is then possible to asses if all the data from the UM7 is current / accurate.
i have also written calibration code that calculates a rotation matrix to be applied to all measurements (to compensate for slight differences in UM7-mounting) but i’m currently not sure if (and how) i could integrate it.
You must be logged in to reply to this topic.