View Single Post
  #1   Spotlight this post!  
Unread 28-02-2012, 17:45
Unforgiven_Hero Unforgiven_Hero is offline
Registered User
FRC #1989
 
Join Date: Feb 2012
Location: Vernon
Posts: 11
Unforgiven_Hero is an unknown quantity at this point
Programming Mecanum Wheels - 4 Victors

Okay, so I've been working on testing my code on a practice bot and need help. I'm using an Attack 3 Joystick (I have 2 ) and a robot with 4 mecanum wheels, each with 4 victors.

Problem is: I have the sample code for a 2 motor robot and am having trouble creating a 4 motor drivetrain and using mecanum wheels.

I create the drive system by doing this:

RobotDrive *myRobot;
Joystick stick;

then

myRobot = new Robotdrive(1,2,3,4);
stick = new Joystick(1);

then under operator control I write,

myRobot->MecanumDrive_Cartesian(stick->GetX(),stick->GetY(),stick->
getTwist());

Except this isn't working. Do I need to declare something specific for the victors or logitech attack 3 joystick? And am I assigning the one joystick to control the whole robotdrive? I really need some help, anything would be appreciated at this point.

Thank you in advance!
Reply With Quote