|
|
**Download the firmware to the Crazyflie**
|
|
|
|
|
|
Install the Bitcraze's virtual machine by following the steps from:
|
|
|
|
|
|
https://wiki.bitcraze.io/projects:virtualmachine:index
|
|
|
|
|
|
Download the folder crazyflie-firmware-src/src from the gitlab.
|
|
|
|
|
|
In the installed virtual machine navigate to the crazyflie firmware project files and replace the src folder with the downloaded src folder.
|
|
|
|
|
|
In order to download the firmware to the crazyflie, follow the instructions given in the appendix of the following thesis report: "Setup of a Distributed Autonomous Flying Test Bed using nano quadcopters" by Aleksandra Kim & Jeremias Seitz
|
|
|
|
|
|
**Add UDEV rules**
|
|
|
|
|
|
navigate to: etc/udev/rules.d
|
|
|
|
|
|
1. create a flie named 99-crazyflie.rules with the following content:
|
|
|
|
|
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", MODE="0664", GROUP="plugdev"
|
|
|
|
|
|
2. create a file named 99-crazyradio.rules with the following content:
|
|
|
|
|
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="7777", MODE="0664", GROUP="plugdev"
|
|
|
|
|
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="0101", MODE="0664", GROUP="plugdev"
|
|
|
|
|
|
|
|
|
**SETUP ROS**
|
|
|
|
|
|
Install ROS by following the instructions from
|
|
|
|
|
|
http://wiki.ros.org/ROS/Installation
|
|
|
|
|
|
***Set up a new ROS workspace:***
|
|
|
|
|
|
Run the following commands, by changing <distro> with the name of the installed ROS distribution:
|
|
|
|
|
|
`source /opt/ros/<distro>/setup.bash`
|
|
|
|
|
|
`rosws init ~/crazyflie_ws /opt/ros/<distro>`
|
|
|
|
|
|
`sudo apt-get install python-rosinstall`
|
|
|
|
|
|
`mkdir ~/crazyflie_ws /sandbox`
|
|
|
|
|
|
`rosws set ~/crazyflie_ws /sandbox`
|
|
|
|
|
|
`source ~/crazyflie_ws/setup.bash`
|
|
|
|
|
|
For a detailed explanation of the meaning of each of the commands, see
|
|
|
|
|
|
http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment
|
|
|
|
|
|
|
|
|
***Create a new ROS package:***
|
|
|
|
|
|
`cd ~/crazyflie_ws/sandbox`
|
|
|
|
|
|
`roscreate-pkg crazypkg std_msgs rospy roscpp`
|
|
|
|
|
|
Download the crazyflie_ws folder from gitlab and copy the content of the crazypkg folder (crazyflie_ws/sandbox/crazypkg/) into the crazypkg folder of the workspace created in the previous step (~/crazyflie_ws /sandbox/crazypkg).
|
|
|
|
|
|
Run the following commands
|
|
|
|
|
|
`rospack profile`
|
|
|
|
|
|
`rosmake crazypkg`
|
|
|
|
|
|
source:
|
|
|
|
|
|
http://wiki.ros.org/ROS/Tutorials/CreatingPackage
|
|
|
|
|
|
http://wiki.ros.org/ROS/Tutorials/BuildingPackages
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**Run the system**
|
|
|
|
|
|
In the command window run:
|
|
|
|
|
|
`roscore`
|
|
|
|
|
|
open a new command window and run the following commands:
|
|
|
|
|
|
`source ~/crazyflie_ws/setup.bash`
|
|
|
|
|
|
`roslaunch crazypkg crazyLaunch.launch `
|
|
|
|
|
|
|