BitBucketsFRC4183 / FRC2020_Infinite_Recharge

Team 4183's repository for our Infinite Recharge robot's code
5 stars 10 forks source link

Using theoretical power cell locations (to be refined later) #249

Closed howard-beck closed 4 years ago

howard-beck commented 4 years ago

Remember how inconsistent it was being grabbing the first ball? I wonder if maybe the locations we had were wrong. I want to test the theoretical locations, I've already made a GUI in matlab with them and they seem to be in the right spot

On Sun, Mar 8, 2020 at 8:53 AM cpostbitbuckets notifications@github.com wrote:

@cpostbitbuckets requested changes on this pull request.

In InfiniteRecharge/src/test/java/frc/robot/subsystem/drive/auto/FieldConstantsTest.java https://github.com/BitBucketsFRC4183/FRC2020_Infinite_Recharge/pull/249#discussion_r389381877 :

+

+import org.junit.Test;

+

+import static org.junit.Assert.*;

+

+import edu.wpi.first.wpilibj.geometry.Translation2d;

+import frc.robot.subsystem.drive.auto.FieldConstants;

+

+

+

+public class FieldConstantsTest {

  • @Test

  • public void testRelativeTransform() {

  • Translation2d pos = FieldConstants.transformToRobot(FieldConstants.OUR_POWER_CELL_1);

  • assertEquals(pos.getX(), 3.114802, 0.00001);

Shouldn’t this be (1.5, 1.2)? That’s what worked in our tests and you are using this transformed position in the trajectory now.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BitBucketsFRC4183/FRC2020_Infinite_Recharge/pull/249?email_source=notifications&email_token=AKDWUW56RCRSUFHXONBTSSTRGO5QJA5CNFSM4LDUAR6KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCYNJD7Q#pullrequestreview-370840062, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDWUWYDYXPYLBPVMTN4TELRGO5QJANCNFSM4LDUAR6A .

-- Sincerely, Howard Beck