|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Automatic Differential/Motor Speed Compensation
Hey All,
We're encountering a problem, we are currently using Rhino drive, with 2 motors per side. Sometimes one set of motors runs faster than the other. When that happens we use a differential modifier on the RobotDrive class. Example: Code:
Robot Drive(0.8*DIFFERENTIAL, 0.8) Edit: We are using tank drive style, not arcade style. Last edited by Sky Captain : 02-06-2016 at 03:41 PM. Reason: Drive Style |
|
#2
|
||||
|
||||
|
Re: Automatic Differential/Motor Speed Compensation
Encoders could work, using a PID to compensate the turn. This is complicated but it does work. Using a gyroscope works as well.
I always recommend fixing the problem mechanically though. If it's such a problem that a driver can't compensate themselves, you have an issue on your hands that should be physically fixed. |
|
#3
|
||||
|
||||
|
Re: Automatic Differential/Motor Speed Compensation
|
|
#4
|
||||
|
||||
|
Re: Automatic Differential/Motor Speed Compensation
OK: - skidsteer drivetrain - tank drive user interface Questions: Are you just trying to solve the problem of driving straight a given distance in autonomous? Or are you getting pushback from the drivers that the bot is annoyingly asymmetric and you're trying to correct that? Are you using SRX motor controllers in CAN mode? Do you plan to use encoders only, or are you open to the idea of adding a gyro as well? EDIT (adding Joel's question): Have you tried to identify possible mechanical issues? How? The set of optimal solutions depends on how you answer the questions. Last edited by Ether : 02-06-2016 at 04:37 PM. |
|
#5
|
||||
|
||||
|
Re: Automatic Differential/Motor Speed Compensation
Mostly the first two problems you posted. When we drive in autonomous, sometimes it doesn't drive straight. Also with the motors being off, the drivers are having to attempt to manually compensate for differing speeds on the left and right set of motors. On the robot we are testing, we are using Jaguars set up in PWM (standard) mode. We have encoders and a gyro. We've checked out the gearboxes, and made sure that all the treads are tight. We think it might be an inherent differences in the motors themselves.
|
|
#6
|
||||
|
||||
|
Re: Automatic Differential/Motor Speed Compensation
Quote:
That would definitively tell you whether it's the motors, or friction in the drivetrain. |
|
#7
|
||||
|
||||
|
Re: Automatic Differential/Motor Speed Compensation
Not that difficult actually, I'll get mechanical on it and report what the results are. Thanks.
|
|
#8
|
||||
|
||||
|
Re: Automatic Differential/Motor Speed Compensation
Quote:
|
|
#9
|
||||
|
||||
|
Re: Automatic Differential/Motor Speed Compensation
We just got our frame assembled, and we were going to disassemble the tracks when we migrated them from the test bot to the real bot. I'll report back sometime during the weekend when this happens.
|
|
#10
|
||||
|
||||
|
Re: Automatic Differential/Motor Speed Compensation
Quote:
|
|
#11
|
|||
|
|||
|
Re: Automatic Differential/Motor Speed Compensation
We have a similar problem with our robot. One of the gear boxes on one side is tighter. It doesn't seem to cause problems when manually driving, but long distances in autonomous mode would cause it to veer slightly.
We corrected by designing an algorithm using the gyro which we can set an angle and the PI controller will correct. Unfortunately it isn't perfect because the gyros drift so bad. We were having good luck scoring a goal autonomously and we made it to the finals. After turning the robot on the announcers would talk so long that the gyro would start drifting like crazy before the robots started. The reference library takes 5 seconds to calibrate the gyro. I wonder if that could be reduced. |
|
#12
|
||||
|
||||
|
Re: Automatic Differential/Motor Speed Compensation
Quote:
|
|
#13
|
|||
|
|||
|
Re: Automatic Differential/Motor Speed Compensation
I know reading the gyro doesn't take that long, the calibration routine takes 5 seconds on the 450 gyro. That is when using the WPI class.
When it drifts it really takes off. I reset the gyro at the very beginning, but if it is already drifting it will be off a few degrees in a matter of a few seconds. Ideally I would like to calibrate the gyro in my autonomous init. |
|
#14
|
||||
|
||||
|
Re: Automatic Differential/Motor Speed Compensation
Quote:
Also make sure you have all vibration sources (like the compressor) turned off when you calibrate. Or you could try this solution: http://www.chiefdelphi.com/forums/sh...9&postcount=13 http://www.chiefdelphi.com/forums/sh...8&postcount=17 |
|
#15
|
|||
|
|||
|
Re: Automatic Differential/Motor Speed Compensation
We used a gyro to drive straight, by taking into account the change in angle and a constant value (a constant much like a P-value in a PID loop).
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|