// Spindexer
public static final int SPINDEXER_ID = 12;
+
+ // Intake
+ public static final int INTAKE_BASE_ID = 13;
+ public static final int INTAKE_FLYWHEEL_ID = 14;
+ public static final int INTAKE_ENCODER_ID = 2;
}
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.constants.Constants;
import frc.robot.constants.IdConstants;
-import frc.robot.constants.IntakeConstants;
public class Intake extends SubsystemBase implements IntakeIO{
- private TalonFX flyWheelMotor = new TalonFX(IdConstants.FLYWHEEL_MOTOR_ID, Constants.SUBSYSTEM_CANIVORE_CAN);
- private TalonFX baseMotor = new TalonFX(IdConstants.BASE_MOTOR_ID, Constants.SUBSYSTEM_CANIVORE_CAN);
+ private TalonFX flyWheelMotor = new TalonFX(IdConstants.INTAKE_FLYWHEEL_ID, Constants.SUBSYSTEM_CANIVORE_CAN);
+ private TalonFX baseMotor = new TalonFX(IdConstants.INTAKE_BASE_ID, Constants.SUBSYSTEM_CANIVORE_CAN);
double basePower;
double flyWheelPower;
package frc.robot.subsystems.intake;
public class IntakeConstants {
-
-}
+ public static final double PIVOT_GEAR_RATIO = 1/(18.0*18.0*10.0/54.0/60.0/38.0); //38
+
+ public static final double MASS = 1.5753263; // kilograms: mass of arm specifically
+ public static final double CENTER_OF_MASS_LENGTH = 0.199608903192622; // meters
+ public static final double LENGTH = 0.245750; // meters
+
+ public static final double MOI = 0.0644; // kg*m^2
+ public static final double MAX_VELOCITY = 15.0; // rad/s
+ public static final double MAX_ACCELERATION = 100.0; // rad/s^2
+
+ public static final double START_ANGLE = 101.7539148;
+ public static final double INTAKE_ANGLE = 142.48;
+ public static final double STOW_ANGLE = 107.0;
+
+ //TODO: find this
+ public static final double FLYWHEEL_SPEED = 1.0;
+
+ //TODO: find this
+ public static final double ABSOLUTE_OFFSET_ANGLE = (139.1748046875 - START_ANGLE + 30);
+
+}
\ No newline at end of file
public double measuredAngle = IntakeConstants.START_ANGLE;
public double currentAmps = 0.0;
public double flyWheelVelocity = 0.0;
-
}
public void updateInputs();