View Single Post
  Spotlight this post!  
Unread 18-02-2009, 16:53
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: autonomous mode help please...

I would be simpler to use 4 motor tank drive, then your autonomous mode is also much simpler. Making three duplicates of the original drive function isn't the right way to go.

For just the top Drive section:
1) Right click on the top "Drive Open 2 Motor" and choose: Replace -> RobotDrive Pallet -> Open 4 Motor
You'll then need to add constants for the extra PWMs for your motors, but make sure to read which motor each connection is supposed to be.

2) Right click on "Drive Arcade Drive" and choose: Replace -> RobotDrive Pallet -> TankDrive

3) Take the output of your second joystick on USB 2 and connect it to the Tank Drive "Right Axis value"

4) Remove the second "Drive Open 2 Motor" and the second Arcade Drive icon.

5) Switch "TeleOp Execute" to "TeleOp Reset" and also replace the Arcade Drive there with Tank Drive.

That's all you need to have 4 motors controlled by Joysticks 1 & 2 in tank-style drive.

The attached sample of this is a direct modification of your code.

This makes Autonomous pretty simple, because you can use what's already there
In Autonomous Independent.vi replace each of the three Arcade Drive icons with TankDrive:

1) Right click on "Drive Arcade Drive" and choose: Replace -> RobotDrive Pallet -> TankDrive
Add a second constant (use -0.5 for the fist one and 0.5 for the second one) to each of the TankDrive Left axis inputs.

2) Toggle the True/False switch on the left to True, so that the autonomous is allowed to run.

P.S. I've attached a picture of what the autonomous would look like when you're done.
Attached Thumbnails
Click image for larger version

Name:	TankDriveSample.jpg
Views:	82
Size:	28.6 KB
ID:	7519  Click image for larger version

Name:	Auto_sample.jpg
Views:	87
Size:	37.7 KB
ID:	7521  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 19-02-2009 at 09:15.
Reply With Quote