View Single Post
  #1   Spotlight this post!  
Unread 10-02-2014, 21:35
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Programming Mecanum

Code for doing Mecanum with joysticks looks like this:

Code:
myRobotDrive.mecanumDrive_Cartesian(joy1.getX(), joy1.getY(), joy1.getTwist());
Optionally you can put the angle from a gyro in as the optional 4th parameter.

One possible problem is that some of the motors may need to be inverted depending on how they are configured. To determine that, put the robot on blocks and drive it with the joysticks and see what it is doing. You can call the

Code:
setInvertedMotor()
method on the side that is going in the wrong direction.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote