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

[question] Math behind converting attitude errors to body rates #228

Open
ayhamalharbat opened this issue Oct 21, 2022 · 2 comments
Open

Comments

@ayhamalharbat
Copy link

Hi @Jaeyoung-Lim ,

I have a couple of questions:

  1. What is the logic/math behind converting the non-linear attitude errors to angular velocity setpoints (as shown below)? is there a physical meaning to this conversion and to the constant attctrl_tau_?

    desired_rate_ = (2.0 / attctrl_tau_) * error_att;

    and
    desired_rate_(0) = (2.0 / attctrl_tau_) * std::copysign(1.0, qe(0)) * qe(1);
    desired_rate_(1) = (2.0 / attctrl_tau_) * std::copysign(1.0, qe(0)) * qe(2);
    desired_rate_(2) = (2.0 / attctrl_tau_) * std::copysign(1.0, qe(0)) * qe(3);

  2. Do you have any practical recommendations on how to get an accurate and proper normalization of the thrust command, i.e. how to estimate the norm_thrust_const_ and norm_thrust_offset_?

    bodyrate_cmd(3) =
    std::max(0.0, std::min(1.0, norm_thrust_const_ * thrust_command +
    norm_thrust_offset_)); // Calculate thrustcontroller_->getDesiredThrust()(3);

Thanks in advance!

@cillian-bao
Copy link

I encounter the same problem,if the code written in this way, I dont't think it is a geometric control approach. @Jaeyoung-Lim

@Jaeyoung-Lim
Copy link
Owner

@cillian-bao I have explained why this is the case in #230

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

No branches or pull requests

3 participants