Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculating Angle given X, Y, Z Coordinates #1

Open
ProtoG opened this issue Oct 31, 2018 · 0 comments
Open

Calculating Angle given X, Y, Z Coordinates #1

ProtoG opened this issue Oct 31, 2018 · 0 comments

Comments

@ProtoG
Copy link

ProtoG commented Oct 31, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant