-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sensor fusion callback only working intermittent? #50
Comments
The board you have, it is a MetaMotion R board? You are sure that it supports sensor fusion data? MetaWear has recently released a Python BLE package of its own, and I plan to upgrade pymetawear to use it. Maybe that will alleviate the problem. |
Yes, it is the MetaMotion R board. I'm interested specifically in the quaternion callback. The frustrating part is that the code will publish the output only some of the time, but not other. The sensor will still connect (and publish basic info) when it is not publishing the data. |
@how-chen I will make some investigations into the matter during this week. Will get back to you on this. |
@how-chen If you are still interested in trying to resolve this issue, I have just released a new version (v0.11.0) of metawear which uses a different BLE library for communication. This might resolve your issue. |
@how-chen I have seen these issues with my MetaWear R+ sensors on Linux with a SpeedLink dongle, but never had any problems on macOS on a macbook. When there are two sensors sometimes it hicks up also on macOS, but with a single sensor everything works perfectly. Also, have a look at this thread. As a wild guess: it seems that the throughput of a particular BLE chip may affect this behaviour, i.e. if the BLE unable to deliver data within certain time the sensor gives up. So I would recommend to try to play with the parameters for sensor fusion sampling rates AND connection parameters. I have the following setup and everything works fine on macOS with a single sensor: client.settings.set_connection_parameters(min_conn_interval=7.5, max_conn_interval=10, latency=0, timeout=3000)
client.sensorfusion.set_mode(SensorFusionMode.NDOF)
client.sensorfusion.set_acc_range(SensorFusionAccRange._16G)
client.sensorfusion.set_gyro_range(SensorFusionGyroRange._2000DPS)
client.sensorfusion.set_sample_delay(SensorFusionData.QUATERNION, 10)
client.sensorfusion.set_sample_delay(SensorFusionData.CORRECTED_ACC, 10)
client.sensorfusion.set_sample_delay(SensorFusionData.CORRECTED_GYRO, 10) That's all with the latest |
I am using one of the metawear R sensors with an Ubuntu laptop (16.04) with pymetawear. The accelerometer and gyroscope examples are working fine at the moment, but the sensor fusion example is only working on an intermittent basis (more often than not, it is problematic). I can run the code a few times and everything is working then the code will run, but not streaming any data (I can connect to the sensor but the callback does not seem to be returning anything). I am out of ideas. Was wondering if anyone has run into the same problem.
The text was updated successfully, but these errors were encountered: