Troubleshooting
Why Pick and Place Placement Position Varies With Pickup Angle
Short answer
A pick and place arm that lands the object at the correct angle but at a shifting position has two stacked geometric causes: the vision reference center moves as the irregular part rotates, and a grasp offset between the gripper rotation axis and the held point is swept into translation. Fix the center first, then compensate the offset or compute the placement target.

On this page
The arm lands the object at the correct angle but at a different position each cycle. That combination points to two stacked geometric effects, not a tuning fault: the vision system's reference center moves as the D-shaped part rotates, and the rotating gripper sweeps any offset between its rotation axis and the actual grasp point into translation. Fix the reference center first, because that is the cheapest correction to validate, then either rotate the measured grasp offset into the placement target or compute the placement joint angles from the grasp transform by inverse kinematics. Preset joint angles survive only when every pickup holds the object in the same place.
Separate the two effects before changing code #
A placement point that moves with pickup angle has a short list of causes. Check them in this order, cheapest first:
- Reference center drift. The bounding-box center of an irregular silhouette follows its outline extremes, so rotation moves it even when the physical part does not. Confirm by recording the detected center while one fixed part rotates under the camera; if the reported center moves, vision is a cause.
- Grasp offset swept by gripper rotation. Rotation holds only points on its axis stationary. A datum that sits off the gripper rotation axis travels an arc when the gripper turns. Confirm by picking, rotating in air, and measuring where the object datum sits relative to the axis; a repeatable arc means a real offset.
- Variable finger seating or slip. If the object-to-gripper relationship changes between pickups, no fixed correction works. Confirm by marking the part and re-measuring across several pickups.
- Calibration or kinematic bias. A fixed spatial bias at every angle, or drift over a run, lives in the camera-to-robot mapping or the arm itself. Confirm with a repeat calibration routine before blaming geometry.
Replace the bounding-box center first #
The bounding rectangle of a D-shaped outline is not a physical datum: its edges follow the silhouette extrema, so rotation and protruding branches move its center. Two better references exist. The minimum enclosing circle, the smallest circle that contains all contour points, is reported to give a noticeably more stable center on this kind of part, and it is cheap to test. The largest rectangle fully inside the segmented region is the alternative when external branches still disturb the circle; define its selection rule explicitly so competing candidates cannot make it jump.
Whichever method you pick, the confirming check is the same: rotate one fixed part under the camera and verify the reported center stays tied to the same feature of the curved body. If the outline itself is unstable under the camera because segmentation flickers, that is a camera and lighting problem first; the machine vision category is where a replacement camera, lens or light is chosen.
Measure the grasp offset #
Define the grasp offset as the vector from the gripper rotation axis to the desired object datum, expressed in gripper coordinates. Measure it directly: place a part, record the object datum relative to the gripper axis from the arm's own pose, rotate the wrist 90 degrees, and record again. Repeat at several angles; the recorded points should lie on a circle whose radius is the offset length. A repeatable arc confirms a rigid offset. Points that scatter instead point at variable finger seating, slip, or an unstable vision reference, and no rotation-math correction will fix those.
The same pivot question appears on moving lines too; if your cell also applies a vision offset to parts on a conveyor, the pivot choice is covered in where the vision offset pivots in conveyor tracking.
Worked example: how far the offset moves the placement point #
Take an illustrative grasp offset with components a = 6 mm and b = 2 mm in gripper coordinates, a length of sqrt(6² + 2²) = sqrt(40) ≈ 6.32 mm. The gripper picks at a wrist angle of 20 degrees and places at 95 degrees. For a rotation angle theta, the rotated offset is (a cos theta − b sin theta, a sin theta + b cos theta), with the angle in degrees consistently throughout:
- At 20 degrees: x = 6 × 0.9397 − 2 × 0.3420 = 5.638 − 0.684 = 4.954 mm; y = 6 × 0.3420 + 2 × 0.9397 = 2.052 + 1.879 = 3.931 mm.
- At 95 degrees: x = 6 × (−0.0872) − 2 × 0.9962 = −0.523 − 1.992 = −2.515 mm; y = 6 × 0.9962 + 2 × (−0.0872) = 5.977 − 0.174 = 5.803 mm.
- The datum therefore shifts by Δx = −7.47 mm and Δy = 1.87 mm, a magnitude of sqrt(7.47² + 1.87²) = sqrt(59.3) ≈ 7.7 mm.
So a 6.32 mm offset rotated 75 degrees moves the set-down point by about 7.7 mm — enough to miss a fixture pocket entirely. This is a calculated example for these inputs, not a measured result; your offset and angles will give your own number. The upper bound for any two wrist angles is 2r, twice the offset length, so 12.6 mm for this offset.
The same arithmetic is the fix. To set the object datum down at a desired point (px, py), command the gripper axis to (px, py) − R(theta_final) × (a, b). For the example placement at 95 degrees, that means commanding the axis 2.52 mm beyond px and 5.80 mm below py, so the swept offset lands the object exactly on target.
Preset joints or calculated target: the decision #
With the center stable and the offset measured, the choice is narrow. Keep the preset placement joint angles when every pickup produces the same object-to-gripper relationship and the offset compensation above absorbs the wrist rotation; the fixed endpoint then repeats accurately cycle after cycle. Compute the placement joint angles by inverse kinematics from a Cartesian target built from the grasp transform when the relationship varies — different branch positions, different grasp widths, or a fixture that demands a specific object pose rather than a specific gripper pose. A fixed endpoint can only guarantee where the gripper goes, never where the object lands.
The calibration run that closes the loop #
Before trusting the corrections, separate geometry from calibration error: run the arm 50 cycles through the corners of its travel envelope with a fixed reference part, returning to a home position each time. A constant bias at every corner is a calibration or steps-per-move error; scatter that grows over the run is drift; angle-dependent scatter after these fixes means the offset was measured wrong or the grasp is not rigid. Run this routine at reduced speed with nobody inside the arm's reach, as with any motion test on a live cell. Commit to the corrections in the order above: stable center first, then offset compensation, then inverse-kinematics placement only if the grasp transform genuinely varies.
Questions asked
How large can the placement error from a grasp offset get?
For a grasp offset of length r measured from the gripper rotation axis, two different gripper angles can set the object down up to 2r apart, because each angle puts the held datum on a different point of a circle of radius r around the axis. The worked example in this article uses an offset with components 6 mm and 2 mm, about 6.3 mm long; rotating it 75 degrees between pickup and placement shifted the target roughly 7.7 mm.
Why not use the area centroid from image moments instead?
The area centroid tracks the distribution of segmented pixels, so any branch or protrusion that sticks out of the D-shaped part contributes area and drags the centroid away from the main body. On a part with irregular extensions that shift the silhouette, the centroid and the bounding-box center both fail for the same reason, which is why an interior-based reference such as the minimum enclosing circle or the largest internal rectangle is the better starting point.
When can preset placement joint angles stay?
Keep the preset joints when every pickup produces the same object-to-gripper relationship and the fixed endpoint already meets the placement tolerance. Test it: pick the same part several times, and measure where the object datum sits in the gripper each cycle. If it is identical within your tolerance and the offset is compensated or zero, stored joint angles repeat it accurately. When the grasp transform varies between pickups, only a placement target calculated from that transform keeps the object endpoint fixed.

