System designHow-to

Edit a multi-waypoint relative trajectory after camera locate

Structure a relative trajectory as offsets from one feature point, so an edit after camera locate means re-saving that point — the procedure, the arithmetic.

LumaSpec Vision10 min read Share on LinkedIn

On this page 11 sections
  1. 01Store the path as offsets, not poses
  2. 02The four pieces of the program
  3. 03Size the snapshot view first
  4. 04Teach the feature point once: the master-setup pass
  5. 05Edit one waypoint: the same pass, one change
  6. 06Check the edit before production
  7. 07Common mistakes
  8. 08When one feature point is not enough
  9. 09Release checklist
  10. 10Build or rework the locate layer
  11. 11Questions

Glue dispensing, sealing and screw-checking cells share one pattern: the camera finds the part, then the robot runs a multi-waypoint path across it. The pain arrives at the second revision, when one waypoint must move and the tempting move is to re-teach everything. Set the program up so the whole trajectory hangs off a single feature point saved at the camera-detected position, and an edit becomes one jog and one save. This guide gives you the program structure, the teach and edit procedures step by step, the arithmetic that shows why edits survive a re-locate, and a checklist before you release the program to production.

Store the path as offsets, not poses

Decide the storage rule before you write a single motion: every waypoint of the process path is a pose offset from one feature point, and that feature point is saved at the position the camera locate node reports. Nothing in the trajectory references the base frame directly. The controller then does the same arithmetic on every cycle:

x' = x·cos θ − y·sin θ + X_ref y' = x·sin θ + y·cos θ + Y_ref

Worked example: the locate finds the part at X_ref = 412.5 mm, Y_ref = 238.0 mm, rotated θ = 5° from the teach pose. A dispensing waypoint was taught at (+80.0, +20.0) mm from the feature. At 5°, cos θ = 0.9962 and sin θ = 0.0872, so:

x' = 80.0 × 0.9962 − 20.0 × 0.0872 = 77.95 mm, and 412.5 + 77.95 = 490.5 mm

y' = 80.0 × 0.0872 + 20.0 × 0.9962 = 26.90 mm, and 238.0 + 26.90 = 264.9 mm

Stored in base coordinates, the waypoint would still command 492.5, 258.0 mm — the teach-time position — and miss the bead by about 7 mm. Stored as an offset, the controller computes 490.5, 264.9 mm and the tool lands on the bead.

What changes Waypoints in base poses Waypoints as feature offsets
Part shifts 10 mm between boards every waypoint misses by 10 mm the path follows the locate
One bead corner is wrong re-teach the path or fight base numbers edit that one waypoint
Camera recalibrated or replaced offsets hidden in every waypoint re-save one feature point
Robot re-datumed after a joint swap full re-teach run the master-setup pass again

The single-point version of this — moving the tool to one detected frame — is laid out in move a robot relative to a vision-detected part frame; what follows extends it to a path of many waypoints.

The four pieces of the program

Four containers do all the work. Pendants name them differently — some call the feature point a user frame or a work object — but the roles are fixed:

  1. Camera locate node with its snapshot position (profil1 in these examples). It fires at a fixed robot pose and returns the detected pose of the profile.
  2. Master setup folder — plain motion instructions that carry the TCP from the locate result to the feature origin, orientation included.
  3. Feature point (rTrajectoryRef here) — a saved pose you overwrite once per setup.
  4. Relative trajectory folder — every waypoint defined from the feature point, one instruction per bead segment.

The trick is suppression, and the two folders take turns: master setup runs while the trajectory is suppressed, then they swap. That is what lets you drive the robot to a pose computed from a live camera result, save the feature point there, and only then edit the trajectory against it.

The locate layer itself is a smart camera or compact vision sensor reading the profile — the smart cameras category is the hardware class for the job.

Size the snapshot view first

Size the view before you teach profil1. The locate node fires at a fixed pose, so the feature must sit inside the field of view with margin at every expected part position:

FOV ≈ sensor width × working distance / focal length

