Skip to content

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

License

Notifications You must be signed in to change notification settings

mwlock/crazyflie_mpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published