Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High Thrust Calculation in Motor Model Plugin #2637

Open
Kametor opened this issue Oct 1, 2024 · 1 comment
Open

High Thrust Calculation in Motor Model Plugin #2637

Kametor opened this issue Oct 1, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Kametor
Copy link

Kametor commented Oct 1, 2024

Environment

  • OS Version: Ubuntu 22.04
  • Gazebo Harmonic

Description

  • There may be a misunderstanding or misuse of the Gazebo motor model plugin parameters. Specifically, the “maxRotVelocity” parameter, which is described as the “Maximum rotational velocity command in units of rad/s”, seems to be leading to unintended results in the thrust calculation.
    The thrust force is computed using the following equation:

thrust = realMotorVelocity * realMotorVelocity * this->motorConstant;
Here, the variable realMotorVelocity is defined as:

double realMotorVelocity = motorRotVel * this->rotorVelocitySlowdownSim;
Consequently, at full throttle, the resulting force calculation is:

(maxRotVelocity * 10)^2 * motorConstant.
Based on my calculations, the resulting force in Gazebo appears significantly higher than expected. I am uncertain if I am misinterpreting a specific aspect of the model or if there is an issue with the parameter setup. In my calculation the thrust force is very high. Also drone climbs very fast. I think there is a problem. Any guidance or insight into this discrepancy would be greatly appreciated.

@Kametor Kametor added the bug Something isn't working label Oct 1, 2024
@Kametor
Copy link
Author

Kametor commented Oct 1, 2024

As observed, the ESC PWM values are approximately 250, while the joystick input remains below the halfway mark. Despite this moderate input, the drone exhibits rapid ascent behavior. The custom parameters currently in use are as follows:

<plugin filename="gz-sim-multicopter-motor-model-system" name="gz::sim::systems::MulticopterMotorModel">
  <jointName>rotor_0_joint</jointName>
  <linkName>rotor_0</linkName>
  <turningDirection>ccw</turningDirection>
  <timeConstantUp>0.0125</timeConstantUp>
  <timeConstantDown>0.025</timeConstantDown>
  <maxRotVelocity>313.0</maxRotVelocity>
  <motorConstant>830.0e-06</motorConstant>
  <momentConstant>0.03</momentConstant>
  <commandSubTopic>command/motor_speed</commandSubTopic>
  <motorNumber>0</motorNumber>
  <rotorDragCoefficient>0.001</rotorDragCoefficient>
  <rollingMomentCoefficient>0.001</rollingMomentCoefficient>
  <rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
  <motorType>velocity</motorType>
</plugin>

Additionally, the drone has a total weight of 45 kg.
high_thrust

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Inbox
Development

No branches or pull requests

1 participant