Quote:
Originally Posted by Ring_Lord
Lineskier,
Our team has figured out that when we use the Y axis on our controller it acts as axis 3. And when we use the axis 3 it acts as though its the Y axis. We tested this so the labels are wrong in the program. We are using cartesian and plugging the correct axis into the Cartesian mecnum with a numerical gyro number between -360°and 360°. We have our program set up so we can "turn off" the gyro and put a zero in for the angle at the press of a button. when the angle is at zero our robot works fine, but when we put our gyro angle in and try to rotate it at 90° it starts to strafe. This shouldn't be possible because spin is input to the equation after the gyro changes the X and Y axis.
Any help would be appreciated.
|
Are you using an xbox controller by any chance? I seem to remember the x on the right joystick is axis 3.
If this is the case I would expect that you would be feeding something like this into the mecanum:
Left JS_Y (js1.y) -> mecanum y
Left JS_X (js1.x) -> mecanum x
Right JS_X (js1.axis3) -> mecanum rot
Gyro getAngle -> mecanum angle
[Edit]
I just did some some further research and realized this is probably not the case. Can you provide the mappings you are using for x, y, and rot. Also what type of js set up you're using...