UAV Toolbox Support Package for PX4 Autopilots - px4_simulink_app module
Show older comments
I have successfully built and deployed the px4 controller on pixhawk4 via simulink. Also added rc.txt to SD Card's etc folder.
When I tried to connect Pixhawk4 to QGroundControl without any additional work, it was disconnected and unable to connect.
For reference, I added the following two lines to the end of rc.txt, so I was able to connect Pixhawk4 to QGroundControl.
mavlink start -d /dev/ttyACM0 -m config –x
mavlink boot_complete
At this point, I had my doubts. I know that if the rc.txt file is added to the SD card and the Simulink controller is built and deployed, the px4_simulink_app module, not the mc_attitude_control and mc_position_control modules, is executed without any additional work. But how can I make sure that it activates px4_simulink_app when linked to QGroundControl?
Accepted Answer
More Answers (2)
Arun Mathamkode
on 3 Feb 2023
0 votes
The modules you are adding to the rc.txt will be started after the board bootup, irrespective of whether you have connected QGroundControl or not. So if you have the px4_simulink_app start command added in the rc.txt, px4_simulink_app will be started after the bootup. It is not very clear to me what you meant by 'activates', if you are referring to making sure the module is running you can verify it through the System Console or MAVLink NSH Console in QgroundControl. Use the px4_simulink_app status command for this.
Jae Won Han
on 6 Feb 2023
0 votes
2 Comments
Arun Mathamkode
on 7 Feb 2023
The 'px4_simulink_app' will be added in '<px4_firmware_root>\Firmware\boards\px4\fmu-v4\init\rc.board_extras' file. You can open this file and check. The rcS file will be referring to rc.board_extras. The rcS file is located at '<px4_firmware_root>\ROMFS\px4fmu_common\init.d\rcS'. To make sure the px4_simulink_app module is running in the board, you can use System Console or MAVLink NSH Console in QgroundControl. Use the px4_simulink_app status command for this.
Jae Won Han
on 10 Feb 2023
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!