working on vision
This commit is contained in:
parent
87c0772982
commit
05e9202592
@ -245,6 +245,7 @@ public class RobotContainer {
|
|||||||
private void configureShuffleboard() {
|
private void configureShuffleboard() {
|
||||||
ShuffleboardTab autoTab = Shuffleboard.getTab(OIConstants.kAutoTab);
|
ShuffleboardTab autoTab = Shuffleboard.getTab(OIConstants.kAutoTab);
|
||||||
ShuffleboardTab sensorTab = Shuffleboard.getTab(OIConstants.kSensorsTab);
|
ShuffleboardTab sensorTab = Shuffleboard.getTab(OIConstants.kSensorsTab);
|
||||||
|
ShuffleboardTab apriltagTab = Shuffleboard.getTab(OIConstants.kApriltagTab);
|
||||||
|
|
||||||
Shuffleboard.selectTab(OIConstants.kAutoTab);
|
Shuffleboard.selectTab(OIConstants.kAutoTab);
|
||||||
|
|
||||||
@ -320,6 +321,14 @@ public class RobotContainer {
|
|||||||
|
|
||||||
//sensorTab.add("odometry", drivetrain::getPose);
|
//sensorTab.add("odometry", drivetrain::getPose);
|
||||||
|
|
||||||
|
sensorTab.addDouble("Orange ID", vision::getOrangeClosestTag);
|
||||||
|
sensorTab.addDouble("Orange x", vision::getOrangeRelativeX);
|
||||||
|
sensorTab.addDouble("Orange y", vision::getOrangeRelativeY);
|
||||||
|
sensorTab.addDouble("Orange z", vision::getOrangeRelativeZ);
|
||||||
|
|
||||||
|
// sensorTab.addDouble(" ID", vision::getOrangeClosestTag);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Command getAutonomousCommand() {
|
public Command getAutonomousCommand() {
|
||||||
|
@ -8,4 +8,5 @@ public class OIConstants {
|
|||||||
|
|
||||||
public static final String kAutoTab = "Auto Tab";
|
public static final String kAutoTab = "Auto Tab";
|
||||||
public static final String kSensorsTab = "Sensors Tab";
|
public static final String kSensorsTab = "Sensors Tab";
|
||||||
|
public static final String kApriltagTab = "Apriltag Tab";
|
||||||
}
|
}
|
||||||
|
@ -49,9 +49,9 @@ public class Vision{
|
|||||||
|
|
||||||
blackFramerate = blackVisionTable.getDoubleTopic("blackFPS").subscribe(0.0);
|
blackFramerate = blackVisionTable.getDoubleTopic("blackFPS").subscribe(0.0);
|
||||||
|
|
||||||
orangeRobotRelativeX = orangeVisionTable.getDoubleTopic("orangeRelativeX").subscribe(0.0);
|
orangeRobotRelativeX = orangeVisionTable.getDoubleTopic("tag3tx").subscribe(0.0);
|
||||||
orangeRobotRelativeY = orangeVisionTable.getDoubleTopic("orangeRelativeY").subscribe(0.0);
|
orangeRobotRelativeY = orangeVisionTable.getDoubleTopic("tag_tvec_y").subscribe(0.0);
|
||||||
orangeRobotRelativeZ = orangeVisionTable.getDoubleTopic("orangeRelativeZ").subscribe(0.0);
|
orangeRobotRelativeZ = orangeVisionTable.getDoubleTopic("tag_tvec_z").subscribe(0.0);
|
||||||
|
|
||||||
orangeClosestTag = orangeVisionTable.getDoubleTopic("orangeClosestTag").subscribe(0.0);
|
orangeClosestTag = orangeVisionTable.getDoubleTopic("orangeClosestTag").subscribe(0.0);
|
||||||
orangeTagDetected = orangeVisionTable.getBooleanTopic("orangeTagDetected").subscribe(false);
|
orangeTagDetected = orangeVisionTable.getBooleanTopic("orangeTagDetected").subscribe(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user