So they have code on their robot for driving, but they did not change anything. Yesterday it started spinning in circles randomly. They changed out the brain and smart motor first. When that didn’t work, they changed out the motors and cables. The robot stopped spinning in circles, but now it drives much slower going forward and turns much faster. Our regional championship is tomorrow. This affects their timing for the game. Thoughts?
It is very hard to help with coding issues without seeing the code. In this case it also might help to see pictures of the drive.
Did you change out the battery?
You might want to try and calibrate the controller the the robot brain, or try to connect a different controller.
They systematically changed the brain (thinking it might be a bad port), then changed the motors and wires, then changed the controller. Nothing worked. As a matter of fact, it was still doing it Friday during the day, stopped Friday evening. It didn’t do it all through the qualifying matches on Saturday and then during finals did it and cost them the tournament.
Can you post the actual program file?
Yes, here it is. They emailed it to me. 9875B-StrafeDriveV6.iqblocks (20.8 KB)
It might actually just be a bad gyro. If you use a gyro in the program, maybe try switching it out for another?
My old gyro used to record 90 degree turns as 7 degree turns.
They actually disconnected the gyro at one point, but did not have the gyro in the drive code. It didn’t affect anything when they disconnected, and it was still spinning. But I just relayed that message to them and told them to try replacing the gyro since that’s the only thing they had not replaced yet. Thank you!!
Given that the team are using a tank drive here, albeit with some additional code to aid their control, the first thing I would do is go back to basics and make a super simple program to test the mechanical, build and electronics side of the robot.
They should do a simple program where they just assign tank control using no code, and just the basic Controller Configuration under Devices to set up the drivetrain control. Then drive it around loads and see if the issues occur. They should probably leave the strafe motor in like they already have.
If the issue doesn’t occur under these conditions, you probably have a code issue.
It might also be worth taking the
spin LeftMotor forward and
spin RightMotor forward out of the forever loop. You only really need send that command once since you are otherwise controlling it with velocity. Probably not the issue, but there is no need to continually send this command every time you go around the loop.
My first go to for an issue like speed is friction. Are any of the Omni wheels rubbing against the chassis?
It looks like that may be a problem on the strafe wheel, but nowhere else.
The issue isn’t speed. The issue is that the wheels started spinning out of control. The brain disconnected from the controller somehow. They thought it was a bad port and they replaced the brain, but that didn’t fix it. And it is random. The robot worked fine for 10 matches on Saturday, then started spinning out of control in the finals.
I’m not familiar with strafe wheel. I’m still relatively new to robotics. But the issue is intermittent. The robot worked fine for 10 matches on Saturday, then started spinning out of control in the finals. It drives fine normally, but then suddenly one of the wheels will randomly start spinning wildly. And it just started on Thursday. The robot has never done this before and they didn’t change any of the coding for driving. They are very confused as am I. I don’t know what to tell them.
Ok, thank you so much. I will definitely relay this information to them! I really appreciate your help!
Thank you! I told them and they replaced it!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.