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

Manual With Shooter Lock deadbanding? #436

Open
truher opened this issue Jul 5, 2024 · 0 comments
Open

Manual With Shooter Lock deadbanding? #436

truher opened this issue Jul 5, 2024 · 0 comments

Comments

@truher
Copy link
Member

truher commented Jul 5, 2024

@Coolearthsky this is your code from a few weeks ago, which looks like it's supposed to be some sort of deadband? could you explain what you're doing here?

if (Math.abs(goal.x()-prevGoal.x()) < 0.05 || Math.abs(2*Math.PI - goal.x()-prevGoal.x()) < 0.05) {

State100 goal = new State100(bearing.getRadians(), targetMotion);
if (Math.abs(goal.x()-prevGoal.x()) < 0.05 || Math.abs(2*Math.PI - goal.x()-prevGoal.x()) < 0.05) {
goal = new State100(prevGoal.x(), goal.v(),goal.a());
}
if (Math.abs(goal.v()-prevGoal.v()) < 0.05) {
goal = new State100(goal.x(), 0,goal.a());
}
if (Math.abs(goal.a()) < 0.05) {
goal = new State100(goal.x(), goal.v(),0);
}

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

No branches or pull requests

1 participant