How to do vtol transition in offboard mode with ros2

Hello I need to use vtol transition in my offboard script but I dont know how to do a vtol transition in offboard script for ros2. I read about a discussion about it but it was old and for mavros. They suggested to write a ros service. Is there an easy way? Thank you…

I successfully change the mode to FW through px4_msgs::msg::VehicleCommand msg in ROS 2 by uXRCE-DDS way.

But I dont know how to achieve path setpoint control?

this->Pub_Vehicle_Command(px4_msgs::msg::VehicleCommand::VEHICLE_CMD_DO_VTOL_TRANSITION, 4);
        void Pub_Vehicle_Command(uint16_t command, float param1 = 0.0, float param2 = 0.0) {
            px4_msgs::msg::VehicleCommand msg{};
            msg.param1           = param1;
            msg.param2           = param2;
            msg.command          = command;
            msg.target_system    = 1;
            msg.target_component = 1;
            msg.source_system    = 1;
            msg.source_component = 1;
            msg.from_external    = true;
            msg.timestamp        = this->get_clock()->now().nanoseconds() / 1000;
            rcl_obj.pub_px4_vehicle_command->publish(msg);
        }