I’m planning to buy a Lynxmotion AL5D SSC-32U. I found a lot of infos on the forum, on how to communicate with the board via USB port.
My idea is to have a sensor connected to my machine, giving me 3D point coordinates (X,Y,Z)
In all sample codes i’ve found, the arm is driven by giving each servo a target angle-value.
Is there any way of transforming a space-position value (x,y,z) to degree/radians values so the arm will follow a position in space … ?
Or is there another way to do that ??
“Inverse kinematics” would be what you need, where the angle of each joint is determined based on the Cartesian coordinate. Since the SSC-32U itself is not meant to be programmed, but rather simply respond to input commands for each angle, a separate software / controller needs to do the calculations in order to determine the angle of each joint for the end effector to reach a specific coordinate. We offer basic equations in the guide on the third to last page under "calculating angles based on x,y,z: robotshop.com/media/files/pd … -guide.pdf
You will be calculating angles a, b, c and d.
Unfortunately we cannot troubleshoot custom code. Calculate each line by hand to see what you should get.
You caught the error in that the radius should be the square root of x^2 + y^2.
Ok, i checked the code again and calculate each line by hand : it works
My error was due to my inputs (the values i was passing to this method were “out of range”)
I let the code here if someone needs to implement inverseKinematics in c++.