Hi! I am struggling with a control problem and could use some help.
I want to control my drone via offboard mode. I need to control my drone via a fixed attitude (roll, pitch, yaw), but I need to maintain a set altitude.
I am using PX4 1.14.3 with a multi-rotor
From how I understand my problem, is that I can set my attitude when I am in offboard mode by putting the drone it attitude control. However I am unable to specify my altitude setpoint, but instead my thrust. I can set the altitude if I put the drone in position control via offboard mode, but then I can’t specify my attitude.
What I have read/tried:
I had read topic from 5 years ago of someone trying to something similar from what appears to be mavlink messages, but I can’t get the mixing to work because when I try to send both, it defaults to just the position control: Setting the type mask for setpoints
I also have tried implementing a PID control of the thrust based on my local position z value, but resulted in way too much oscillation.
I imagine the logic for this is somewhere buried in PX4 because what I want to do is very similar to if not the same as altitude mode when in manual mode. I just want to do this in offboard.
Is there someway to use the cascaded control loop to pass the specified altitude and attitude? Controller Diagrams | PX4 User Guide (v1.14) Is there a way to not bypass the position loop when specifying the angle control?