Arvin-Mohammadi / Delta-Robot-Trajectory-Planning-V1

This repository is dedicated to studying the different trajectory planning methods (theory + practical)
15 stars 1 forks source link

The problem of IK. #1

Open L-SY opened 1 year ago

L-SY commented 1 year ago

Hello, Lucky to see you detail report, but I have a doubt. Is the IK computer really right? I computer by myself,but is different from you.

L-SY commented 1 year ago
double tan_30_deg = 0.5773502692;
//        double y_delta_E = parameter_.e/2*tan_30_deg;
        std::vector<double> alpha_rad{0., 240*M_PI/180, 120*M_PI/180};
        std::vector<geometry_msgs::Point> j1_position;
        j1_position.clear();
        for (int i = 0; i < 3; ++i) {
            std::vector<double> EE_position{3,0};
            EE_position[0] = x*cos(alpha_rad[i]) + y*sin(alpha_rad[i]);
            EE_position[1] = -x*sin(alpha_rad[i]) + y*cos(alpha_rad[i]);
            EE_position[2] = z;
            std::vector<double> F1_position{0.,  -parameter_.f/2*tan_30_deg, 0.};
            std::vector<double> E1_position{EE_position[0],EE_position[1]-parameter_.e/2*tan_30_deg,EE_position[2]};
            std::vector<double> E1_prime_position{0.,E1_position[1],E1_position[2]};
            double y_F = F1_position[1];
            double c1 = (pow2(E1_position[0]) + pow2(E1_position[1]) + pow2(E1_position[2]) + pow2(parameter_.r_f)
                    - pow2(parameter_.r_e)- pow2(y_F))/(2*E1_position[2]);
            double c2 = (y_F - E1_position[1])/E1_position[2];
            double c3 = -(c1+c2*y_F)*(c1+c2*y_F)+parameter_.r_f*(pow2(c2)*parameter_.r_f+parameter_.r_f);
            double J_y = ((y_F-c1*c2)- sqrt(c3))/(1+ pow2(c2));
            double J_z = c1+c2*J_y;

this is my code,could you help me find the question? I think zhe c1 is should include the param"e" part.

Arvin-Mohammadi commented 11 months ago

hi

sorry i didn't see the issue until now. I don't know if your problem has been solved or not but essentially i used the following as reference:

https://github.com/ArthasMenethil-A/Delta-Robot-Trajectory-Planning/blob/main/Research/FK%20and%20IK/Inverse%20Kinematics%20(Delta%20Robot).pdf

since it's already tested on a real Delta Robot and it works, it's recommended to use the same code