FW position controller offboard control with PX4-messages and ROS2

Hello, I am running a simulation with PX4-1.14 SIL. My aircraft is a VTOL.
I switch to offboard mode and take off as MC. At a certain altitude the aircraft transitions to FW and a ‘‘trajectory_setpoint’’ message is sent to the PX4 with a 3D target point to go to. I use ROS2 and DDS to communicate with PX4.

From data logs analysis i observed that when the transition to FW is finished, the throttle goes to zero and the aircraft looses altitude and crashes to the ground. It seems like the '‘trajectory_setpoint’ message doesn’t have any effect - it never reaches the FW position controller.

My question is how is it possible to command a FW aircraft to move towards (or to) a 3D point in space using ROS2 and PX4-messages, and the PX4 position controller?

In the PX4 user guide I found that only with a MAVLink command can do this: SET_POSITION_TARGET_LOCAL_NED (Offboard Mode | PX4 User Guide (main))
Is there any way to avoid using MAVLink and stick with ROS2 and PX4-messages?


If you use TrajectorySetpoint you should be able to send velocities and positions, alsong with accelerations if you want. If you use VehicleCommand you can also easily send mavlink commands without diving into mavlink that deep.
Would you mind sharing the logic to transition? I am currently working on transistioning the VTOL and it doesnt seem to be working. The command is being sent but it is not transitioning.