UAV Toolbox support package for PX4 Autopilots- Host target simulation
조회 수: 1 (최근 30일)
이전 댓글 표시
hello.
I started to peform simulations with PX4 host target, and as a target a simulink model.
I'm able to run the example Px4DemoHostTargetWithSimulinkPlantStart, and it works. But now i want to build my controller, with my simulink model. I tried to perform some simulation and i saw that my simulink model don't recevie all the commads that my controller send via mavlink message HIL_ACTUATOR_CONTROL.
I can explai better with an example:
-Controller model send 1000 1100 1200 1300, via Pwm block for PX4, with a fixed sample time of 0.01
-The Plant Model recevied 1000 1000 1000 1300, via Mavlink messsage HIL_ACTUATOR_CONTROL. alway with a fixed sample time of 0.01
So basically i have that my desired command that my controller compute, isn't recevied perfectly by my model.
My first thought is that there was some delay in reading or in sending, or some problem due to computational effrot. So i'm asking if anyone know how the two sysyems interact each other, i mean is a synchronous communication or not, the simulator plant must have a sample time smaller with respect the controller one.
thanks in advance
댓글 수: 0
채택된 답변
Arun Mathamkode
2023년 7월 12일
The controller and plant are in lock step simulation by default. What this means is that PX4 controller and the plant wait on each other for sensor and actuator messages, rather than running at their own speeds. Please refer thsi PX4 doc for more details.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!