Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,26 @@ class ElevatorConstants:
SETPOINT_TOLERANCE = 0.1

class PivotConstants:
INSIDE_ELEVATOR_ANGLE = 0.2 # Used for subsystem collision checking
ELEVATOR_PRIORITY_ANGLE = 0.123535 # We move the pivot to this position until the elevator has reached its setpoint.
STOW_ANGLE = 0.188
GROUND_INTAKE_ANGLE = -0.119385
FUNNEL_INTAKE_ANGLE = 0.28
ALGAE_INTAKE_ANGLE = -0.05
HIGH_SCORING_ANGLE = 0.21
MID_SCORING_ANGLE = 0.22
LOW_SCORING_ANGLE = -0.119385
INSIDE_ELEVATOR_ANGLE = 0.279297 # Used for subsystem collision checking
ELEVATOR_PRIORITY_ANGLE = 0.241943 # We move the pivot to this position until the elevator has reached its setpoint.
STOW_ANGLE = 0.267334
GROUND_INTAKE_ANGLE = -0.054688
FUNNEL_INTAKE_ANGLE = 0.373
ALGAE_INTAKE_ANGLE = -0.04
HIGH_SCORING_ANGLE = 0.30
MID_SCORING_ANGLE = 0.30
LOW_SCORING_ANGLE = -0.065186
NET_SCORING_ANGLE = 0.131
PROCESSOR_SCORING_ANGLE = 0.001
CLIMBER_PRIORITY_ANGLE = 0.201943
CLIMBER_PRIORITY_ANGLE = 0.349365

MINIMUM_ANGLE = -0.091
MAXIMUM_ANGLE = 0.392822

CRUISE_VELOCITY = 3
MM_ACCELERATION = 3

GEAR_RATIO = 961/36
GEAR_RATIO = 23/1
GAINS = (Slot0Configs()
.with_k_g(0.518)
.with_k_p(45)
Expand All @@ -110,16 +110,16 @@ class PivotConstants:
)

CANCODER_DISCONTINUITY = 0.5
CANCODER_OFFSET = 0.35009765625
CANCODER_OFFSET = -0.168701171875

SETPOINT_TOLERANCE = 0.03125

class IntakeConstants:

CORAL_INTAKE_SPEED = 0.4*1.2*1.1
FUNNEL_INTAKE_SPEED = 0.8*0.75
CORAL_OUTPUT_SPEED = 0.6
L1_OUTPUT_SPEED = -0.4
CORAL_INTAKE_SPEED = 1
FUNNEL_INTAKE_SPEED = 1
CORAL_OUTPUT_SPEED = 2
L1_OUTPUT_SPEED = -0.6

ALGAE_HOLD = 0.125
ALGAE_INTAKE_SPEED = 0.75
Expand Down
8 changes: 4 additions & 4 deletions generated/tuner_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class TunerConstants:
_front_left_drive_motor_id = 3
_front_left_steer_motor_id = 7
_front_left_encoder_id = 7
_front_left_encoder_offset: units.rotation = 0.155029296875
_front_left_encoder_offset: units.rotation = 0.146240234375
_front_left_steer_motor_inverted = True
_front_left_encoder_inverted = False

Expand All @@ -143,7 +143,7 @@ class TunerConstants:
_front_right_drive_motor_id = 1
_front_right_steer_motor_id = 5
_front_right_encoder_id = 5
_front_right_encoder_offset: units.rotation = -0.27978515625
_front_right_encoder_offset: units.rotation = -0.282958984375
_front_right_steer_motor_inverted = True
_front_right_encoder_inverted = False

Expand All @@ -154,7 +154,7 @@ class TunerConstants:
_back_left_drive_motor_id = 4
_back_left_steer_motor_id = 8
_back_left_encoder_id = 8
_back_left_encoder_offset: units.rotation = -0.241943359375
_back_left_encoder_offset: units.rotation = -0.45703125
_back_left_steer_motor_inverted = True
_back_left_encoder_inverted = False

Expand All @@ -165,7 +165,7 @@ class TunerConstants:
_back_right_drive_motor_id = 2
_back_right_steer_motor_id = 6
_back_right_encoder_id = 6
_back_right_encoder_offset: units.rotation = -0.06494140625
_back_right_encoder_offset: units.rotation = -0.069580078125
_back_right_steer_motor_inverted = True
_back_right_encoder_inverted = False

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.robotpy]

robotpy_version = "2025.3.2.0"
robotpy_version = "2025.3.2.2"

robotpy_extras = [
"apriltag",
Expand Down
2 changes: 1 addition & 1 deletion subsystems/pivot.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class SubsystemState(Enum):
.with_feedback_sensor_source(FeedbackSensorSourceValue.REMOTE_CANCODER)
.with_feedback_remote_sensor_id(Constants.CanIDs.PIVOT_CANCODER)
)
_master_config.motor_output.inverted = InvertedValue.CLOCKWISE_POSITIVE
_master_config.motor_output.inverted = InvertedValue.COUNTER_CLOCKWISE_POSITIVE
_master_config.motor_output.neutral_mode = NeutralModeValue.BRAKE

_master_config.with_slot0(Constants.PivotConstants.GAINS)
Expand Down