About normalized torque and thrust in offboard control mode (ROS2 SITL)

Hi all, I want to run a quadrotor SITL with ROS2 using thrust an torque control mode.
For both thrust and torque setpoints messages it says the setpoint value need to be ‘normalized’.
I understand the thrust can be normalized simpling by dividing it by the maximum thrust, but I wonder how can I calculate the normalized torque? I suppose it can be calculated similarily by deviding the actual torque by the maximum torque but I don’t know how to get the maximum torque.
Another problem I found is the normalized thrust doesn’t match with the maximum thrust.
As for my case, I’m using x500 for SITL, the quadrotor’s parameters are as following:

Mass: 1.0643[kg]
from model sdf file (original body mass was 2.0 and I changed it to 1.0)
Maximum single rotor thrust: 8.54858[N]
– Calculated from motor constant = 8.54858e-6 and maxRotorVelocity = 1000

However the reading of Actuator Outputs topic when hovering is around 0.470 for each rotor, which means actual thrust should be 0.470*8.54858=4.0178[N], and this is far more than the thrust needed for hovering.

Anybody knows the reason? Are there other functions I missed in the calculation?

1 Like

Hi @Hinoki I also have curiosity about this topic.
In my case, I tried to calculate based on .sdf file in SITL but I couldn’t remember how was it since finding out proper thrust and torque is also related to my high-level controller parameters.
Did you solve or find out acceptable result?

Hi @ChanJoon , thanks for the reply.
I’ve reached an acceptable calculation, and I think there is a wrong expression in the thrust setpoint msg document.
First the final equation for calculating the normalized thrust:

thrust_normalized =

which means that the ‘thrust’ setpoint is actually the same with the motor output, it is the normalized motor velocity.
And I managed to normalize torque by calculating the max torque in roll, pitch, yaw using the quadrotor geometry and the min and max thrust.

BTW I’m also trying to design a high-level controller by calculating the torque and thrust from individual rotor thrusts, but I find in the SITL there is also noise affecting the sensor readings, which makes me unable to control the drone either by direct motor signal or thrust and torque setpoints, have you encoutered similar problem?

1 Like

Thank you for sharing your experience.

About noises in state estimation, I didn’t encountered similar problem in controlling my quadrotor.

Actually, those noises are not so large to make your control system unstable. (But in my case I tried attitude control, not directly control motors) It could be problem of your CPU load or other problems.(If your SITL is so heavy, then px4 system or Gazebo couldn’t process it well.) But without any logs or terminal outputs, I can’t help you further.