Skip to content
This repository has been archived by the owner on Dec 25, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant