Extents of the Workspace

What are the extents of the workspace of the uArm?

When the servos are not locked I can move the arm more than the arm will move when code is running. This is especially true in the z-axis. I can move the arm while in free movement almost 4.5 inches lower than I can lower the arm in a program that incrementally decreases the z-axis. The program stops at around what would be 0. When I program in a negative value for the z-axis, such as with “moveTo(0,-15,-10)”, the arm doesn’t seem to go lower than 0.

Is there a limit on the z-axis in the programming or calibration that I could change?

You can find some official specs on the limits of the uArm here: http://developer.ufactory.cc/hardware/

As one of the developers of the uArm code (AND having released the magic blue smoke on at least one uArm servo), I can tell you that the servo constraints are there for your own safety and the protection of the uArm.

I can also tell you that they are somewhat conservative. :smiley:

Here’s the problem, which only affects the shoulder servos: If you were to write a sketch that let you move the uArm around and output the servo angles you would see that the max limits for each servo are easy to determine one at a time, but when you move them in combination, especially when one or both are near their extremes, new limitations are imposed that are not easy to describe due to the geometry of the arm.

So in the code, a shortcut is taken to “round off” the dangerous part of the combination of shoulder angles and disallow it. It cuts off more than it should because to cut it off more accurately would require more code.

To your question, you are more than welcome to make any changes to the code. Here is the exact line where that “round off” occurs: https://github.com/uArm-Developer/UArmForArduino/blob/master/uarm_library.cpp#L68

Slightly above, you see the general (basically, the single-servo) limits, which you can change as well. Remember though that sending a servo to a position it cannot reach will destroy that servo in, oh, I’d say about 10-20 seconds. :slight_smile:

A good technique I found for working with the servo limits was to test short movements (no movement longer than 1-second), and ensure that your code calls uarm.detachAll() after every move.

1 Like

Thank you, this is a really helpful description of what is going on and I’ll take a look at the code and play with it a bit.

Topic on detaching and reattaching the servos and recalibration:

(Recalibration after servo detach and reattach)