Skip to content
This repository was archived by the owner on Dec 18, 2021. It is now read-only.

Commit bd45c0c

Browse files
committed
Updated EncoderDistance parameter for new sprocket.
Adjusted autonomous moves, successfully hung red-right and red-left with the current values. Velocity constant generally 0.6. Taking this version to WPI
1 parent 1aa373a commit bd45c0c

File tree

4 files changed

+23
-24
lines changed

4 files changed

+23
-24
lines changed

Entropy2017/src/org/usfirst/frc/team138/robot/Sensors.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ public static void initialize() {
2727

2828
leftEncoder = new Encoder(RobotMap.LEFT_ENCODER_PORT_A, RobotMap.LEFT_ENCODER_PORT_B);
2929
rightEncoder = new Encoder(RobotMap.RIGHT_ENCODER_PORT_A, RobotMap.RIGHT_ENCODER_PORT_B);
30-
leftEncoder.setDistancePerPulse(0.165);
31-
rightEncoder.setDistancePerPulse(0.165);
30+
leftEncoder.setDistancePerPulse(0.198);
31+
rightEncoder.setDistancePerPulse(0.198);
3232
resetEncoders();
3333

3434
gearCamera = CameraServer.getInstance().startAutomaticCapture("Gear Feed", 0);

Entropy2017/src/org/usfirst/frc/team138/robot/commands/AutoDrive.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,13 @@ public void end() {
172172

173173
protected void interrupted() {
174174
}
175-
175+
176176
public void pidWrite(double output) {
177177
output = -output;
178178
if (rotateInPlace)
179179
{
180-
double minSpeed = 0.7;
181-
if (output > minSpeed|| output < -minSpeed)
180+
double minSpeed = 0.8;
181+
if (output > minSpeed || output < -minSpeed)
182182
{
183183
rotateToAngleRate = output;
184184
}

Entropy2017/src/org/usfirst/frc/team138/robot/commands/AutonomousCommand.java

+17-17
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,21 @@ public AutonomousCommand(String team, String startPos, String autoMode){
3030
{
3131
if (team == "red")
3232
{ // tested with competition robot on practice field
33-
addSequential(new AutoDrive(0.65, 70)); // previously "90"
34-
addSequential(new AutoDrive(52.5));
35-
addSequential(new VisionCorrect(true, 4));
36-
addSequential(new AutoDrive(0.65, 15));
33+
addSequential(new AutoDrive( 0.6, 90));
34+
addSequential(new AutoDrive( 52.5 ));
35+
addSequential(new VisionCorrect( true, 4));
36+
addSequential(new AutoDrive( 0.6, 10));
3737
}
3838
if (team == "blue")
3939
{ // based on mirror of "red-right"
40-
addSequential(new AutoDrive(0.65, 90));
40+
addSequential(new AutoDrive(0.6, 90));
4141
addSequential(new AutoDrive(52.5));
4242
addSequential(new VisionCorrect(true, 4));
43-
addSequential(new AutoDrive(0.65, 15));
43+
addSequential(new AutoDrive(0.6, 10));
4444
}
4545
addSequential(new SetClawPosition(true));
4646
addSequential(new PushGear(true));
47-
addSequential(new Wait(0.5));
47+
addSequential(new Wait(0.6));
4848
addSequential(new AutoDrive(-0.7, 20));
4949
addSequential(new PushGear(false));
5050
addSequential(new Wait(0.1));
@@ -62,16 +62,16 @@ public AutonomousCommand(String team, String startPos, String autoMode){
6262
}
6363
if (startPos == "middle")
6464
{ // tested with competition robot on practice field
65-
addSequential(new AutoDrive(0.65, 40));
65+
addSequential(new AutoDrive(0.6, 40));
6666
addSequential(new VisionCorrect(true, 4));
67-
addSequential(new AutoDrive(0.65, 20));
67+
addSequential(new AutoDrive(0.6, 20));
6868
addSequential(new SetClawPosition(true));
6969
addSequential(new PushGear(true));
70-
addSequential(new Wait(0.5));
70+
addSequential(new Wait(0.6));
7171
addSequential(new PushGear(false));
7272
addSequential(new Wait(0.1));
7373
addSequential(new PushGear(true));
74-
addSequential(new Wait(0.5));
74+
addSequential(new Wait(0.6));
7575
addSequential(new AutoDrive(-0.7, 15));
7676
addSequential(new PushGear(false));
7777
addSequential(new Wait(0.1));
@@ -81,25 +81,25 @@ public AutonomousCommand(String team, String startPos, String autoMode){
8181
{
8282
if (team == "red")
8383
{ // tested with competition robot on practice field
84-
addSequential(new AutoDrive(0.65, 89));
84+
addSequential(new AutoDrive(0.6, 89));
8585
addSequential(new AutoDrive(-52.5));
8686
addSequential(new VisionCorrect(true, 4));
87-
addSequential(new AutoDrive(0.65, 30));
87+
addSequential(new AutoDrive(0.6, 25));
8888
}
8989
if (team == "blue")
9090
{ // based on mirror of "red left"
91-
addSequential(new AutoDrive(0.65, 89));
91+
addSequential(new AutoDrive(0.6, 89));
9292
addSequential(new AutoDrive(-52.5));
9393
addSequential(new VisionCorrect(true, 4));
94-
addSequential(new AutoDrive(0.65, 30));
94+
addSequential(new AutoDrive(0.6, 25));
9595
}
9696
addSequential(new SetClawPosition(true));
9797
addSequential(new PushGear(true));
98-
addSequential(new Wait(0.5));
98+
addSequential(new Wait(0.6));
9999
addSequential(new PushGear(false));
100100
addSequential(new Wait(0.1));
101101
addSequential(new PushGear(true));
102-
addSequential(new Wait(0.5));
102+
addSequential(new Wait(0.6));
103103
addSequential(new AutoDrive(-0.7, 20));
104104
addSequential(new PushGear(false));
105105
addSequential(new Wait(0.1));

save.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,9 @@
8181
<location x="-9" y="13"/>
8282
<width>517</width>
8383
<height>362</height>
84-
<property name="Camera Choice" value="Rope and Shooter Feed"/>
84+
<property name="Camera Choice" value="Ground Feed"/>
8585
</static-widget>
8686
</dashboard>
8787
<live-window>
8888
</live-window>
89-
<hidden field="Distance:"/>
9089
</xml>

0 commit comments

Comments
 (0)