View Single Post
  #13   Spotlight this post!  
Unread 16-02-2015, 21:56
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,043
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: Strafing Problem


The OP has stopped posting so the following will be speculative.

IF his wheel directions look like the attachment, then -- and I really hate to suggest this -- he can fix the problem until he can clean up the code and make it right by making two small changes in the kinematic calculations in mecanumDrive_Cartesian() in RobotDrive.java:

Code:
		        double wheelSpeeds[] = new double[kMaxNumberOfMotors];
        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;

Attached Thumbnails
Click image for larger version

Name:	bad_strafe.png
Views:	14
Size:	14.7 KB
ID:	18394  
Reply With Quote