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

Improvements to DCMotorSim and SingleJointedArmSim #6656

Closed
wants to merge 29 commits into from

Conversation

narmstro2020
Copy link
Contributor

@narmstro2020 narmstro2020 commented May 25, 2024

This PR does the following

  1. Renames DCMotorSim to AngularMechanismSim. I'm not opposed to other options. This serves as a base class for mechanisms with both angular position and velocity states.
  2. AngularMechanismSim provides all of the same overloads that were added to FlywheelSim in this PR along with their positional counterparts.
  3. SingleJointedArmSim inherits from AngularMechanismSim to save on method duplication.
  4. Both classes have only one constructor.
  5. SingleJointedArmSim now works for alternative pivot positions not just the end of the arm.
  6. SingleJointedArmSim now provides methods for setting position and velocity independently, getting the arm length, getting the pivot point, getting the arm's mass.
  7. LinearSystemID has been modified to provide methods for creating the plants needed for both of these classes along with some duplication removal.

Items to check/get feedback on.

  1. Should I remove estimateMOI from SingleJointedArmSim or modify it?
  2. The arm tests are failing with actual values somewhat close to their expected value, but not close enough. I'm not sure how to fix.
  3. EDIT: The arm tests are working. I noticed that the comments in the ArmSimulation example didn't have the correct values as listed in the Constants file. I corrected the comments.

@narmstro2020 narmstro2020 requested review from a team as code owners May 25, 2024 02:08
@narmstro2020
Copy link
Contributor Author

/format

@narmstro2020
Copy link
Contributor Author

/format

@narmstro2020
Copy link
Contributor Author

Any thoughts or feedback on this PR?

@narmstro2020 narmstro2020 deleted the AngularMechanismSim branch August 29, 2024 20:56
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.

1 participant