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

Add C++ #1

Conversation

KangarooKoala
Copy link

@KangarooKoala KangarooKoala commented Dec 21, 2023

Adds the C++ side of wpilibsuite#5473.

Notes:

  • This adds a const modifier on TimeInterpolatableBuffer::Sample to allow PoseEstimator::SampleAt to be const-qualified.
  • This takes a different approach to the tests than the Java version. Notably, it follows the pattern of the former tests in storing the encoder readings and updating those on each iteration (instead of adding noise to the ground truth pose). It also doesn't change the standard deviations, and it doesn't use constants for the standard deviations because of the confusion from name hiding. (This can be changed if desired)
  • There are also a few differences in PoseEstimationTestUtils- For example, SE2Kinematics swapped multiplication and division by dt to make the units match. A getter for the wrapped pose in SE2KinematicPrimitive was also added since other places needed it.

@KangarooKoala
Copy link
Author

Weird that running it locally (I have a Mac) didn't catch the constexpr error.

@jlmcmchl
Copy link
Owner

The best PRs delete more code than they contribute. 👍

@jlmcmchl jlmcmchl merged commit a2ae295 into jlmcmchl:jmcmichael/alternate-vision-adjustment Dec 28, 2023
24 of 25 checks passed
@KangarooKoala KangarooKoala deleted the 5473-cpp branch December 28, 2023 18:21
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.

2 participants