Amazing robot! Just curious about how color sensor works, are you shooting cargos with wrong colors in different angles or just simply not intaking them?
Yep! Originally the idea was to just shoot wrong cargo at a different angle than the correct cargo but we never fully implemented the color sensor before OCR. At our next regional at LAR, we plan to have the color sensor working and maybe have a outtake on the side of our robot to drop out wrong alliance cargo.
Here’s our technical documentation if anyone would like to know more about how we designed the robot, specifics about each subsystem, and our programming!
The cycle count and teleop path fields are used together to mark shot locations and shot percentages. For example, a cycle count field with this data: [[1, 2, 0, 0], [2, 1, 1, 0], [3, 0, 2, 0]] and a teleop path field with this data: [[326,77],[382,185],[459,66]] allows us to display the image shown in the image below. We color the different location squares based on the shot percentage, with Green indicating 100%, Yellow indicating 50%, and Red indicating 0%.
Here is the code that we’re using to limit our robot’s acceleration to prevent us from tipping, wearing out our threads, and damaging the field. This is in addition to other best practices, such as current limiting.
Hi! After seeing your tech binder and your code. l have some questions about your robot’s hopper, climber.
Hopper
How does your hopper work? Is it automatic? You have said that breakbeam sensors are used ensure robot never controls more than two cargo, so how do you achieve that? Can you explain with your code?
Can you introduce how do you use gyro to make your automatic climb? Besides, can you introduce how to achieve the automatic climb with your code? Thanks!
Besides, can you introduce how your scouting works and is it possible to customize your scouting?
For context our hopper is large enough that we could easily fit 3 cargo inside of it. To try and stop us from getting penalized for this we added a beam break sensor where the 3rd ball of the robot would lie.
When we initially detect that the beam has been broken, we force the hopper to run. We do this in case we really only have 2 cargo and one just happens to be over the beam break sensor. This would move the cargo and unblock the beambreak if there was only 2 cargo. FRC-2022/Hopper.java at main · FRC3476/FRC-2022 (github.com)
We could have used a second beam break sensor (or just better placement) because sometimes it was still possible for the third ball to get in a position where it wasn’t breaking the sensor.
For our climb we’re checking our roll angle and roll direction at certain parts of the climb to ensure we’re climbing at the correct parts of our swing. Here’s one of the cases where we do that.
If you’re taking a look at our climber code, it’ll probably be a bit confusing. Our climb steps are stored in our ClimbState enum which contains a ClimbStep Object. Each ClimbStep contains a begin action, a wait condition, and an end action. In our climber’s update loop, we’re checking the wait condition and if the condition returns true, we run the appropriate end actions and begin actions for the appropriate states.
If you have any more questions, feel free to ask away!