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

Implement Pose2d and Pose3d rotateAround() #7659

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TheComputer314
Copy link
Contributor

@TheComputer314 TheComputer314 commented Jan 8, 2025

Closes #7657

Blocked by #7658

TODO:

  • Wait on Translation3d.rotateAround() to be implemented
  • Come up with a better name for the translation in which it rotates around
  • C++

@github-actions github-actions bot added the component: wpimath Math library label Jan 8, 2025
/**
* Rotates the current pose around a translation in 2D space.
*
* <p>TODO: I feel like pivot is a bad name?
Copy link
Member

Choose a reason for hiding this comment

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

You could just use the naming of Translation2d.rotateAround().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Translation2d.rotateAround() has parameter names Translation2d other, Rotation2d rot and I did use rot for the amount to rotate by but The other translation to rotate around. doesn't quite work for this instance.

Copy link
Member

Choose a reason for hiding this comment

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

Why not?

Copy link
Contributor Author

@TheComputer314 TheComputer314 Jan 8, 2025

Choose a reason for hiding this comment

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

IDK how to better explain this, but other would sorta imply that it's the same type as the class, which is the case for Translation2d.rotateAround(Translation2d other, Rotation2d rot) but isn't the case for Pose2d.rotateAround(Translation2d other, Rotation2d rot). But thinking about it a bit more, maybe it's not that bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Pose2d and Pose3d rotateAround()
2 participants