PX4 UAV Toolbox px4demo_attitudeSystem Attitude Controller for a Hexacopter

Hello,
I am deploying the hexacopter attitude controller from Matlab UAV Toolbox to PX4 flight controller. All version information are listed in the bottom of this post. I have followed the hardware setup as in the documentation. In the beginning I was using PX6 Holybro and all steps were successfully done however, once i physically connect my laptop to the pixhawh PX6 and QGC, it shows that there is no connection as no options related to the configuration appears.
Then, I switched to using PX4 flight controller and started the setup from the beginning. Everything worked and I could connect to QGC. I successfyully flashed the attitude controller (i.e. px4demo_attitudeSystem) to PX4.
Now my problem is that I cant arm through the RC Controller, I can arm using a setting from QGC. Also, I can increase/decrease thrust through the rc controller stick. However, I dont have any pitch, yaw, roll authority.
Is their any documentation on what setup the rc controller in simulink must be configured when you flash the controller?
I have the feeling that it is a simple fix since I have manually tilted the drone (as if im pitching, rolling) and the motors were reacting. I would appreciate if someone can help me out. Thank you in advance.
System info
  • Matlab 2023a
  • PX4 Toolchain v0.8
  • PX4 Firmware px4_fmu-v5_multicopter.px4
  • QGC v4.2.8

2 Comments

Can you clarify how you are reading the RC data in Simulink? Are you using the RC block in PX4 Simulink library?
Hello, thank you for your reply. Yes I am using this simulink model shown below which already have an RC block.
Since only the thrust input from the RC controller was working, i tried to add other channels then changing the connections and flash again the controller to PX4 but nothing changes. The only thing that I can input is the thrust.

Sign in to comment.

Answers (1)

What does the status output of the RC block indicate?

1 Comment

Its been a while for me that i havent proceed with this task. I will get back to it very soon so I will update this post in case I got something new. Thank you for following up.

Sign in to comment.

Products

Release

R2023a

Asked:

on 14 Aug 2023

Commented:

on 16 Nov 2023

Community Treasure Hunt

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

Start Hunting!