PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.2k stars 13.38k forks source link

How to use vx, vy, and roll to control fixed wings through self setting interfaces #21479

Open niceybc opened 1 year ago

niceybc commented 1 year ago

How to use vx, vy, and roll to control fixed wings through self setting interfaces

As far as I know, the official control interfaces provided by PX4 only include position control and attitude angle thrust control. I want to use setpoint_raw topic in PX4 to introduce the control interface and achieve the control of fixed wings using vx, vy, and roll.[SET_ATTITUDE_TARGET].

[PX4 Internal Control]

Thanks!

Jaeyoung-Lim commented 1 year ago

@niceybc I don't see why this is useful. Are you trying to control acceleration through roll? Then why not just provide acceleration setpoints?

Offboard mode is an interface to provide references to the controllers directly. Attitude and velocity are handled by different controllers and therefore you can't give partial information to each of the controllers

niceybc commented 1 year ago

When the roll angle in a two-dimensional plane does not consider height changes, it can be represented by ay. So can I directly use [SET_POSITION_TARGET_LOCAL_NED] if I want to control vx, vy, and ay? Because I found in the px4 document that it only mentioned Position setpoint

Jaeyoung-Lim commented 1 year ago

As I said this is not a supported usecase.

You need to set the full reference. What is the expectation of not providing vz? Uncontrolled? Or zero?

niceybc commented 1 year ago

I want to fly at a fixed altitude. So the pitch angle is controlled by TECS

Jaeyoung-Lim commented 1 year ago

@niceybc Then set the vertical velocity as zero

Also for the roll and vx, vy if you send a constant roll and vx,vy reference you are telling the vehicle to do a knife edge

niceybc commented 1 year ago

@Jaeyoung-Lim I hope to use TECS to control the altitude and speed response of the aircraft. Roll angle is used to achieve single machine flight control or multi machine collaborative algorithms, such as L1.Not a constant.

Jaeyoung-Lim commented 1 year ago

@niceybc My question is why you wouldn't use vx, vy, vz and let the low level control deal with tracking the reference.

I still don't see why you would want to control roll directly, individual of vx and vy

niceybc commented 1 year ago

@niceybc My question is why you wouldn't use vx, vy, vz and let the low level control deal with tracking the reference.

I still don't see why you would want to control roll directly, individual of vx and vy

Sorry, my basic knowledge is not solid enough. What I really want is to use airspeed and roll angle. So, can I convert my expected airspeed and roll angle into vx, vy, and vz for control?