Bionic-Bison-5535 / Bionic-Bison-2023-Competition-Robot

This is FRC team 5535's robot code for the 2023 competition.
1 stars 0 forks source link

Robot Arm Position Function #13

Closed WesleyMcGinn closed 1 year ago

WesleyMcGinn commented 1 year ago

We want to have four different positions for the robotic arm to easily go to through the arm.pos(<POSITION_NUMBER>); function. The positions would be as in the chart below:

Position Number Purpose
0 Score in bottom row or collect game piece from floor
1 Score in middle row (puts arm slightly above position for dropping.)
2 Score in top row (puts arm slightly above position for dropping.
3 Starting configuration or hold object in robot frame while traveling.

The code for moving the arm to a position is written, but it has not yet been tested and it is very likely to have errors.

WesleyMcGinn commented 1 year ago

The robotic arm design has changed so that we are using a three-segment robotic arm. This means that we will need three encoder values per position.

A new branch for the new robotic arm design has just been created. It is called 3arm due to the fact that there are three segments, as well as three motors, in the arm.

It is important to create some means of testing positions and adjusting encoder values through the SmartDashboard. In the new branch, testPeriodic() will be used first to reset the motors and then to test the robotic arm using the SmartDashboard. One box in the SmartDashboard will be labeled Arm Pos, in which a 0, 1, 2, or 3 can be entered. There will also be boxes on the right side of the SmartDashboard that will always be available, used for adjusting the encoder values of each position. These can be adjusted while test mode is enabled, so you can use a live feedback loop to find the exact encoder values needed for each motor.

WesleyMcGinn commented 1 year ago

Extra arm position

While it seems like we would only need the four robotic arm positions initially described, we now know that it would also be useful to have an extra arm position, located just below position 1. This would enable us to grab a game piece off of the middle row and place it on the highest row - an action that would earn our alliance an instant gain of two points! This action would be performed by pressing the right stick on the primary controller down after auto-aligning.

The new position would be position 4, making the position table as follows:

Position Number Purpose
0 Score in bottom row or collect game piece from floor
1 Score in middle row (puts arm slightly above position for dropping.)
2 Score in top row (puts arm slightly above position for dropping.
3 Starting configuration or hold object in robot frame while traveling.
4 Grab object off of second row to place on third.
WesleyMcGinn commented 1 year ago

Extra arm position

While it seems like we would only need the four robotic arm positions initially described, we now know that it would also be useful to have an extra arm position, located just below position 1. This would enable us to grab a game piece off of the middle row and place it on the highest row - an action that would earn our alliance an instant gain of two points!

With our new intake system, this action is not possible.