-
Notifications
You must be signed in to change notification settings - Fork 0
Skid detection #96
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
base: main
Are you sure you want to change the base?
Skid detection #96
Conversation
| - (rotationalComponentState.speedMetersPerSecond | ||
| * rotationalComponentState.angle.getSin()); | ||
| } | ||
| double xTransComponentAverage = Arrays.stream(xTransComponents).average().getAsDouble(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think its more correct to find the avg and std dev of the speed of each module, rather than the components, but idt it makes a huge difference at the end of the day.
|
|
||
| boolean[] result = new boolean[4]; | ||
| for (int i = 0; i <= moduleStates.length; i++) { | ||
| // If the measurement deviates by more than 2 standard deviations assume it's skidding (TODO: TUNE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it could be worth setting up a way to see how off one module needs to be for this to take effect, either with a desmos project or running some test values through this method
Currently, if it detects a skidding module, it will set that module's delta position to the average of the other modules.