User Tools

Site Tools


projects:crazyflie:pc_utils:install

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
projects:crazyflie:pc_utils:install [2015-09-09 10:33]
macke
projects:crazyflie:pc_utils:install [2015-09-10 11:00] (current)
macke
Line 1: Line 1:
-====== Crazyflie Python client installation ====== +In the interest of not duplicating instructions all the install instructions have been moved to [[https://github.com/bitcraze/crazyflie-clients-python/blob/develop/README.md README on GitHub]].
- +
-The Crazyflie PC utilities are developed using Python 2.7. The Crazyflie library is used from the command line tools as well as a graphical user interface. On Windows an installer permits to run the client without having to install any dependencies, on linux the client can easily be run from source code. There is also a [[misc:hacks:rasberrypi|Raspberry Pi hack to run the client headless (without the GUI and monitor)]]. +
-===== Installing on windows ===== +
- +
-Download and run the installer from the [[projects:crazyflie:binaries:index|binaries download page]]. A link called "Crazyflie client" will be created in the start menus. +
- +
-To install the Crazyradio dongle follow the instruction [[doc:crazyradio:install_win7|Install crazyradio driver on Windows 7]]. The procedure is similar for windows XP. For [[doc:crazyradio:install_win8|Windows 8]] you have to take care about the not signed driver. +
- +
-===== Installing on Linux ===== +
-The firmware and Python client can be downloaded as binaries from the  [[projects:crazyflie:binaries:index|binary download page]].  +
- +
-To run the client after downloading it without installation, run the ''cfclient'' in the ''bin'' folder, e.g.: +
-<code> +
-cd <cfclient folder> +
-python2 bin/cfclient +
-</code> +
- +
-You might want to [[doc:crazyflie:client:pycfclient:index#bootloader|flash the latest firmware version]]. Instructions on how to install the software for development, etc. can be found in the [[projects:crazyflie:pc_utils:dev_guide|developer guide]]. +
- +
-==== Automatic system-wide install using setup.sh ==== +
-By running the ''setup.sh'' script the client will automatically be installed as root and the udev rules will be added. If you would like to install the client as a normal user please follow the instructions above instead. +
- +
-<code> +
-cd crazyflie-clients-python +
-sudo sh setup.sh +
-</code> +
- +
-The client can then be run from any location using +
-<code> +
-cfclient +
-</code> +
- +
-==== Manual installation ==== +
- +
-=== Install dependencies ===  +
-The following has to be installed for the PC utilities to work: +
-  * Python 3.4 +
-  * pyGame +
-  * PyUSB (0.X or 1.X) +
-  * libusb +
-  * Python bindings for Qt4 +
- +
-The following will install these dependencies on Fedora (tested for 16 to 18). +
-<code> +
-sudo yum install pygame pyusb PyQt4 +
-</code> +
- +
-Or to install them on Ubuntu (tested for 15.04): +
-<code> +
-sudo apt-get install python3 python3-pip python3-pyqt4 python3-zmq python3-pyqtgraph +
-sudo pip3 install pyusb==1.0.0b2 +
-</code> +
- +
-This will install the dependencies in OpenSUSE (tested for 11.3): +
-<code> +
-sudo zypper install python-pygame libusb python-usb +
-</code> +
- +
-Note that these commands will pull in a lot of dependencies. +
- +
-=== Fix udev permissions (Linux, Debian, Raspbian Wheezy, etc.)=== +
-The following steps make it possible to use the USB Radio without being root. +
- +
-Note: If using a fresh Debian install, you may need to install sudo first (executing exit command to exit from root shell first): +
-<code>su - +
-apt-get install sudo</code> +
- +
-Note - installing sudo is probably not required if using Raspbian Wheezy on a Raspberry Pi +
- +
-Check if there is a plugdev group: +
-<code> +
-groups +
-</code> +
- +
-If there is not a plugdev group, then add a plugdev group: +
-<code> +
-sudo groupadd plugdev +
-</code> +
- +
-Now execute the following command: +
-<code> +
-sudo usermod -a -G plugdev <username> (the default username for a Raspberry Pi is: Pi) +
-</code> +
- +
-Create a file named /etc/udev/rules.d/99-crazyradio.rules  +
-<code> +
-sudo touch /etc/udev/rules.d/99-crazyradio.rules +
-</code> +
-and open the nano editor to edit the newly created 99-crazyradio.rules file you created +
-<code> +
-sudo nano /etc/udev/rules.d/99-crazyradio.rules +
-</code> +
- +
-The nano display will show there's no content in the file.  Paste the following as a line in editor: +
-<code> +
-SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="7777", MODE="0664", GROUP="plugdev" +
-</code> +
-and hit Ctl-O to 'write out' (i.e. save) the new line into the file.  Then Ctl-X to exit. +
- +
-Restart the computer and you are now able to access the USB radio dongle without being root. +
- +
-===== Running source code on Windows ===== +
- +
-This procedure is required if you want to develop with the Crazyflie client on Windows. If you just want to run and fly the Crazyflie follow the instruction to install the client above. +
-==== Windows XP ==== +
-The following has to be downloaded/installed for the PC utilities to work: +
-  * [[http://www.python.org/download/releases/ | Python 2.7]] (for Windows the last available binary version of Python 2.7 is [[http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi|Python 2.7.3]]) +
-  * [[http://pygame.org/download.shtml | pyGame]] for reading the input devices +
-  * [[http://sourceforge.net/projects/pyusb/files/latest/download | PyUSB 1.X]] for communicating with the Crazyradio +
-  * [[http://sourceforge.net/projects/libusb-win32/files/latest/download | libusb]] needed as backend for PyUSB +
-  * [[http://www.riverbankcomputing.co.uk/software/pyqt/download | PyQt4]] bindings for QT4 +
- +
-==== Windows Vista/7 32/64-bit==== +
-Even if you have a 64-bit install you should download the 32-bit versions of the libraries since this makes everything easier. +
- +
-The following has to be downloaded/installed for the PC utilities to work: +
-  * [[http://www.python.org/download/releases/ | Python 2.7]] (for Windows the last available binary version of Python 2.7 is [[http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi|Python 2.7.3]]) +
-  * [[http://pygame.org/download.shtml | pyGame]] for reading the input devices +
-  * [[http://sourceforge.net/projects/pyusb/files/latest/download | PyUSB 1.X]] for communicating with the Crazyradio +
-  * [[http://sourceforge.net/projects/libusb-win32/files/latest/download | libusb]] needed as backend for PyUSB +
-  * [[http://www.riverbankcomputing.co.uk/software/pyqt/download | PyQt4]] bindings for QT4 +
- +
-===== Installing on Mac OSX ===== +
-There are a few different options for getting setup on your Mac, choose one of the methods below: +
- +
-====Using homebrew==== +
-**IMPORTANT NOTE**: The following will use homebrew and it's own python distribution. If you have a lot of other 3rd party python stuff already running on your system they might or might not affected of this. +
- +
-  - Open a terminal and install [[http://mxcl.github.io/homebrew/|homebrew]]<code>ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"</code> You also need to install Command Line Tools for Xcode or [[https://developer.apple.com/xcode/|Xcode]] if you don't already have them installed. +
-  With homebrew installed, install it's distribution of Python: <code>brew install python</code> This will also pull [[http://www.pip-installer.org/en/latest/|pip]] which we will use later to install some Python modules that are not distributed through homebrew. +
-  - Now make sure that the new python version is used for non-homebrew applications. To do this we need to prepend this installation to our PYTHONPATH: <code> +
-echo 'export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH' >> ~/.bashrc +
-source ~/.bashrc</code> +
-  - Install SDL for Python:<code>brew install sdl sdl_image sdl_mixer sdl_ttf portmidi</code> +
-  - Install PyQT:<code>brew install pyqt</code> +
-  - Install libusb:<code>brew install libusb</code>  +
-  - Install Mercurial: <code>brew install mercurial</code> +
-  - Now use pip to install pyGame:<code>pip install hg+http://bitbucket.org/pygame/pygame</code> //As of 2013-05-08 the non-hg doesn't build correctly with brew installed SDL. Please update this when the fix as been pushed into the release version.// +
-  - Install pyusb:<code>pip install pyusb</code> +
- +
-You now have all the dependencies needed to run the client. [[projects:crazyflie:binaries:index#host_software|Download and extract the client]] and then start it by running the following in a terminal:<code>python bin/cfclient</code> +
-====Using MacPorts==== +
-  - If you do not have MacPorts installed yet please follow the [[http://www.macports.org/install.php|installation guide]]. +
-  - If you just installed MacPorts you can skip this step, otherwise make sure you update before you continue: <code>sudo port self update +
-sudo port upgrade outdated</code> +
-  - Then go ahead and install the dependencies needed for the crazyflie client, this will also bring in lots of other dependencies, especially Qt will take a while: <code>sudo port install -v python27 py27-pyqt4 py27-SDL2 py27-pyqtgraph py27-pyusb-devel</code> +
-  - To make it easier to run MacPorts binaries add ''/opt/local/bin'' to your ''PATH'' variable, The MacPorts installer should take care of that but take a look at ''~/.profile'' to make sure. If you have any issues it could be due to the libraries not getting picked up correctly, fix that by setting ''DYLD_LIBRARY_PATH'' to ''/opt/local/lib'' in ''~/.profile'': <code>export DYLD_LIBRARY_PATH=/opt/local/lib</code> +
-  - To ensure we use the MacPorts Python installation, select it using the 'port' command: <code>sudo port select --set python python27</code> +
-  - No you're good to go! [[projects:crazyflie:binaries:index#host_software|Download and extract the client]], change into the newly extracted directory, and then start the client by running the following in a terminal:<code>python bin/cfclient</code>+
projects/crazyflie/pc_utils/install.1441787592.txt.gz · Last modified: 2015-09-09 10:33 by macke