- There are no specific limiation of 4 uorb topics. It ideally depends on the algorithm you are designing in Simulink and the flash size of the board. The number is not exactly limitless as one point you will run out of flash, but I am certian that it is not 4. I am not so sure why you are facing issue with 4 uorb topic in R2022b. The model you were using and the build log etc would be needed to comment on this. If you are planning to upgrade the version I would recommend R2024a as it will support the PX4 v1.14. Since we are discussing regarding the number of uORB topics, I would also like to mention about running out of file descriptors. If you are using many uorb blocks and assume the build is successful, but still during the execution few uorb might not work as expected because of running out of the file descriptors. You can refer this documentation to resolve it.
- In Cube Orange we have seen issues with telemtry serial ports using with PX4 serial blocks. As documented here, we recommend usign GPS2 instead of TELEM1 or TELEM2. You should be able to use GPS2 (/dev/ttyS5) to talk from PX4 to GCS. If your intention is to send some values from your Simulink model to host why not give a try with Monitor and Tune Simulation as well. You can see and visualize the signal from your model in Simulink using Monitor and Tune simulation.
- If you are using the PWM block and configured to use the AUX channels you should be able to write values to the AUX channels. To undertsand if there any issues with the board you are using, I recommend trying out the pwm command (for px4 v1.12) using system console or NSH shell. See using this command if you are able to write values to AUX channel first.
Pixhawk Cube Orange AUX PWM Channels Not Activating When Using PX4 Toolbox (2023b)
20 views (last 30 days)
Show older comments
I am using the MATLAB 2023b version with the Pixhawk PX4 Support toolbox. I have had prior success on MATLAB 2022a using a Pixhawk 1 and Firmware v1.10, and now in the attempt to upgrade hardware there are a couple issues coming up:
1) Previously, in 2022a, I was able to subscribe to several (10 or more at times) uORB topics to grab sensor data, RC inputs, etc. and had no issues. One of the issues I had seen initially in 2022b was that a hard limit of 4 uORB topics was set (Firmware build would fail if exceeding 4 topics). Has this issue been resolved in 2023b, meaning it is possible to subscribe to limitless uORB topics for obtaining sensor data?
2) Using the 2022a - Pixhawk 1 hardware, I was able to send custom data back to a GCS using the PX4 Serial Send block, simply creating a custom header and terminator and appending bytes of information in a vector and sending it to the appropriate ttyX port that was on the RFD900x telemetry module. This resulted in successful data transfer at a specified rate using a rate limiter block in Simulink. I have noticed on the 2023b - Pixhawk Cube Orange hardware setup that this is no longer working. Initial tests are showing that the bytes are not coming through at all (it's easy to see the header and terminator when they arrive on the GCS). Has this functionality been removed and, if so, what workarounds exist aside from creating custom firmware to use perhaps the Debug Array MAVLink message and send data on that?
3) Preliminary testing has shown that the AUX PWM channel outputs on the Cube Orange are not activating (plugging anything into them results in it not even receiving a wakeup signal), but the MAIN PWM channel outputs appear to at least be receiving power as they will center/move a servo when connected. I have dug around in the forums and seen a few people attempting to fix this with commands such as "fmu mode_pwm" which is apparently supposed to enable AUX PWM channels, but this has been unsuccessful.
As of writing this, I can successfully build and deploy Simulink code onto the Cube Orange, and I have configured the Cube Orange with the peripherals it needs and it is waking up, so I have gotten past simple build issues at this point. Any help would be greatly appreciated.
0 Comments
Answers (1)
Arun Mathamkode
on 12 Jun 2024
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!