RflySim / RflyExpCode

Multicopter Design and Control Experiments based on MATLAB and PixHawk
https://rflysim.com
176 stars 92 forks source link

Mission Generation using QGround Control #57

Closed EL-Wadi closed 3 years ago

EL-Wadi commented 3 years ago

Can we build the controller using your Package and and use the Qground Control to generate the trajectory? How?

RflySim commented 3 years ago

First, you should choose "no" in the "(10) Whether to block the actuator outputs" option of installation UI, which will enable all PX4 functions. Then, you can delete the modules (EKF, attitude controller, position controller, etc) you want to replace with the generated controller in the cmake file, or comment out the uORB subscribe and publish codes in the cpp file of these modules. In the end, you can use Simulink to subscribe and publish signals to replace these modules.

For your case, you can replace part of the function of the PX4 navigator module (get trajectory and send target position point to mc_pos_control module). Basic knowledge of the PX4 code framework is required for the above modification. You can visit http://dev.px4.io

EL-Wadi commented 3 years ago

Thanks for your reply,

EL-Wadi commented 3 years ago

In real flight what modules are disabled in your package? Can we use mavros with your package to do hill with Gazebo? Another question, if I generate a time based trajectory that is function of time, is the time is initiated (i.e. t=0) when the motors are armed or what?