Pixhawk Video Tutorial with matlab simulink

7 次查看(过去 30 天)
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