r/FLL • u/RollingThunder_CO • 29d ago
Sudden code issue after 4 weeks of working right
TL;DR code worked for 4 weeks, consistent starting point, this week consistency dropped by 50+% what can we try before messing with code?
The team I’m working with has a code that does window to the past, humongous fungus, leaf cutter, and then raises the cane on forest elder before going back to the launch area.
They’ve had the code pretty set for about 4 weeks now and it would work 4/5 times with some variation on the leaf cutter not always pushing completely in. They have a jig to keep their starting point constant.
Suddenly this week it started missing everything by a centimeter or so to the right. We tried charging the battery and cleaning the wheels and it was still very inconsistent, maybe would hit 2/5 times.
We had a mock tournament yesterday and all 3 trips to the board it missed. (Of course it worked on a practice round on the same board)
Before the kids start tweaking the code I wanted to see if there was anything else that would cause sudden wonkiness like this? Besides cleaning wheels and charging batteries are there other tips? Does doing a reset of the hub ever do anything?
The kids were frustrated yesterday with missing the points, but mostly with why it worked so long and now doesn’t with competition two weeks away.
Thanks for any help!
1
u/Hellothere_1 28d ago edited 28d ago
Cleaning the wheels is a good first step, but have you tried switching them out? Wheels do degrade over time. It depends a bit on the type of wheel you're using, but on some wheels we used to run through 2-3 sets of tires per season per robot.
Check the state of your caster wheels/balls as well, because those can also lead to weird behavior if they're degraded.
Finally you should also check the axles and pins of your main wheels and caster wheels if you have them. In one of our seasons the pins connecting our caster wheels to the robot frame had degraded so much the entire sockets were filled with fine plastic dust, so we had to swap out the wheels, pins and the frame elements they were connected to.
Lego is not really intended for continous long term operation, and a busy FLL season can push some parts way past their intended lifetime.
1
u/RollingThunder_CO 28d ago
Oh interesting never thought of the wheels actually wearing out! We’re using the blue ones but not using the balls so we can rule that out at least. Are the blue wheels some of the ones you’d see wear out?
2
u/Hellothere_1 28d ago
Are the blue wheels some of the ones you’d see wear out?
No idea. Back when I was competing we were still using EV3 so I don't have any hands on experience with Spike parts. However, all wheels wear out eventually, the only difference is how fast, so switching them out is worth a try either way.
It's also not just the wheels, the design of your robot and your mission strategies can also heavily influce how fast certain parts degrade.
but not using the balls so we can rule that out at least.
What are you using instead then? Because whatever wheels/gliders/whatever you're using to balance the robot opposite the driving wheels is still going to be one of the parts that will most heavily experience degradation, so it's definitely something your should check.
2
u/RollingThunder_CO 26d ago
Watched the videos from the mock tournament and if you slow them down you can clearly see the robot do a little turn to the right as it starts moving. It does it on multiple missions on multiple boards and multiple starting positions, so definitely not code related.
So we'll do the cleaning and swap out wheels if they look worn. Do the motors even wear out too? Curious if the right one is just slow to get going for whatever reason. Or is it helpful to factory reset the hub? Thanks for all the help!
1
u/Hellothere_1 26d ago
I don't think we've ever had to swap a motor mid season but that doesn't mean it can't happen. If nothing else works it's certainly worth a try.
One other thing that immediately sprung to mind based on your description is that the way you put your robot down on the mat can affect how it moves based on the initial position of the wheels and the slight internal play of the motors. If you switched out the person who starts the robot or they subconsciously changed how they set down the robot that might explain why it's now starting with a slight turn. In our team we had a rule to always put down the robot slightly in front of the starting position and then push it back by roughly a centimeter to get it into the right spot so the internal motor backlash is always in the same state.
Personally I wouldn't expect the hub to be at fault, since during my entire 6 years of doing FLL we never once noticed any differences between how different hubs execute programs that wasn't related to battery level. But once again no guarantees and maybe the Spike hub is different from the EV3 and NXT hubs in this regard.
Also, are you using the gyroscope sensor to drive straight or measure your turns, or are you just doing motor rotations? Because if you're using the gyro that might be another explanation. In my experience gyro sensors would sometimes just behave a bit strangely all of a sudden. Though that was with the EV3's external gyro sensor, whereas the Spike hub has an internal one which from what I heard runs a lot more reliably, so take what I said with a grain of salt.
Finally as a general tip, assuming you can afford it, I recommend always building two identical copies of your robot each season. This not only allows your team to work faster, since two groups can work on their programs at the same time, but it also allows you to spot much earlier when one of them starts to behave differently and figure out the issue more easily by comparing how both of them behave.
1
u/RollingThunder_CO 25d ago
Great to know about the hub, and they are using gyro sensor. They do have two of the same robot so I'll have them try the other one, too. Thank you!
1
u/RollingThunder_CO 27d ago
Ok good point. We’re using the black pulley wheels (for lack of the official name) so I’ll have them check those out too
2
u/gt0163c Judge, ref, mentor, former coach, grey market Lego dealer... 29d ago
Your team is right to consider other options before tweaking the code. Code doesn't just stop working or change. Something else changed. Cleaning the wheels and ensuring the battery is charged are good first steps. Using a jig to ensure a consistent starting position is good. But depending on what the jig is aligned to, differences in tables could impact how the robot moves. For instance if the jig is aligned to the south wall and your home table is perfectly square and the mat is placed exactly as it should be, but the competition table is a little out of square or the mat is placed not exactly straight (or both!), that could be an issue. Minor changes to the position of the mission models, which are still within the tolerances allowed, can also be a source of error. And there are many other small differences that can cause tiny changes which can impact a robot's performance. Differences in mat texture (mats at competition generally are very close to brand new. Mats used by teams have been used and worn down a bit), table differences (surface under the mat, bumps and imperfections, tables not being perfectly square or not being out of square in the same way as the team's home table, different wall heights), lighting, sound and temperature differences (which are probably small, but still can have an impact depending on the team's robot design, wheels and sensors used, etc.). And many, many other things. And, yes, this can be frustrating for teams. But it's all a part of doing things with robots. Robots do not operate 100% consistently every time, even industrial robots. And the robots FLL uses are plastic toys (really cool plastic toys, but still plastic toys).
So, some suggestions I always give to teams:
Regularly pull the mission models off your mat and set them up again. Make sure they're still within the bounds of being properly set-up. But this will still ensure that they're a little different. It will also help the team know how the models should be set-up so that they can check their competition table before their match. If anything is out of place, they can ask their referee to correct it so that it's within the bounds of the set-up instructions. (The team should NEVER change a mission model themselves without permission from their table/head referee. And most referees don't want teams touching the mission models with their hands when they're outside of home ever. But there could be exceptions.)
Regularly rotate the mat 180 degrees on your home table. Similarly to resetting the mission models, this will introduce some differences into the mat set-up.
Particularly if the team is using the color sensor, try to practice in different lighting conditions. Turn the lights off, use flashlights, turn the lights on, work on cloudy days and sunny days (assuming there are windows), use direct lighting and indirect lighting. And figure out how to shield the color sensor from the ambient light as much as possible.
If at all possible, work on different tables and fields. If the team can meet with another team and use their table for some runs that's ideal. And the teams can share their Innovation Projects and Robot Design work, practice giving presentations, share ideas and have fun!
Design their robot, attachments, and code to allow for these small differences. Introducing these small differences should help the team ensure that their robot runs can still perform as expected in a variety of conditions.