I have started a project to use the AL5D robotic arm with my Macintosh computer. I am making the source code public at the following location:
It currently controls the SSC-32U to drive the robot, and I have started on the forward kinematics, and will hopefully get reverse kinematics done soon.
It will center the servos, so can be used during construction, if needed.
The Forward Kinematics have been added, using the Denavit-Hartenberg method.
They are reasonably accurate. What I will have to do is add some calibration for the servo motor angles, as the code currently uses the assumption that 1000 microSeconds is a 90 degree turn. Close for most servos, but for better accuracy this should be measured and compensated for.
OK, I’ve added some simple calibration of the servos (found most went +/- 100 degrees for the 500 and 2500 microSecond pulses
I’ve also put in the math for inverse kinematics. It will take the XYZ position you enter, and if it can find a solution, set the servo angles to put the gripper at that position. Remember that units for this program are in meters, so a valid position looks like: -0.12, 0.23, 0.06. The origin is the bottom of the base underneath the pivot point for the swivel servo. X direction is to the right, Y in front, Z up.
Next project: inverse kinematics with condition. Particularly wrist angle - the gripper hardware is somewhat bulky, so I would like the inverse kinematics to come up with a solution that has the wrist angle vertical, so it doesn’t knock over neighboring items when it is going to pick something up.
Makes quite a bit of sense. That’s what the SSC-32/SSC-32U also allow for in their internal settings for calibration of each channel. ±100 gives you a range of calibration of ±18° (assuming 500-2500 range = ~180°). One tooth on a 24-tooth spline of an RC servomotor is ~15° of spacing. This basically allows you to not have to reassemble joints when they are off by one tooth.
Amazing stuff! Though I’d probably use mm (or even cm) in such a case since meters of distance for an arm that under a meter in length means you will only ever use fractions of a meter for all inputs, which may feel a bit non-intuitive or off putting. Maybe allow a toggle to choose units (like some radio buttons! )?
Also sounds quite good! You got this!
As before, keep up the good work… while I work on finding myself a mac