PX4 / PX4-SITL_gazebo-classic

Set of plugins, models and worlds to use with OSRF Gazebo Simulator in SITL and HITL.
http://dev.px4.io/simulation-gazebo.html
368 stars 787 forks source link

In gazebo_motor_model.cpp , what is the unit for the motor_constant and where is the moment calculated? #1001

Open mariam0amin opened 1 year ago

mariam0amin commented 1 year ago

in this line of code -----> ignition::math::Vector3d drag_torque(0, 0, -turningdirection force momentconstant); is this the calculation for the moment? and if it is, how is it force* moment constant? does this mean moment constant unit is meters?? Thanks in advance

JohnTGZ commented 1 year ago

Based on these notes which try to explain the gazebo parameters for the motor model, you might actually be right.

mariam0amin commented 1 year ago

@JohnTGZ
Thank you so much,but it is also written that the motor_constant is in kg.m in this part of the paper paper_motor calculation however I thought it was in (N.sec^2/rad^2) on what I thought I understand and also based on these two issues: 5986 110 so how can the motor constant have this unit?

JohnTGZ commented 1 year ago

The units of ω is [Time^-2], there is no radians involved

Motor constant is in (kg)(m). Moment constant is in (m)

According to the code for motor constant and force: Motor Constant = Thrust / (Angular_rate^2) Units of motor constant = [Mass][Length][Time^2] / [Time^2] = [Mass][Length]

According to the code for moment constant and torque: Moment Constant = (Torque about z axis) / (Thrust along z axis) Units of Moment constant = [Mass][Length^2][Time^2] / [Mass][Length][Time^2] = [Length]

mariam0amin commented 1 year ago

@JohnTGZ Thanks, I appreciate your help; but, do you know how I may obtain the motor constant in this case? I used to conduct an experimental analysis in which I measured the thrust and the rotor velocity in rpm or rad/sec that corresponded to this thrust. After fitting the data, I obtained the motor constant. However, now that you are saying that it is angular rate, how can I obtain the motor constant in that case? or simply that radians are dimensionless?