[Beginner] Help with Python Client

Post here to get support
VeryConfused
Beginner
Posts: 9
Joined: Mon Mar 05, 2018 5:43 am

Re: [Beginner] Help with Python Client

Post by VeryConfused » Fri Mar 23, 2018 4:43 am

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.
Attachments
erroroutput1.PNG
First half of Python error output
erroroutput2.PNG
Second half of Python error output

arnaud
Bitcraze
Posts: 1671
Joined: Tue Feb 06, 2007 12:36 pm

Re: [Beginner] Help with Python Client

Post by arnaud » Mon Mar 26, 2018 10:16 am

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?

VeryConfused
Beginner
Posts: 9
Joined: Mon Mar 05, 2018 5:43 am

Re: [Beginner] Help with Python Client

Post by VeryConfused » Mon Mar 26, 2018 5:52 pm

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!

arnaud
Bitcraze
Posts: 1671
Joined: Tue Feb 06, 2007 12:36 pm

Re: [Beginner] Help with Python Client

Post by arnaud » Wed Mar 28, 2018 7:44 am

Great! Happy that you got it up an running :).

Post Reply