KRTMI 2019
/
Inverse_Kine_Lengan3
Boleh bisa langsung dicoba, tap servo base belum dikalibrasi
Diff: main.cpp
- Revision:
- 13:e465ee0ccafb
- Parent:
- 12:6db54df00e14
--- a/main.cpp Wed May 15 10:50:56 2019 +0000 +++ b/main.cpp Thu May 16 05:08:40 2019 +0000 @@ -149,10 +149,10 @@ teta1 = teta1_rad*180/pi; //dalam derajat //--------mulai proses teta2-------- - if((xt>0)&&(yt>0)){ + if((xt>0)&&(zt>0)){ float teta2_rad = rum2_tet(teta1_rad,xt,yt,zt,r1,r2)-teta1_rad; teta2 = teta2_rad*180/pi; - }else if((xt>0)&&(yt<0)){ + }else if((xt>0)&&(zt<0)){ float teta2_rad = teta1_rad-rum1_tet(teta1_rad,xt,yt,zt,r1,r2); teta2 = teta2_rad*180/pi; }