Skip to content
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

Error in parseData #15

Open
shreks7 opened this issue Jan 24, 2018 · 5 comments
Open

Error in parseData #15

shreks7 opened this issue Jan 24, 2018 · 5 comments

Comments

@shreks7
Copy link

shreks7 commented Jan 24, 2018

I tried all tasks but I am getting an error with parseData each time i run it -

py -2 bebop.py testTakeOff

METALOG: logs/meta_180123_190246.log
UNKNOWN Project 144
0 Flying State 2 hovering
1 2 3 AssertionError 23
4 5 6 Unknown Piloting State 12 04 7E 1F 2F 00 00 00 01 04 0C 00 00 00 00 00 00 40 7F 40 00 00 00 00 00 40 7F 40 00 00 00 00 00 40 7F 40 00 00 00 00 00 00 00 00 01 00 00 00
7 NavigateHomeStateChanged 0 available finished
8 9
Taking off ... 0 Unknown Piloting State 14 04 7E 35 27 00 00 00 01 04 0E 00 00 00 00 00 00 40 7F 40 00 00 00 00 00 40 7F 40 00 00 00 00 00 40 7F 40 01 00 00 00
1 Unknown Piloting State 15 04 7E 3A 0F 00 00 00 01 04 0F 00 00 00 00 00
2 3
Traceback (most recent call last):
  File "bebop.py", line 421, in <module>
    testTakeoff( robot )
  File "bebop.py", line 285, in testTakeoff
    robot.takeoff()
  File "bebop.py", line 176, in takeoff
    self.update( cmd=None )
  File "bebop.py", line 117, in update
    self._parseData( data )
  File "bebop.py", line 104, in _parseData
    parseData( data, robot=self, verbose=False )
  File "bebop_katrina\katarina\navdata.py", line 114, in parseData
    commandProject, commandClass, commandId = struct.unpack("BBH",  data[7:7+4])
struct.error: unpack requires a string argument of length 4
@m3d
Copy link
Member

m3d commented Jan 24, 2018

This looks like the remaining data were smaller than 4 bytes - was there some unusual interrupt? Can you share your meta_180123_190246.log with related (listed inside) files?

@shreks7
Copy link
Author

shreks7 commented Jan 24, 2018

Here are the log files (attached) -

meta_180123_190246.log
['bebop.py', 'testTakeoff'] navdata: logs/navdata_180123_190246.bin cmd: logs/cmd_180123_190246.bin console: logs/console_180123_190246.txt now: datetime.datetime(2018, 1, 23, 19, 2, 46, 362000)

log.zip

This is even happening on Linux.

@m3d
Copy link
Member

m3d commented Feb 1, 2018

Thanks for the log file - I can confirm partial reproduction of the problem. The first issue is probably 1 2 3 AssertionError 23 when it stops properly parsing the data. There is a quick workaround (or rather "hack") in
ccc9d6f
but it is not sufficient:

python navdata.py logs\navdata_180123_190246.bin
...
Piloting State change 9
Unknown ACK: 04 7E 1C 10 00 00 00 00 11 01 00 03 00 00 00 01
Traceback (most recent call last):
  File "navdata.py", line 415, in <module>
    data = parseData( data, robot, verbose=True )
  File "navdata.py", line 317, in parseData
    assert frameSize == 15, len(data)
AssertionError: 890

and this is in if branch

elif frameId == 0x0: # ARNETWORK_MANAGER_INTERNAL_BUFFER_ID_PING

... which I have not seen before :(.

@EmmanuelBousser
Copy link

@EmmanuelBousser
Copy link

i have the same error and it work for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants