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

struct.error while using opencv-viewer.py #70

Open
matze946 opened this issue Apr 7, 2022 · 11 comments
Open

struct.error while using opencv-viewer.py #70

matze946 opened this issue Apr 7, 2022 · 11 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@matze946
Copy link

matze946 commented Apr 7, 2022

Hey :)
I tried to use the opencv-viewer.py and got a struct.error message

Connecting to socket on 192.168.4.1:5000... Socket connected Traceback (most recent call last): File "streamer.py", line 86, in <module> [magic, width, height, depth, format, size] = struct.unpack('<BHHBBI', imgHeader) struct.error: unpack requires a buffer of 11 bytes

Any ideas how to solve this?

@knmcguire
Copy link
Member

Hi! Did you update your wifi example with the latest example? or are you trying it out right out of the box? You would probably need to revert the examples to this commit: bdcca78 in that case.

@knmcguire knmcguire added bug Something isn't working documentation Improvements or additions to documentation labels Apr 7, 2022
@matze946
Copy link
Author

matze946 commented Apr 8, 2022

Yes I first used it without updating to the latest example. But after updating the examples the error is still the same..

@evoggy
Copy link
Member

evoggy commented Apr 12, 2022

I haven't seen this before. Do you get this the first time you connect as well? Or is it only after disconnecting/connecting again?

@matze946
Copy link
Author

Yes I also get the error the first time I connect

@kjayarajah
Copy link

Anybody have any luck with this? I'm having this issue even after going back to the older commit. Thanks in advance for any help -- been stuck with this for several days.

@matze946
Copy link
Author

matze946 commented May 6, 2022

I updated everything again like in the getting started pages [https://www.bitcraze.io/documentation/tutorials/getting-started-with-aideck/]
That solved the problem for me, but now I am still not able to stream the images with the opencv-viewer.py
It says that I am connected to the socket, but I can't see the viewer.
Any advice on that issue?

@knmcguire
Copy link
Member

Good you fixed that build problem.

Were you able to flash over air the wifi example okay without error? Are you connected to the aodeck as accesspoint or is it connecting to wifi itself?

@matze946
Copy link
Author

matze946 commented May 6, 2022

Yes I was able to flash the wifi example using the radio without any errors and I'm connected with the aideck as accesspoint.

@knmcguire
Copy link
Member

Ah oke. Sometimes I had to powercycle my crazyflie a time or two before it was connected. You can also have feedback from the console tab of the Cfclient for any cpx readouts. Usually it would say if it manage to establish a connection or if anything failed. If the camera failed to initialized for instance, you'll see that in the console tab.

@matze946
Copy link
Author

matze946 commented May 9, 2022

Thank you so much. This helped to get it to work properly. Now I'm able to see the stream again.

@knmcguire
Copy link
Member

ah great! we are trying to work on the stability of it all, as it should not be necessary to constantly restart it... but I'll keep it open here so that other people know of it if they are seeing the same thing of what they should do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants