diff --git a/advantagescope-layout-telemetry.json b/advantagescope-layout-telemetry.json new file mode 100644 index 0000000..0a3589f --- /dev/null +++ b/advantagescope-layout-telemetry.json @@ -0,0 +1,317 @@ +{ + "hubs": [ + { + "x": -8, + "y": -8, + "width": 1552, + "height": 840, + "state": { + "sidebar": { + "width": 500, + "expanded": [ + "/Robot/Robot Container/Swerve", + "/Robot/Swerve/Desired Module States/0", + "/Robot/Swerve/Module States/0", + "/Robot/Swerve/Pose/translation", + "/NT/Faults", + "/NT/Faults/Active Faults/errors", + "/NT/Faults/Active Faults", + "/Robot/Swerve/left-arducam", + "/Robot/Swerve/left-arducam/Estimate", + "/Robot/Swerve/blue-arducam/Estimate", + "/Robot", + "/Robot/Wristevator" + ] + }, + "tabs": { + "selected": 3, + "tabs": [ + { + "type": 0, + "title": "", + "controller": null, + "controllerUUID": "o9cs5ztcxgrwtny58ej9k9380oq4pavb", + "renderer": "#/", + "controlsHeight": 0 + }, + { + "type": 9, + "title": "Swerve", + "controller": { + "sources": [ + { + "type": "chassisSpeeds", + "logKey": "NT:/Robot/Swerve/Speeds", + "logType": "ChassisSpeeds", + "visible": true, + "options": { + "color": "#ff0000" + } + }, + { + "type": "chassisSpeeds", + "logKey": "NT:/Robot/Swerve/Desired Speeds", + "logType": "ChassisSpeeds", + "visible": true, + "options": { + "color": "#0000ff" + } + }, + { + "type": "states", + "logKey": "NT:/Robot/Swerve/Module States", + "logType": "SwerveModuleState[]", + "visible": true, + "options": { + "color": "#ff0000", + "arrangement": "0,1,2,3" + } + }, + { + "type": "states", + "logKey": "NT:/Robot/Swerve/Desired Module States", + "logType": "SwerveModuleState[]", + "visible": true, + "options": { + "color": "#0000ff", + "arrangement": "0,1,2,3" + } + }, + { + "type": "rotation", + "logKey": "NT:/Robot/Swerve/Pose/rotation", + "logType": "Rotation2d", + "visible": true, + "options": {} + } + ], + "maxSpeed": 4.7, + "sizeX": 0.65, + "sizeY": 0.65, + "orientation": 1 + }, + "controllerUUID": "tj8b7ik3e8qxcapobn65d8jzeb8a406h", + "renderer": null, + "controlsHeight": 200 + }, + { + "type": 2, + "title": "Odometry", + "controller": { + "sources": [ + { + "type": "robot", + "logKey": "NT:/Robot/Swerve/Pose", + "logType": "Pose2d", + "visible": true, + "options": {} + }, + { + "type": "vision", + "logKey": "NT:/Robot/Swerve/Detected Tags", + "logType": "Pose3d[]", + "visible": true, + "options": { + "color": "#00ff00", + "size": "normal" + } + }, + { + "type": "ghost", + "logKey": "NT:/Robot/Swerve/Accepted Estimates", + "logType": "Pose3d[]", + "visible": false, + "options": { + "color": "#00ff00" + } + }, + { + "type": "ghost", + "logKey": "NT:/Robot/Swerve/Rejected Estimates", + "logType": "Pose3d[]", + "visible": false, + "options": { + "color": "#ffff00" + } + }, + { + "type": "trajectory", + "logKey": "NT:/Robot/Auto/Current Trajectory", + "logType": "Pose2d[]", + "visible": true, + "options": { + "color": "#ff00ff", + "size": "normal" + } + }, + { + "type": "ghost", + "logKey": "NT:/Robot/Auto/Current Trajectory Desired Pose", + "logType": "Pose2d", + "visible": true, + "options": { + "color": "#ff00ff" + } + } + ], + "game": "2025 Field", + "bumpers": "auto", + "origin": "blue", + "orientation": 0, + "size": 24 + }, + "controllerUUID": "yb01i8b8ie8wdgv27adfp6hmhntv51s1", + "renderer": null, + "controlsHeight": 200 + }, + { + "type": 11, + "title": "Wristevator Space", + "controller": { + "sources": [ + { + "type": "circle", + "logKey": "NT:/Robot/Wristevator/Position", + "logType": "Translation2d", + "visible": true, + "options": { + "size": "small", + "groupSize": "0" + } + }, + { + "type": "cross", + "logKey": "NT:/Robot/Wristevator/Presets", + "logType": "Translation2d[]", + "visible": true, + "options": { + "size": "medium", + "groupSize": "1" + } + }, + { + "type": "plus", + "logKey": "NT:/Robot/Wristevator/Intermediates", + "logType": "Translation2d[]", + "visible": true, + "options": { + "size": "medium", + "groupSize": "2" + } + } + ], + "width": 100, + "height": 10, + "orientation": "xr,yu", + "origin": "ll" + }, + "controllerUUID": "9belppk6g6q3m1ap2vmnkv0necq1906m", + "renderer": null, + "controlsHeight": 200 + }, + { + "type": 10, + "title": "Wristevator", + "controller": [ + { + "type": "mechanism", + "logKey": "NT:/SmartDashboard/Wristevator Visualizer", + "logType": "Mechanism2d", + "visible": true, + "options": {} + }, + { + "type": "mechanism", + "logKey": "NT:/SmartDashboard/Intake Visualizer", + "logType": "Mechanism2d", + "visible": true, + "options": {} + } + ], + "controllerUUID": "nh1p7b3gpwcrbqxaplgte4jzsk0atj1e", + "renderer": null, + "controlsHeight": 180 + }, + { + "type": 1, + "title": "Line Graph", + "controller": { + "leftSources": [ + { + "type": "stepped", + "logKey": "NT:/Robot/Wristevator/Wrist Reference Slope", + "logType": "Number", + "visible": false, + "options": { + "color": "#2b66a2", + "size": "normal" + } + }, + { + "type": "stepped", + "logKey": "NT:/Robot/Wristevator/Elevator Reference Slope", + "logType": "Number", + "visible": true, + "options": { + "color": "#e5b31b", + "size": "normal" + } + }, + { + "type": "stepped", + "logKey": "NT:Robot/Wristevator/Wrist Velocity", + "logType": "Number", + "visible": false, + "options": { + "color": "#af2437", + "size": "normal" + } + }, + { + "type": "stepped", + "logKey": "NT:Robot/Wristevator/Elevator Velocity", + "logType": "Number", + "visible": false, + "options": { + "color": "#af2437", + "size": "normal" + } + }, + { + "type": "stepped", + "logKey": "NT:/Robot/Wristevator/Non-Adjusted Desired Elevator Speed", + "logType": "Number", + "visible": false, + "options": { + "color": "#80588e", + "size": "normal" + } + } + ], + "rightSources": [], + "discreteSources": [], + "leftLockedRange": null, + "rightLockedRange": null, + "leftUnitConversion": { + "type": null, + "factor": 1 + }, + "rightUnitConversion": { + "type": null, + "factor": 1 + }, + "leftFilter": 0, + "rightFilter": 0 + }, + "controllerUUID": "k1almmklzxunotmndfr92dov3bxdpekl", + "renderer": null, + "controlsHeight": 200 + } + ] + } + } + } + ], + "satellites": [], + "version": "4.1.1" +} diff --git a/src/main/java/frc/robot/subsystems/Wristevator.java b/src/main/java/frc/robot/subsystems/Wristevator.java index 0b7bfe6..034c37e 100644 --- a/src/main/java/frc/robot/subsystems/Wristevator.java +++ b/src/main/java/frc/robot/subsystems/Wristevator.java @@ -153,14 +153,14 @@ public Wristevator() { presets[i] = new Translation2d( Preset.values()[i].getHeight().in(Radians), - Preset.values()[i].getAngle().in(Radians)); + Preset.values()[i].getAngle().in(Radians) + WristevatorConstants.minWristAngle.abs(Radians)); } for (int i = 0; i < Intermediate.values().length; i++) { intermediates[i] = new Translation2d( Intermediate.values()[i].getHeight().in(Radians), - Intermediate.values()[i].getAngle().in(Radians)); + Intermediate.values()[i].getAngle().in(Radians) + WristevatorConstants.minWristAngle.abs(Radians)); } DogLog.log("Wristevator/Presets", presets); @@ -527,7 +527,7 @@ public void periodic() { DogLog.log("Wristevator/Previous Setpoint", _prevSetpoint.toString()); DogLog.log("Wristevator/Next Setpoint", _nextSetpoint.toString()); - DogLog.log("Wristevator/Position", new Translation2d(getHeight(), getAngle())); + DogLog.log("Wristevator/Position", new Translation2d(getHeight(), getAngle() + WristevatorConstants.minWristAngle.abs(Radians))); } @Override