Log in

View Full Version : Tank Drive Troubles


Nicandy
05-03-2011, 15:38
Okay, so We have the arm motors programmed pretty as you please, we are using a tank drive to control the two drive motors, as well as the two arm motors that we have. The arm motors do exactly what they are supposed to do. as well as our drive motors, but we are having issues with programming the drive motors to turn or re-invert themselves to turn. is there anyone out there who can give us some insight? we are completely stuck and out of ideas on this. There is also a photo that might help you guys. thanks very much from the Marinerds.

nighterfighter
05-03-2011, 19:10
I don't know labview at all, but do you need to invert one of the joystick axis?

Remember that full forward is -1.

Vikesrock
05-03-2011, 19:20
Easy way to test for proper operation of a Tank drive.

1.Put the robot up on blocks so the wheels are off the ground and not touching anything.
2. Push whichever joystick corresponds to the left side forward. Check if the left side drive wheels move forward.
2a. If they don't go to Begin.VI and wire a true constatnt into the Invert Left terminal of the Open X Motor drive.
3. Push the right joystick forward. Check if the right side drive wheels move forward.
3a. If they don't go to Begin.VI and wire a true into the Invert Right terminal of the Open X Motor drive.
4. Save and rerun, or rebuild and set as startup
5. Verify both sides now move in the proper direction.

Nicandy
06-03-2011, 11:00
Easy way to test for proper operation of a Tank drive.

1.Put the robot up on blocks so the wheels are off the ground and not touching anything.
2. Push whichever joystick corresponds to the left side forward. Check if the left side drive wheels move forward.
2a. If they don't go to Begin.VI and wire a true constatnt into the Invert Left terminal of the Open X Motor drive.
3. Push the right joystick forward. Check if the right side drive wheels move forward.
3a. If they don't go to Begin.VI and wire a true into the Invert Right terminal of the Open X Motor drive.
4. Save and rerun, or rebuild and set as startup
5. Verify both sides now move in the proper direction.
We want one joystick to control forward and backward, as well as turning left and turning right, while the other joystick will control the arms elevation.
and our problem is that we can't figure out how to program the first joystick to do all four things. we can only get it to do either forward and backward, or left and right.

Ether
06-03-2011, 11:05
We want one joystick to control forward and backward, as well as turning left and turning right...

and our problem is that we can't figure out how to program the first joystick to do all four things. we can only get it to do either forward and backward, or left and right.

Here's your problem: What you are describing is called Arcade Drive, not Tank Drive.

Your FRC LabVIEW installation supports Arcade Drive.

See attached screenshots of the Functions Palette and the Help.

Nicandy
06-03-2011, 13:48
well then can i use two arcade drives? or one tank and one arcade drive?
because i need the one joystick to be able to control the arm, and one to control the driving.

Ether
06-03-2011, 14:07
well then can i use two arcade drives? or one tank and one arcade drive?

You could, but that's not the way it was intended to be used.

because i need the one joystick to be able to control the arm, and one to control the driving.

Use the Arcade Drive VI to control the driving.

Don't use Arcade or Tank Vis to control non-drivetrain motors. See this (http://www.chiefdelphi.com/forums/showpost.php?p=1025243&postcount=12) post.

EthanMiller
06-03-2011, 14:33
The arcade drive VI takes one joystick input, IIRC. Maybe an X and a Y input. Either way, they come from the same joystick.

Ether
06-03-2011, 15:20
The arcade drive VI takes one joystick input, IIRC.

Arcade Drive takes 2 joystick inputs.

Maybe an X and a Y input. Either way, they come from the same joystick.

That's the way it's usually done, but it's not required. The 2 inputs could come from 2 different joysticks.

Nicandy
07-03-2011, 13:28
Ether, thank you so much, you really helped answer a lot of questions.
:)

Ether
07-03-2011, 16:23
Ether, thank you so much, you really helped answer a lot of questions.
:)

You are welcome.