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

Linear acceleration for strafing and rotating #18

Open
wants to merge 8 commits into
base: 6460-main-dev
Choose a base branch
from

Conversation

smyansengupta
Copy link
Collaborator

This pull request implements linear acceleration based on time for strafing (in travelLinear method) and rotating (in rotate method). This is done in order to fix the issue of the robot accelerating in a quadratic manner.

  • Added getHalfRotateTime method to find half the amount of time it takes to rotate.
  • Added getHalfStrafeTime method to find half the amount of time it takes to strafe.
  • Added getRobotSpeed method to find the speed of the robot based on the angle and power. This is used in the getHalfStrafeTime method for the miminum and maximum speeds of the robot, which are used in the time calculations.

formularin and others added 8 commits January 26, 2022 11:22
…e strafe angle, strafing speed, wheel speeds, and speed factor; implemented getMinStrafeSpeed and getMaxStrafeSpeed methods to, respectively, get minimum and maximum strafing speeds of robot using getRobotSpeed method with minimum and maximum strafing power constants; set min_strafe_speed and max_strafe_speed variables to minimum and maximum strafing speeds, respectively
…ing getRobotSpeed directly from getHalfStrafeTime
…do a rotation based on the angle and the speed; added ROTATION_RADIUS constant which will be used for the calculations of the angular velocity
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.

2 participants