Thread: Inverting Axis
View Single Post
  #16   Spotlight this post!  
Unread 03-02-2015, 17:31
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: Inverting Axis

Quote:
Originally Posted by 2386programming View Post

Code:


        double mFL = strafe + forward + rotation;
        double mFR = strafe + forward - rotation;
        double mRL = strafe - forward + rotation;
        double mRR = strafe - forward - rotation;

This is my code for regular driving for mecanum but I feel that if I inverted the motor not everything else would be the same.
The correct inverse kinematics for mecanum is:
Code:


double mFL = forward - strafeRight  - rotateClockwise;
double mFR = forward + strafeRight  + rotateClockwise;
double mRL = forward - strafeRight  + rotateClockwise;
double mRR = forward + strafeRight  - rotateClockwise;
If the above doesn't work, it's better to do the necessary motor inverting/swapping to make it work, rather than changing the signs of the kinematics.


Reply With Quote