wire_stickout
wire_stickout
Section titled “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
Section titled “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_mmQuick start
Section titled “Quick start”# buildcolcon build --packages-select wire_stickout
# run (source first)source install/setup.bashros2 run wire_stickout wire_stickout_blob_measure \ --ros-args -p tso_namespaces:="['/TSO_0']"Baseline calibration
Section titled “Baseline calibration”During layer 0 on a flat substrate with 10mm wire stickout:
# arm on launchros2 run wire_stickout wire_stickout_blob_measure \ --ros-args -p tso_namespaces:="['/TSO_0']" -p capture_baseline:=true
# or arm at runtimeros2 param set /wire_stickout_blob_measure capture_baseline trueCollects 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
Section titled “Topics”| Topic | Type | Description |
|---|---|---|
/TSO_n/image_raw/compressed | CompressedImage | input camera stream |
/TSO_n/weld_locus_xy | Float64MultiArray | normalized (x, y) blob centroid |
/TSO_n/delta_y | Float64 | per-channel y deviation from baseline |
/wire_stickout/consensus_delta_y | Float64 | mean delta_y across all channels |
/wire_stickout/err_surface_mm | Float64 | surface height error in mm |
Parameters
Section titled “Parameters”| Parameter | Default | Description |
|---|---|---|
tso_namespaces | ['/TSO_0','/TSO_1','/TSO_2'] | camera namespaces to subscribe |
saturation_threshold | 253 | min grayscale value for arc detection |
capture_baseline | false | arm baseline capture |
baseline_sample_count | 128 | samples to average per stream |
baseline_config_path | ~/PhotogrammetryWAAM/STATE/TSO/baseline.json | persist/load baseline |
delta_y_to_delta_z_scale_factor | 1.0 | converts consensus delta_y to mm |
TSO_n.baseline_10mm_x | 0.0 | per-stream baseline x (auto-set) |
TSO_n.baseline_10mm_y | 0.0 | per-stream baseline y (auto-set) |
Example: Modifying delta_y_to_delta_z_scale_factor
Section titled “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:=20Or, at runtime:
ros2 param set /wire_stickout_blob_measure delta_y_to_delta_z_scale_factor 20.0This will multiply the consensus delta_y value by 20 to yield /wire_stickout/err_surface_mm.