balandinodidonato / MyoMapper

Myo Mapper is an open-source application to map Myo armband data into OSC.
http://www.balandinodidonato.com/myomapper
47 stars 8 forks source link

[Bug] Orientation acceleration & velocity mixed up when using two Myo's #50

Open kium-one opened 6 years ago

kium-one commented 6 years ago

I'm sending Left Myo to port 5432 and Right Myo to port 5434. Most data is correct, but when enabling Orientation acceleration & velocity, both Myo's send to both ports. So myo1/orientation/velocity (1,2,3) keeps flashing between two values, and is affected by the movement of both arms. Same for myo1/orientation/acceleration (1,2,3). For myo2 the values are inverted, but have the same issue (flashing and affect by both arms). Thanks :)

balandinodidonato commented 5 years ago

I apologise for my enormous delay in answering. Do you still need some help with Myo Mapper? I hope you did sort that out. have you downloaded the latest version?

kium-one commented 5 years ago

No worries and thank you! I'm running on the latest version (January), but still having the issue described above so I can't use many of the data features when two MYOs are connected. I'm still using Myo Mapper daily and am extremely grateful for it, thank you for investing so much time into building this!

thebbg commented 5 years ago

Hey there,

Happy this thread exist, I seem to be getting the same problem. Data is very smooth while I work with one Myo connected, but as soon as I connect the second one, it starts getting weird. I don't even have started the second Myo Mapper, only one with both connected via Myo Connect and everything goes wrong.

Any chance you'll be working on that issue soon?

balandinodidonato commented 5 years ago

Hi @thebbg,

I'm dedicating a few hours a week to Myo Mapper and this is a priority. I'm trying to find a way to better manage two Myos. It's not that easy as it looks but I'm doing my best. Please let me know if you have any suggestions. From the UI design to backend ideas :)

thebbg commented 5 years ago

Hey Balandino,

No problem, I understand that very well. I know how simple looking things are usually much more complicated under the hood. That said, I haven't checked how it works to receive the data from the Myo Connect app (or maybe directly from the myo's bluetooth receiver). Since the problems start to show up as soon as another myo is connected via Myo Connect, before the second myo mapper is open, I believe the problem isn't from the OSC data send. The fact that I'm sending both Myo's on port 5432 and differentiating them using the address (finding either 'myo1' or 'myo2' in the address string to redirect the data stream) confirms me that the OSC is working fine.

The thing I find weird though is that the positions received for both Myo's work great, I'm using it to spatialize my sounds live in a dome using Serveur Gris plugin (if you wanna check it out : http://gris.musique.umontreal.ca/). I believe the orientation/velocity and orientation/acceleration is extirped from the positions and since the position itself is working fine for 2 myo's, maybe the problem happens between the reception and analysis of position data and the calculations for the velocity and acceleration, but that's only an hypothesis. If it works in a different way, feel free to send me some code examples / explanation so I can add my brain power to solving that specific issue, it would be my pleasure!