From aa418fb3533d5ca463398b905752459ed8fc2702 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Tue, 24 Oct 2017 21:22:50 -0400 Subject: [PATCH] Fix map errors --- .../org/usfirst/frc/team449/robot/Robot.java | 4 ++-- RoboRIO/src/main/resources/ballbasaur_map.yml | 24 +++++++------------ .../main/resources/calcifer_outreach_map.yml | 21 ++++++++-------- RoboRIO/src/main/resources/nate_map.yml | 23 ++++++++++++++---- RoboRIO/src/main/resources/naveen_map.yml | 23 ++++++++++++++---- 5 files changed, 57 insertions(+), 38 deletions(-) diff --git a/RoboRIO/src/main/java/org/usfirst/frc/team449/robot/Robot.java b/RoboRIO/src/main/java/org/usfirst/frc/team449/robot/Robot.java index b4aa2830..0bf4680d 100644 --- a/RoboRIO/src/main/java/org/usfirst/frc/team449/robot/Robot.java +++ b/RoboRIO/src/main/java/org/usfirst/frc/team449/robot/Robot.java @@ -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); diff --git a/RoboRIO/src/main/resources/ballbasaur_map.yml b/RoboRIO/src/main/resources/ballbasaur_map.yml index 38d4bfaa..f5cd3d35 100644 --- a/RoboRIO/src/main/resources/ballbasaur_map.yml +++ b/RoboRIO/src/main/resources/ballbasaur_map.yml @@ -4,7 +4,7 @@ testMP: true leftTestProfile: &leftTest '@id': leftTest - filename: "ballbasaurForward100InProfile.csv" + filename: "forward100InProfile.csv" inverted: true velocityOnly: true rightTestProfile: @@ -139,7 +139,7 @@ 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 @@ -147,8 +147,11 @@ 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: @@ -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 @@ -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-" \ No newline at end of file diff --git a/RoboRIO/src/main/resources/calcifer_outreach_map.yml b/RoboRIO/src/main/resources/calcifer_outreach_map.yml index 7e3f0f8f..312c9984 100644 --- a/RoboRIO/src/main/resources/calcifer_outreach_map.yml +++ b/RoboRIO/src/main/resources/calcifer_outreach_map.yml @@ -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 @@ -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 @@ -74,7 +76,6 @@ drive: &leftMaster '@id': leftMaster port: 7 - inverted: false reverseOutput: true enableBrakeMode: false feetPerRotation: 0.9817 @@ -116,7 +117,6 @@ drive: org.usfirst.frc.team449.robot.jacksonWrappers.FPSTalon: <<: *leftMaster '@id': rightMaster - inverted: false reverseSensor: true reverseOutput: false port: 2 @@ -163,7 +163,6 @@ climber: org.usfirst.frc.team449.robot.jacksonWrappers.FPSTalon: '@id': climberTalon port: 5 - inverted: false enableBrakeMode: false maxPower: 500 simpleMotor: @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/RoboRIO/src/main/resources/nate_map.yml b/RoboRIO/src/main/resources/nate_map.yml index 57a78bef..19907900 100644 --- a/RoboRIO/src/main/resources/nate_map.yml +++ b/RoboRIO/src/main/resources/nate_map.yml @@ -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 @@ -513,12 +513,12 @@ 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 @@ -526,8 +526,21 @@ 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: diff --git a/RoboRIO/src/main/resources/naveen_map.yml b/RoboRIO/src/main/resources/naveen_map.yml index 6fda3943..41921b61 100644 --- a/RoboRIO/src/main/resources/naveen_map.yml +++ b/RoboRIO/src/main/resources/naveen_map.yml @@ -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 @@ -501,12 +501,12 @@ 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 @@ -514,8 +514,21 @@ 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: