mirror of
https://github.com/Team4388/2023WayOfTheRobot.git
synced 2026-06-09 00:37:59 -06:00
Update that does not currently work
Work on shuffleboard integration
This commit is contained in:
@@ -11,10 +11,16 @@ public class Apriltags {
|
||||
public Object[] getApriltagPosition() {
|
||||
final var tagTable = NetworkTableInstance.getDefault().getTable("apriltag");
|
||||
|
||||
// return new Object[] {true,
|
||||
// tagTable.getEntry("TagPosX"),
|
||||
// tagTable.getEntry("TagPosY"),
|
||||
// tagTable.getEntry("TagPosZ")
|
||||
// };
|
||||
|
||||
return new Object[] {true,
|
||||
tagTable.getEntry("TagPosX"),
|
||||
tagTable.getEntry("TagPosY"),
|
||||
tagTable.getEntry("TagPosZ")
|
||||
1,
|
||||
2,
|
||||
3
|
||||
};
|
||||
}
|
||||
|
||||
@@ -30,6 +36,7 @@ public class Apriltags {
|
||||
|
||||
public boolean isAprilTag() {
|
||||
final var tagTable = NetworkTableInstance.getDefault().getTable("apriltag");
|
||||
return tagTable.getEntry("IsTag").getBoolean(false);
|
||||
// return tagTable.getEntry("IsTag").getBoolean(false);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,17 +15,13 @@ public class Location {
|
||||
}
|
||||
|
||||
public Object[] getPosition() {
|
||||
Object[] Position = {};
|
||||
|
||||
if(isLimelight){
|
||||
//Return Limelight Position
|
||||
}else if(isApriltag){
|
||||
return Apriltag.getApriltagPosition();
|
||||
}else{
|
||||
//Return odometry Position, last resort
|
||||
}
|
||||
|
||||
return Position;
|
||||
return null;
|
||||
}
|
||||
|
||||
public Object[] getRotation() {
|
||||
|
||||
@@ -28,7 +28,7 @@ public class SwerveDrive extends SubsystemBase {
|
||||
|
||||
private SwerveDriveKinematics kinematics = new SwerveDriveKinematics(leftFrontLocation, rightFrontLocation, leftBackLocation, rightBackLocation);
|
||||
|
||||
// private SwerveDriveOdometry odometry = new SwerveDriveOdometry(
|
||||
// private SwerveDriveOdometry odometry = new SwerveDrive(
|
||||
// kinematics,
|
||||
// gyro.getRotation2d(),
|
||||
// new SwerveModulePosition[] {
|
||||
|
||||
Reference in New Issue
Block a user