-
Notifications
You must be signed in to change notification settings - Fork 34
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
[Spinal] Add an option for body rate cmd #579
base: master
Are you sure you want to change the base?
Conversation
…te == true, the body_rate cmd will be set as target_ang_vel and hence becomes the feedforward term. Note that I change the sign of d term in control_feedback_state_msg_ to be compatible with p and i.
I think this is a very useful contribution to our control framework. |
In my understanding, in this mode, we use only D-term in our original system for attitude control. Is this correct ? Moreover, where is |
Yes correct, only D-term of attitude controller (or we can call it the P gain for angular rate) is used.
You are right, I truly missed something during cherry-pick. Now I have fixed this part and please check. |
For the naming of the control term, I also agree with @Li-Jinjie . Although using |
What is this
Add body rate option in cmd msg.
Details
First, I add SetControlMode.srv to set mode. The default set is is_attitude == True and is_body_rate == False.
If is_attitude == True and is_body_rate == False, everything remains the same with previous version.
If is_attitude == True and is_body_rate == True, the controller will use error_ang_vel = target_ang_vel - ang_vel to get D term.
If is_attitude == False and is_body_rate == True, the controller becomes a body_rate controller with only P term.
is_attitude == False and is_body_rate == False are temporarily not allowed.
TODO:
Note that I have changed the sign of d term in control_feedback_state_msg_ to be compatible with p and i. I think this change will not affect anything. Please check the 309 line of attitude_control.cpp