For a 1/6-inch sensor — about 3.2 × 2.4 mm — with a 3 mm lens at a 240 mm working distance: FOV_w ≈ 3.2 mm × 240 mm / 3 mm = 256 mm and FOV_h ≈ 2.4 mm × 240 mm / 3 mm = 192 mm. A 140 × 70 mm glue path leaves about 58 mm of margin at the sides and 61 mm at top and bottom. At 0.3 MP — 640 × 480 pixels — the scale is 256 mm / 640 px = 0.4 mm per pixel, enough to hold a profile edge well inside a millimetre; gauging bead width is where you want more pixels.

Lens focal length, field of view and working distance
Units
Solve for
Focal length
– mm
Field of view
– mm
Working distance
– mm
Magnification
– x
Angle of view
– °
Pixel on the part
– mm

Thin-lens model: m = sensor width / field of view, f = WD × m / (1 + m). Accurate to a few percent above about 150 mm; check the lens's minimum object distance.

Find lenses with this focal length Open the full calculator

The lens focal length calculator runs the same relation from the other side: give it the view and the working distance, it returns the focal length and filters the shop to lenses that deliver it.

The MV-SCA002M-03S-WBN-SR pairs a 3 mm lens with a 240 mm focus distance on a 1/6-inch sensor — compact locate hardware that matches the numbers above.

Smart cameras & vision sensorsHikrobot MV-SCA002M-03S-WBN-SR SCA vision sensor, 0.3 MP, Mono, 3 mm lens, Focus distance 240 mmMV-SCA002M-03S-WBN-SR
Interface
Fast Ethernet
Resolution
Up to 3 MP
Sensor format
1/6"
Shutter
Global
$1,989.00 · quotedView and quote

Teach the feature point once: the master-setup pass

What you need: the locate node configured and its snapshot position taught, an empty trajectory folder, and an empty pose variable for the feature point. Then:

  1. Unsuppress the master setup folder and keep the relative trajectory folder suppressed.
  2. Run the program once. The locate node fires at the snapshot position, and the master-setup motions drive the TCP to the detected object position, orientation included.
  3. Suppress the master setup folder.
  4. Unsuppress the relative trajectory folder.
  5. Save the current TCP pose into the feature point — rTrajectoryRef, position and orientation, not just the X-Y-Z.
  6. Define the relative trajectory: create each waypoint relative to the feature point, walking the bead in order.
  7. Save. The production state is master setup suppressed and the trajectory unsuppressed.

If the locate node refuses to fire, the usual culprit is stream versus snapshot mode: vision locate works in teach but fails at run time walks through that failure.

Edit one waypoint: the same pass, one change

Editing is the same cycle with one insertion. To move waypoint 3 of 9 by 2.0 mm along the bead:

  1. Unsuppress master setup and suppress the trajectory folder.
  2. Run once so the robot sits at the detected position again, in the same part pocket as the original teach.
  3. Suppress master setup and unsuppress the trajectory folder.
  4. Re-save the feature point at the current TCP pose.
  5. Correct only waypoint 3: type the new offset, or jog the tool to the corrected pose and save that waypoint relative to the feature point.
  6. Run the full program — one cycle at reduced speed, then production speed.

The other eight waypoints never move, because they reference the same feature point you just re-saved.

Check the edit before production

Run this sequence before you release the program:

  • One full cycle at 10 to 25% of program speed.
  • Dispense on three to five parts and measure bead start and end against the part edge with calipers; log the deviation. With the 0.4 mm per pixel scale above, expect a spread well under a millimetre part to part once the mechanics are stiff.
  • Run the master-setup pass on a second part from the same batch: the feature point moves by the part shift and the bead still lands in the same place on the part. That proves the offsets are live, not frozen.
  • Confirm nobody jogged the camera or the snapshot position between runs. Why the robot must return to the snapshot position first explains what breaks when it moves.
  • After a joint replacement or a camera remount, redo both passes: restore vision accuracy after a robot joint replacement covers the recovery.

