|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Extreme curve?
So yesterday during our unbag time, we decided to test our autonomous that should drive straight over the defenses, and the drive is set for 70% forward. However, when we tested it for the first time on the field, instead of driving straight, it curved extremely left, crashing into the drawbridge instead of going over the moat. We went into teleop mode and made sure the shifters were set both to low gear just to be sure, then we tested it again, and it still drove to the left. We have greased our gearboxes, and have both belts set to proper tension. We did notice that the shifter coupler (interfacing the piston with the shifter) on the right side (the faster side) is rotating with the shaft, but the left side was not. What could possibly be causing this huge curve, and how would we fix it? We don't have time to buy encoders and have them shipped to us, as we have a week 1 event. Thank you for your help!
|
|
#2
|
|||||
|
|||||
|
Re: Extreme curve?
Does it drive straight in teleop? Have you checked the current going to each motor? Have you spun the wheels by hand to see if one side is harder to turn than the other?
Do you have a gyro? Using a gyro is pretty simple these days. |
|
#3
|
||||
|
||||
|
Re: Extreme curve?
Quote:
Quote:
We did get one through FIRST Choice, I'll have our programmer look into that. |
|
#4
|
||||
|
||||
|
Re: Extreme curve?
How many motors per gearbox? How are the motors connected?
We had the same problem last year and we discovered that one of the Anderson Power Pole connector contacts wasn't fully engaged. That solved the problem for us. |
|
#5
|
||||
|
||||
|
Re: Extreme curve?
We have 3 CIMs per gearbox, and we are using yellow crimp terminals.
|
|
#6
|
||||
|
||||
|
Re: Extreme curve?
Quote:
You can also try changing teleop to drive the motors at 70% power instead of whatever value the joystick says. That should tell you whether this is only happening in auton (the problem is in your auton code) or if it is always happening and the driver is subconsciously correcting for it (the problem is mechanical or somewhere else in the code). |
|
#7
|
||||
|
||||
|
Re: Extreme curve?
Are you using PWM for your motor controllers? I had this issue in 2014 with PWM Talons until we calibrated them.
|
|
#8
|
||||
|
||||
|
Re: Extreme curve?
Disclaimer: Not on the manufacturing team.
But check the code. Is one side driving faster than the other in the code? If so, try boosting the left side to 80% and the right side to 70%. Just adjust so the system drives straight, even if the code says it shouldn't (straight might be left 90% and right 60%. idk, robots do odd things. Also, by some odd chance, does your left side have a higher gear reduction? could your gear boxes have been built just different enough? |
|
#9
|
||||
|
||||
|
Re: Extreme curve?
The number of parts in a typical FRC drivetrain can make for a noticeable variation in the speeds of drive units. When run open loop, the drivetrain on our bot this year has one side a few percent faster than the other which made it curve.
Certainly calibrate all motor controllers and double check connections first. You may be able to tweak your drive train for better consistency and find a balance of motor power settings that goes approximately straight, but the real solution is using some form of feedback. A combination of wheel speed encoders and/or a gyro lets the roborio make adjustments on the fly. However this can take a fair bit of time to get coded and tuned in properly. |
|
#10
|
||||
|
||||
|
Re: Extreme curve?
If you do have the time, I would advise using the gryo to make a feedback loop to keep the robot going straight. If tuned properly, that should make the drivebase drive straight regardless of any mechanical issues.
|
|
#11
|
|||
|
|||
|
Re: Extreme curve?
Quote:
I'd caution against ignoring the issue or papering over it, and instead start to look for the root cause. If the issue is that a motor isn't plugged in when you thought it was, or the speed controller was disconnected or a mechanical issue, fixing it in code will make it look like everything works when it doesn't. The current suggestion is a good one. After that, I'd try isolating the issue. Feel each of the sides of your drivetrain and try to see if one side has more resistance than the other. Try unplugging all but 1 motor per side and see how it performs. Do that for each of the motors on a side. Try controlled experiments to see if you can discover where the problem is. |
|
#12
|
||||
|
||||
|
Re: Extreme curve?
Quote:
|
|
#13
|
||||
|
||||
|
Re: Extreme curve?
First of all, does it only curve in autonomous, or in teleop as well?
If it's only in autonomous, that would indicate a software problem. If it curves in teleop as well, it could be any number of problems. Are the speed controllers all calibrated? Are they all blinking at the same rate when it's driving? Are all the motors running in the right directions? If all of those things are good, then it's likely a mechanical issue. I've seen over-tensioned chains, over-tightened wheel shafts, bad spacing in gearboxes, and chains rubbing on parts of the frame all cause problems like this before. If you can't figure it out, could you compensate by powering one side more than the other in auton? |
|
#14
|
||||
|
||||
|
Re: Extreme curve?
Quote:
|
|
#15
|
|||
|
|||
|
Extreme curve?
If you're using PID for speed control, make sure the encoders are reading correctly (encoder shaft rotates with the shaft it's coupled with, it's wired up correctly, and you get a reading from the encoder when the wheel is spinning)
If the encoder isn't coupled correctly with the drive shaft, a PID loop will "correct" it to 100% power Also for PID: if your motor is inverted relative to the encoder (ie positive value to the motor results in a negative value to the encoder) a feedback loop will occur, causing the motor to go at full speed, and probably staying there even when the setpoint is 0. The solution to this is negating the setpoint instead of inverting the motor. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|