44
55package frc .robot .subsystems ;
66
7- import edu .wpi .first .units .Units ;
87import edu .wpi .first .epilogue .Logged ;
98import edu .wpi .first .epilogue .NotLogged ;
109import edu .wpi .first .math .geometry .Pose3d ;
11-
10+ import edu . wpi . first . units . Units ;
1211import edu .wpi .first .wpilibj .smartdashboard .Mechanism2d ;
1312import edu .wpi .first .wpilibj .smartdashboard .MechanismLigament2d ;
1413import edu .wpi .first .wpilibj .smartdashboard .MechanismRoot2d ;
@@ -25,7 +24,7 @@ public class RobotPoses extends SubsystemBase {
2524 MechanismLigament2d elevatorPivot ; // Pivot point for the elevator
2625 MechanismLigament2d elevator ;
2726 MechanismLigament2d intakeWrist ;
28- Mechanism2d mech = new Mechanism2d (3 , 3 );
27+ Mechanism2d mech = new Mechanism2d (0 , 0 );
2928
3029 @ NotLogged
3130 Drivetrain subDrivetrain ;
@@ -43,26 +42,31 @@ public RobotPoses(Drivetrain subDrivetrain, Elevator subElevator, Intake subInta
4342 // the main mechanism object
4443
4544 // the mechanism root node
46- MechanismRoot2d root = mech .getRoot ("drivetrain" , constRobotPoses .ROOT_X .in (Units .Meters ),
45+ MechanismRoot2d root = mech .getRoot (
46+ "drivetrain" ,
47+ constRobotPoses .ROOT_X .in (Units .Meters ),
4748 constRobotPoses .ROOT_Y .in (Units .Meters ));
4849
49- elevatorPivot = root
50- .append (new MechanismLigament2d ("elevator-pivot" , constRobotPoses .ELEVATOR_PIVOT_LENGTH .in (Units .Meters ),
50+ elevatorPivot = root .append (
51+ new MechanismLigament2d ("elevator-pivot" ,
52+ constRobotPoses .ELEVATOR_PIVOT_LENGTH .in (Units .Meters ),
5153 constRobotPoses .ELEVATOR_PIVOT_DEFAULT_ANGLE .in (Units .Degrees ),
52- constRobotPoses .ELEVATOR_PIVOT_WIDTH .in (Units .Meters ),
54+ constRobotPoses .ELEVATOR_PIVOT_WIDTH .in (Units .Centimeters ),
5355 new Color8Bit (Color .kGreen )));
56+
5457 elevator = elevatorPivot .append (
55- new MechanismLigament2d ("elevator" , constRobotPoses .ELEVATOR_LENGTH .in (Units .Meters ),
58+ new MechanismLigament2d ("elevator" ,
59+ constRobotPoses .ELEVATOR_LENGTH .in (Units .Meters ),
5660 constRobotPoses .ELEVATOR_DEFAULT_ANGLE .in (Units .Degrees ),
57- constRobotPoses .ELEVATOR_WIDTH .in (Units .Meters ), new Color8Bit (Color .kBlue )));
58- // Set default motor configurations if needed
59- // e.g., elevatorLeftMotor.configFactoryDefault();
60- // post the mechanism to the dashboard
61+ constRobotPoses .ELEVATOR_WIDTH .in (Units .Centimeters ),
62+ new Color8Bit (Color .kBlue )));
6163
6264 intakeWrist = elevator .append (
63- new MechanismLigament2d ("intake-wrist" , constRobotPoses .INTAKE_WRIST_LENGTH .in (Units .Meters ),
65+ new MechanismLigament2d ("intake-wrist" ,
66+ constRobotPoses .INTAKE_WRIST_LENGTH .in (Units .Meters ),
6467 constRobotPoses .INTAKE_WRIST_DEFAULT_ANGLE .in (Units .Degrees ),
65- constRobotPoses .INTAKE_WRIST_WIDTH .in (Units .Meters ), new Color8Bit (Color .kRed )));
68+ constRobotPoses .INTAKE_WRIST_WIDTH .in (Units .Centimeters ),
69+ new Color8Bit (Color .kRed )));
6670 }
6771
6872 @ Override
0 commit comments