Send Thrust and Torque setpoint with ROS1

Hi, I am trying to make a drone takeoff from a moving platform. The drone is locked to the platform with a release mechanism that triggers when the drone achieves zero moments wrt the platform as well as a setpoint thrust (by adjusting the motor speed). The moments and forces between the drone and the platform are being recorded by a force/torque sensor and the data is streamed through a ROS script. The control is made within a ROS1 environment.

The goal is to trim the vehicle prior takeoff to zero moment and a setpoint thrust. After separation, we want to maintain this trim condition for a short amount of time before switching to attitude mode. This would be akin to locking the motor output values that PX4 is sending (i.e., PWM to the ESCs) independent of vehicle attitude and, thus, sensor input.

Currently we can achieve a trimmed condition via overriding the RC commands in offboard mode with “/mavros/rc/override” and feed the PWMs to “/mavros/rc/in” (i.e., pitch, roll, yaw, thrust). However, we have so far not been able to “lock” the PWM values (i.e., send constant PWM out to the ECSs(/mavros/rc/out)). Directly feeding PWM to /mavros/rc/out appears to not be suggested.

A better way would send a torque and thrust setpoint message (setpoints independent of vehicle attitude), which appears to be possible within ROS2 environment with the following message (Offboard Mode | PX4 User Guide):

VehicleThrustSetpoint: VehicleThrustSetpoint (UORB message) | PX4 User Guide

VehicleTorqueSetpoint: VehicleTorqueSetpoint (UORB message) | PX4 User Guide

Unfortunately we can’t run ROS2 environment.

I was wondering if there was any other way to send Thrust and Torque setpoints other than “VehicleThrustSetpoint” and “VehicleTorqueSetpoint” in ROS1. Alternatively, is there a chance to somehow “lock” the PWM motor outputs in offboard mode either directly (via /mavros/rc/out) or indirectly (via specific setpoints sent to PX4 via mavros).