PX4 SITL with Simulink based Plant Model
Show older comments
I'm trying to perform SITL with my custom controller with PX4 toolchain for trajectory tracking for quadcopter.I designed the controller with the MIL(model-in-the-loop) taking into account this link as reference:https://uk.mathworks.com/help/supportpkg/px4/ref/simulator-plant-model-example.html. The controller I designed in MIL works(no code generation everything done in simulink). So I moved to SITL(on PX4 host target) on Simulink based plant model. I press "monitor and tune", wait untill the controller is compiled and it says to run(with pacing active on 1) the model plant, so I did, but it doesn't work. I noticed that the controller and the palnt are running at complitly different times. The drone goes crazy. Is this the problem maybe? Should I syncronize the plant and the controller?
I tried also jmavsim simulator, but it does not work either.
How is possible that the MIl works and the SITL doesn't?
Accepted Answer
More Answers (0)
Categories
Find more on PX4 Autopilots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
