Quote:
Originally Posted by F22Rapture
Would something like this be correct?
|
Run the code and create a contour map. Then carefully study the contour map to see if it's what you want.
Quote:
|
@ Ether what are the benefits of your method vs Tom's?
|
I haven't yet coded up Tom's method and made a contour map, so I can't say for sure. But the method I posted requires no clipping or normalization of the wheel speeds, because they are guaranteed to be within the range -1 to +1 (as long as the tuning constants "a" and "b" are kept in the ranges indicated). The left and right wheel speeds are linearly interpolated all the way out to +/-1 in the Y and X joystick directions.
I have pseudocode that takes that a step further and does throttle-dependent nonlinear interpolation of the wheel speeds, but that seems like overkill. However if there's any interest I'll post that too.
Quote:
|
What would that code look like in Java?
|
I'm not sure what you mean. It would look the same, only using Java syntax and semantics.