Autonomous Updates, Multi-glyph
Tags: innovate, control, and softwarePersonhours: 8
Task: Score extra autonomous glyphs
At super regionals, we saw all the good teams having multi glyph autonomi. In fact, Viperbots Hydra, the winning alliance captain, had a 3 glyph autonomous. I believed Iron Reign could get some of this 100 point autonomous action so I sat down to create a 2 glyph autonomous. We now have 3 autonomi, one of which is multiglyph.
I made a new methods called autonomous3(). For the starting settings (like driving off balancing stone and jewel points), I copied code from our existing autonomous program. After that, I realized that 10 seconds of the autonomous period had already been used by the time the robot had driven off the stone. That led me to think about ways to optimize autonomous after that point. I realized that if the gripper deployed as the robot was aligning itself with the balancing stone, it would save a lot of time. I also sped up the drive train speeds to lead to maximum efficiency. I had many runs of the fix though.
First time through, I ran the code and nothing happened. I realized that I forgot to call the actual state machine in the main loop. Dumb mistake, quick fix.
Second run: The robot drove off the balancing stone properly and was ready to pick up extra glyphs. Unfortunately, I flipped the motor directions to the robot rammed into the cryptobox instead of driving into glyph pit. Another quick fix.
Third run: The robot drove off stone and into glyph pit. However, it went almost into the Blue zone (I was testing from red side). Also, the robot would rotate while in the glyph pit, causing glyphs to get under the wiring and pull stuff out. I had to rewire a couple things then I went back to coding.
Fourth run: The robot drove off stone and into pit and collected one more glyph. The issue was that once the glyph was collected, the bot kept driving forward because I forgot to check the speeds again.
Fifth run: All the initial motions worked. However, I realized that the robot didn't strafe off as far as I needed it to reach the glyph pit. I added about .3 meters to the robot distance and tested again.
Sixth run: I don't know if anyone says 6th time is the charm but it was definitely a successful one for me. The robot did everything correctly and placed the glyph in the cryptobox. The only issue I had was that the robot kept backing away and ramming the cryptobox during end of auto. I fixed this easily by adding another autoState++ to the code.
Before I made the fix after the 6th run, I decided to take a wonderful video of the robot moving. It is linked below.
Next Steps:
Everything is ready to go to do a multiglyph autonomous. However, the robot doesn't score by the codex for the correct column. I need to implement that with IMU angles before Champs.