Team Sub-Groups‎ > ‎Programming‎ > ‎

Working in the Simulator with Tank Drive or Arcade Drive

posted Dec 10, 2014, 9:32 PM by Rob Owings   [ updated Oct 4, 2015, 12:05 AM by Jeffrey Kangas ]
Today with the help of standard labview without the robotics code, we found that the left stick on the game pad has axis 1 as the horizontal and axis 2 as the vertical axis.  The right stick is axis 3 as the horizontal and axis 4 as the vertical.  


Using something similar to the code above, you can plug in a joystick (only one at this point) and push the buttons and move the axes to see which button maps to 1, 2, etc.  X = 1, Y = 2, Z = 3, etc.

For tank drive, it is best to use axis 2 and axis 4.  We started to code axis 3 as the gripper if the A button is pressed and axis 1 as the arm if the b button is pressed.  The code for that looks something like this:

Begin.vi
Finish.vi

We did not get to the telop code entirely.

Axis 2 = left motor
Axis 4 = right motor

press button 1 (true) then use axis 3 to set gripservo
press button 2 (true) then use axis 1 to set armservo

scale joystick output (-1 to +1) to angle input (0 to 170)

Test in the simulator and tell me how it goes... send a screen shot.
Comments