View Single Post
  #9   Spotlight this post!  
Unread 16-01-2011, 23:35
CodeMonkeyMatt CodeMonkeyMatt is offline
Registered User
FRC #2605
 
Join Date: Jan 2011
Rookie Year: 2008
Location: WA
Posts: 46
CodeMonkeyMatt is on a distinguished road
Re: Mechanum wheel programming in C++

Most likely, you would want to put the mecanum code inside of the "while(IsOperatorControl())" loop of the OperatorControl function of the SimpleRobot class. Also, I believe the code would change slightly as the SimpleRobot template uses different variable names, and does not use pointers. (I don't have our classmate in front of me, so someone correct my code if I'm mistaken)

Code:
while(IsOperatorControl())
{
myRobot.MecanumDrive_Cartesian(stick.GetX(), stick.GetY(), stick.GetTwist());
...
This is a good document for getting started in C++ and making sure that Windriver is properly set up (which you may or may not need).
http://firstforge.wpi.edu/sf/docman/...tation/doc1197

While I haven't looked through this very much yet, this should document most, if not all the WPILib classes with examples of using them. It is written for both Java and C++, so make sure you don't get the code mixed up.
http://firstforge.wpi.edu/sf/docman/...tation/doc1196
Reply With Quote