SMTP Client icon SMTP Client Send SMTP email (text or camera images) from ARC robots via ControlCommand; configure SMTP/auth and sender; saves credentials in project. Try it →
Asked

Requesting Video For Inverse Kinematic Arm

I have a question about the ARC robot skill called Inverse Kinematic Arm. Is there any video available that demonstrates this skill? I find the current instructions too vague, and it would be helpful to see the skill in operation through a video.



Related Hardware (view all EZB hardware)
EZ-B V4 by EZ-Robot
EZ-B v4/2 robot controller: dual Cortex ARM, Wi-Fi, audio/video, 24 servo/digital ports, I2C/UART, camera and Synthiam ARC control for custom robots
Wi-Fi / USB
Servos 24
Camera
Audio
UART 3
I2C
ADC 8
Digital 24

Related Robot Skills (view all robot skills)
Script by Synthiam
Multi-language ARC Script: build, run and debug Blockly, JavaScript, EZ-Script or Python with Intellisense, run/save/load and Roboscratch support
Control robot arms with inverse and forward kinematics, converting X/Y/Z positions into joint motion and reporting end-effector location.

ARC Pro

Upgrade to ARC Pro

Synthiam ARC Pro is a new tool that will help unleash your creativity with programming robots in just seconds!

Author Avatar
PRO
Canada
Twitter YouTube GitHub
#9  

Short answer: the Inverse Kinematic Arm robot skill converts a desired hand (end-effector) position in space into the individual servo angles needed to put the arm there. It needs an exact description of your robot arm geometry (every bone length and offset, including the gripper/end-effector length) plus how each servo is mounted so it can compute accurate joint commands.

Below I’ll explain in detail what the skill does, how it works (the math and data it needs), how to configure it in ARC (kebab menu steps), how MoveTo and Forward Kinematics operate, what units to use, and how to test & troubleshoot. I’ll finish with exact measurement instructions you must follow (Synthiam is correct - every length is required).

Reference: Inverse Kinematic Arm manual
https://synthiam.com/Support/Skills/Servo/Inverse-Kinematic-Arm?id=21839

What the skill is (overview)

  • The Inverse Kinematic (IK) Arm skill is a robot skill that:
    • Stores a kinematic model of your serial robot arm (each joint type, bone length, offsets, servo mounting offsets, min/max ranges, inversion).
    • Computes forward kinematics (given current joint angles, where is the hand X,Y,Z) for display and calibration.
    • Computes inverse kinematics (given desired hand X,Y,Z) and converts that into servo angle commands the servos must move to (via ControlCommand MoveTo).
  • It runs as its own control in ARC and communicates with other skills (Servos, Camera, scripts) via ControlCommand() and global variables.

Why every length must be exact

  • The IK math computes positions using trigonometry (law of cosines, atan2, vector transforms). Missing or inaccurate bone lengths produce compounding errors - the arm will not reach the requested point or it will try to move to impossible positions and bind/strain servos.
  • The end-effector length (wrist center gripper tip) is part of the forward kinematic chain. Omitting it means the skill doesn’t know where the tool tip is relative to the wrist joint, so the tip location will be wrong, and inverse solutions will be wrong.
  • Conclusion: measure center-to-center distances for each joint (and the tip extension) and enter them exactly (mm).

Units and conversions (very important)

  • Configuration lengths are in millimeters (mm).
  • The skill’s MoveTo expects coordinates in centimeters (cm). Internally the skill converts cmmm for math. So:
    • When configuring bone lengths: use mm (e.g., 110 mm).
    • When calling MoveTo: use cm (e.g., MoveTo(0, 12, 12) means 0 cm X, 12 cm Y, 12 cm Z = 120 mm).
  • Servo angles and ranges are degrees (1-180). The servo "Range" field in the config is the half-range (e.g., a 180 servo has Range = 90).

Kinematic model data the skill requires (fields you configure) For each joint (from base end effector) you must provide:

  • Servo Port - the ARC constant (d0..d23 for EZB ports, v0..v99 for virtual plugin servos). Do NOT use quotes.
  • Joint Type - Rotation (azimuth swivel) or Lever (pitch/arm bend). The first joint is commonly Rotation (base).
  • Length (mm) - center-to-center distance from this joint to the next joint. For the last joint, length is the wrist center gripper tip (end-effector extension).
  • Offset (mm) - lateral offset between joint axes (if the next joint is shifted sideways).
  • Servo Range (degrees) - half the physical travel range of the servo (180 servo -> 90).
  • Servo Offset (degrees) - mechanical mounting offset to align "90 degrees commanded" with physical neutral. This compensates for servo horn mounting orientation.
  • Invert - if the servo moves opposite to the computed joint direction, toggle invert.
  • Save configuration (File Save) to create a .kinematic file you can reload/share.

How the IK math works (high level)

  1. Coordinate frame:
    • The skill defines a base coordinate system. MoveTo(x,y,z) values are in cm relative to the robot base (x = left/right, y = up/down, z = forward/back).
  2. Conversion:
    • MoveTo(cm) converted to mm for internal math.
  3. Base rotation:
    • If the first joint is Rotation, the skill computes the base azimuth angle via atan2(X,Z) (or atan2(X, Z) depending on configuration) to point the arm toward the target XY ground-plane position. This separates the planar problem into a 2D problem for the remaining lever joints.
  4. Planar lever chain:
    • The remaining lever joints form a serial planar linkage in a plane determined by base rotation. The skill computes joint angles using geometry:
      • Compute distance from shoulder pivot to desired wrist position (law of cosines).
      • Solve for shoulder and elbow angles using cosines and sines (analytical IK for a serial chain). The skill uses these angles plus servo offsets to compute desired servo angles.
  5. End-effector offset:
    • If an end-effector extension exists (wrist-to-tip), the target wrist center position is offset backward along the approach vector so the tip lands on the requested point.
  6. Joint limits:
    • The computed angles are clamped to the servo min/max (range + offsets). If the requested position is unreachable within limits, the skill will either fail or attempt the closest reachable point (depends on skill implementation).
  7. Output:
    • The computed joint angles are converted to servo positions (1-180) and commands are sent to servos (via Servo.setPosition or the skill’s internal servo output) with configured speeds. The skill updates the Forward Kinematics display so you can see returned X/Y/Z (computed from commanded angles).

Forward Kinematics vs Inverse Kinematics

  • Forward Kinematics (FK): Given joint angles (what servos actually are or last commanded), compute where the hand is. Useful for verifying geometry and calibration. The IK skill displays FK X/Y/Z in its UI as you move servos manually.
  • Inverse Kinematics (IK): Given a desired X/Y/Z, compute joint angles. That’s what MoveTo does.

How to configure the skill in ARC (kebab menu)

  1. Project Add robot skill find "Inverse Kinematic Arm" Add.
  2. Open the skill window. Click the kebab menu (three lines, top-right) Configure (or Options).
  3. In Configure:
    • Add joints from base outward. Fill servo Port (use d0..d23 or v0..v99 constants without quotes), Joint Type, Length (mm), Offset (mm), Range, servo Offset, Invert checkbox.
    • Example for your LeftArmTest (based on earlier data): v11 rotation, v12 lever 110 mm, v13 lever 110 mm, v14 lever 110 mm, v15 gripper (enter gripper tip length here, e.g., 50 mm).
  4. File Save to create a .kinematic file.
  5. Use Project Add robot skill servo to add servo controls for manual testing.

Important configuration notes and mapping details

  • Servo Ports: use constants (d0,d1,... v11 etc.) without quotes.
  • If you use virtual ports (v11..v15), ensure the robot skill or servo plugin supports those ports.
  • Servo Offset: To find this, set servo to physical neutral (the position where joint is mechanically upright) with the servo slider, read the servo’s commanded position, and enter the offset so commanded/physical match.
  • Servo Range: For an HDD 180 servo, enter 90 (half travel). If you have modified travel or mechanically limited travel, adjust accordingly.
  • Invert: If a joint moves the opposite direction of expectation, toggle Invert for that joint in config (do this fold by fold).

Measurement instructions (how to measure accurately - you must do this)

  • Use a caliper or precise ruler. Measure in millimeters (mm).
  • For each pair of consecutive joints:
    • Measure from the center of rotation (shaft center) of the upstream joint to the center of rotation of the downstream joint.
    • If a joint shaft is buried or hard to find, use the center of rotation of the servo horn or the pivot point of the linkage - the geometric center the link rotates around.
  • For the last link (end-effector):
    • Measure from the wrist joint center (the last joint’s rotation center) to the actual tool tip (the gripper’s gripping point or the center between gripper fingers when closed). This is the "end-effector length" and cannot be zero unless the tip coincides with the wrist axis.
  • Record and enter all values into the configuration in mm.
  • If any offset in the lateral direction exists (joint axis not coaxial), measure that offset (mm) and enter Offset(mm).

