Pixhawk Video Tutorial with matlab simulink

2 ビュー (過去 30 日間)
Abdelkader Fareha
Abdelkader Fareha 2018 年 3 月 28 日
コメント済み: UASLAB 2023 年 5 月 16 日
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 件のコメント
Walter Roberson
Walter Roberson 2018 年 9 月 4 日
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
Grisha Khodos 2019 年 5 月 2 日
Still, is there any gudeline on how to use this? Redy-to fly SImulink model example to start with? Installation guide?

サインインしてコメントする。

回答 (3 件)

Steve Kuznicki
Steve Kuznicki 2018 年 4 月 16 日
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.

anil guclu
anil guclu 2018 年 9 月 7 日
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 件のコメント
Kevin Hollands
Kevin Hollands 2019 年 3 月 18 日
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
UASLAB 2023 年 5 月 16 日
can you please provide me with your models and how you push your simulink model into pixhawk? Thank you.

サインインしてコメントする。


anil guclu
anil guclu 2019 年 4 月 28 日
Hi Kevin,
Sorry for late answer, You may check the below things,
  1. 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.
  2. please check inside the rc.txt, there must be a line like "px4_simulink_app".
  3. 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.
  4. 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 件のコメント
Kevin Hollands
Kevin Hollands 2019 年 5 月 7 日
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
anil guclu 2019 年 5 月 7 日
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.
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.

サインインしてコメントする。

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by