![]() |
Re: H-Drive Programming
Quote:
@kinganu123: Is the following a correct interpretation of what you meant? Let X be the value of the joystick strafe axis, If so, would you be so kind as to post your G(X) function. |
Re: H-Drive Programming
Our formula is e^(gaussianInput^2/-.18) where the gaussianInput is the polar degrees from 0 to pi where pi/2 is 0, 0 is 1, and pi is -1.
I'm putting the code below, in case what I've typed doesn't make sense, here's the code: Code:
centerCurrent = xAxis; |
Re: H-Drive Programming
Quote:
Suppose the driver pushes the joystick to Y=1, X=0.5, rotate=0. What will be the "tapered" value of X? |
Re: H-Drive Programming
Oh, sorry, I meant to say that the y-axis is the one that is modified, not the x.
So, x will be .5 and y will be 0.9702, or e^(((atan(1/.5)-pi/2)/pi/2)^2/-.18). |
Re: H-Drive Programming
4 Attachment(s)
Quote:
e^(((atan(1/.5)-pi/2)/(pi/2))^2/-.18) This is quite different from the previous description. See attachments. Have you guys driven with this yet? How is it working? |
Re: H-Drive Programming
Yes, I didn't realize that he specified the strafe axis, which would result in the confusion.
And we haven't been able to test it yet since the mechanical guys are currently assembling the elevator on the robot, so we're losing a few days on testing and tuning this. Also, I thought I'd note here that we tweaked the code above, in case anyone else wanted to try our stuff out, because I noticed a slight flaw in getting the y values Code:
centerCurrent = xAxis; |
Re: H-Drive Programming
Quote:
I'm a math enthusiast, so don't take this wrong, but why the complicated function with exponential and inverse trig? Wouldn't a simple linear interpolated 6x6 LUT do the job... and be far more easily tuned to compensate for actual behavior once you've done your testing? |
Re: H-Drive Programming
So we do have a simpler version coded up with some sort of linear adjustment instead of this one (I had some of the other students write that as a backup), but the main reasoning behind this method was to allow y to increase significantly to make up the lost y speed as the driver went at a smaller angle (with respect to the front of the robot).
|
Re: H-Drive Programming
4 Attachment(s)
Instead of using arctangent and exponential functions, why not just multiply the X axis by a factor of 4, clip it at 1, and normalize the resulting X,Y pair? Code:
The attached plot shows a family of Xa vs Xj curves for Yj=0 to 1. Or you could make the X gain a function of Yj, like so: Code:
and Ya vs Yj for Xj=0 to 1 |
| All times are GMT -5. The time now is 12:22. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi