Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1 KB

readme.md

File metadata and controls

44 lines (30 loc) · 1 KB

crazyflie_mpc

ROS 2 package implementing a Model Predictive Control (MPC) system for precise and real-time control of the Crazyflie 2.1 quadcopter.

Dependencies

The official Crazyswarm2 package had not implemented everything needed for my simulation purposes. Therefore, this controller is built against my own fork of the Crazyswarm2 package, which can be found here.

Installation

  1. Clone the repository into your ROS 2 workspace.

  2. Install the required dependencies:

python -m pip install casadi
python -m pip install numpy
python -m pip install osqp
rosdep install --from-paths src --ignore-src -r -y
  1. Build the package:
colcon build --symlink-install

Run Example

Start the Crazyflie 2.1 simulation:

ros2 launch crazyflie launch.py backend:=sim

Start the MPC controller:

source install/setup.bash
ros2 launch crazyflie_mpc spiral_example.launch.py