T-Kuhn/DeltaRobInverseKin

Calculating Angle given X, Y, Z Coordinates

ProtoG opened this issue · 0 comments

Hello,

Is there a way to use this library to calculate the three angles given and X, Y, Z coordinate?

After saving all my machines parameters, I tried uploading the program and printing to the serial monitor with something like this:
DRIK.resetArr();
DRIK.setGoalCoordinates(0.0, 0.0, -0.38602895, 0);

But the info I get does not seem like angles. It may have to do with the variable double _rat;

How is _rat calculated? My machine has 8000 pulses per revolution.

// ratio = 2 * PI / pulses per rotation
_rat = 545.58;
In my case 2*PI/8000 = 0.0007853981633974483. Is this what I need to enter?

I'm trying to accomplish something similar to this website: https://www.marginallyclever.com/other/samples/fk-ik-test.html

The issue is that there is something wrong with the website's kinematic equations and the answers are wrong. If you set all the angles to zero and check the math with basic trigonometry, the numbers given are wrong.