wire_stickout

Real-time surface height error measurement for WAAM, derived from wire stickout (torch-tip to arc distance) observed through welding-glass cameras.

How it works

Each TSO camera looks through a welding glass at the arc. The brightest saturated blob in the image is the arc core. Its y-position in the image is proportional to the wire stickout distance (torch tip to substrate). When the surface is higher than expected the arc moves up in the image (shorter stickout); when lower, it moves down (longer stickout).

Pipeline:

/TSO_n/image_raw/compressed
    -> detect brightest blob centroid (x, y) normalized to [0,1]
    -> subtract baseline_y (captured at known 10mm stickout on layer 0)
    -> per-channel delta_y
    -> average across all channels -> consensus_delta_y
    -> scale by delta_y_to_delta_z_scale_factor -> err_surface_mm

Quick start

# build
colcon build --packages-select wire_stickout

# run (source first)
source install/setup.bash
ros2 run wire_stickout wire_stickout_blob_measure \
  --ros-args -p tso_namespaces:="['/TSO_0']"

Baseline calibration

During layer 0 on a flat substrate with 10mm wire stickout:

# arm on launch
ros2 run wire_stickout wire_stickout_blob_measure \
  --ros-args -p tso_namespaces:="['/TSO_0']" -p capture_baseline:=true

# or arm at runtime
ros2 param set /wire_stickout_blob_measure capture_baseline true

Collects 128 samples per stream, averages, writes the baseline parameters, and saves to ~/PhotogrammetryWAAM/STATE/TSO/baseline.json. On subsequent launches the baseline is loaded automatically.

Topics

TopicTypeDescription
/TSO_n/image_raw/compressedCompressedImageinput camera stream
/TSO_n/weld_locus_xyFloat64MultiArraynormalized (x, y) blob centroid
/TSO_n/delta_yFloat64per-channel y deviation from baseline
/wire_stickout/consensus_delta_yFloat64mean delta_y across all channels
/wire_stickout/err_surface_mmFloat64surface height error in mm

Parameters

ParameterDefaultDescription
tso_namespaces['/TSO_0','/TSO_1','/TSO_2']camera namespaces to subscribe
saturation_threshold253min grayscale value for arc detection
capture_baselinefalsearm baseline capture
baseline_sample_count128samples to average per stream
baseline_config_path~/PhotogrammetryWAAM/STATE/TSO/baseline.jsonpersist/load baseline
delta_y_to_delta_z_scale_factor1.0converts consensus delta_y to mm
TSO_n.baseline_10mm_x0.0per-stream baseline x (auto-set)
TSO_n.baseline_10mm_y0.0per-stream baseline y (auto-set)

Example: Modifying delta_y_to_delta_z_scale_factor

You can override the scale factor parameter (default: 1.0) to change how delta_y is converted to physical units in mm. For example, to set it to 20:

ros2 run wire_stickout wire_stickout_blob_measure \
  --ros-args -p delta_y_to_delta_z_scale_factor:=20

Or, at runtime:

ros2 param set /wire_stickout_blob_measure delta_y_to_delta_z_scale_factor 20.0

This will multiply the consensus delta_y value by 20 to yield /wire_stickout/err_surface_mm.