Good idea with the native client installation. After doing that and repeating the firmware flash, the LEDs started to behave properly and I managed to connect to the Crazyflie and receive telemetry from the gyroscope, battery, etc. The VM seems to be much more unpredictable, sometimes connecting to the drone and other times not, but it's much better than where I was at before so that is okay with me. However, even though I can connect to the Crazyflie through the client, I am still unable to connect to it through the Python IDLE.
After successfully establishing a connection to the Crazyflie within the client (so that I was receiving real-time flight data), I proceeded to attempt to run a Python code. The code I chose was 'flowsequenceSync.py,' which is a pre-programmed flight path that seemed like a good starting point for testing. However, running the script produced an error output which I have attached in the two screenshots below (it is quite long, and I'm sorry for posting so much information especially since much of it is duplicated, but I figured I might as well show the entire error output). The problem seems to revolve around the radio or USB drivers, but I'm not sure how. The most common piece throughout the output is this "Couldn't load link driver: [Errno 16] Resource busy".
From browsing other forum posts, it seems like one potential solution may be to retry the whole process using the libusbK driver rather than the libusb-win32 that I am currently using. Could this be helpful? I am hesitant to alter my driver as it took a lot of time to get to the point where I am at now, and I don't want to lose progress by taking unnecessary steps.
[Beginner] Help with Python Client
-
- Beginner
- Posts: 9
- Joined: Mon Mar 05, 2018 5:43 am
Re: [Beginner] Help with Python Client
It looks like you are running your python script while the client is connected to the Crazyflie. This is not possible since the will both wants exclusive control of the Crazyradio and it would explain the error message.
Have you tried to run your script without connecting from the client first?
Have you tried to run your script without connecting from the client first?
-
- Beginner
- Posts: 9
- Joined: Mon Mar 05, 2018 5:43 am
Re: [Beginner] Help with Python Client
That solved it! My mistake, I just assumed that I would need to use the client to connect to the Crazyflie before I would be able to run Python code. Thanks for your help Arnaud!
Re: [Beginner] Help with Python Client
Great! Happy that you got it up an running .
Re: [Beginner] Help with Python Client
I think you figured something out with the LEDs. According to the Getting Started page, connecting the USB should initiate a self-test, which ideally will cause the M4 LED to flash green five times, as you said. When I turn on the Crazyflie, only the M2 LED (rear right) lights up, solid blue. I also tried connecting the drone to my phone via the Crazyflie app, which was also the first thing I did after building it a few weeks ago. When I tried it then, it worked, and I could get the drone to fly. However, when I tried the same thing a few minutes ago, I couldn't. The only thing I was able to do was to install https://www.amazon.com/Flagpole-Energy-Battery-Illumunation-Vont/dp/B00YBDA7DC/ myself. Do you like it?