We have a field at home with homemade wooden walls, and it is on a carpet surface. We noticed that every time we code our autons or programmings skills, it works perfectly at home, yet every time we try it at comp or at school, it never works properly. Why is this happening and how can we fix this?
Carpet surface generates unwanted friction and interferes with the gearing, thus making movement less accurate
What issue arises when you try your auton at school? Does the robot drive at an undesired speed? Does the robot turn to the wrong angles? (Give us more details so we can better help you).
Every movement is thrown off. Sometimes it is small, but sometimes is it big and goes in the wrong direction by 15-20 degrees, or stop short on it’s goal.
Does your robot use any sensors, that could be a problem, as the environment could interfere w/ the system.
Yes.
This is likely because of the difference between the foam and carpet. Try adding encoders to the drivetrain (just one on each side), then using the encoders’ outputs to generate how much the encoders are turned for each part of the auton when running it at home. Then, program your auton using the values the encoders generated instead of the way you currently have the auton programmed.
In other words:
- Add encoders to drivetrain (one encoder per. side)
- Run your regular auton at home but have the encoders collect data about how much they were turned for each turn of the auton
- Reprogram the auton to have the motors turn until the encoder has reached the amount it should turn for that part of the auton (make sure to keep a copy of your old auton around in case this change doesn’t work)
- Try your new auton at school
Note: These numbered steps talk about only using the encoders for turns, but you should use them when driving straight too because it may help avoid the robot going too far/not far enough.
Starting off the carpet provide extra unwanted friction. Trying autons on an official vex bought field will always have better results as it shows what the robot will actually do. This could also be due to sensor detection in the code.
Sorry for not being clear, but we use a PID system with an inertial sensor on JAR - Template. When I said carpet surface, I meant there is a carpet under the tiles. We are also planning to use odometry, do you think that will help or should put wood under the tiles? We also heard that having carpet under generates static electricity messing with the movements.
As someone who has been dealing with Jar template for the entirety of last season and this one, sometimes a little value in the code can completely make the program go haywire, look over your code and make sure nothing is out of place or incorrect, static electricity shouldn’t be causing the issues as we tested our OU states autonomous on carpet and it worked in competition until I beat the inertial silly while crossing the barrier, my teams main programmer could probably explain this better since I only really understand the basics of JAR.
Yeah so PID is great but it still will suffer from the downfalls of using motor encoders on a carpet surface. The times will squish more compare to a school field with a hard surface below it. I would put wood underneath your home field so it is more consistent with a field on a hard floor, which is also how competition fields will be.