How do I add custom uORB topics when using "UAV Toolbox Support Package for PX4 Autopilots"?
10 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2023 年 6 月 14 日
編集済み: MathWorks Support Team
2023 年 6 月 14 日
I am working with the PX4 support toolbox in order to design a flight controller for Cube Orange hardware. I successfully compiled a model and flashed it to the Cube Orange.
However, after this, I wanted to include an additional uORB topic to interface with a special sensor unit. For this, I defined a customized uORB topic and added it to the CMake file under Firmware/msg. Back in Simulink, I tried to access this uORB topic with the uORB Read Block, however, I only got an error message. But now, no matter which uORB topic I access, I only get an error message even for topics which clearly are defined as standards in PX4 such as the sensor_combined topic:
Error evaluating 'MaskParameterCallback' callback of PX4 uORB Read block
(mask) 'sacs_mod_pixhawk/Read EKF/PX4 uORB Read1'. Callback string is
'px4.internal.block.SubscribeBlockMask.dispatch('topicEdit', gcb);'
"sensor_combined" is not a valid uORB topic name.
Now I cannot use the uORB Read block anymore, the according busses are not defined, and whenever I open the blocks the aforementioned error message is shown. It seems to me, that MATLAB is searching for the busses but cannot find them. How can I solve this problem?
採用された回答
MathWorks Support Team
2023 年 6 月 14 日
This workflow can be supported but with limitations - adding a custom uORB topic will break the "Connected IO" simulation support. If your are okay with that, you can follow the below steps to add a custom uORB message:
1. Add the message in CMake file under the Firmware/msg folder
2. Re-run the hardware setup app for the Cube Orange hardware.
3. Go to Simulink and select the custom uORB message or any other message.
The error message above indicates that the hardware setup screens need to be re-run if you decide to update the custom uORB topic that you added.
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!