Skip to content

This is an autopilot for DuctedFanUAV, forked from PX4-Aotupilot, supports gazebo simulation (ubuntu/macOS), and has been flight tested on DFUAV equipped with pixhawk.

License

Notifications You must be signed in to change notification settings

mengchaoheng/DuctedFanUAV-Autopilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

DuctedFanUAV Autopilot

This repository forked from [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot.git) for holds the PX4 flight control solution for DuctedFanUAV. It also contains the INDI controller, and a control allocator based on [Library of Control Allocation Algorithms](https://github.com/mengchaoheng/control_allocation.git).

image

Featrue

Our development work is now mainly concentrated on the df-1.12.3 branch, based on the v1.12.3 version of px4.

  • An angular velocity controller based on the INDI control algorithm for DFUAV.
  • Control allocator based on linear programming algorithm. Currently only ductedfan4 is supported, but it can be easily changed to support other models.
  • Supported airframes:
    • ductedfan2: DFUAV with two control surfaces and two rotors.
    • ductedfan4: DFUAV with four control surfaces and one rotor.
    • ductedfan6: DFUAV with six control surfaces and one rotor.
    • ductedfan_mini: mini DFUAV with four control surfaces and one rotor.
    • ToDo: many more experimental types based on Ducted Fan.
  • Supports gazebo-based simulation (Gazebo Classic) and can easily communicate with the ros package. We implement DuctedFanUAV simulation by modifying the gazebo model and plugins, more detail in DF_gazebo which forked from PX4-SITL_gazebo-classic (sitl_gazebo).
  • We have performed extensive flight tests with DuctedFanUAV equipped with Pixhawk.

Installation

Before running this project, you need to deploy the development environment. Please refer to the PX4 official website (v1.12) to ensure that your computer (macOS/Linux) can open the default model simulation by executing the make px4_sitl gazebo or make px4_sitl gazebo-classic command and take off through QGC or terminal commands. It's recommended to use Ubuntu 20.04 and QGC 4.2.9.

It's easy to upgrade this project to the latest version of px4, just make sure that the Gazebo Classic environment is deployed in a supported ubuntu version, but we need a lot of testing before doing so.

Due to Ubuntu 22.04 or later with Arm64 architecture cannot install gazebo, the gazebo classical may not run on arm64-based Ubuntu 22 and later versions. However, AMD should still support it. As long as the px4 official gazebo classical simulation can run, the code in this repository can be executed.

The PX4 User Guide explains how to assemble supported vehicles and fly drones with PX4. See the forum and chat if you need help!

For Ubuntu 20.04, installing the simulation environment is quite straightforward:

  1. Install git:
sudo apt install git
  1. Clone code:
git clone https://github.com/mengchaoheng/DuctedFanUAV-Autopilot --recursive
  1. Go to the path of the code:
cd DuctedFanUAV-Autopilot
  1. Run the ubuntu.sh with no arguments (in a bash shell) to install everything:
# For arm64-based ubuntu. See https://github.com/PX4/PX4-Autopilot/issues/21117
bash ./Tools/setup/ubuntu.sh

Or download the development environment deployment script from the official website.

wget https://raw.githubusercontent.com/PX4/PX4-Autopilot/main/Tools/setup/ubuntu.sh
wget https://raw.githubusercontent.com/PX4/PX4-Autopilot/main/Tools/setup/requirements.txt
bash ubuntu.sh
  1. Start Gazebo SITL using the following command:

5.1 Test the built-in quadcopter simulation:

make px4_sitl gazebo

5.2 Test the simulation of this project:

make px4_sitl gazebo_ductedfan4

Note: In Ubuntu 22.04 and higher versions, Gazebo Classic is no longer supported on arm64 Ubuntu. If Gazebo was installed using a script on amd64 Ubuntu, it needs to be uninstalled and reinstalled:

sudo apt remove gz-harmonic
sudo apt install aptitude
sudo aptitude install gazebo libgazebo11 libgazebo-dev

Usage

Clone this repository:

git clone https://github.com/mengchaoheng/DuctedFanUAV-Autopilot.git

cd DuctedFanUAV-Autopilot

Make sure you're on the df-1.12.3 branch. You can use git status to check it.

git checkout df-1.12.3

Ensure that the required submodules for loading the df-1.12.3 branch are loaded.

git submodule update --init --recursive

When switching branches or wishing to recompile, you can use

make distclean

to keep a clean compilation, and then run

git submodule update --init --recursive

again to rebuild, The compilation command is as follows.

Note: px4 is not sensitive to the Python environment, but you need to ensure that you have installed the required Python packages. Refer to Development Environment Deployment

Simulation

  1. ductedfan2
make px4_sitl gazebo_ductedfan2
  1. ductedfan4
make px4_sitl gazebo_ductedfan4
  1. ductedfan6
make px4_sitl gazebo_ductedfan6
  1. ductedfan_mini
make px4_sitl gazebo_ductedfan_mini

Flight with pixhawk

Taking pixhawk 4 as an example, the upload command is:

make px4_fmu-v5 upload

Other versions are similar, please refer to the official website for more details.

About

This is an autopilot for DuctedFanUAV, forked from PX4-Aotupilot, supports gazebo simulation (ubuntu/macOS), and has been flight tested on DFUAV equipped with pixhawk.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 453