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

【mc_att_control】 Remove unnecessary defaults. #9077

Closed
xdwgood opened this issue Mar 14, 2018 · 1 comment · Fixed by #8003
Closed

【mc_att_control】 Remove unnecessary defaults. #9077

xdwgood opened this issue Mar 14, 2018 · 1 comment · Fixed by #8003

Comments

@xdwgood
Copy link
Contributor

xdwgood commented Mar 14, 2018

😃 I don't think we need this extra variable. https://github.com/PX4/Firmware/blob/master/src/modules/mc_att_control/mc_att_control_main.cpp#L95 
This variable ATTITUDE_TC_DEFAULT is used to adjust the pid. 
Use it here: https://github.com/PX4/Firmware/blob/master/src/modules/mc_att_control/mc_att_control_main.cpp#L534
I think we can use this parameter MC_ROLL_TC to directly adjust the pid. https://github.com/PX4/Firmware/blob/master/src/modules/mc_att_control/mc_att_control_params.c#L54
It is also a mistake to follow the current logic. https://github.com/PX4/Firmware/blob/master/src/modules/mc_att_control/mc_att_control_params.c#L45
Should : Increase if the system is too twitchy, Reduce if the response is too slow and sluggish.

@MaEtUgR @Stifael Do I understand that correctly? :rabbit2:

@MaEtUgR
Copy link
Member

MaEtUgR commented Mar 15, 2018

@xdwgood Don't use the TC parameters, I just recently requested to take them out: a349bd8
It will likely get merged soon.

TC stands for time constant. It just the inverse of a gain -> K = 1/TC
In this implementation it was multiplied to the gain as GAIN * 0.2/TC which means if you stay on default parameters (which is 0.2) it multiplies by 1 and has no effect.
If you changed the parameter you blindly rescale the gains of rate and attitude control loop... which makes no sense from a control perspective and only generates confusion in my opinion. That's why I deleted them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants