Quote:
Originally Posted by jhersh
Funny you should ask... the forthcoming update will include a Cartesian version of the VI that even inverts Y for you.
-Joe
|
Not sure how you are implementing this, but can I request that you DON'T include the Joystick reversal in the drive VI. (or at least make it an option "Reverse Y Axis")
I know the reversal is needed, but if we intend to use the same VI in Auto, having to use negative numbers to go forwards is real annoying (eg when target tracking).
I can't tell you how annoying it was writing the code last year to track the target, and having to continually reverse the sign of the forward motion to get the robot to "approach" the target. Flipping the sign is easy, but debugging the control loop was no fun.
I still say ground based robot joysticks MUST output +ve numbers when pushed forward. There would be SOOOOOO much less confusion if the Get Joystick just flipped the Y axis, and ALL the controls that currently accept JS inputs were corrected to match. Then they'd work the same in auto and teleop.
I'll give you another example.
Our robot has it's 4 drive wheels on pivots, so they can be configured to be in-line (90 deg) or at 45 Deg. So at the press of a button, the robot can flip from Skid steer to Holomonic. The trouble is, it turns out that the "default" + direction for the Arcade Drive, and the Holomonic drives are flipped... mainly because the Arcade VI assumes -ve input is forward, and the holomonic assumes 0 Deg is forward (eg: holomonic is logical, Joystick is convenient.)
So if the wheel "Invert" bits are set correctly for Arcade drive (as in the sample template), they are incorrect for holomonic. This caused me no end of trouble during debugging. In the end I just had to invert the joystick values going to the Arcade drive. Now stick forward works for both arcade and holomonic.
The alternative was to make JoyStick back action request a 0 degree vector for holomonic..... No Thanks.
Phil.