|
**Download the firmware to the Crazyflie**
|
|
**Download the firmware to the Crazyflie**
|
|
|
|
|
|
|
|
The firmware is the actual code that runs on the Crazyflie 2.0 quadcopter. As the crazyflie is designed with research in mind, the developer, Bitcraze, provides an easy to use interface for flashing new code onto the crazyflie's microprocessor. Following steps describe downloading the firmware onto the crazyflie:
|
|
|
|
|
|
Install the Bitcraze's virtual machine by following the steps from:
|
|
Install the Bitcraze's virtual machine by following the steps from:
|
|
|
|
|
|
https://wiki.bitcraze.io/projects:virtualmachine:index
|
|
https://wiki.bitcraze.io/projects:virtualmachine:index
|
... | @@ -10,7 +12,9 @@ In the installed virtual machine navigate to the crazyflie firmware project file |
... | @@ -10,7 +12,9 @@ In the installed virtual machine navigate to the crazyflie firmware project file |
|
|
|
|
|
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
|
|
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**
|
|
**Add UDEV rules for Crazyradio and Crazyflie**
|
|
|
|
|
|
|
|
We have to add udev rule that starts up the client when the Crazyflie is inserted and kills it when it's removed. We should also have a rule that allows us to use the Crazyradio bootloader with out being root.
|
|
|
|
|
|
navigate to: etc/udev/rules.d
|
|
navigate to: etc/udev/rules.d
|
|
|
|
|
... | @@ -27,6 +31,8 @@ SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="0101", MODE="0664" |
... | @@ -27,6 +31,8 @@ SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="0101", MODE="0664" |
|
|
|
|
|
**SETUP ROS**
|
|
**SETUP ROS**
|
|
|
|
|
|
|
|
Offboard controller, GUI, Vicon data acquisition, and sending data by the crazyradio are different tasks implemented offboard and connected using the robotic operating system (ROS). Before running the code, ROS has to be appropriately set up.
|
|
|
|
|
|
Install ROS by following the instructions from
|
|
Install ROS by following the instructions from
|
|
|
|
|
|
http://wiki.ros.org/ROS/Installation
|
|
http://wiki.ros.org/ROS/Installation
|
... | @@ -85,6 +91,48 @@ open a new command window and run the following commands: |
... | @@ -85,6 +91,48 @@ open a new command window and run the following commands: |
|
|
|
|
|
`source ~/crazyflie_ws/setup.bash`
|
|
`source ~/crazyflie_ws/setup.bash`
|
|
|
|
|
|
`roslaunch crazypkg crazyLaunch.launch `
|
|
`roslaunch crazypkg crazyLaunch.launch`
|
|
|
|
|
|
|
|
After running the previous command, GUI should be visible on the screen
|
|
|
|
|
|
|
|
![guiCFlabeled](/uploads/3278c1cdd3c1c8ed1cff6c9113c5cf74/guiCFlabeled.png)
|
|
|
|
|
|
|
|
Different features of the GUI are labeled in red and described in the following way:
|
|
|
|
|
|
|
|
1) Start/Stop button starts or stops the controllers. In the stop mode zero motor commands are sent to the crazyflie which stop the motors.
|
|
|
|
|
|
|
|
2) Reset the controllers to the initial conditions
|
|
|
|
|
|
|
|
3) Switch between different controller architectures and change the sampling rate.
|
|
|
|
|
|
|
|
PID Position - Nested rate and attitude controllers are implemented onboard. Position PID controller is implemented offboard.
|
|
|
|
|
|
|
|
PID Angle - Rate controller is implemented onboard. Nested position and attitude PID controllers are implmented offboard.
|
|
|
|
|
|
|
|
PID Full - Whole PID control algorithm is implemented offbard. Motor commands are sent to the crazyflie
|
|
|
|
|
|
|
|
LQR Full - Whole LQR control algorithm is implemented offboard. Currently this case is not completed and this controller structure should not be selected.
|
|
|
|
|
|
|
|
LQR Nested onboard - Rate controller is implemented onboard. LQR controller that outputs rate setpoints and thrust commands is implemented offboard.
|
|
|
|
|
|
|
|
LQR Nested offboard - Rate controller is implemented offboard as well as the LQR controller that outputs rate setpoints and thrust commands. Currently this case is not completed and this controller structure should not be selected.
|
|
|
|
|
|
|
|
The three test controllers are used to check if the hardware is connected properly as well as to check the communication with the crazyflie. Sliders are used to set the desired setpoint value.
|
|
|
|
|
|
|
|
4) In order to change the crazyflie's position setpoint, type the appropriate values in the boxes and press change button. Curr pos changes the setpoint to be at the current crazyflies position. Home button changes the setpoint to the hardcoded values. z=200 changes only the z position setpoint to 200mm, in order to land the crazyflie. All of this actions are considered if the custom radio button is selected. Circle and square radio buttons allow for automatic setpoint changes for following the predefined path.
|
|
|
|
|
|
|
|
5) Indicates if the rate controller is run onboard or offboard. Allows to change the sampling rate of the offboard controller. Onboard controller sample rate can not be changed.
|
|
|
|
|
|
|
|
6) Change the feedforward commands
|
|
|
|
|
|
|
|
7) Display the last package sent to the crazyflie over the crazyradio.
|
|
|
|
|
|
|
|
8) *Print controller info* - prints the information about the whole controller system in the command window. *Set default Ts* - sets all sample rates to default ones. *Set default ff cmd* - sets all feedforward commands to the default ones.
|
|
|
|
|
|
|
|
9) Displays the localization data obtained by the Vicon's motion capture system
|
|
|
|
|
|
|
|
10) Counts the number of missed measurements. If the crazyflie is operating in the area covered by Vicon cameras field of view, this should stay zero.
|
|
|
|
|
|
|
|
11) Starts and stops the pitch and roll offset calibration while hovering.
|
|
|
|
|
|
|
|
12) Allows to switch between control and parameter tabs. Control tab is depicted in the image above, while the parameters tab opens a table with controller parameters that can be changed in-flight. |
|
|
|
\ No newline at end of file |