Skip to content

Conversation

@SCool62
Copy link
Contributor

@SCool62 SCool62 commented Mar 16, 2025

Currently, if it detects a skidding module, it will set that module's delta position to the average of the other modules.

@SCool62 SCool62 requested a review from Lyssia-Seiden March 17, 2025 19:26
- (rotationalComponentState.speedMetersPerSecond
* rotationalComponentState.angle.getSin());
}
double xTransComponentAverage = Arrays.stream(xTransComponents).average().getAsDouble();
Copy link
Contributor

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)
Copy link
Contributor

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

@spellingcat spellingcat linked an issue Mar 25, 2025 that may be closed by this pull request
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

Successfully merging this pull request may close these issues.

Skid detection

3 participants