Skip to content

Conversation

@LucienMorey
Copy link
Contributor

4774 is trying their hand at state space control. We are starting with a single jointed arm to control our intake and shooter from this past season. The C++/Java code creates a 2 1 2 system and slices it into a 2 1 1 system. We can't do this in Python because that method doesn't exist.

I don't think language parity is likely to happen in this case. Slicing is also a whack operation in this part of the codebase anyway. I suggest sticking a 2 1 2 kf in the example. This class would also help our cause, making arms great again anyway.

I manually added these entries for export in the __init__.py. The file should be autogenerated, but I can't see what else I should modify at first glance. A quick search for any other reference to the word KalmanFilter and estimator didn't show me another spot to modify, but if you tell me where to look, I will do the things.

I figure an equivalent ekf couldn't hurt either if we want to get fancy later

@auscompgeek
Copy link
Member

Do we need to instantiate a LinearSystemLoop as well?

@auscompgeek
Copy link
Member

FWIW the long term fix will be to make all this compatible with Eigen::Dynamic sized matrices, so we don't have to instantiate these templates with every fathomable combination.

@auscompgeek auscompgeek added the package: wpimath subprojects/robotpy-wpimath label Apr 26, 2025
@LucienMorey
Copy link
Contributor Author

Do we need to instantiate a LinearSystemLoop as well?

Done

Copy link
Member

@auscompgeek auscompgeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@auscompgeek auscompgeek merged commit 094dd76 into robotpy:main Apr 27, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: wpimath subprojects/robotpy-wpimath

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants