![]() |
Re: Mechanum wheel programming in C++
Ok, I am really new to C++, we are using the SimpleRobot class. can help me out by telling me what kind of a loop I put around it (MecanumDefaultCode.cpp) and some details like that. Do I need a .h file to go with it? What else do I need to add to make it work with the default sample code? by the way, does anyone know of a tutorial that explains how to use most/all of the WPI Library commands? I don't know how to use hardly any of them. this is my first year coding and all of the programmers graduated last year so I'm looking for any possible help.
|
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())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 |
Re: Mechanum wheel programming in C++
Quote:
|
Re: Mechanum wheel programming in C++
Quote:
|
Re: Mechanum wheel programming in C++
So Joe I downloaded your code and am trying to get it to build in Windriver.
Sorry but myself and the kids are just getting familiar with Windriver. I opened it but it would build. Any suggestions? thanks John Quote:
|
Re: Mechanum wheel programming in C++
Quote:
|
Re: Mechanum wheel programming in C++
Would you be able to program/run it with only a two axis joystick? My team wants to run this years bot as a CO-OP and have two joysticks with one Logictech controller for the shooter/loader system.
|
Re: Mechanum wheel programming in C++
Quote:
How are you planning to take advantage of the 3 degrees of freedom of a mec drivetrain using only one 2-axis joystick? Changing modes with a button perhaps?? WPILib has code for mecanum. |
Re: Mechanum wheel programming in C++
Quote:
Code:
[...] gyro->Reset(); float theta = gyro->GetAngle(); [...] |
Re: Mechanum wheel programming in C++
Quote:
|
Re: Mechanum wheel programming in C++
1 Attachment(s)
Our team uses SimpleRobot and here's our code for Mecanum/Omni drive using a 3 axis joystick (you may have to reverse some motors for it to work right and/or switch axis channels around)
|
| All times are GMT -5. The time now is 13:21. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi