Pixhawk Video Tutorial with matlab simulink
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Please can any body provides a video tutorial or more detailed support on how to convert SIMULINK Model into pixhak code apart from the Pixhawk Support Package;
2 Kommentare
Walter Roberson
am 4 Sep. 2018
Vasanthakumar Sekar comments,
I bought a Pixhawk -4 new and install the simulation package from matlab 2018a. now, what i have to see is on-board sensors reading in matlab. try to find out a way to see possibly. need some video lecture indeed.
Grisha Khodos
am 2 Mai 2019
Still, is there any gudeline on how to use this? Redy-to fly SImulink model example to start with? Installation guide?
Antworten (3)
Steve Kuznicki
am 16 Apr. 2018
You will need to become familiar with the PX4 open source flight stack and write your own S-Functions that communicate via the uORB messaging mechanism. You will be able to subscribe or publish to uORB topics yourself just like the commander/navigator modules do. This is essentially what the Pixhawk PSP does for you.
0 Kommentare
anil guclu
am 7 Sep. 2018
Hi guys,
I am able to download matlab/simulink model file into px4, drive servo motors and log data in an SD card. Do you still need help?
Sincerely.
3 Kommentare
Kevin Hollands
am 18 Mär. 2019
Hi,
I need help as well driving the servo motors and log the data. At this moment I am receiving the message uploading the model is done, but I am not able to run the model. Have you had this problem too?
Kind regards.
Kevin
UASLAB
am 16 Mai 2023
can you please provide me with your models and how you push your simulink model into pixhawk? Thank you.
anil guclu
am 28 Apr. 2019
Hi Kevin,
Sorry for late answer, You may check the below things,
- be sure that rc.txt file is located in the SD card in etc folder. In addition there must be a folder named as log.
- please check inside the rc.txt, there must be a line like "px4_simulink_app".
- May be you may run the model, there is a safety button which flahes, it must be solid in order to generate signal from PWM ports.
- for logging data, you may connect a step input to enable port of binary logger block. Aware that type of the enable is boolean, and the output of step input is decimal. you must convert it.
please try those and inform me, I will do my best.
Sincerely.
2 Kommentare
Kevin Hollands
am 7 Mai 2019
Hi,
Thank you for your answer. It is working right now! I changed the rc file, updated the bootloader using qgroundcontrol and set all sample frequencies to 400.
Kind regards.
Kevin
anil guclu
am 7 Mai 2019
Hi Kevin,
Have you checked the uORB time. I am having trouble acquiring data. I set sample time as 1/250, and take the uORB time difference , sometimes there are data loss about 180ms.
Could you please check the following link that explains my problem.
https://uk.mathworks.com/matlabcentral/answers/459024-px4-vehicle-attitude-data-loss?s_tid=srchtitle
If you have time, I will be happy if you run a 5 min vehicle attitude block data with uORB time. I wonder if the problem is related with the hardware or the driver that we use in simulink. I use Matlab 2018B and officially supported PX4 package from Mathworks.
Thanks.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!