mirror of
https://github.com/TimeCrafters/UltimateGoal.git
synced 2025-12-16 06:02:33 +00:00
Stuff for localization accuracy experiment.
This commit is contained in:
@@ -32,7 +32,7 @@ public class IMUDrive extends CyberarmState {
|
|||||||
double inchesTarget = robot.stateConfiguration.variable(groupName, actionName, "inches").value();
|
double inchesTarget = robot.stateConfiguration.variable(groupName, actionName, "inches").value();
|
||||||
tickTarget = (int) robot.inchesToTicks(inchesTarget);
|
tickTarget = (int) robot.inchesToTicks(inchesTarget);
|
||||||
angleTarget = robot.stateConfiguration.variable(groupName, actionName, "angle").value();
|
angleTarget = robot.stateConfiguration.variable(groupName, actionName, "angle").value();
|
||||||
finishDelay = robot.stateConfiguration.variable(groupName,actionName,"delay").value();
|
finishDelay = robot.stateConfiguration.variable(groupName, actionName, "delay").value();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -25,8 +25,12 @@ public class IMUTurn extends CyberarmState {
|
|||||||
power = robot.stateConfiguration.variable(groupName,actionName, "power").value();
|
power = robot.stateConfiguration.variable(groupName,actionName, "power").value();
|
||||||
angleTarget = robot.stateConfiguration.variable(groupName,actionName, "angle").value();
|
angleTarget = robot.stateConfiguration.variable(groupName,actionName, "angle").value();
|
||||||
angleAllowance = robot.stateConfiguration.variable(groupName,actionName, "allowance").value();
|
angleAllowance = robot.stateConfiguration.variable(groupName,actionName, "allowance").value();
|
||||||
turnDirection = robot.stateConfiguration.variable(groupName, actionName, "direction").value();
|
|
||||||
useOptimalDirection = (turnDirection==0);
|
// turnDirection = robot.stateConfiguration.variable(groupName, actionName, "direction").value();
|
||||||
|
|
||||||
|
turnDirection = 0;
|
||||||
|
|
||||||
|
useOptimalDirection = (turnDirection == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -23,5 +23,43 @@ public class LocalizerTestingEngine extends CyberarmEngine {
|
|||||||
addState(new IMUTurn(robot,"group", "020_turn"));
|
addState(new IMUTurn(robot,"group", "020_turn"));
|
||||||
addState(new IMUDrive(robot,"group", "030_drive"));
|
addState(new IMUDrive(robot,"group", "030_drive"));
|
||||||
addState(new IMUTurn(robot,"group", "040_turn"));
|
addState(new IMUTurn(robot,"group", "040_turn"));
|
||||||
|
|
||||||
|
addState(new IMUDrive(robot,"group", "050_drive"));
|
||||||
|
addState(new IMUTurn(robot,"group", "060_turn"));
|
||||||
|
addState(new IMUDrive(robot,"group", "070_drive"));
|
||||||
|
addState(new IMUTurn(robot,"group", "080_turn"));
|
||||||
|
|
||||||
|
|
||||||
|
addState(new IMUDrive(robot,"group", "010_drive"));
|
||||||
|
addState(new IMUTurn(robot,"group", "020_turn"));
|
||||||
|
addState(new IMUDrive(robot,"group", "030_drive"));
|
||||||
|
addState(new IMUTurn(robot,"group", "040_turn"));
|
||||||
|
|
||||||
|
addState(new IMUDrive(robot,"group", "050_drive"));
|
||||||
|
addState(new IMUTurn(robot,"group", "060_turn"));
|
||||||
|
addState(new IMUDrive(robot,"group", "070_drive"));
|
||||||
|
addState(new IMUTurn(robot,"group", "080_turn"));
|
||||||
|
|
||||||
|
addState(new IMUDrive(robot,"group", "010_drive"));
|
||||||
|
addState(new IMUTurn(robot,"group", "020_turn"));
|
||||||
|
addState(new IMUDrive(robot,"group", "030_drive"));
|
||||||
|
addState(new IMUTurn(robot,"group", "040_turn"));
|
||||||
|
|
||||||
|
addState(new IMUDrive(robot,"group", "050_drive"));
|
||||||
|
addState(new IMUTurn(robot,"group", "060_turn"));
|
||||||
|
addState(new IMUDrive(robot,"group", "070_drive"));
|
||||||
|
addState(new IMUTurn(robot,"group", "080_turn"));
|
||||||
|
|
||||||
|
|
||||||
|
addState(new IMUDrive(robot,"group", "010_drive"));
|
||||||
|
addState(new IMUTurn(robot,"group", "020_turn"));
|
||||||
|
addState(new IMUDrive(robot,"group", "030_drive"));
|
||||||
|
addState(new IMUTurn(robot,"group", "040_turn"));
|
||||||
|
|
||||||
|
addState(new IMUDrive(robot,"group", "050_drive"));
|
||||||
|
addState(new IMUTurn(robot,"group", "060_turn"));
|
||||||
|
addState(new IMUDrive(robot,"group", "090_drive"));
|
||||||
|
addState(new IMUTurn(robot,"group", "080_turn"));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user