roboTJ101 / ros_myo

ROS node for the Thalmic Labs Myo Armband
Other
33 stars 26 forks source link

Issue with the new version ... not enough values to unpack #10

Open korymath opened 8 years ago

korymath commented 8 years ago

Traceback (most recent call last): File "/home/kory/catkin_ws/src/ros_myo/scripts/myo-rawNode.py", line 444, in m.run(1) File "/home/kory/catkin_ws/src/ros_myo/scripts/myo-rawNode.py", line 204, in run self.bt.recv_packet(timeout) File "/home/kory/catkin_ws/src/ros_myo/scripts/myo-rawNode.py", line 87, in recv_packet self.handle_event(ret) File "/home/kory/catkin_ws/src/ros_myo/scripts/myo-rawNode.py", line 120, in handle_event h(p) File "/home/kory/catkin_ws/src/ros_myo/scripts/myo-rawNode.py", line 300, in handle_data typ, val, xdir = unpack('3B', pay) File "/home/kory/catkin_ws/src/ros_myo/scripts/common.py", line 7, in unpack return struct.unpack('<' + fmt, *args) struct.error: unpack requires a string argument of length 3

Adding a small change to the code to unpack the full list of 6 values makes this work.

korymath commented 8 years ago

This discusses a similar issue: https://github.com/dzhu/myo-raw/pull/11