View Single Post
  #6   Spotlight this post!  
Unread 08-17-2012, 02:05 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,002
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: West Coast Drive Code

Quote:
Originally Posted by F22Rapture View Post
Would something like this be correct?
Code:
...
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.


Reply With Quote