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

SimpleThruster does not set thrust if there are no thrust limits set (the default) #54

Open
jrtcppv opened this issue Sep 19, 2024 · 0 comments

Comments

@jrtcppv
Copy link

jrtcppv commented Sep 19, 2024

Describe the bug
Setting the setpoint (thrust and torque) on SimpleThruster ignores the thrust if it does not pass the check for upper limit > lower limit. By default the limits are (1, -1), so by default setSetpoint ignores input thrust.

To Reproduce
Steps to reproduce the behavior:
Set the setpoint on a SimpleThruster without setting the limits first, the call getThrust() and the thrust will have not changed.

Expected behavior
Setting the thrust setpoint should work when limits are not set.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
You can see this via code inspection here:

void SimpleThruster::setSetpoint(Scalar _thrust, Scalar _torque)
{
if(limits.second > limits.first) // Limitted
sThrust = _thrust < limits.first ? limits.first : (_thrust > limits.second ? limits.second : _thrust);
sTorque = _torque;
if(inv)
{
sThrust *= Scalar(-1);
sTorque *= Scalar(-1);
}
ResetWatchdog();
}

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

1 participant