Testing procedure (safe)

  1. Add servo skill(s) so you can manually move each servo. With the robot powered, move each servo slowly and confirm:
    • No binding or collision.
    • Directions match expectation; if not, toggle Invert or fix mounting.
  2. With all servos at neutral (90), read the FK X/Y/Z in the IK skill. Confirm they line up with where the physical gripper tip is.
  3. Run small MoveTo tests (1-3 cm offsets) only:
    • Example test call in JavaScript (use your skill window name exactly):
      // MoveTo example
      print("MoveTo test start");
      ControlCommand("LeftArmTest", "MoveTo", 0, 10, 12);  // X=0cm, Y=10cm, Z=12cm
      
    • Wait (sleep) between commands: sleep(1500) - sleep uses milliseconds in ARC.
  4. If anything binds or moves unexpectedly, press the Panic button in the IK skill immediately - it releases all servos.
  5. Calibrate servo offsets and ranges if FK does not match physical.

Example ARC JavaScript usage patterns (remember to use print())

  • Initialize home:
    // initialize servos home
    print("Initializing home");
    Servo.setPosition(v11, 90);
    Servo.setPosition(v12, 90);
    Servo.setPosition(v13, 90);
    Servo.setPosition(v14, 90);
    Servo.setPosition(v15, 90);
    sleep(1500);
    print("Home set");
    
  • MoveTo:
    // Move center up a bit
    ControlCommand("LeftArmTest", "MoveTo", 0, 12, 12); // X,Y,Z in cm
    

Camera mapping & calibration (if camera observes workspace)

  • Camera gives pixel coordinates ($CameraObjectX, $CameraObjectY) and object size ($CameraObjectWidth).
  • You must calibrate mapping from camera pixels robot cm coordinates using Utility.map():
    • Map X: Utility.map($CameraObjectX, 0, cameraWidth, leftCm, rightCm)
    • Map Y/Z: map $CameraObjectY to forward/back range (Z) and set Y (height) to a safe pick height or map object size to Z for depth.
  • Calibration method: place a colored marker at a known arm position and capture the pixel coordinate. Repeat for corners and solve for mapping min/max.

Common problems and remedies

  • Problem: Arm misses the target by a lot.
    • Most common cause: incorrect bone lengths (center-to-center). Re-measure carefully.
  • Problem: FK values look wrong when servos are at 90.
    • Cause: wrong servo offset or wrong joint type. Re-check servo offsets and joint type entries.
  • Problem: A joint moves opposite expected direction.
    • Fix: toggle Invert for that joint in the kinematic config, or change servo wiring if necessary.
  • Problem: servo hum/strain or binding.
    • Fix: Panic immediately, reduce requested movement range, inspect physical linkage, adjust limits.
  • Problem: Unreachable positions or sudden large movements.
    • Fix: Make smaller MoveTo steps and verify Reachable workspace; adjust joint ranges.

Why the skill cannot work with unknown lengths

  • The IK solution requires every link length and offset to compute where the tip will be. If any length is missing or incorrect, the computed wrist position relative to the tip is wrong and the solver will fail or produce incorrect servo angles. There are no "approximate" shortcuts that give reliable, safe robot motions - this is why exact measurements are mandatory.

What I can do next (options)

  • I can help you measure (step-by-step measurement checklist with pictures if you provide photos). If you share clear photos showing joint centers I can help identify centers and measure offsets.
  • If you provide these exact measurements (center-to-center mm for every joint and wristgripper tip mm), I will:
    • Build the LeftArmTest .arc project and .kinematic file that will work with your servos (using v11-v15 and camera d0/d1), and
    • Provide the tested MoveTo and camera mapping scripts ready to paste into ARC.
  • If you want I will also provide a safe sequence script that initializes servos, tests FK, and runs small MoveTo steps.

Follow-up questions I need from you now

  1. Provide every bone length (mm) center-to-center:
    • Base joint 2 (shoulder pivot distance) - (if you previously gave 110, confirm)
    • Joint2 Joint3 (110 mm)
    • Joint3 Joint4 (110 mm)
    • Joint4 (wrist center) gripper tip (mm) - this is required; earlier you said unknown (I previously assumed 50 mm). Please measure and give exact mm.
  2. Confirm the exact servo ports (you gave v11..v15 and d0/d1 - confirm those are final).
  3. Confirm camera resolution (EZ-Robot default 320x240) and camera mounting orientation (looking down over workspace).
  4. Confirm the desired skill window name ("LeftArmTest") - good to confirm exact name.

When you give me the full measured lengths (including the wristgripper tip length), I’ll produce the final downloadable ARC project (.arc + .kinematic) and exact scripts for initialization, demo MoveTo, gripper open/close, and camera tracking - ready to load.

If you want, send a clear photo (top or side) showing the arm with visible servo horns and link centers. I can analyze and point out exactly where to measure if you’re unsure.

Which would you like to do next - provide the exact mm lengths so I can finalize the LeftArmTest ARC project, or would you like measurement guidance with photos first?


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
📚 This thread has been preserved as a helpful resource!

While new comments are no longer being accepted, the information here remains available for learning and reference. Check the most recent comment for additional details.