|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
||||
|
||||
|
Re: Inverting Axis
Quote:
I guess neither is simpler. |
|
#17
|
|||||
|
|||||
|
Re: Inverting Axis
I swapped b and c between the two. Let's correct the prose. I meant to say that b was between a and c, and you didn't know whether a or c were larger.
|
|
#18
|
|||
|
|||
|
Re: Inverting Axis
Code:
double strafe = mainStick.getRawAxis(3);
double forward = mainStick.getRawAxis(1);
double rotation = mainStick.getRawAxis(2);
//mecanum algotrithms
double mFL = strafe + forward + rotation;
double mFR = strafe + forward - rotation;
double mRL = strafe - forward + rotation;
double mRR = strafe - forward - rotation;
FL.set(mFL);
FR.set(mFR);
RL.set(mRL);
RR.set(mRR);
This is my code for regular driving for mecanum but I feel that if I inverted the motot not everything else would be the same. |
|
#19
|
||||
|
||||
|
Re: Inverting Axis
Quote:
Code:
double mFL = forward - strafeRight - rotateClockwise; double mFR = forward + strafeRight + rotateClockwise; double mRL = forward - strafeRight + rotateClockwise; double mRR = forward + strafeRight - rotateClockwise; |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|