Quote:
Originally Posted by Jogo
Really like the idea of that use of throttle.
Out of curiosity, is there anything special about the function x^3+x?
|
Just to be clear (to avoid possibly confusing other readers), the function is not x^3+x, it is f(x) = a*x^3 + (1-a)*x. This function has some interesting properties.
As mentioned in the paper, when a=0, it becomes f(x)=x. When a=1, it becomes f(x)=x^3. When 0<a<1, it's something in-between. You can vary the "a" parameter to create a curve between f(x)=x and f(x)=x^3 to obtain the desired gain at low joystick settings.
Also, f(x) maps the domain (-1..1) into the range (-1..1) for any chosen value of "a" between 0 and 1, so there's no extra code required to break the domain up into, say, x<0 and x>0.
Quote:
Recently we've used an exponential graph:
Let min = lowest desired value (min>0, usually the highest value at which the robot doesn't move)
Let max = highest desired value (usually, max = 1.0)
Then, output = min(max/min)^joystick value.
|
Clever. I like it.
If you want to add a Y-intercept to the f(x) function, you can do it like this:
Code:
g(x) = b + (1-b)*[a*x^3 + (1-a)*x] for x>=0
g(x) = -b + (1-b)*[a*x^3 + (1-a)*x] for x<0
Now you have 2 adjustable parameters: "b" and "a". The "a" parameter still adjusts the gain, and the extra parameter, "b", adjusts the y-intercept.
Interestingly, if you set b=0.2 and a=0.5, you get almost exactly the same curve as your exponential curve with min=0.2.
I have a graph prepared to illustrate this but can't attach it to this post for some reason*. I'll
upload it when I get a chance.
Quote:
|
This also enables us to vary the max value for the turning axes based on the robot's forward speed.
|
Could you provide some more detail explaining what you mean please.
*if a moderator happens to be reading, would it be possible to change permissions on this thread to allow attaching graphs?