Skip to content

Commit

Permalink
Fix map errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah Gleason committed Oct 25, 2017
1 parent 8eddb4f commit aa418fb
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ public void robotInit() {
//Read the yaml file with SnakeYaml so we can use anchors and merge syntax.
// Map<?, ?> normalized = (Map<?, ?>) yaml.load(new FileReader(RESOURCES_PATH+"ballbasaur_map.yml"));
// Map<?, ?> normalized = (Map<?, ?>) yaml.load(new FileReader(RESOURCES_PATH + "naveen_map.yml"));
Map<?, ?> normalized = (Map<?, ?>) yaml.load(new FileReader(RESOURCES_PATH + "nate_map.yml"));
// Map<?, ?> normalized = (Map<?, ?>) yaml.load(new FileReader(RESOURCES_PATH + "calcifer_outreach_map.yml"));
// Map<?, ?> normalized = (Map<?, ?>) yaml.load(new FileReader(RESOURCES_PATH + "nate_map.yml"));
Map<?, ?> normalized = (Map<?, ?>) yaml.load(new FileReader(RESOURCES_PATH + "calcifer_outreach_map.yml"));
YAMLMapper mapper = new YAMLMapper();
//Turn the Map read by SnakeYaml into a String so Jackson can read it.
String fixed = mapper.writeValueAsString(normalized);
Expand Down
24 changes: 9 additions & 15 deletions RoboRIO/src/main/resources/ballbasaur_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ testMP: true
leftTestProfile:
&leftTest
'@id': leftTest
filename: "ballbasaurForward100InProfile.csv"
filename: "forward100InProfile.csv"
inverted: true
velocityOnly: true
rightTestProfile:
Expand Down Expand Up @@ -139,16 +139,19 @@ teleopStartupCommand:
org.usfirst.frc.team449.robot.subsystem.singleImplementation.pneumatics.Pneumatics:
pneumatics
- org.usfirst.frc.team449.robot.drive.commands.EnableMotors:
'@id': enableMotors
'@id': enableMotorsTeleop
subsystem:
org.usfirst.frc.team449.robot.drive.unidirectional.DriveTalonClusterShiftable:
drive
autoStartupCommand:
org.usfirst.frc.team449.robot.commands.general.ParallelCommandGroup:
'@id': startAutoCommand
commandSet:
- org.usfirst.frc.team449.robot.commands.general.ParallelCommandGroup:
startTeleopCommand
- org.usfirst.frc.team449.robot.drive.commands.EnableMotors:
'@id': enableMotorsAuto
subsystem:
org.usfirst.frc.team449.robot.drive.unidirectional.DriveTalonClusterShiftable:
drive
- org.usfirst.frc.team449.robot.drive.commands.ResetPosition:
'@id': resetPosition
subsystem:
Expand All @@ -159,14 +162,7 @@ startupCommand:
'@id': runRunnables
runnables:
- org.usfirst.frc.team449.robot.other.UnidirectionalPoseEstimator:
'@id': noahPoseEstimator
robotDiameter: 2.0833
subsystem:
org.usfirst.frc.team449.robot.drive.unidirectional.DriveTalonCluster:
drive
absolutePosAngleTolerance: 5
- org.usfirst.frc.team449.robot.other.UnidirectionalPoseEstimator:
'@id': eliPoseEstimator
'@id': poseEstimator
subsystem:
org.usfirst.frc.team449.robot.drive.unidirectional.DriveTalonCluster:
drive
Expand All @@ -177,9 +173,7 @@ logger:
- org.usfirst.frc.team449.robot.drive.unidirectional.DriveTalonCluster:
drive
- org.usfirst.frc.team449.robot.other.UnidirectionalPoseEstimator:
noahPoseEstimator
- org.usfirst.frc.team449.robot.other.UnidirectionalPoseEstimator:
eliPoseEstimator
poseEstimator
loopTimeSecs: 0.02
eventLogFilename: "/home/lvuser/logs/eventLog-"
telemetryLogFilename: "/home/lvuser/logs/telemetryLog-"
21 changes: 10 additions & 11 deletions RoboRIO/src/main/resources/calcifer_outreach_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ oi:
org.usfirst.frc.team449.robot.oi.unidirectional.arcade.OIArcadeWithDPad:
'@id': overridingOi
gamepad:
'@id': overridingGamepad
port: 1
org.usfirst.frc.team449.robot.jacksonWrappers.MappedJoystick:
'@id': overridingGamepad
port: 1
rotThrottle:
org.usfirst.frc.team449.robot.oi.throttles.ThrottleDeadbanded:
&overridingRotThrottle
Expand All @@ -37,8 +38,9 @@ oi:
org.usfirst.frc.team449.robot.oi.unidirectional.arcade.OIArcadeWithDPad:
'@id': overridenOi
gamepad:
'@id': overridenGamepad
port: 3
org.usfirst.frc.team449.robot.jacksonWrappers.MappedJoystick:
'@id': overridenGamepad
port: 3
rotThrottle:
org.usfirst.frc.team449.robot.oi.throttles.ThrottleDeadbanded:
&overridenRotThrottle
Expand Down Expand Up @@ -74,7 +76,6 @@ drive:
&leftMaster
'@id': leftMaster
port: 7
inverted: false
reverseOutput: true
enableBrakeMode: false
feetPerRotation: 0.9817
Expand Down Expand Up @@ -116,7 +117,6 @@ drive:
org.usfirst.frc.team449.robot.jacksonWrappers.FPSTalon:
<<: *leftMaster
'@id': rightMaster
inverted: false
reverseSensor: true
reverseOutput: false
port: 2
Expand Down Expand Up @@ -163,7 +163,6 @@ climber:
org.usfirst.frc.team449.robot.jacksonWrappers.FPSTalon:
'@id': climberTalon
port: 5
inverted: false
enableBrakeMode: false
maxPower: 500
simpleMotor:
Expand Down Expand Up @@ -252,7 +251,7 @@ buttons:
org.usfirst.frc.team449.robot.oi.buttons.TriggerButton:
'@id': overridingClimbButton
throttle:
org.usfirst.frc.team449.robot.oi.throttles.Throttle:
org.usfirst.frc.team449.robot.oi.throttles.ThrottleBasic:
'@id': overridingClimbButtonThrottle
stick:
overridingGamepad
Expand All @@ -279,7 +278,7 @@ buttons:
org.usfirst.frc.team449.robot.oi.buttons.TriggerButton:
'@id': overridingPushGearButton
throttle:
org.usfirst.frc.team449.robot.oi.throttles.Throttle:
org.usfirst.frc.team449.robot.oi.throttles.ThrottleBasic:
'@id': overridingPushGearThrottle
stick:
overridingGamepad
Expand Down Expand Up @@ -307,7 +306,7 @@ buttons:
org.usfirst.frc.team449.robot.oi.buttons.TriggerButton:
'@id': overridenClimbButton
throttle:
org.usfirst.frc.team449.robot.oi.throttles.Throttle:
org.usfirst.frc.team449.robot.oi.throttles.ThrottleBasic:
'@id': overridenClimbButtonThrottle
stick:
overridenGamepad
Expand All @@ -334,7 +333,7 @@ buttons:
org.usfirst.frc.team449.robot.oi.buttons.TriggerButton:
'@id': overridenPushGearButton
throttle:
org.usfirst.frc.team449.robot.oi.throttles.Throttle:
org.usfirst.frc.team449.robot.oi.throttles.ThrottleBasic:
'@id': overridenPushGearThrottle
stick:
overridenGamepad
Expand Down
23 changes: 18 additions & 5 deletions RoboRIO/src/main/resources/nate_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ teleopStartupCommand:
'@id': startTeleopCommand
commandSet:
- org.usfirst.frc.team449.robot.generalInterfaces.shiftable.commands.SwitchToLowGear:
'@id': startupSwitchToLowCommand
'@id': startTeleSwitchToLowCommand
subsystem:
org.usfirst.frc.team449.robot.drive.unidirectional.DriveTalonClusterShiftable:
drive
Expand All @@ -513,21 +513,34 @@ teleopStartupCommand:
org.usfirst.frc.team449.robot.subsystem.singleImplementation.pneumatics.Pneumatics:
pneumatics
- org.usfirst.frc.team449.robot.subsystem.interfaces.solenoid.commands.SolenoidForward:
'@id': closeGearHandlerStartup
'@id': startTeleCloseGearHandler
subsystem:
org.usfirst.frc.team449.robot.subsystem.interfaces.solenoid.SolenoidSimple:
gearHandler
- org.usfirst.frc.team449.robot.drive.commands.EnableMotors:
'@id': enableMotors
'@id': startTeleEnableMotors
subsystem:
org.usfirst.frc.team449.robot.drive.unidirectional.DriveTalonClusterShiftable:
drive
autoStartupCommand:
org.usfirst.frc.team449.robot.commands.general.ParallelCommandGroup:
'@id': startAutoCommand
commandSet:
- org.usfirst.frc.team449.robot.commands.general.ParallelCommandGroup:
startTeleopCommand
- org.usfirst.frc.team449.robot.generalInterfaces.shiftable.commands.SwitchToLowGear:
'@id': startAutoSwitchToLowCommand
subsystem:
org.usfirst.frc.team449.robot.drive.unidirectional.DriveTalonClusterShiftable:
drive
- org.usfirst.frc.team449.robot.subsystem.interfaces.solenoid.commands.SolenoidForward:
'@id': startAutoCloseGearHandler
subsystem:
org.usfirst.frc.team449.robot.subsystem.interfaces.solenoid.SolenoidSimple:
gearHandler
- org.usfirst.frc.team449.robot.drive.commands.EnableMotors:
'@id': startAutoEnableMotors
subsystem:
org.usfirst.frc.team449.robot.drive.unidirectional.DriveTalonClusterShiftable:
drive
- org.usfirst.frc.team449.robot.drive.commands.ResetPosition:
'@id': resetPosition
subsystem:
Expand Down
23 changes: 18 additions & 5 deletions RoboRIO/src/main/resources/naveen_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ teleopStartupCommand:
'@id': startTeleopCommand
commandSet:
- org.usfirst.frc.team449.robot.generalInterfaces.shiftable.commands.SwitchToLowGear:
'@id': startupSwitchToLowCommand
'@id': startTeleSwitchToLowCommand
subsystem:
org.usfirst.frc.team449.robot.drive.unidirectional.DriveTalonClusterShiftable:
drive
Expand All @@ -501,21 +501,34 @@ teleopStartupCommand:
org.usfirst.frc.team449.robot.subsystem.singleImplementation.pneumatics.Pneumatics:
pneumatics
- org.usfirst.frc.team449.robot.subsystem.interfaces.solenoid.commands.SolenoidForward:
'@id': closeGearHandlerStartup
'@id': startTeleCloseGearHandler
subsystem:
org.usfirst.frc.team449.robot.subsystem.interfaces.solenoid.SolenoidSimple:
gearHandler
- org.usfirst.frc.team449.robot.drive.commands.EnableMotors:
'@id': enableMotors
'@id': startTeleEnableMotors
subsystem:
org.usfirst.frc.team449.robot.drive.unidirectional.DriveTalonClusterShiftable:
drive
autoStartupCommand:
org.usfirst.frc.team449.robot.commands.general.ParallelCommandGroup:
'@id': startAutoCommand
commandSet:
- org.usfirst.frc.team449.robot.commands.general.ParallelCommandGroup:
startTeleopCommand
- org.usfirst.frc.team449.robot.generalInterfaces.shiftable.commands.SwitchToLowGear:
'@id': startAutoSwitchToLowCommand
subsystem:
org.usfirst.frc.team449.robot.drive.unidirectional.DriveTalonClusterShiftable:
drive
- org.usfirst.frc.team449.robot.subsystem.interfaces.solenoid.commands.SolenoidForward:
'@id': startAutoCloseGearHandler
subsystem:
org.usfirst.frc.team449.robot.subsystem.interfaces.solenoid.SolenoidSimple:
gearHandler
- org.usfirst.frc.team449.robot.drive.commands.EnableMotors:
'@id': startAutoEnableMotors
subsystem:
org.usfirst.frc.team449.robot.drive.unidirectional.DriveTalonClusterShiftable:
drive
- org.usfirst.frc.team449.robot.drive.commands.ResetPosition:
'@id': resetPosition
subsystem:
Expand Down

0 comments on commit aa418fb

Please sign in to comment.