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

Where to find quadrotor parameters and matrix allocation in the firmware ? #14149

Open
islamdib opened this issue Feb 13, 2020 · 7 comments
Open

Comments

@islamdib
Copy link

Hello,
Im new in this domaine. I want to modify the quadrotor PID parameters directly in hte firmware then to change the matrix allocation (control inputs U_i funtion of rotations speed Omega_i).

Please, enyone to tell me where to find this parameters ?

@julianoes
Copy link
Contributor

Can you point to the place in code where you want to change it?

@islamdib
Copy link
Author

I want to stabilize my quadrotor which is originaly in the X-morphology
Ive four servomotors which allow to obtain an H-morphology (negociate in narrow space).
so the inertia matrix have to be changed then the allocation matrix too.
I dont know where to find this parameters ?

@islamdib
Copy link
Author

islamdib commented Feb 19, 2020

Can you point to the place in code where you want to change it?

home/dib/Firmware/src/modules/mc_att_control/mc_att_control_params.c
Im not sure, I think this is the corresponding folder

@julianoes
Copy link
Contributor

The controls just output angular rates and thrust. This is then mixed in a mixer. I think you want to read about that first: https://dev.px4.io/master/en/concept/mixing.html

@saengphet
Copy link

I want to stabilize my quadrotor which is originaly in the X-morphology
Ive four servomotors which allow to obtain an H-morphology (negociate in narrow space).
so the inertia matrix have to be changed then the allocation matrix too.
I dont know where to find this parameters ?

Are you looking for this part?
https://github.com/PX4/Firmware/tree/master/src/lib/mixer/MultirotorMixer

@islamdib
Copy link
Author

@saengphet
now Im working with simulink
the problem is that rotors haven't the same speed so I think that I have to change PID parameters in the first part.
In the second part , I didn't understand the command calculation formula:
% Quad X
M1 = uint16(((Roll + Pitch - Yaw) / 2 * Thrust + Thrust) * single(1000)) + idle_PWM;
M2 = uint16(((-Roll + Pitch + Yaw) / 2 * Thrust + Thrust) * single(1000)) + idle_PWM;
M3 = uint16(((-Roll - Pitch - Yaw) / 2 * Thrust + Thrust) * single(1000)) + idle_PWM;
M4 = uint16(((Roll - Pitch + Yaw) / 2 * Thrust + Thrust) * single(1000)) + idle_PWM;
M5 = uint16(1000);
M6 = uint16(1000);

Capture

@stale
Copy link

stale bot commented May 30, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants