|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Getting the bot to go straight?
Hello Everyone,
A while back, I read on these forums that adding a 1:1 reduction in a gearbox is a hardware solution to prevent the robot from veering to one side. I was wondering if anyone could explain this. Appreciate it, Sunny G. |
|
#2
|
|||||
|
|||||
|
Re: Getting the bot to go straight?
I think you must be mis-remembering. Gearing both sides (left and right) of a differential drive together with a 1:1 ratio IS a surefire way to drive straight*, but good luck turning
Otherwise, there is nothing magical about a 1:1 ratio (perhaps in the old days with heavily biased drill motors, using an extra 1:1 ratio would let both motors spin CW/CCW at the same time, but in the CIM era, this is a much more minor issue).In general, there are a few strategies teams use to drive straighter: 1. Pay close attention to the mechanics. Alignment. Weight distribution. Friction in the drivetrain. Everything on the left should look and feel like everything on the right (always a good idea). 2. Using encoders. When you are driving perfectly straight, the left and right encoders should report the same speed and distance traveled. But when you are veering, one side moves faster than the other. You can write code to automatically boost the power on the slower side or lower the power on the faster side to force the bot to go straight (a good application for a PID controller). 3. Using gyros. Gyros provide you with angular rate information (how fast you are turning). Integrate their output over time (e.g. sum it all up) and you get the heading of the robot. A perfectly straight robot should have 0 angular rate, or in other words, should maintain the same heading. Similar to above, you can write code to tell the bot to adjust motor power to fight any heading changes that you see. *Assuming everything is aligned, weight is reasonably balanced, etc. |
|
#3
|
||||
|
||||
|
Re: Getting the bot to go straight?
with the drill motors that was an issue. cims gain bias the older and/or more used they are, so i would recommend against using cims from prior robots, or more than 2-3 years old. (replace the motor, keep the gearbox, if you are worried about costs.)
our team used to always use drive straight code. this year, for the first time since i joined the team, the robot drives perfectly straight, without any code. |
|
#4
|
||||
|
||||
|
Re: Getting the bot to go straight?
A longer wheel base will also improve your bots ability to drive in a straight line. (Notice: This also makes turning your robot much more difficult. Which.. well... is why your bot will drive straighter....)
|
|
#5
|
||||
|
||||
|
Re: Getting the bot to go straight?
I'm noticing a trend. If your robot needs to drive straight, the solution is to make it impossible to turn. That should basically fix all your problems. Just as long as you don't have to turn at some point.
Jason |
|
#6
|
||||
|
||||
|
Re: Getting the bot to go straight?
Quote:
The old Drill Motors were biased to run faster forwards than in reverse. A typical skid-steer drivetrain with 1 of these motors on each side would be built such that to drive forward these motors would be spinning in opposite directions. The motor bias would then cause the robot to veer to one side (since one side of the drive is running faster than the other). A way to counter-act this, is to add another 1:1 gear stage inside one side of the drivetrain. Spur gears reverse the direction of motion. So if you add one additional stage to one side, you reverse the direction of motion. This would serve to ensure that both motors are running in the same direction, and eliminates any worry about motor bias. (Of course you make it a 1:1 stage, because you don't want to change the overall gear ratio for this gearbox). Back in the day, this wasn't a huge issue since there was no autonomous mode. Drivers typically just "dealt with it." In 2003 and 2004 (the 2 years involving both Autonomous mode AND drill motors) many teams came up with different solutions to make their robots track a little straighter. Some teams simply dealt with it by adding a voltage bias to their drivetrain (i.e. applying slightly less voltage to the "fast" side of the drive). Other teams implemented a mechanical solution similar to the one you described. Still other teams implemented some "go straight" code which utilized sensor feedback from the wheels to ensure they are spinning the same speed. Now-a-days in the "modern era of the CIM motor" we don't really need to worry about motor bias, since CIMs are neutrally biased (they spin about the same forward & reverse). People still implement go-straight code, but not for the reason described above. The "additional 1:1 reduction" mechanical solution will NOT help a robot with CIM motors drive straight. -John Last edited by JVN : 10-06-2011 at 09:10. |
|
#7
|
||||
|
||||
|
Re: Getting the bot to go straight?
The past two seasons, team 148 has utilized an articulating drivetrain. The robot shifts from one set of wheels to another via pneumatics. One of these sets of wheels consists of (4) high-traction wheels, spread to the outer 4 corners of the robot in "narrow/long body" configuration. This configuration of wheels makes it VERY difficult for the robot to turn due to the scrub forces of these wheels -- in addition... it makes it hard for the robot to BE turned. This "traction mode" keeps the robot driving straight as an arrow.
If we are ever in a situation where we need to push forward in a straight line (like autonomous this year), we run in this traction mode. For normal moving around the field, we use our other drivetrain mode. For more information on drivetrain turning, and scrub forces... check out the math in Chris Hibner's whitepaper: http://www.chiefdelphi.com/media/papers/1443 Note... articulating drivetrains aren't for everyone. There is some added complexity over a "standard" style drive. However, we on 148 like the benefits that come with such a drive. Whatever solution you decide to go with for driving straight, be it a software or mechanical solution, I strongly urge you to work to develop / test it during the off-season. What else were you going to do this summer anyways? Sleep? -John |
|
#8
|
|||
|
|||
|
Re: Getting the bot to go straight?
P.S. - It always helps to check and make sure that the jumpers are all in the same position on the victors (either coast or brake).
|
|
#9
|
||||
|
||||
|
Re: Getting the bot to go straight?
"
The old Drill Motors were biased to run faster forwards than in reverse " We found a similar symptom to happen with our robot and I believe we are using CIM. Basically when appling equal voltage say 0.08 on both motors only one side would run while the other did not. I've applied a software solution that removes the "dead-zone" like what you can do for joysticks, and then linear interpolate the rest of the values. With the wheels on drive blocks I can see this appears to work, but I have not yet tested on the ground. I feel confident that a software solution could work even if it requires an exhaustive attempt to plot a graph of several points to obtain the derivative for each side. I think voltage applied to the motors only are linear, but due to the chains and other static friction it makes it appear more logrithmic. Unfortunately one of our encoders is still defected (returns NAN), and we are all too mechanically challenged to fix it. So I am hoping for a miracle with tweaking the voltage distribution (or hope to get team to install a gyro). I've added more details (and videos) on my blog here: http://www.termstech.com/articles/ |
|
#10
|
||||
|
||||
|
Re: Getting the bot to go straight?
We found a similar symptom to happen with our robot and I believe we are using CIM. Basically when appling equal voltage say 0.08 on both motors only one side would run while the other did not. I've applied a software solution that removes the "dead-zone" like you can do for joysticks, and the linear interpolate the rest of the values. This alone appears to improve the problem, and probably well enough to conduct autonomous... we'll just compensate for the slight turn... since it is consistent we can make something work. I'll want to pursue the gyro solution as time allows (especially for next season).
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|