dzhu / myo-raw

MIT License
216 stars 115 forks source link

unpack() error on Ubuntu/Indigo #14

Open jsuh719 opened 8 years ago

jsuh719 commented 8 years ago

-When running myo-rawNode.py on Ubuntu w/ ROS indigo, it will randomly throw an error -Sometimes it will freeze right after being called, other times it will run (successfully) for a few seconds before stopping -The error is always the same:

struct.error: unpack requires a string argument of length 3

-The root issue seems to be with the unpack() call on line 301 of myo-rawNode.py:

typ, val, xdir = unpack('3B', pay)

which in turn calls the following code in common.py:

def unpack(fmt, *args):
    return struct.unpack('<' + fmt, *args)

Any suggestions/explanations of what's going on with struct/unpack? Thanks!

jsuh719 commented 8 years ago

issue was fixed https://github.com/dzhu/myo-raw/pull/11

larasamirammal commented 8 years ago

how it was fixed? @jsuh719

jsuh719 commented 8 years ago

@LaraZubaidia

Line 291 of myo_raw.py Copy/Paste the link below (clicking it doesn't work)

https://github.com/dzhu/myo-raw/pull/11/files

larasamirammal commented 8 years ago

Thank You very Much @jsuh719 another little thing do you know why the files generated after running myo.py are empty ? how could I get the files of emg and groy and other stuff ? did you face the same problem?

jsuh719 commented 8 years ago

Glad I could help. I don't know about the emg files being generated, sorry You could try a rostopic echo topicFoo > topicFoo.txt to generate a .txt file from the output of rostopic echo

larasamirammal commented 8 years ago

@jsuh719 they said that the myo-row data generates files of data here after complying myo.py I got 9 files but all of them was empty don't know why ? do you have any idea

Thank you very much for everything

fengyanWang commented 6 years ago

@larasamirammal The link you got above has failed. Can you send another copy? https://github.com/dzhu/myo-raw/pull/11/files