Ok, i’ve done a little research and found that IK will give you the joint angles for the arm… But servos are not all created equally… how do you know the pulse values of every servo for the desired angles?
BTW: i am using my own program… not RIOS.
Ok, i’ve done a little research and found that IK will give you the joint angles for the arm… But servos are not all created equally… how do you know the pulse values of every servo for the desired angles?
BTW: i am using my own program… not RIOS.
You’ll probably have to test the servos.
If you send them signals at each end of their rotation and measure the angles from the centre, you will be able to just do a simple calculation to convert degrees into pulse width.
It should be linear, so you will just have to find a constant to multiply it by.
should this be calculated in degrees or radians?
Radians are actually the geometric relation, however, in PWM signals it is micro-seconds of “on” time vs. microseconds of “off” time that convey positional information to the servos, so degrees or radians, take your pick.
…btw… radians are based on the length of half the unit circle perimiter - 3.14159… The same length represented in degrees is 180. Therefore, to convert from degrees to radians : degrees times pi divided by 180
d * (pi / 180)
…and to go the other way, from radians to degrees is then academic…
r * (180 / pi)
If you establish that 500us is -85deg. and 2300us is 88deg. then you’ve established the correlation (linear relationship) between the PWM signal and your chosen unit of angular measure.
2300-500 = 1800
88-(-85) = 173
…so, 1us = 173/1800 deg. = .0961deg = .001677rad.
…and, 1deg. = 1800/173 = 10.4046us
…and, 1rad. = 1800/(173*(pi/180)) = 596.1411us
It’s time for me to go home - I’m sitting around at the end of my shift, but momma is expecting to get the yard mowed today! I had to hurry to type this - I believe I got everything to balance??