How do I use Pixhawk 6x with UAV Toolbox Support Package for PX4 Autopilots?

60 次查看(过去 30 天)
I want to use the Pixhawk 6x board with the UAV Toolbox Support Package for PX4 Autopilots. What are the steps that I can follow to deploy the code from Simulink onto these boards?

采纳的回答

Ankur Bose
Ankur Bose 2023-5-4
编辑:Ankur Bose 2023-7-5
Pixhawk 6x is officially supported in the latest version UAV Toolbox support package for PX4 Autopilots in R2023a. It is recommended to use the latest version of UAV Toolbox support package for PX4 Autopilots in R2023a to get Pixhawk 6x support.
Pixhawk 6x can be used with R2022b version of MATLAB by following the below process.
  1. Follow the steps to clone the Cygwin Toolchain and PX4 Firmware as mentioned here.
  2. Go to the location "Firmware\boards\px4\fmu-v6x" in your cloned PX4 Firmware.
  3. For the default.cmake, disable all the controller modules that you dont need by commenting them out. For example, if you need the multicopter controllers only, you can disable the Fixed Wing and VTOL controllers modules (Fixed WIng Controller modules are named as fw_**, VTOL controllers as vtol_** and multicopter controlers as mc_**). If you are designing controller in Simulink, the code generated from Simulink will act the Controller module and you can remove all controllers from default.CMake
  4. Follow the steps as mentioned here to setup the Firmware for Pixhawk 6x, generate code in Simulink and deploy on Pixhawk 6x.
  1 个评论
Hussein
Hussein 2023-8-11
Hello,
I am actually also using Pixhawk 6x and trying to flash the hexacopter attitude controller which can be found using the command 'px4demo_attitudeSystem'. I have followed all the required steps that can be found in the documentation and all steps have been successfully verified. (except Get accelerometer data test )
What I am stuck with is when I connect qgroundcontrol to the pixhawk nothing shows (as if it have no firmware).
The steps that I have tried so far are the following:
  • Build again the firmware through UAV toolbox and then go to qground control and flash the firmware by selecting the file (C:/PX4/home/Firmware/build) which is "px4_fmu-v6x_multicopter". Flashing the firmware was successfully uploaded however I cant see any options with Qgroundcontrol (like calibration etc. which means i cant do anything). I also tried to flash the controller from simulink but an error occured.
  • I tried to use "px4_fmu-v6x_default" but also same issue
  • I build the firmware without using the UAV Toolbox, but using the console from "PX4 Cygwin 0.8" and the firmware was successfully build but same issue with qgroundcontroll that everytime I flash the firmware nothing appears.
Note that the recommended firmware that is noted in the documentation and which i am trying to flash is PX4 1.12.3 but it never worked.
If i flash PX4 1.13.3 firmware to the px v6x then everything works from the qgroundcontrol side but I cant flash the attitude controller since they mentioned in the documentation that it only works with PX4 1.12.3.
Any help here will be much appreciated. Thank you!

请先登录,再进行评论。

更多回答(0 个)

产品

Community Treasure Hunt

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

Start Hunting!

Translated by