diff --git a/3128-Common.json b/3128-Common.json
index b3e7043..e4d5d7a 100644
--- a/3128-Common.json
+++ b/3128-Common.json
@@ -1,6 +1,6 @@
{
"name": "3128-common",
- "version": "1.3.3",
+ "version": "1.3.4",
"uuid": "ae3fa5a2-78d9-47e8-921a-dba45b889445",
"frcYear": "2024",
"mavenUrls": [
@@ -12,7 +12,7 @@
{
"groupId": "com.github.Team3128",
"artifactId": "3128-common",
- "version": "1.3.3"
+ "version": "1.3.4"
}
],
"jniDependencies": [],
diff --git a/3128-common.json b/3128-common.json
index b3e7043..e4d5d7a 100644
--- a/3128-common.json
+++ b/3128-common.json
@@ -1,6 +1,6 @@
{
"name": "3128-common",
- "version": "1.3.3",
+ "version": "1.3.4",
"uuid": "ae3fa5a2-78d9-47e8-921a-dba45b889445",
"frcYear": "2024",
"mavenUrls": [
@@ -12,7 +12,7 @@
{
"groupId": "com.github.Team3128",
"artifactId": "3128-common",
- "version": "1.3.3"
+ "version": "1.3.4"
}
],
"jniDependencies": [],
diff --git a/doc/allclasses-index.html b/doc/allclasses-index.html
index ffba171..2174de4 100644
--- a/doc/allclasses-index.html
+++ b/doc/allclasses-index.html
@@ -119,147 +119,143 @@
All Classes and Interfaces<
Custom GenericHID class for team 3128's button board setup
-
+
-
Team 3128's streamlined PhotonCamera
class that provides additional functionality and ease of use.
-
-
-
Team 3128's streamlined CANSparkBase
class.
-
-
+
+
-
-
+
+
-
-
+
+
Team 3128's status frames
-
-
+
+
Wrapper for the WPILib Joystick
class.
-
-
+
+
Team 3128's motor class replacement for MotorController
-
-
+
+
-
-
+
+
Store conversion factors for motor
-
-
-
-
+
+
+
+
Motor states when no voltage is applied
-
-
+
+
Team 3128's PIDCommand that uses a ControllerBase to control an output.
-
-
+
+
A subsystem based off of PIDSubsystem
-
-
+
+
Team 3128's Robot class that includes advantageScope and addPeriodic
-
-
-
-
+
+
+
+
Team 3128's Wrapper class for Shuffleboard
-
-
+
+
Team 3128's streamlined WPI_TalonSRX
class.
-
-
+
+
Wrapper for the WPILib XboxController class.
-
-
+
+
Enum to represent buttons
-
-
+
+
Team 3128's WebSocketServer
class, used to log robot data and select autos
-
-
-
-
+
+
+
+
Stores PID and feedforward constants.
-
-
-
-
+
+
+
+
Team 3128's Pivot Template class.
-
-
+
+
Team 3128's class to take the derivative of a Polynomial Regression function.
-
-
+
+
The PolynomialRegression
class performs a polynomial regression on an set of N
data points (yi, xi).
-
-
+
+
Team 3128's Shooter Template class.
-
-
-
-
+
+
+
+
-
-
+
+
Team 3128's conversion class for Swerve
-
-
+
+
Team 3128's Swerve Module class
-
-
+
+
Swerve Module configuration class which is used to configure
SwerveModule
.
-
-
-
+
-
-
+
+
+
+
Team 3128's Tester utility class used to run system checks at competitions.
-
-
+
+
Collection of tests to be run for a system
-
-
+
+
Enum representing test states
-
-
+
+
-
-
+
+
Team 3128's streamlined ProfiledPIDController
class.
diff --git a/doc/common/core/swerve/SwerveModule.html b/doc/common/core/swerve/SwerveModule.html
index 80a9729..9a8fc28 100644
--- a/doc/common/core/swerve/SwerveModule.html
+++ b/doc/common/core/swerve/SwerveModule.html
@@ -148,7 +148,9 @@
Method Summary
-
+
+
Return the state of the swerve module.
+
edu.wpi.first.math.kinematics.SwerveModuleState
@@ -331,6 +333,11 @@
getAngleMotor
getRunningState
+Return the state of the swerve module.
+
+- Returns:
+- State of the swerve module.
+
diff --git a/doc/common/hardware/camera/Camera.html b/doc/common/hardware/camera/Camera.html
index c0506c1..fb36765 100644
--- a/doc/common/hardware/camera/Camera.html
+++ b/doc/common/hardware/camera/Camera.html
@@ -90,17 +90,29 @@
Field Summary
+
final edu.wpi.first.apriltag.AprilTagFields
+
+
+
final org.photonvision.PhotonPoseEstimator.PoseStrategy
+
+
+
final org.photonvision.PhotonPoseEstimator
+
+
+
+
+
final double
-
+
-
boolean
-
+
final double
+
-
-
+
final double
+
-
final edu.wpi.first.math.geometry.Transform2d
-
+
final double
+
@@ -113,13 +125,14 @@
Constructor Summary
-
Camera(String name,
- boolean enabled,
- edu.wpi.first.math.geometry.Transform2d cameraOffset,
- double cameraPitch)
-
-
Creates a new object for a camera.
-
+
Camera(String name,
+ double xOffset,
+ double yOffset,
+ double pitchOffset,
+ double yawOffset,
+ edu.wpi.first.apriltag.AprilTagFields aprilTags,
+ org.photonvision.PhotonPoseEstimator.PoseStrategy calc_strategy)
+
@@ -148,21 +161,45 @@
name
-
-offset
-public final edu.wpi.first.math.geometry.Transform2d offset
+
+xOffset
+public final double xOffset
-
-enabled
-public boolean enabled
+
+yOffset
+public final double yOffset
-
-cameraPitch
-public final double cameraPitch
+
+pitchOffset
+public final double pitchOffset
+
+
+
+
+yawOffset
+public final double yawOffset
+
+
+
+
+
+
+
+calc_strategy
+public final org.photonvision.PhotonPoseEstimator.PoseStrategy calc_strategy
+
+
+
+
+estimator
+public final org.photonvision.PhotonPoseEstimator estimator
@@ -174,19 +211,15 @@
cameraPitch
Constructor Details
diff --git a/doc/common/hardware/camera/NAR_Camera.html b/doc/common/hardware/camera/NAR_Camera.html
deleted file mode 100644
index 58c54d5..0000000
--- a/doc/common/hardware/camera/NAR_Camera.html
+++ /dev/null
@@ -1,435 +0,0 @@
-
-
-
-
-
NAR_Camera (3128-common)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-java.lang.Object
-
org.photonvision.PhotonCamera
-
common.hardware.camera.NAR_Camera
-
-
-
-
-- All Implemented Interfaces:
-AutoCloseable
-
-
-public class NAR_Camera
-extends org.photonvision.PhotonCamera
-Team 3128's streamlined
PhotonCamera
class that provides additional functionality and ease of use.
-
Geometry: https://docs.wpilib.org/en/stable/docs/software/advanced-controls/geometry/index.html.
-
Photonvision: https://docs.photonvision.org/en/latest/.
-
-- Since:
-- 2023 Charged Up
-
-
-
-
-
--
-
-
Field Summary
-Fields
-
-
-
Fields inherited from class org.photonvision.PhotonCamera
-kTableName
-
-
-
--
-
-
Constructor Summary
-Constructors
-
-
-
-
-
-
Creates a NAR_Camera object.
-
-
-
-
-
--
-
-
Method Summary
-
-
-
-
-
-
-
-
void
-
-
-
Stops the camera from updating robot odometry.
-
-
void
-
-
-
Allows the camera to update robot odometry.
-
-
edu.wpi.first.math.geometry.Transform2d
-
-
-
Returns the best target to camera vector as a Transform2d.
-
-
double
-
-
-
Returns the distance from the best target to the camera.
-
-
-
-
-
edu.wpi.first.math.geometry.Pose2d
-
-
-
Returns position of the robot on the field based on the best target.
-
-
edu.wpi.first.math.geometry.Transform2d
-
-
-
Returns the best target to camera vector as a Transform2d.
-
-
edu.wpi.first.math.geometry.Transform3d
-
-
-
Returns the best target to camera vector as a Transform3d.
-
-
boolean
-
-
-
Returns whether or not the camera sees a target.
-
-
static void
-
-
-
Sets the necessary resources for cameras to function.
-
-
static void
-
setThresholds(double angleThreshold,
- double distanceThreshold,
- double ambiguityThreshold,
- boolean multipleTargets)
-
-
Sets the thresholds for camera pose estimates.
-
-
double
-
-
-
Returns the ambiguity of the best target with lower being more accurate.
-
-
int
-
-
-
Returns the ID of the best target.
-
-
void
-
-
-
Gets the latest targets.
-
-
-
-
-
-
Methods inherited from class org.photonvision.PhotonCamera
-close, getCameraMatrix, getCameraTable, getDistCoeffs, getDriverMode, getLatestResult, getLEDMode, getPipelineIndex, hasTargets, isConnected, setDriverMode, setLED, setPipelineIndex, setVersionCheckEnabled, takeInputSnapshot, takeOutputSnapshot
-
-
Methods inherited from class java.lang.Object
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
-
-
-
--
-
-
-
--
-
-
Constructor Details
-
--
-
-
NAR_Camera
-public NAR_Camera(Camera camera)
-Creates a NAR_Camera object.
-
-- Parameters:
-camera
- Specs of the camera.
-
-
-
-
-
-
-
--
-
-
Method Details
-
--
-
-
setResources
-
-Sets the necessary resources for cameras to function.
-
-- Parameters:
-gyro
- Feeds the angle of the robot.
-odometry
- Feeds the robot odometry object for vision estimates to update.
-aprilTags
- Sets the AprilTag positions on the field.
-poseSupplier
- Supplies the robot's current pose.
-
-
-
--
-
-
setThresholds
-public static void setThresholds(double angleThreshold,
- double distanceThreshold,
- double ambiguityThreshold,
- boolean multipleTargets)
-Sets the thresholds for camera pose estimates.
-
Defaults: 30 degrees, 5 meters, 0.5, false.
-
-- Parameters:
-angleThreshold
- Angle offset to stop using estimates.
-distanceThreshold
- Distance to stop accepting updates.
-ambiguityThreshold
- Pose ambiguity from 0.0 to 1.0 to reject estimates.
-multipleTargets
- Update position using multiple tags.
-
-
-
--
-
-
enable
-public void enable()
-Allows the camera to update robot odometry.
-
-
--
-
-
disable
-public void disable()
-Stops the camera from updating robot odometry.
-
-
--
-
-
update
-public void update()
-Gets the latest targets.
-
-
--
-
-
hasTarget
-public boolean hasTarget()
-Returns whether or not the camera sees a target.
-
-- Returns:
-- If camera sees any targets.
-
-
-
--
-
-
getDistance
-public double getDistance()
-Returns the distance from the best target to the camera.
-
-- Returns:
-- The distance in meters.
-
-
-
--
-
-
targetId
-public int targetId()
-Returns the ID of the best target.
-
-- Returns:
-- The target ID as an integer.
-
-
-
--
-
-
targetAmbiguity
-public double targetAmbiguity()
-Returns the ambiguity of the best target with lower being more accurate.
-
-- Returns:
-- A value from 0.0 to 1.0 representing the accuracy of the target.
-
-
-
--
-
-
getTarget3d
-public edu.wpi.first.math.geometry.Transform3d getTarget3d()
-Returns the best target to camera vector as a Transform3d.
-
-- Returns:
-- Transform3d with coordinate system relative to camera.
-
-
-
--
-
-
getRelTarget
-public edu.wpi.first.math.geometry.Transform2d getRelTarget()
-Returns the best target to camera vector as a Transform2d.
-
- Factors in camera pitch offset.
-
-- Returns:
-- Transform2d with coordinate system relative to camera.
-
-
-
--
-
-
getAccTarget
-public edu.wpi.first.math.geometry.Transform2d getAccTarget()
-Returns the best target to camera vector as a Transform2d.
-
-- Returns:
-- Transform2d with coordinate system relative to target.
-
-
-
--
-
-
getPos
-public edu.wpi.first.math.geometry.Pose2d getPos()
-Returns position of the robot on the field based on the best target.
-
-- Returns:
-- Pose estimate.
-
-
-
--
-
-
getName
-
-
-- Overrides:
-getName
in class org.photonvision.PhotonCamera
-- Returns:
-- The name of the camera.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/common/hardware/camera/package-summary.html b/doc/common/hardware/camera/package-summary.html
index cc84868..824f7b4 100644
--- a/doc/common/hardware/camera/package-summary.html
+++ b/doc/common/hardware/camera/package-summary.html
@@ -71,10 +71,6 @@
Package common.hardware
Represents and holds the specs of a camera.
-
-
-
Team 3128's streamlined PhotonCamera
class that provides additional functionality and ease of use.
-
diff --git a/doc/common/hardware/camera/package-tree.html b/doc/common/hardware/camera/package-tree.html
index 2a28a06..71be1ec 100644
--- a/doc/common/hardware/camera/package-tree.html
+++ b/doc/common/hardware/camera/package-tree.html
@@ -59,11 +59,6 @@
Class Hierarchy
java.lang.Object
- common.hardware.camera.Camera
-- org.photonvision.PhotonCamera (implements java.lang.AutoCloseable)
-
-
diff --git a/doc/index-all.html b/doc/index-all.html
index 30f01fd..c9f9f98 100644
--- a/doc/index-all.html
+++ b/doc/index-all.html
@@ -49,7 +49,7 @@
-
A B C D E F G H I K L M N O P R S T U V W X Z All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
+
A B C D E F G H I K L M N O P R S T U V W X Y Z All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- Absolute - Enum constant in enum class common.hardware.motorcontroller.NAR_CANSpark.EncoderType
@@ -172,6 +172,8 @@ A
-
- appliedOutput - Variable in class common.hardware.motorcontroller.NAR_Motor.NAR_MotorIO
-
+- aprilTags - Variable in class common.hardware.camera.Camera
+-
- AREA - Enum constant in enum class common.hardware.limelight.LimelightKey
-
- atSetpoint() - Method in class common.core.controllers.ControllerBase
@@ -212,6 +214,8 @@ B
C
+- calc_strategy - Variable in class common.hardware.camera.Camera
+-
- calculate(double) - Method in class common.core.controllers.ControllerBase
-
Returns the next output of the controller.
@@ -256,22 +260,16 @@ C
-
Returns the PID output of the controller.
- - camera - Variable in class common.hardware.camera.NAR_Camera
--
- Camera - Class in common.hardware.camera
-
Represents and holds the specs of a camera.
-- Camera(String, boolean, Transform2d, double) - Constructor for class common.hardware.camera.Camera
--
-
Creates a new object for a camera.
-
+- Camera(String, double, double, double, double, AprilTagFields, PhotonPoseEstimator.PoseStrategy) - Constructor for class common.hardware.camera.Camera
+-
- cameraAngle - Variable in class common.hardware.limelight.Limelight
-
- cameraHeight - Variable in class common.hardware.limelight.Limelight
-
-- cameraPitch - Variable in class common.hardware.camera.Camera
--
- CAN_SPARK_FLEX - Enum constant in enum class common.hardware.motorcontroller.NAR_CANSpark.ControllerType
-
- CAN_SPARK_MAX - Enum constant in enum class common.hardware.motorcontroller.NAR_CANSpark.ControllerType
@@ -460,10 +458,6 @@ D
-
Disables the PID control.
-- disable() - Method in class common.hardware.camera.NAR_Camera
--
-
Stops the camera from updating robot odometry.
-
- DISCONNECTED - Enum constant in enum class common.utility.narwhaldashboard.NarwhalDashboard.State
-
- distanceFactor - Variable in class common.hardware.motorcontroller.NAR_Motor.MotorConfig
@@ -493,10 +487,6 @@ E
-
Enables the PID control.
-- enable() - Method in class common.hardware.camera.NAR_Camera
--
-
Allows the camera to update robot odometry.
-
- enableContinuousInput(double, double) - Method in class common.core.controllers.ControllerBase
-
Enables continuous input.
@@ -519,8 +509,6 @@ E
- enabled - Variable in class common.core.subsystems.NAR_PIDSubsystem
-
-- enabled - Variable in class common.hardware.camera.Camera
--
- enableVoltageCompensation(double) - Method in class common.hardware.motorcontroller.NAR_CANSpark
-
- enableVoltageCompensation(double) - Method in class common.hardware.motorcontroller.NAR_Motor
@@ -543,6 +531,8 @@ E
-
Ends the main loop in startCompetition().
+- estimator - Variable in class common.hardware.camera.Camera
+-
- evaluate(double) - Method in class common.utility.sysid.PolynomialDerivative
-
Returns a y-value by plugging in the x-value into the derivative function.
@@ -618,10 +608,6 @@ F
G
-- getAccTarget() - Method in class common.hardware.camera.NAR_Camera
--
-
Returns the best target to camera vector as a Transform2d.
-
- getAngleMotor() - Method in class common.core.swerve.SwerveModule
-
Returns the angle motor
@@ -670,10 +656,6 @@ G
-
Get the Differential coefficient.
- - getDistance() - Method in class common.hardware.camera.NAR_Camera
--
-
Returns the distance from the best target to the camera.
-
- getDouble(String, String) - Static method in class common.utility.shuffleboard.NAR_Shuffleboard
-
Get the value reference of a widget storing doubles.
@@ -786,8 +768,6 @@ G
- getMotor() - Method in class common.hardware.motorcontroller.NAR_TalonSRX
-
-- getName() - Method in class common.hardware.camera.NAR_Camera
--
- getP() - Method in class common.core.controllers.ControllerBase
-
Get the Proportional coefficient.
@@ -800,10 +780,6 @@ G
-
- getPitch() - Method in class common.core.swerve.SwerveBase
-
-- getPos() - Method in class common.hardware.camera.NAR_Camera
--
-
Returns position of the robot on the field based on the best target.
-
- getPose() - Method in class common.core.swerve.SwerveBase
-
- getPosition() - Method in class common.hardware.motorcontroller.NAR_Motor
@@ -836,10 +812,6 @@ G
- getRawVelocity() - Method in class common.hardware.motorcontroller.NAR_TalonSRX
-
-- getRelTarget() - Method in class common.hardware.camera.NAR_Camera
--
-
Returns the best target to camera vector as a Transform2d.
-
- getRightPOVButton() - Method in class common.hardware.input.NAR_Joystick
-
Returns the 90 degree or right POV button
@@ -865,7 +837,9 @@ G
- getRotation2d() - Method in class common.core.swerve.SwerveBase
-
- getRunningState() - Method in class common.core.swerve.SwerveModule
--
+-
+
Return the state of the swerve module.
+
- getSelectedAuto() - Method in class common.utility.narwhaldashboard.NarwhalDashboard
-
Returns the selectedAuto on the web server
@@ -910,10 +884,6 @@ G
-
Get the value reference of a widget storing Strings.
- - getTarget3d() - Method in class common.hardware.camera.NAR_Camera
--
-
Returns the best target to camera vector as a Transform3d.
-
- getTest(String) - Method in class common.utility.tester.Tester
-
Returns a Test for the robot.
@@ -972,10 +942,6 @@ H
-
Returns whether manipulator has an object.
- - hasTarget() - Method in class common.hardware.camera.NAR_Camera
--
-
Returns whether or not the camera sees a target.
-
- hasValidTarget() - Method in class common.hardware.limelight.Limelight
-
Checks to see if the Limelight has a valid target
@@ -1224,14 +1190,6 @@ N
-
Creates a new button board object.
- - NAR_Camera - Class in common.hardware.camera
--
-
Team 3128's streamlined PhotonCamera
class that provides additional functionality and ease of use.
-
-- NAR_Camera(Camera) - Constructor for class common.hardware.camera.NAR_Camera
--
-
Creates a NAR_Camera object.
-
- NAR_CANSpark - Class in common.hardware.motorcontroller
-
Team 3128's streamlined CANSparkBase
class.
@@ -1373,8 +1331,6 @@ O
-
- OFF - Enum constant in enum class common.hardware.limelight.LEDMode
-
-- offset - Variable in class common.hardware.camera.Camera
--
- ON - Enum constant in enum class common.hardware.limelight.LEDMode
-
- onClose(WebSocket, int, String, boolean) - Method in class common.utility.narwhaldashboard.NarwhalDashboard
@@ -1437,6 +1393,8 @@ P
-
- PIPELINE - Enum constant in enum class common.hardware.limelight.LimelightKey
-
+- pitchOffset - Variable in class common.hardware.camera.Camera
+-
- PivotTemplate - Class in common.core.subsystems
-
Team 3128's Pivot Template class.
@@ -1785,10 +1743,6 @@ S
-
Sets power to all motors.
- - setResources(DoubleSupplier, BiConsumer<Pose2d, Double>, HashMap<Integer, Pose2d>, Supplier<Pose2d>) - Static method in class common.hardware.camera.NAR_Camera
--
-
Sets the necessary resources for cameras to function.
-
- setRightXDeadband(double) - Method in class common.hardware.input.NAR_XboxController
-
Sets the horizontal deadband value for the right joystick.
@@ -1823,10 +1777,6 @@ S
- setStreamMode(StreamMode) - Method in class common.hardware.limelight.Limelight
-
-- setThresholds(double, double, double, boolean) - Static method in class common.hardware.camera.NAR_Camera
--
-
Sets the thresholds for camera pose estimates.
-
- setThrottleBounds(double, double) - Method in class common.hardware.input.NAR_Joystick
-
Sets the throttle bounds for the joystick.
@@ -1990,14 +1940,6 @@ T
- TALONSRX_ENCODER_RESOLUTION - Static variable in class common.hardware.motorcontroller.MotorControllerConstants
-
-- targetAmbiguity() - Method in class common.hardware.camera.NAR_Camera
--
-
Returns the ambiguity of the best target with lower being more accurate.
-
-- targetId() - Method in class common.hardware.camera.NAR_Camera
--
-
Returns the ID of the best target.
-
- targetWidth - Variable in class common.hardware.limelight.Limelight
-
- Tester - Class in common.utility.tester
@@ -2064,10 +2006,6 @@ U
Log something which should not happen under normal circumstances and probably
is a bug, but does not cause anything to crash.
-- update() - Method in class common.hardware.camera.NAR_Camera
--
-
Gets the latest targets.
-
- update() - Static method in class common.utility.shuffleboard.NAR_Shuffleboard
-
Updates every widget
@@ -2251,13 +2189,22 @@ X
-
Sets the module in its x-lock angle and sets the velocity to 0
+ - xOffset - Variable in class common.hardware.camera.Camera
+-
+
+
Y
+
+- yawOffset - Variable in class common.hardware.camera.Camera
+-
+- yOffset - Variable in class common.hardware.camera.Camera
+-
Z
- zeroGyro(double) - Method in class common.core.swerve.SwerveBase
-
-
A B C D E F G H I K L M N O P R S T U V W X Z All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
+
A B C D E F G H I K L M N O P R S T U V W X Y Z All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form