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

Make the GUI pop-up #8

Open
joboiss opened this issue Aug 3, 2024 · 6 comments
Open

Make the GUI pop-up #8

joboiss opened this issue Aug 3, 2024 · 6 comments

Comments

@joboiss
Copy link

joboiss commented Aug 3, 2024

Hi,
I did the raspberry readme. everything works well. Now the GUI does not pop-up.

I ran this code on my window 11 computer

from cognifly import Cognifly

# connect to the drone and pop the GUI:
cf = Cognifly(drone_hostname="my_drone_name.local")

time.sleep(10.0)

when I interrupt the program it gives me this response.

Traceback (most recent call last):
File "C:\Users\jonfe\Documents\DRONE\cognifly\test.py", line 5, in
cf = Cognifly(drone_hostname="cognifly.local")
File "C:\Users\jonfe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\cognifly\cognifly_remote\cognifly_remote.py", line 211, in init
self.reset()
File "C:\Users\jonfe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\cognifly\cognifly_remote\cognifly_remote.py", line 417, in reset
time.sleep(sleep_duration)

How could I resolve the issue?

@yannbouteiller
Copy link
Collaborator

It looks like the Cognifly object cannot reach the CogniflyController object running on the raspberry pi via your local network.

@joboiss
Copy link
Author

joboiss commented Aug 3, 2024

I will try on a more permissible network then.

@joboiss
Copy link
Author

joboiss commented Aug 6, 2024

Hi @yannbouteiller, I have tried running the code on another network and I ran the code on a pi 5 but both of these solutions failed. Also I tried with the IP address of the drone, but this did not resolve the issue.
Do you have a recommended setup for the cognifly to run successfully on a machine

@yannbouteiller
Copy link
Collaborator

Mmh, first, can you successfully ping the raspberry pi from your machine ?

Also, is the cognifly-controller script properly running on the raspberry pi while you are trying to launch the remote on your machine ?

If you manually instantiate a CogniflyController object, can you share the code snippet?

@joboiss
Copy link
Author

joboiss commented Aug 9, 2024

  1. yes I can ping the raspberry pi zero from my machine.
  2. here is a screen capture of the script running on my machine and the window of the ssh session connected to my pi zero.
    screen

Is it possible that the problem comes from the fact that my FC is not yet soldered to the pi zero?

@yannbouteiller
Copy link
Collaborator

Ah I see, yes, the script is not running properly on the pi. Probably it is trying to communicate with the FC and waiting for an answer.

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

2 participants