Implement simple HITL simulation PX4
7 次查看(过去 30 天)
显示 更早的评论
Hello, I'm trying to understand how to implement a simple HITL simulation using PX4 and UAV Toolbox Support Package for PX4 Autopilots. In particular I want to run the example Position Tracking for X-Configuration Quadcopter - MATLAB & Simulink Example - MathWorks Italia but instead of having a PX4 Host Target as hardware board I have a Pixracer R15. Is this possible?
If this isn't possible how can I implement a HITL simulation by specify with Simulink the reference trajectories for my quadcopter instead of usign QGroundControl and specify a simple trajectory to follow?
Thanks in advance.
0 个评论
回答(1 个)
Arun Mathamkode
2022-10-11
Specifying simple setpoints from Simulink is implemented in HITL with Simulink plant example. In the model 'Quadcopter_ControllerWithNavigation' open the Navigation subsystem. Different navigation logics are implemented here including the one with specifying setpoints from Simulink using variant subsystem.
Enable the 'Manual Waypoints from Simulink Dashboard' subsystem by assigning guidanceType = 2. Now the controller will read setpoints from Simulink instead of QGC.
2 个评论
MathWorks Embedded Coder Team
2022-12-1
Is HITL selected in HardwareSettings > Hardware Implementation > Target Hardware Resources > HITL? Are you using Model references?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Hardware-in-the-loop Simulation (HITL) with PX4 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!