Efficiently Controlling an Arm
Brainstorming and simulating a code control system for an arm.
I’m back writing another blog post! I am writing this blog post due to the interesting challenge our robot design has presented us in the code (Thanks build team). This blog post will be a bit different as I will be writing about my thought process and how I came to the conclusion of the code I wrote. The Problem Our robot this year has an elevator and an arm with an intake at the end of the arm. The elevator and arm both have a motor and encoder, allowing the code to accurately position and control the height and angle the resulting angle of the intake using PID. The intake’s rotation is locked to the elevator tower, so the intake is at a permanent 45 degree angle. The arm can rotate around over the top to get from one side of the tower to another. However, if the elevator is to low then the intake can hit the elevator tower, giving us our dilemma. How can we effectively control the height and angle of the arm over time to get to a desired position is the least amount of time?
Bevy · Code · Frc · Kinematics · Pathing · Physics · Rapier · Rust · Simulation
7 minutes
Today in Code Team - January 27, 2025
Your semi-regularly updated blog from the code team.
Overview Drake, Sean and Mr. Cutter set up and cleaned the drive carpet and set up information for path-planned and then tested and debugged/fixed the path-planning code. Chloe redid the ML subsystem to work with our new subsystem structure. Major vision improvements We were out of our workshop for a week due to snow. But with e-learning, I was able to use that time and made a lot of improvements to vision:
2 minutes
Today in Code Team - January 18, 2025
Your semi-regularly updated blog from the code team.
Overview Today focused on two main areas: Tuning PID loops for velocity motors and test chassis heading. Drake and Sean worked on tuning the PID loops for the velocity motors, the PID loops for the individual SWERVE drives are done being tuned. The PID loops for the heading of the robot were started and finished as well in the same meeting. We plan on starting and working on path planning at the next meeting.
Code · Drive · Frc · Pid · Vision
1 minute
Today in Code Team - January 17, 2025
Your semi-regularly updated blog from the code team.
Overview Today focused on two main areas: PID tuning for the test chassis and vision system improvements. Drake, Sean, and Ethan started tuning the PID loops for the velocity motors on the SWERVE drives. Drake fixed the bugs from last meeting at home and found the issue in having values in the optional section of the YAGSL code which was breaking the roational motors ability to rotate the way they should. We finished tuning the PID loops for rotation and will begin on tuning velocity motors next meeting.
Code · Drive · Frc · Pid · Vision
1 minute
Today in Code Team - January 15, 2025
Your semi-regularly updated blog from the code team.
Overview Today focused on two main areas: PID tuning for the test chassis and vision system improvements. Drake, Sean, and Ethan worked on debugging the swerve drive PID loops. We’re seeing issues where the wheels know their target direction but aren’t reaching it correctly - they either undershoot/overshoot or exhibit erratic behavior. While the code correctly calculates desired wheel orientations, there appears to be a disconnect between the commanded positions and actual wheel movement. We suspect this could be related to how the PID controllers are interpreting feedback from the turn encoders.
Code · Drive · Frc · Pid · Vision
1 minute
Today in Code Team - January 13, 2025
Your semi-regularly updated blog from the code team.
Overview We’re starting to make some major progress. Drive code is way ahead of schedule, with the test chassis nearly operational. Drake switched to 2025 YAGSL and started testing the code on the test chassis (image above) after gathering necessary data required for it to work closer to correctly. Sean read through most of the YAGSL documents (to be completed) and learned about the chassis and assisted in data gathering.
1 minute
Today in Code Team - January 11, 2025
Your semi-regularly updated blog from the code team.
Overview After ongoing issues with the Kotlin language server (which appears to be unmaintained), Drake made the decision to switch the robot code back to Java. The team spent time converting the existing Kotlin code and adapting to Java. While waiting for the chassis, Drake implemented button mapping and control code for driving the robot. A subsystem manager was briefly explored but ultimately deemed too complex for our needs. When the test chassis was ready, we deployed the code and attempted to drive it. The drive motors exhibited erratic behavior (spasming) while the turn motors remained unresponsive. We suspect issues with the feedback sensors for the turn motors, likely due to significant API changes in the 2025 update.
Code · Drive · Frc · Router · Vision
1 minute
Today in Code Team - January 10, 2025
Your semi-regularly updated blog from the code team.
Overview Drake, Ethan, and Sean researched and fixed all the API changes. They added some comments to document this. “I really wish they documented better but I think all the code has been updated correctly, however, it still needs testing.” –Drake They got the code down to 4 issues but after an hour of debugging it seems to be a problem where the Kotlin Unit library is overwriting the WPILib Unit library. Drake’s going to try getting help on the Kotlin discord to get help as he assumes it’s a common problem. After this is fixed, we should have working code. Sean and Ethan also researched YAGSL and how to configure the robot.
Code · Drive · Frc · Router · Vision
1 minute
Today in Code Team - January 8, 2025
Your semi-regularly updated blog from the code team.
Overview Drake and the robot team in set up the 2025 robot project in Kotlin FRC extension after using WPILib to create the project. The FRC Kotlin extension caused some headaches since it was designed for 2024, but we fixed it by updating configurations and Gradle settings. Vendor dependencies like YAGSL and REVLib were set up, and we began structuring the robot code. Vendor Dependencie’s API changes remain an issue for next time.
Code · Drive · Frc · Router · Vision
1 minute
Today in Code Team - January 6, 2025
Your semi-regularly updated blog from the code team.
Overview So we’re going to do a blog post every (meeting) day this year, summarizing our accomplishments and mistakes. Drake helped everyone on robot code get WPILib 2025 installed, which took forever over the school’s WiFi connection. In the meantime, the rookies learned kotlin which is what we are going to program for the robot. Here’s Sean’s Kotlin notes: Chloe flashed a fresh image onto a Pi 5 for vision testing. She also started learning Linux.
Code · Drive · Frc · Router · Vision
1 minute