Add new Pixhawk block

4 ビュー (過去 30 日間)
Giulio Melacarne
Giulio Melacarne 2015 年 10 月 21 日
Hi, I'm using the Pixhawk PX4 Support from Embedded Coder but I need to create an other block function to load some other variable from px4. How can I do it? I cannot find the c source code used to create the s-function in the simulink blocks. Thanks.
  1 件のコメント
MathWorks Aerospace Products Team
MathWorks Aerospace Products Team 2015 年 11 月 19 日
Hi Giulio,
One thing we are actively looking at for future releases of the Pixhawk PSP includes easier modification of blocks to do what you described. We will take this feedback into consideration and possibly implement subscriber/publisher blocks and guidelines on creating new blocks in a future release of the Pixhawk PSP.
Thank you

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

回答 (1 件)

Dan Lluch
Dan Lluch 2015 年 10 月 26 日
Hi Giulio,
For additional peripheral support, you can create blocks via this guide: http://www.mathworks.com/matlabcentral/fileexchange/39354-device-drivers
to help us prioritize possible future support - can you let us know which additional signal from PX4 you are interested in?
HTH Dan
  2 件のコメント
Giulio Melacarne
Giulio Melacarne 2015 年 10 月 26 日
Hi Dan, thanks for your answer,
I have added two new mavlink messages (a position setpoint and the actual position), I have configured uorb and I would like to use them as input in my control system.
For the moment I use an input block (in1) and I assign the values to the input from a cpp program and it works.
In my opinion (if it is possible) would be very usefull a block in which the ORB_ID for advertise or subscribe is a parameter.
Giulio.
Dan Lluch
Dan Lluch 2015 年 11 月 16 日
Great you got it functional Giulio via an input and then writing to that variable/memory location. I'll pass these particular peripheral requests into the PixHawk Target developers.
You are likely quite close to making your own block with similar CPP code - the device driver guide touches on some methods in case you ever what to give it a try, but glad you are functional as is!

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by