Beginner question
Beginner question
Hi,
I'm a beginner of Crazyflie ,and I want to develope a program on PC to control my Crazyflie.
I have learned C++ programing and I find that the Crazyflie may be developed by Python.
So, what should I do?
Learning Python Programing and what else?
Thank you !~
I'm a beginner of Crazyflie ,and I want to develope a program on PC to control my Crazyflie.
I have learned C++ programing and I find that the Crazyflie may be developed by Python.
So, what should I do?
Learning Python Programing and what else?
Thank you !~
Re: Beginner question
Python is great for making progress quickly so it might be worth learning. There are some examples in the example folder in the cfclient and also here.
Re: Beginner question
I'm learning the Python programing. Thanks a lot.tobias wrote:Python is great for making progress quickly so it might be worth learning. There are some examples in the example folder in the cfclient and also here.
Re: Beginner question
How should I run the Sample in eclipse? Besides python2.7 and pyqt4, anything else needed?tobias wrote:Python is great for making progress quickly so it might be worth learning. There are some examples in the example folder in the cfclient and also here.
Re: Beginner question
There are some additional dependencies (pyusb, pygame etc.), but if you are able to run the cfclient, you have most likely everything you need.
For the beginning, you should try to run the samples directly without eclipse. Open a command prompt, navigate to the folder with the samples, and type "python ramp.py". This should find your flie, connect to it and ramp up the motors.
I am not sure how easy it is to get going with eclipse, however you can also use PyCharm (https://www.jetbrains.com/pycharm/). There you simply open the file (e.g. ramp.py) and select Run and it should do everything else for you (i.e. no separate project file needed etc.).
For the beginning, you should try to run the samples directly without eclipse. Open a command prompt, navigate to the folder with the samples, and type "python ramp.py". This should find your flie, connect to it and ramp up the motors.
I am not sure how easy it is to get going with eclipse, however you can also use PyCharm (https://www.jetbrains.com/pycharm/). There you simply open the file (e.g. ramp.py) and select Run and it should do everything else for you (i.e. no separate project file needed etc.).
Re: Beginner question
I downloaded the PyCharm 3.4.1 and import the crazyflie-clients-python-master(download fromhttps://github.com/bitcraze/crazyflie-clients-python) into the PyCharm.whoenig wrote:There are some additional dependencies (pyusb, pygame etc.), but if you are able to run the cfclient, you have most likely everything you need.
For the beginning, you should try to run the samples directly without eclipse. Open a command prompt, navigate to the folder with the samples, and type "python ramp.py". This should find your flie, connect to it and ramp up the motors.
I am not sure how easy it is to get going with eclipse, however you can also use PyCharm (https://www.jetbrains.com/pycharm/). There you simply open the file (e.g. ramp.py) and select Run and it should do everything else for you (i.e. no separate project file needed etc.).
Then, I ran the ramp.py ,but it says "ImportError: No module named usb".
So,How should I do now?
I have already download the pyusb and libusb from the install page of wiki(http://wiki.bitcraze.se/projects:crazyf ... ls:install),and installed the PyQt4 64bits pyGame 64bits for my Python 2.7.6 64bits. My computer system is Win7 - 64bits.
Re: Beginner question
It sounds like it can't find pyusb. How did you install it? Did you run ?
Code: Select all
python setup.py install
Re: Beginner question
I do the same way in your advices and it doesn't works.whoenig wrote:It sounds like it can't find pyusb. How did you install it? Did you run?Code: Select all
python setup.py install
it says that:
Traceback (most recent call last):
File "setup.py",line 16, in (module)
raise Exception("Cannot run git: Git is required to generate packages!")
Exception:Cannot run git:Git is required to generate packages!
BTW: I don't know how to post a photo,so I type the code above~
Re: Beginner question
My probleme solved!~whoenig wrote:It sounds like it can't find pyusb. How did you install it? Did you run?Code: Select all
python setup.py install
First of all, I open the cmd.exe and run the setup.py of pyusb file ,
then I copy the file named "usb" to the crazyflie-clients-python-masters file
Finally, I run the "cfclient" in bin in PyCharm and it works~
BTW: There are still some modules needed for the crazyflie client.
For example:
scipy,numpy,pyqtgragh and etc.
Re: Beginner question
Though I could run the client in the PyCharm, I still don't know how to run the setup.py in cmd.exe...whoenig wrote:It sounds like it can't find pyusb. How did you install it? Did you run?Code: Select all
python setup.py install