Mac code for working with AL5D arm

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.

3 Likes

Hi @MacRobotics !

Welcome to the RobotShop community!

Nice! :smiley:
We don’t have many OSX users, so that is pretty cool!

Very nice of you and much appreciated!

I’m sure the community will be curious, too!

Looking forward to it!

That is certainly an issue many customers have (or a step they simply forget to do)

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.

1 Like

That sounds pretty good! OK, now I totally need a mac to test this out! :stuck_out_tongue:

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.

1 Like

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! :smiley: )?

Also sounds quite good! You got this! :slight_smile: :+1:

As before, keep up the good work… while I work on finding myself a mac :stuck_out_tongue:

OK, I added unit selection on the kinematics, for those adverse to shifting decimal points!:wink:

1 Like

Inverse kinematics with condition (vertical gripper) now in, if anyone is interested in the math for that.

Now waiting on the pressure resistor I ordered so I can instrument the gripper and add pressure feedback on the gripper controller.

Then onto vision feedback… (If you looked at my other GitHub repositories, you could have guessed that was coming!)

1 Like

Gripper sensor code, with real-time plot and ‘grip to pressure limit’ option added

1 Like

Neat stuff! I think you are due to make a video of all these features! :wink: