Created
November 20, 2017 21:20
-
-
Save akirayou/46e365c66dfc24022de6ee4c66efd125 to your computer and use it in GitHub Desktop.
ackerman link calculation for maxima
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A:280; /*Tread: distance of right wheel and left wheel (length of long side of trapeziod link) */ | |
B:80; /* Link rod length of Hypotenuse of trapezoid*/ | |
L:480; /*Wheel base: distance of front and rear wheel */ | |
Hl:0.2*%pi; /*Optimization point: Hl is angle of left Wheel */ | |
/* | |
Link Shape | |
Left Right | |
| | | |
|-------------A----------------| | |
|\ /| | |
\B B/ | |
\ / | |
----------C------------- | |
*/ | |
/* Ackerman condition: when right wheel angle is Hl , the Angle of right wheel must be Hr*/ | |
eq1:L/tan(Hr)-L/tan(Hl)=A; | |
/*H0 is angle of trapezoid link, (0 means parallel link)*/ | |
/*It defines C and H0 condition when go stright (means Hr=Hl=0)*/ | |
eq2:(A-C)/2=B*sin(H0); | |
/*C must be same at Left wheel Angle is Hl */ | |
s1:Ha=3/2*%pi+H0+Hl; | |
s2:Hb=3/2*%pi-H0+Hr; | |
eq3:C=abs(B*exp(%i*Ha)-(A+B*exp(%i*Hb))); | |
/*solve them*/ | |
seq1:solve(eq1,Hr); | |
seq2:solve(eq2,H0); | |
seq3:subst([s1,s2,seq1[1],seq2[1]],eq3); | |
/*Result C (length of short side of trapeziod)*/ | |
find_root(seq3,C,A-B,A); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment