View Single Post
  #5   Spotlight this post!  
Unread 04-02-2015, 21:02
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Mecanum Single Joystick Control not working

Quote:
Originally Posted by pastelpony View Post
Correct me if I'm wrong, but I've been reading that the default mecanum code in the WPI library actually takes the incorrect inputs by default.
Would you please post a link to where you've been reading that?

I don't have access to LabVIEW to inspect its code, but here's the inverse kinematics code taken straight from 2015 WPILib RobotDrive.Java:

Code:

wheelSpeeds[MotorType.kFrontLeft_val] = xIn + yIn + rotation;
   
wheelSpeeds[MotorType.kFrontRight_val] = -xIn + yIn - rotation;
      
wheelSpeeds[MotorType.kRearLeft_val] = -xIn + yIn + rotation;
      
wheelSpeeds[MotorType.kRearRight_val] = xIn + yIn - rotation;
I'm not a Java guru, but it looks correct to me.


Reply With Quote