Skip to content
This repository has been archived by the owner on Oct 11, 2021. It is now read-only.

What is the intuition of the math of the aerodynamics? #3

Closed
PrasadNR opened this issue Aug 22, 2021 · 1 comment
Closed

What is the intuition of the math of the aerodynamics? #3

PrasadNR opened this issue Aug 22, 2021 · 1 comment

Comments

@PrasadNR
Copy link
Owner

PrasadNR commented Aug 22, 2021

I am creating this question as several people have asked this question to me.

https://github.com/PrasadNR/Webots-Quadcopter-Python-SITL/blob/master/controllers/mavic2proController/mavic2proController.py#L93-L96

front_left_motor_input = float(params["k_vertical_thrust"]) + vertical_input - roll_input - pitch_input + yaw_input
front_right_motor_input = float(params["k_vertical_thrust"]) + vertical_input + roll_input - pitch_input - yaw_input
rear_left_motor_input = float(params["k_vertical_thrust"]) + vertical_input - roll_input + pitch_input - yaw_input
rear_right_motor_input = float(params["k_vertical_thrust"]) + vertical_input + roll_input + pitch_input + yaw_input

I did not create this equation by myself; these were derived from the C++ equations I saw in Webots software https://github.com/cyberbotics/webots/blob/master/projects/robots/dji/mavic/controllers/mavic2pro/mavic2pro.c#L173-L180 (where I saw these equations without explanations or comments):

const double front_left_motor_input = k_vertical_thrust + vertical_input - roll_input - pitch_input + yaw_input;
const double front_right_motor_input = k_vertical_thrust + vertical_input + roll_input - pitch_input - yaw_input;
const double rear_left_motor_input = k_vertical_thrust + vertical_input - roll_input + pitch_input - yaw_input;
const double rear_right_motor_input = k_vertical_thrust + vertical_input + roll_input + pitch_input + yaw_input;
wb_motor_set_velocity(front_left_motor, front_left_motor_input);
wb_motor_set_velocity(front_right_motor, -front_right_motor_input);
wb_motor_set_velocity(rear_left_motor, -rear_left_motor_input);
wb_motor_set_velocity(rear_right_motor, rear_right_motor_input);

The intuition is like the one below:
k_vertical_thrust is for the quadcopter to just stay in the air without losing altitude. So, just for this discussion, we can assume that the quadcopter just stays in the air even when k_vertical_thrust = 0 (may be by magnetic fields that lets quadcopter "hover" without having to have any air-power). Then, if M1, M2, M3 and M4 are the four motors of the quadcopter, we can conveniently represent the 4 channel input mapped to these four motors' inputs.

Screenshot 2021-08-22 9 24 52 PM

@PrasadNR
Copy link
Owner Author

latex_source.zip
LaTeX source if any person is not able to view the image properly.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant