How can I communicate between a Pixhawk controller and an actuator module using UAVCAN?

4 ビュー (過去 30 日間)
I am now building a UAV whose controller is Pixhawk 4X or 6X.
UAVCAN communication is available to drive the main motors.
According to the following page, UAVCAN is used to read GPS data.
However, I cannot find the detailed configuration of the UAVCAN.
Would you tell me how to use the UAVCAN communication using some blocks in UAV Toolbox Support Package for PX4 Autopilot such as "uORB Read" block?

採用された回答

Arun Mathamkode
Arun Mathamkode 2024 年 9 月 5 日
Starting in R2024b, you can use the PX4 Actuator Write block in your Simulink model to write motor and servo actuator values over the PWM and UAVCAN interfaces. Please refer to R2024b release notes.
  3 件のコメント
Arun Mathamkode
Arun Mathamkode 2024 年 10 月 7 日
It is a new block, refer the doc here. You need to select the interface (PWM vs UAVCAN) in QGC.
Sakahisa Nagai
Sakahisa Nagai 2024 年 10 月 7 日
Thank you for your advice. I updated the MATLAB version and could rotete the motor using the new block.

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

その他の回答 (1 件)

Ayush
Ayush 2024 年 9 月 5 日
編集済み: Ayush 2024 年 9 月 5 日
You can develop algorithms on UAVCAN communication using various blocks like “uORB Read” block, “uORB Write”, “uORB Message” etc. Please refer to know more: https://www.mathworks.com/help/uav/develop-algorithm-deploy-px4.html
For hardware support and configuration for UAV Toolbox for PX4 Autopilots, you can refer to this documentation: https://www.mathworks.com/help/uav/setup-and-configuration-px4.html
You can also read more about UAV Toolbox here: https://www.mathworks.com/help/uav/index.html
Hope it helps!
  1 件のコメント
Sakahisa Nagai
Sakahisa Nagai 2024 年 9 月 6 日
Thank you very much for your comment.
I try to read parameter value as the below figure.
As indicated in the figure, the status is 1 which means that the communication is not successfully conducted.
Are there any mistakes in my simulink file?
The PX4 hardware setup has successfully done.
I connected PX4 controller to a Vertiq motor module.
The following URL describes the uavcan used for the Vertiq module.
I would like to read uavcan.equipment.esc.Status (Data Type ID = 1034).

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

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by