Getting Started

Installation and Usage

How to install and use DroneForce

Setting up DroneForce

  • Create your workspace
mkdir -p ~/df_ws/src && cd ~/df_ws/src
  • Clone DroneForce
git clone https://github.com/Embedded-Fault-Tolerant-Control/DroneForce
git clone --recursive https://github.com/ArduPilot/ardupilot
  • Clone Ardupilot-Gazebo and set it up (optional)
git clone https://github.com/SwiftGust/ardupilot_gazebo
  • Install prerequisites with pip
cd ~/df_ws/src/DroneForce
pip install -r requirements.txt
  • Install Terminator (for multiple terminal windows)
sudo apt install terminator
  • Ensure you have ROS setup already in your ws (tested on Noetic)

Using DroneForce in your project

GPS dependant

For simulation, run:

Open up the following terminals

mavproxy.py --master 127.0.0.1:14551 --out=udp:127.0.0.1:14552 --out=udp:127.0.0.1:14553 --out=udp:127.0.0.1:14554
cd ~/df_ws/src/ardupilot_gazebo/worlds 
gazebo --verbose iris_ardupilot.world
  1. Only when you need to generate a trajectory (ideally after drone is hovering and stable)
cd ~/df_ws/src/DroneForce/tests
python3 test-26-trajectory-generator.py
cd ~/df_ws/src/ardupilot/Tools/autotest

For Gazebo simulation:

python3 sim_vehicle.py -v ArduCopter -f gazebo-iris -m --mav10

For headless simulation:

python3 sim_vehicle.py -v ArduCopter -f X -m --mav10
  1. Source your ROS setup if you already haven't, before running this step
roslaunch mavros apm.launch fcu_url:=udp://:14553@
  1. When you want to record a rosbag file
cd ~/df_ws/src/DroneForce/dist
rosbag record -a
  1. Actual test file for the controller
cd ~/df_ws/src/DroneForce/tests
python3 test-26-pid-hold.py

For real, run:

Open up the following terminals

  1. Ensure your Pixhawk hardware running ArduPilot firmware is already connected
mavproxy.py --master=/dev/ttyUSB0 --out=udp:127.0.0.1:14552 --out=udp:127.0.0.1:14553 --out=udp:127.0.0.1:14554
  1. Only when you need to generate a trajectory (ideally after drone is hovering and stable)
cd ~/df_ws/src/DroneForce/tests
python3 test-26-trajectory-generator.py
  1. Source your ROS setup if you already haven't, before running this step
roslaunch mavros apm.launch fcu_url:=udp://:14553@
  1. When you want to record a rosbag file
cd ~/df_ws/src/DroneForce/dist
rosbag record -a
  1. Actual test file for the controller
cd ~/df_ws/src/DroneForce/tests
python3 test-26-pid-hold.py

Motion-capture dependant

  • (To-do)
Edit this page on GitHub
Built at the Robotics Research Centre, IIIT-H