Offboard mode in fixed wing with PX4 and MAVROS

Hello everyone,
Currently I am working on a project where I am trying to control a fixed wing’s position via offboard mode through PX4 and Mavros. I prepared a code written in C++ and it works smoothly on simulation which is Gazebo. However, when I look at PX4 terminale, I see a warning like this: “WARN [fw_pos_control_l1] Invalid offboard setpoint” although it goes to the specific position setpoint. I tried a lot of different things but I could not solve this problem. I am using CommadTOL service for takeoff, then I activate Offboard mode, then I am using setpoints (/mavros/setpoint_position/local topic) to direct the vehicle’s position. In a few days I will try this code in real life, should I ignore these warnings or is it a problem? I really appreciate If someone can help me.

1 Like

@Elvin_Gultekinoglu You can check why the fw position controller thinks your setpoints are invalid" PX4-Autopilot/FixedwingPositionControl.cpp at main · PX4/PX4-Autopilot · GitHub

Thank you for your answer. I will look at it and try to find it. I wonder one more thing also, I am using mavros_msgs/PositionTarget message to change the type of setpoints as described here . After setting, I am using geometry_msgs/PoseStamped message to set and publish position setpoints. At the end, I am publishing these separately. As I observed, PositionTarget works, for example, I choose gliding setpoints and the fixed wing behaves appropriately in the simulation. Might this be one of the reasons of the problem I encountered? One more thing, as you can observe from the above link, type masks are given as integers, such as 292, 4096, etc. I implement them as integers also in my C++ code, and I did not get any errors during catkin_make. Is this okay? I am just asking these to make sure about the way I use these topics. I really appreciate If you can answer, it will be really helpful. Have a good day.