You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -38,29 +60,39 @@ Interested in learning more about REEFSCAPE? Visit [FIRST's website](https://www
38
60
All values, including motor outputs and logic statements, are displayed during match play and saved to the robot as a file. We have the capability of viewing these logs with a 3D model & graphs.
39
61
-**Why it’s cool:** We can translate what the robot is thinking into visuals we can understand in real time, as well as look back on previous matches to diagnose new issues.
40
62
63
+
-**Example of logging for TalonFXs:**
64
+
Jump into code [`here!`](https://github.com/FRCTeam3255/2025_Robot_Code/blob/26d6f1e49594b345b34e01dcde61f79d4eecd758/src/main/java/frc/robot/loggers/TalonFXLogger.java#L1-L32)
65
+
41
66
### Manual Zeroing
42
67
43
-
We have code to manually zero the Algae Intake Pivot and Elevator. In disabled, a person can quickly zero the Algae Intake Pivot and Elevator by raising them and then hitting them into their hard stop. We display the status of our manual zeroing using the CANdle, providing a clear indicator of our zeroing status. (Red to Green)
68
+
We have code to manually zero the Algae Intake Pivot and Elevator. In disabled, a person can quickly zero the Algae Intake Pivot and Elevator by raising them and then hitting them into their hard stop. We display the status of our manual zeroing using the CANdle, providing a clear indicator of our zeroing status (Red to Green).
44
69
-**Why it’s cool:** The robot will not run automatic zeroing if the manual zeroing is done to save match time. This ensures that our subsystems are at zero for every match.
45
70
71
+
-**Example of Manual Zeroing:**
72
+
Jump into code [`here!`](https://github.com/FRCTeam3255/2025_Robot_Code/blob/26d6f1e49594b345b34e01dcde61f79d4eecd758/src/main/java/frc/robot/commands/Zeroing/ManualZeroElevator.java#L1-L97)
73
+
46
74
### Automatic Zeroing
47
75
48
76
Our Algae Intake Pivot and Elevator automatically sets the subsystem’s zero when we enable it, making us not need an absolute encoder.
49
77
-**How it works:** The motor slowly runs to hit the mechanism to a hard stop, triggering a spike in current and a stop in velocity. We detect the current spike and velocity in code to know when the mechanism is at its hard stop to zero it correctly.
50
78
-**Why it’s cool:** Automatic zeroing serves as a fallback. If manual zeroing fails or is not completed, the robot will automatically initiate the automatic zeroing process. This ensures that our subsystems are at zero for every match.
51
79
80
+
-**Example of Automatic Zeroing:**
81
+
Jump into code [`here!`](https://github.com/FRCTeam3255/2025_Robot_Code/blob/26d6f1e49594b345b34e01dcde61f79d4eecd758/src/main/java/frc/robot/commands/Zeroing/ZeroElevator.java#L1-L82)
82
+
52
83
### Vision
53
84
54
85
Using three Limelight 3G’s, we calculate pose estimates based on the AprilTags that each camera can see. Two of the front cameras are mounted to ensure that when we’re up against the reef (when our pose is most important), at least 1 camera can see the tag in front of us. After San Diego Regional, we added a third Limelight on the back of our robot to be able to see processor tags. This ensures us to also be able to do the net and processor self-aligning.
55
86
Each Limelight’s pose estimates are then fed into the robot, passed through a rejection filter (if tags are too small or far away), and then added to a Pose Estimator that combines our current pose with the estimates.
56
87
57
88
-**Why it’s cool:** This process allows our robot to always have an accurate pose, optimized for times when minuscule changes can heavily impact cycle time. This baseline allows us to do all other vision-related features.
58
89
59
-
### Vision Aided Alignment
90
+
-**Example of Vision:**
91
+
Jump into code [`here!`](https://github.com/FRCTeam3255/2025_Robot_Code/blob/26d6f1e49594b345b34e01dcde61f79d4eecd758/src/main/java/frc/robot/subsystems/Vision.java#L1-L154)
60
92
93
+
### Reef Alignment
61
94
The multi-stage system, depending on the distance
62
95
-**Smart:** Automatically chooses which face of the reef to go
63
-
-**Double limelights**
64
96
-**How it works:** Using the current pose of the robot (see Vision), we calculate our desired reef face on the fly based on our distance from the reef and current rotation. The self alignment then determines different desired positions based on which branch of the reef the driver picks, always relative to their left & right. Then, we calculate our distance from the desired pose. If the distance is too large, the robot will just turn to the correct angle; otherwise, the robot will fully self-drive to the desired position.
65
97
66
98
### Net/Processor Vision Aided Alignment
@@ -69,21 +101,29 @@ However, the net and processor have a special type of alignment. We can self-ali
Jump into code [`here!`](https://github.com/FRCTeam3255/2025_Robot_Code/blob/main/src/main/java/frc/robot/subsystems/StateMachine.java)
118
+
119
+
<br>
80
120
81
121
The state machine prevents us from going to states before the robot is ready.
82
122
-**Blocking invalid transitions through nested switch statements:** Only state transitions that meet predefined conditions are permitted, preventing the robot from entering invalid or hazardous states. The state machine subsystem manages this.
83
-
-**State Machine subsystem:** Used to manage different states in the robot. It controls which state the transitions between different states. We use enum to control what states we could go to from the current state.
84
-
-**States:** Individual commands represent different operational modes of the robot and control the robot's behavior. We set the requirements of the commands to be subStateMachine.
85
-
-**tryState method:** This method is what we run when we try to go from the current state to the desired state. It will return the desired States if it is valid based on the current state. Then it will execute the command based on the desired states.
86
-
-**Calling states:** We call the tryState method in the RobotContainer. We turn whatever it returns into a Deferred Proxy, which allows the tryState method to be evaluated multiple times.
123
+
-**[`State Machine subsystem`](https://github.com/FRCTeam3255/2025_Robot_Code/blob/main/src/main/java/frc/robot/subsystems/StateMachine.java):** Used to manage different states in the robot. It controls which state the transitions between different states. We use enum to control what states we could go to from the current state.
124
+
-**[`States`](https://github.com/FRCTeam3255/2025_Robot_Code/blob/main/src/main/java/frc/robot/subsystems/StateMachine.java#L607):** Individual commands represent different operational modes of the robot and control the robot's behavior. We set the requirements of the commands to be subStateMachine.
125
+
-**[`tryState method`](https://github.com/FRCTeam3255/2025_Robot_Code/blob/main/src/main/java/frc/robot/subsystems/StateMachine.java#L132):** This method is what we run when we try to go from the current state to the desired state. It will return the desired States if it is valid based on the current state. Then it will execute the command based on the desired states.
126
+
-**[`Calling states`](https://github.com/FRCTeam3255/2025_Robot_Code/blob/main/src/main/java/frc/robot/RobotContainer.java#L118):** We call the tryState method in the RobotContainer. We turn whatever it returns into a Deferred Proxy, which allows the tryState method to be evaluated multiple times.
87
127
88
128
### Scoring Elements Indexing
89
129
@@ -93,23 +133,32 @@ The state machine prevents us from going to states before the robot is ready.
93
133
With the addition of the coral hardstop after PHR, we no longer have to slow down the indexing speed and now just set both indexing and intaking to full speed.
94
134
-**Consistency:** Maintaining consistent indexing logic regardless of task details, ensuring high success rates and efficiency in every mission.
95
135
136
+
-**Example of our indexing state:**
137
+
Jump into code [`here!`](https://github.com/FRCTeam3255/2025_Robot_Code/blob/main/src/main/java/frc/robot/commands/states/first_scoring_element/IndexingCoral.java)
138
+
96
139
### Coral Placing Safety Time
97
140
98
141
-**What it is** A mechanism that sets a safety delay after placing coral to ensure the robot does not immediately perform other operations (such as lowering the elevator), thereby preventing a shallow climb on the reef.
99
142
-**How it works:**
100
143
-**Quick Tap:** If the operator performs a quick tap on the trigger button, the robot will wait until the coral has completely exited the scoring mechanism (CoralOuttake) before lowering the elevator. This process is achieved through the Coral Placing Safety Time, ensuring that the robot does not proceed to the next operation until the coral is fully placed.
101
144
-**Long Press:** If the operator holds the trigger button for longer than the preset delay time, the robot will ignore the safety delay. This means the robot will immediately proceed to the next operation when the operator releases the trigger button.
102
145
103
-
### Motion Magic
146
+
-**Example of our shooting delay:**
147
+
Jump into code [`here!`](https://github.com/FRCTeam3255/2025_Robot_Code/blob/main/src/main/java/frc/robot/commands/states/scoring/ScoringCoral.java#L50)
148
+
149
+
### Motion Magic 🪄🪄
104
150
105
151
Our Elevator & Algae Pivot use a motion profiling system from CTRE called Motion Magic, allowing us to tune not only our subsystems’ PID controller, but also their acceleration & cruise velocity.
106
152
-**Why it’s cool:** This method of tuning, along with our constant force springs, allows our Elevator to reach its desired position (from Min to Max) in approximately 0.79 seconds.
107
153
The addition of constant force springs after San Diego Regional allowed us to achieve a 34.6% faster cycle time on our Elevator via dynamic acceleration curves.
108
154
109
155
### Autos
110
156
111
-
Our autos include a 3 coral auto on both sides, 4 one coral and 2.5 algae net auto, and “Tickle” autos that bump other bots (forcing the ranking point).
157
+
Our autos include a 3 coral auto on both sides, four 1 coral and 2.5 algae net auto, and “Tickle” autos that bump other bots (forcing the ranking point).
112
158
-**How it works:**
159
+
<br><br>
160
+

161
+
<br><br>
113
162
-**Driving:**
114
163
- Basic driving: Path planner used to navigate by preset trajectories.
115
164
- Pose Target driving: dynamically adjusts robot pose to auto-align (same as the one in tele-op).
@@ -126,7 +175,6 @@ Our autos include a 3 coral auto on both sides, 4 one coral and 2.5 algae net au
126
175
127
176
-#### Step 3: Check Reef
128
177
129
-
130
178
*Note: if the limelight tuning values of the further one doesn't work for the closer one, just use the closer one*
131
179
132
180
a. In the advantage scope 3D field, check if the robot position is at the same position in the real life
@@ -139,8 +187,7 @@ Our autos include a 3 coral auto on both sides, 4 one coral and 2.5 algae net au
0 commit comments