Linux Installation
These instructions tell you how to set up your own Linux environment for the course. When you get access to the hardware each group will be provided with an external SSD disk with the system installed like this that you can boot from on (almost) any computer (the exception being mainly newer versions of Mac).
Install Ubuntu
- Download the 16.04 desktop image from ubuntu.com
- Install ubuntu with user robot/robot
- Make sure that the system is updated
sudo apt-get update
sudo apt-get dist-upgrade
Install some editors, terminal, etc
- Download and install from https://code.visualstudio.com/download
Links to an external site.
- Install extension for C/C++, python, java, cmake, ROS, ...
- Install some basic packages
-
sudo apt-get install terminator git octave
-
- Install a wide variety of text editors
-
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - sudo apt-get install apt-transport-https echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list sudo apt-get update sudo apt-get install gedit emacs xemacs21 vim vim-gnome sublime-text
-
- Install an image and video editing software and sound recording software
-
sudo apt-get install gimp handbrake gnome-sound-recorder soundconverter vlc vokoscreen
-
- Install additional python packages
-
sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose python-pip python-dev python-virtualenv python-wstool
-
Install ROS and OpenCV 3
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 sudo apt-get update sudo apt-get install ros-kinetic-desktop-full ros-kinetic-libuvc-camera ros-kinetic-qt-create ros-kinetic-aruco python-catkin-tools protobuf-compiler libgoogle-glog-dev libeigen3-dev libxml2-utils ros-kinetic-mav-msgs cmake build-essential genromfs ninja-build inkscape sudo rosdep init
rosdep update
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc source ~/.bashrc
Give yourself the right to use the video receiver
Disconnect the video receiver and run
echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="18ec", MODE:="0666", GROUP:="plugdev"' | sudo sh -c 'dd of=/etc/udev/rules.d/99-uvc-receiver.rules 2>/dev/null && udevadm control --reload-rules && udevadm trigger'
Make sure that your user belongs to the `plugdev` group. You test this by issuing the command `id` on the command line which should result in something like
patric@PJZen:~$ id
uid=1000(patric) gid=1000(patric) groups=1000(patric),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),128(sambashare)
If you do not belong to the plugdev group issue the following command
sudo gpasswd -a $USER plugdev
You need to log out and in again for the new group properties to take effect.
Install Crazyflie software
cd ~/ mkdir crazyflie_software cd crazyflie_software
Install toolchain for building firmware and the firmware itself
Instruction can be found here https://github.com/KTH-CAS-UAV/crazyflie-firmware.git Links to an external site.
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa sudo apt-get update sudo apt-get install libnewlib-arm-none-eabi cd ~/crazyflie_software git clone --recursive https://github.com/KTH-CAS-UAV/crazyflie-firmware.git
cd crazyflie-firmware
make
Install cfclient
Instructions from https://github.com/bitcraze/crazyflie-clients-python Links to an external site.
cd ~/crazyflie_software sudo apt-get install python3 python3-pip python3-pyqt5 python3-pyqt5.qtsvg git clone https://github.com/bitcraze/crazyflie-clients-python.git cd crazyflie-clients-python pip3 install -e .
Make sure that the udev rules are set up correctly
sudo touch /etc/udev/rules.d/99-crazyradio.rules
Add the following to the file /etc/udev/rules.d/99-crazyradio.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="7777", MODE="0664", GROUP="plugdev"
Install the crazyflie python library
Instructions here https://github.com/bitcraze/crazyflie-lib-python Links to an external site.
cd ~/crazyflie_software git clone https://github.com/bitcraze/crazyflie-lib-python.git cd crazyflie-lib-python
pip install transforms3d
pip install -r requirements.txt