Skip to content

StateSpaceArm example requires missing LinearSystem::Slice(int) #166

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

Open
auscompgeek opened this issue Apr 26, 2025 · 0 comments
Open

StateSpaceArm example requires missing LinearSystem::Slice(int) #166

auscompgeek opened this issue Apr 26, 2025 · 0 comments
Labels
package: wpimath subprojects/robotpy-wpimath

Comments

@auscompgeek
Copy link
Member

This currently doesn't type check, and the example is disabled in the tests:

https://github.com/robotpy/examples/blob/242924b3843fdcc6efc2cefa8eac7bfff8b6bc48/StateSpaceArm/robot.py#L59

because LinearSystemId.singleJointedArmSystem returns a LinearSystem<2, 1, 2>.

The upstream examples slice the outputs of this LinearSystem:

https://github.com/wpilibsuite/allwpilib/blob/0695a4db8912a65f175c814c30075cc3e87b313f/wpilibcExamples/src/main/cpp/examples/StateSpaceArm/cpp/Robot.cpp#L48-L51

https://github.com/wpilibsuite/allwpilib/blob/0695a4db8912a65f175c814c30075cc3e87b313f/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/statespacearm/Robot.java#L64

@auscompgeek auscompgeek added the package: wpimath subprojects/robotpy-wpimath label Apr 26, 2025
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

No branches or pull requests

1 participant