10. Practical 5: Crazyflie with aerostack2

In this fifth practical, we will reimplement manual flight and scripted autonomous flight of crazyflies via aerostack2.

10.1 Clone and build aerostack2 package: as2_platform_crazyflie

First step is to clone and build another aerostack2 package called as2_platform_crazyflie.

Please follow the instructions here before aerostack2 common interface.

NOTE: Use source installation and clone the package in the src folder under your aerostack2 workspace.

**NOTE: The documentation may use the "git@.." and you may have issues with ssh. Go to the github repository and use the "https://..." version!

10.2 Clone project_crazyflie into your aerostack2 workspace

Then, you need to clone the project_crazyflie into your aerostack2 workspace.

Follow the instructions here.

10.3 Change radio channel in config file

To be able to connect to your crazyflie, you need to change the setting of radio channel in the package's config file.

This can be done by accessing the config/config.yaml: configuration file for the Crazyflie drones.

NOTE: Make sure the radio channel set in the config file matches the channel you plan to use in the cfclient GUI, as done in the previous lab. Inconsistent channels will prevent the drone from connecting.

Please read through instructions here.

10.4 Teleoperate and autonomously fly crazyflie via aerostack2

Now, you should be able to lanuch the project, connect to, teleoperate, and autonomously fly your crazyflie.

Follow instructions here.

NOTE: 1.Before launch any bash file, disconnect your crazyflie with your cfclient which may occupy the radio channel. 2. After each flight, you have to manually restart your crazyflie.

NOTE: 2. After each flight, you have to manually restart your crazyflie.If you find the Crazyflie remains unresponsive after a flight or changing configs, physically unplug the battery for a few seconds, then reconnect it.

NOTE: 3. Always test your Crazyflie in an open, safe area free of obstacles, and with safety googles on, especially when first trying autonomous flight. Keep emergency stop in mind if something goes wrong.