Separation of LinearSystemId into MechanismId and DriveTrainId #6000
Unanswered
narmstro2020
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So I'm using my own custom version of LinearSystemId and all of the systemSims. I even made a new one.
I haven't sent a pull request yet, and I am sharing my code for feedback before I do so. Currently only have it programmed in Java. See the attachment.
I have separated out the drivetrain creation methods into their own file. I don't really play with differential drivetrain's so I haven't done anything with this yet. Right now it's just a different home for the code.
MechanismId houses the following static methods. Replacing several existing ones.
Please note all LinearSystems are now N2, N1, N2. I know flywheels don't really need position, but that can just be ignored in normal usage and expands it out for turrets, and swerve steer mechanisms without having to create methods to do this. Elevators and Arms were N2, N1, N1, but I noticed that a bit of work was being done in the sims for those mechanism to get velocity when needed for motion profiling. I just went ahead and made set the number of outputs to 2 to alleviate this.
I haven't finished my replacement systemSim
s yet, but I'm looking at removing the Flywheel and just having DCMotorSim (a new one) take over the duties for it along with turrets and Swerve steers.
ElevatorSim is getting a rework. I know I've got a PR for this already, but I've moved on since then in my inner workings. I'm playing around more with actual season code so haven't messed with the main repo recently.
SingleJointedArmSim is getting a rework
WheelSim is coming.
I'll post a discussion on those later.
Looking for feedback. Thoughts, questions, etc. All will be appreciated. Would love to make this a PR.
MechanismId.txt
Beta Was this translation helpful? Give feedback.
All reactions