NiklasRosenstein / myo-python

Python bindings for the Myo SDK
Other
259 stars 102 forks source link

Acceleration and Gyroscope events don't appear #41

Open smetanadvorak opened 8 years ago

smetanadvorak commented 8 years ago

Dear Niklas,

Sorry, I've completely rewritten my question here. Previously it was different, but formulated in a wrong way. Hopefully it didn't bother you)

I successfully run your example files, but I face an issue during the use of Listener class in my application. I'm making a PyQt app that visualizes the EMG and IMU data in real time. I've written my own listener, based on your example, that puts all the data into a Queue shared between the listener and parent widget. The problem is that I don't receive orientation events at all. Let's take this code for example: def on_event(self, kind, event): print(kind) When a listener with this code is created in main(), like in your example, it prints this: ... EventType: emg EventType: emg EventType: emg EventType: emg EventType: orientation ... in a repetitive way and I find it completely correct.

But when I create the same listener in my widget, it gives only : ... EventType: emg ...

The listener class I use in both examples is the same. The difference is whether I create it in main() function or in my app's widget. Do you have some idea about this issue? I do it on OSX El Capitan, armbands are up to date.

Thank you very much!

smetanadvorak commented 8 years ago

Update: Briefly, orientation events don't appear when the hub object is run from a PyQt widget object. I followed the problem until wrapper() function in run() method of Hub class in ctyping.py. It doesn't receive events of type orientation at all. It does receive emg events if emg is enabled. If emg is disabled it receives no data events. Seems to be a problem of SDK, but I haven't seen any issues on the developers forum. Still thanks if you have some information, but I understand that it's an SDK's problem.

NiklasRosenstein commented 8 years ago

Hi @ahkmadeus,

unfortunately I can't reproduce the issue here. I couldn't test it in a PyQt environment yet, though. It does sound really strange though. Sorry but I have no idea where this could be coming from. :(

On 19 August 2016 at 11:58, akhmadeus notifications@github.com wrote:

Update: Briefly, orientation events don't appear when the hub object is run from a PyQt widget object. I followed the problem until wrapper() function in run() method of Hub class in ctyping.py. It doesn't receive events of type orientation at all. It does receive emg events if emg is enabled. If emg is disabled it receives no data events. Seems to be a problem of SDK, but I haven't seen any issues on the developers forum. Still thanks if you have some information, but I understand that it's an SDK's problem.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NiklasRosenstein/myo-python/issues/41#issuecomment-240978320, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQeJj6oXAAo3J54wt9X3ZQ7HJ5LhByzks5qhX5EgaJpZM4JmqMC .

Niklas Rosenstein https://niklasrosenstein.com

smetanadvorak commented 8 years ago

Hi @NiklasRosenstein

I fully understand this situation, never mind. If I find the way I'll tell you here. Otherwise if you want I can help you to reproduce the problem. If you have OSX and anaconda installed, that will take 10 minutes. if you haven't, never mind, again.

Thanks!