Skip to content

Launch the NMPC node

Bárbara Barros Carlos edited this page Jan 6, 2020 · 4 revisions

For launching the node of the NMPC together with a mocap use:

$ roslaunch crazyflie_controller acados_predictor.launch

When launched, the NMPC node initially performs a take-off by means of a regulation. The regulation point is at position [0 0 0.4]^T and it can be changed in real-time though the GUI of the rqt_reconfigure as shown:

drawing

The Crazyflie will hold the position as long as the flag enable_regulation is True.

To make the quadrotor track a predefined trajectory, you have to click on enable_traj_tracking. This will load one of the trajectories of the folder crazyflie_controller/traj and pass it as reference to the NMPC. There are two trajectories available, we call them: smooth_step and helix_traj. To select the trajectory that will be tracked, you have to edit the launch file:

<node name="nmpc" pkg="crazyflie_controller" type="acados_mpc" output="screen" ns="crazyflie">
	<!--param name="ref_traj" value="$(find crazyflie_controller)/traj/smooth_step.txt"/-->
	<param name="ref_traj" value="$(find crazyflie_controller)/traj/helix_traj.txt"/>
</node>