This control will work as is with the ros interface to the now discontinued Asctec research platforms (Hummingbird, Pelican, Firefly and Neo).
### Pixhawk
This controller requires some small modifications to the PX4 firmware to allow yaw rate inputs. A modified version of the firmware can be found [here](https://github.com/ethz-asl/ethzasl_mav_px4). The firmware is interfaced with through a [modified mavros node](https://github.com/ethz-asl/mavros).
### DJI
The controller can interface with DJI platforms through our [mav_dji_ros_interface](https://github.com/ethz-asl/mav_dji_ros_interface)
Published and subscribed topics
------
The linear and nonlinear MPC controllers publish and subscribe to the following topics:
- Published topics:
-**`command/roll_pitch_yawrate_thrust`** of type `mav_msgs/RollPitchYawrateThrust`. This is the command to the low level controller. Angles are in `rad` and `thrust` is in `N`.
-**`command/current_reference`** of type `trajectory_msgs/MultiDOFJointTrajectory`. This is the current reference.
-**`state_machine/state_info`** of type `std_msgs/String`. This is the current state of the state machine of mav_control_interface.
-**`predicted_state`** of type `visualization_msgs/Marker`. This is the predicted vehicle positions that can be used for visualization in `rviz`.
-**`reference_trajectory`** of type `visualization_msgs/Marker`. This is the reference trajectory that can be used for visualization in `rviz`.
-**`KF_observer/observer_state`** of type `mav_disturbance_observer/ObserverState`. This is the disturbance observer state used for debugging purposes. It includes estimated external forces and torques.
- Subscribed topics:
-**`command/pose`** of type `geometry_msgs/PoseStamped`. This is a reference set point.
-**`command/trajectory`** of type `trajectory_msgs/MultiDOFJointTrajectory`. This is a desired trajectory reference that includes desired velocities and accelerations.
-**`rc`** of type `sensor_msgs/Joy`. This is the remote control commands for teleoperation purposes. It also serves to abort mission anytime.
-**`odometry`** of type `nav_msgs/Odometry`. This is the current state of the vehicle. The odometry msg includes pose and twist information.
The PID attitude controller publishes and subscribes to the following topics:
- Published topics:
-**`command/motor_speed`** of type `mav_msgs/Actuators`. This is the commanded motor speed.
- Subscribed topics:
-**`command/roll_pitch_yawrate_thrust`** of type `mav_msgs/RollPitchYawrateThrust`.
-**`odometry`** of type `nav_msgs/Odometry`.
Parameters
------
A summary of the linear and nonlinear MPC parameters:
|`max_integrator_error` | saturation on the integrator |
\* Through dynamic reconfigure, it is possible to change these parameters.
--------
References
------
[1] Model Predictive Control for Trajectory Tracking of Unmanned Aerial Vehicles Using Robot Operating System. Mina Kamel, Thomas Stastny, Kostas Alexis and Roland Siegwart. Robot Operating System (ROS) The Complete Reference Volume 2. Springer 2017 (to appear)
[2] Linear vs Nonlinear MPC for Trajectory Tracking Applied to Rotary Wing Micro Aerial Vehicles. Mina Kamel, Michael Burri and Roland Siegwart. arXiv:1611.09240