Writing Own Controller Algorithm

Hello everyone,for my Masters dissertation I have to write my own MPC controller in gazebo simulation. I can’t use in-built PID controller for it.Please help me out as I’m new here.

if u planning use ROS, then the MPC can be one node, if not using ROS, pure Gazebo plugin can also do the work. U can also choose use use PX4 SITL or not, only the structure changes.

I am planning to use ros ,gazebo and PX4.I am new here if possible please give me some resources

You should take a look at offboard mode. I have implemented a controller that sends acceleration setpoints to the px4, and I have worked with an MPC that sent trust and attitude setpoints to the low-level body-rates controller.

You should carefully read the documentation and understand where you want to enter your MPC in the control structure (or replace it completely).

Good luck with your thesis!

Hey biagio, can you share me your github id if it’s possible and some other resources or other’s works so that I can use them as reference?

Hi @Satyam_Saha, my Git Hub account id is biagio-trimarchi.

I am not aware of works that you can use as a reference. If I were you, I would take a look at the offboard mode and control diagrams pages in the documentation, I think you will find all the information you need with enough patience and time.