-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
Copter: Is there any problem in function euler_accel_limit()? #7327
Comments
Hi @luweikxy, Thanks again for going over this so thoroughly! So the problem here is we need to calculate the acceleration limits that will not let us increase past any one individual axis acceleration limit. I think you are calculating the maximum acceleration limits possible, not the minimum that we need. So for example, if we are banked over by 45 degrees in roll. If we ask apply full yaw then the acceleration will be shared by both the body pitch and body yaw. However, if we apply full yaw and push the pitch stick forward then that euler yaw acceleration is applied only to the body frame yaw and is increased in magnitude because the aircraft is banked by 45 degrees. So we need to limit the yaw acceleration based on this limit rather than the vector addition of both body pitch and body yaw. I realise this is poorly worded but does it make sense? Thanks again! |
I have been thinking about this. Perhaps what we need to do here is look at the maximum possible acceleration in the direction of that acceleration rather than the maximum safe acceleration in each axis with no knowledge of what is happening in any other axis. The function would need a little more information though. |
@lthall Is there any action we should take due to this? It sounds like the there is not a problem so we should close, but maybe there is a enhancement that we could open a new issue for? |
@lthall He wanted to ask how the formula was derived, but you didn't answer his question |
@lixiaowei123 I don't agree. |
ardupilot/libraries/AC_AttitudeControl/AC_AttitudeControl.cpp
Line 530 in ed0063d
The function euler_accel_limit(...) is to translate the angle accel limitations from body frame to euler frame.
In this function, rot_accel(in euler frame) is calculated below:
.But I can not figure it out. Whereas I think the right way is like the euler kinematical equation, just use angle accel instead of angle rate.
The euler kinematical equation is indicated below
Namely, the code may be written below:
But my solutions still seems having some problems, because it means that the rot_accel is calculated based on this situations that body accel at three body axises is reaching the max euler_rad at the same time. It definitely does not fit the reality.
The text was updated successfully, but these errors were encountered: