Quote:
Originally Posted by buildmaster5000
You mentioned that you were working on creating a solution for when the wheels go past an arbitrary 180 degree point. I was proposing the solution that I came up with to your problem. It has it's limitations, but it is simple and reliable.
|
Thank you for clarifying, Alex. I think you misunderstood what I was saying (which could be partly my fault - I will go back and edit that post to add more explanation).
The joystick inputs are not the problem. If you copy and paste the reference code from, say, Example 1 (Figure 7b) into a text file, edit it to add some window dressing, and compile it and test it, you will see that the reference code as shown already cleanly handles all possible combinations of joystick commands (fwd/rev, strafe, and rotate) and correctly calculates the angles and speeds of each of the four wheels.
The 180 problem I mentioned in the earlier post relates to how to control each wheel's speed and angle,
given the correct setpoint and corresponding process variables for each wheel.
The solution to this problem depends on whether the wheels (and sensors) have continuous or limited rotation, and whether the sensors have "dead zones" (gaps). It may also depend on the floor surface and tread material of the wheels, and the power of the steering motors vs the power of the driving motors.