Hey, after we finished competing the regional, I want to know why our robot had command delay while playing in FMS connection
Robot specs:
RoboRIO 1
4 VictorSP on drivetrain
2 VictorSPX & 1 TalonSRX on other subsystems
WPILib version 2022.4.1
What is the problem:
When we worked on programming in build season, the robot looked like ok. No lagging or delays when using the robot with wireless connection with Driver Station. We did not check any logging or memory usage of the RoboRIO.
In the competition (Bosphorus Regional), we started to use the robot on practices and noticed random delay issues in the middle of the match. For example: Out of nowhere I move the drivetrain forward, but the robot does not move instantly, it takes 1 or 2 seconds to respond but very strange responses. The same with shooter and intake. The robot become useless.
On the final of practices, we tried to remove all “useless” code, like constructing autonomous Trajectories that we would not use in the competition, and sensors that could not be calibrated on completion for usage.
For the second day, I noticed that I had less frequently delay, just 1 or 2 time (7 to 10 seconds delay) per game.
We moved on to the third day, in qualifications: We managed to pass to semi final with only 1 delay on quarter finals. We thought we this problem would be trivial. However, in semis, we just let our robot for 2 matches stopped, since all the two matches we couldnt even move the drivetrain properly (we did not lose communication!). Because of the this, we lost the competition.
Now, after this, we wanna know why it happened. We have 3 thoughts:
Root of the problem may be RoboRIO out of memory
• For some reason, autonomous using pathweaver software just killed the memory.
• We run multiple parallel commands for each routine of a cargo collected and shooted (3 parallel commands to collect, 3 parallel commands to organize the cargos inside robot, 3 parallel commands to shoot). This could have killed the memory usage.
• Finally, we noticed after the competitions we let many variables listening on shuffleboard. If we had 20 variables updated every 20ms and sent it to SmartDashboard, we have much changes on the background for no reason.
NOTE: We noticed this problem only on FMS. For now I don’t have the access to robot logging neither can’t test it. This is just a discussion to try thinking about it.
If someone have suffered this like my team I would like to know your vision.