We are working on a project for my robotics class, it is basically a tote bot. C channel frame 6wd 6" high grip drop center 2x cimple boxes powered by 2 mini cims each. Using JVN calc. I am getting about 26fps. This is good I want it to be fast. The issue I think is will we have is control at that speed. I have a few thoughts of my own. But would like to hear from people that have experience with high speed control.
Controlling my little Altered Wheelbase Chevy II at 130 mph is a bit scary!
I think the robot won’t be so bad. It might take a while for it to accelerate to 20+ fps. And you can do some programming tricks to make the controls less sensitive, too.
For programming, I would have it do arc turn drive instead of standard tank or arcade drive. Basic principle is that steering is decoupled from speed, instead of in arcade drive where it’s just simple addition. I have a paper/can shoot you the math if you want.
For this application, you may want to skip the drop center; making the track/wheelbase ratio such that you can barely should will give you more control in the straightaways and gradual turns. caveat: I have not done this.
In my opinion, it’s going to be very valuable to use some sort of closed loop control in this situation. At the very least, PID for drivetrain velocity would be good.
Protip - please DON’T do this. While it’s true it will make it track straight depending on the specifics it could make it not turn at all. The lower available torque from high gearing coupled with needing more torque to turn from the long wheel base will result in massive current draws.
If you have issues driving straight I’d recommend adding a gyro and feeding that into your drive code. caveat - I have done this.
I have to agree with Andrew here. Unless you are changing the ratio of the wheel base (wider than it is long in general) this will make turning at any speed, particularly low speeds, very difficult, likely tripping fuses from the current draw.
I am no programmer, but you could do a lot of different things. The first thing that comes to mind is to limit the maximum turning rate across all speeds. Constantly check for the difference in right and left speeds and prevent the the difference between the two from becoming too great.
You could also do some kind of closed loop system that prevents the difference in the right and left side speeds from becoming too large just at higher speeds. It could look something like this:
while (match=!end)
tL=getthrottleleft
tR=getthrottleright
throttle=(tL+tR)/2 ;net throttle at the center of wheelbase, linear relationship to bot speed
turn=tL-tR ;positive=turning right, negative=turning left (unless going backwards)
turnmax=turn/(throttle*gain) ; the larger the throttle, the smaller the maximum difference between the throttles can be
speedL=throttle+(turnmax/2)
speedR=throttle-(turnmax/2)
match=getmatchtime
end
The biggest drawback with this is that it will be hard to control at low speeds but fine at higher speeds, so it may be better to limit the turning throughout all speeds. You also have to make an exception for when throttle=0, as you will get a divide by zero error.
Let me know if I made any logic mistakes as I am DEFINITELY not a programmer, just someone who understands the absolute basics.
Also, one thing we do in our drive code is allow multiplication of our rotation throttle by an arbitrary polynomial of our forward throttle (with a separate scaling factor for when the forward throttle is 0). I’ve found “a + b*sqrt(x)” to be a pretty good choice for this (our current drive has this with a=.2 and b=.6), but YMMV - the best thing to do is experiment.