Common mistakes

  • Feature saved at the wrong pose. The bead shifts by the same vector on every part. Cause: the master-setup run never executed before the save. Redo the pass.
  • Orientation skipped. Master setup ends over the right point at the wrong approach angle, so every waypoint lands rotated around the feature. Redo the pass with the taught orientation.
  • One waypoint defined in base coordinates "just this once". It stops following the part. Redefine it relative to the feature point.
  • Edit made in a copied program without re-saving the feature point. The offsets point at a stale reference. Run the pass in the copy before judging the result.
  • Robot or camera jogged between locate and the master-setup run. The located pose is stale. Re-run the locate before the pass.
  • Two parts, one snapshot position. The locate grabs whichever part it sees. Teach separate snapshot positions — teach two parts in one vision program: separate snapshot positions shows the pattern.

When one feature point is not enough

Stretch one reference too far and the structure starts fighting you:

Release checklist

Before the cell runs unattended:

  • Snapshot position taught, its pose recorded, camera mounting tight.
  • Locate tested on parts at both ends of the tolerance band, not just the nominal part.
  • Feature point saved through the master-setup pass, orientation included.
  • Every trajectory waypoint defined relative to the feature point, none in base coordinates.
  • One reduced-speed cycle run clean, then one at production speed.
  • Bead position measured on sample parts and the deviation logged with the program.
  • Final save in the production state: master setup suppressed, trajectory unsuppressed.

Each line guards against a failure that shows up as a shifted bead, a crash, or a path that quietly stops following the part.

Build or rework the locate layer

If you are rebuilding the locate hardware along with the program, both sensors below are Fast Ethernet vision sensors with a global shutter and an M12 lens mount.

Smart cameras & vision sensorsHikrobot MV-SCB007EC-12S-WBN SCB vision sensor, 1.6 MP, Color, 12 mm lens, Manual focusMV-SCB007EC-12S-WBN
Interface
Fast Ethernet
Resolution
Up to 3 MP
$1,989.00 · quotedView and quote
Smart cameras & vision sensorsHikrobot HK-TD032-12-WBN 1.6 MP mono vision sensorHK-TD032-12-WBN
Interface
Fast Ethernet
Resolution
Up to 3 MP
$1,699.00View part

The shop camera finder filters by resolution, sensor format and mount, and the camera configurator pairs a sensor with a lens and mount for the working distance you sized above. A bench rig built on one of the camera stands makes the first snapshot-position teach and calibration quicker to set up and repeat. To talk the structure above through against your cell, contact us, or browse the procedure guides on the systems topic page.

Questions

Why does my edited waypoint drift when the part moves?

The waypoint is stored as a pose in the base frame instead of an offset from the feature point, so a re-locate leaves it behind. Move that instruction into the relative trajectory folder and define it from the feature point, then re-save the point at the detected position. The whole path follows the part again.

Can I edit a waypoint by jogging instead of typing numbers?

Yes. Bring the tool to the corrected pose with the jogger while the trajectory folder is unsuppressed and the feature point is current, then save that one waypoint relative to the feature point. Jogging keeps the edit in the same reference as the other waypoints; a typed base-frame pose silently breaks the chain. Re-run one cycle at reduced speed afterwards.

How fast should the first run be after an edit?

Run the first full cycle at 10 to 25% of program speed with a hand near the stop. The trajectory geometry changed, so clearance you trusted before may no longer hold near fixture edges. Step up through roughly half speed once one cycle runs clean, then return to production speed.

Does the feature point store orientation as well as position?

Yes, and orientation is where most edits go wrong. The master-setup pass must end with the tool at the taught orientation, not merely over the detected point, because each waypoint offset is a full pose offset. A 100 mm offset along a tool axis rotated 10° lands about 17 mm away from where the same offset lands at the teach orientation.

What if the parts sit at different heights in the same program?

One feature point tracks height only if the camera locate reports it. For a fixed height step, teach one snapshot position per plane and apply a constant offset between them; for parts at genuinely mixed heights, split the program into one locate and trajectory per plane rather than stretching one reference over all of them.

Do my folders and variables need the same names as yours?

No. Master setup, profil1 and rTrajectoryRef are example names from the structure above. What matters is the roles: one locate node with a fixed snapshot position, one folder that drives the tool to the feature origin, one saved feature point, and one trajectory folder whose waypoints reference only that point. Consistent names make the suppress-and-run cycle faster to read a year later.