Pen tip pose perception method and system for multi-modal anti-jamming handheld positioning demonstration pen
By identifying arc flicker characteristics and employing a multi-level gating mechanism, the problem of false positive marking induced by arc light in welding sites was solved, enabling accurate pose perception and teaching trajectory protection under strong interference environments.
Patent Information
- Application Number
- CN202611352908.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-02
- Publication Date
- 2026-11-24
AI Technical Summary
Existing visual-inertial fusion positioning methods have difficulty identifying arc-induced false positive markers on the welding site and lack a protection mechanism for fusion pose, leading to pose calculation errors and contamination of the teaching trajectory.
By capturing arc flicker features through temporal changes in the proportion of image saturation regions, false positive markers are identified and interference intensity is quantified. Pose protection is then achieved by combining multi-level nested gated state machines, forming a closed-loop adaptive adjustment.
It significantly reduces the impact of false detection marks under arc flash, ensuring the accuracy and continuity of the teaching trajectory, and is suitable for handheld teaching operations on steel structure welding sites.
Smart Images

Figure CN123149985A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robot welding teaching and multi-sensor positioning technology, specifically to a pen tip pose sensing method and system for a multimodal anti-interference handheld positioning teaching pen. Background Technology
[0002] In offline or online teaching scenarios for steel structure welding robots, operators typically hold a teaching pen close to the weld seam. Fixed vision sensors identify optical marks on the pen and reconstruct the pen tip's six-degree-of-freedom pose using attitude data output from the inertial measurement unit (IMU). The welding environment is characterized by strong arc light, smoke scattering, partial obstruction, mechanical vibration, and metal surface reflection. Visual marks are prone to short-term loss, misdetection, or drift, while long-term integration by the IMU can lead to cumulative drift.
[0003] Existing visual-inertial fusion localization methods often employ fixed-weight fusion or a single credibility evaluation based on reprojection error, making it difficult to distinguish between genuine markers and false positive bright spots formed by arc light in the image. When the arc light flicker frequency is close to the camera sampling frequency, false positive markers are incorrectly included in the pose calculation, causing pen tip pose jumps. On the other hand, the fused pose is usually directly written into the teaching trajectory, lacking error upper bound estimation and hierarchical gating mechanisms linked to the current interference intensity. Short-term failed poses can easily contaminate the entire welding teaching trajectory.
[0004] Therefore, there is a need for a handheld teaching pen tip pose sensing method and system that can identify arc-induced false positive markers, quantify interference intensity, estimate the protection level of fused pose, and perform multi-level effectiveness gating. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of existing visual-inertial fusion teaching and positioning methods, such as insufficient ability to identify false positive marks induced by welding arc light, inability of fusion weights to adaptively adjust with interference intensity, and lack of hierarchical interception mechanism for failure poses. Instead, this invention provides a pen tip pose perception method and system for a multimodal anti-interference handheld positioning teaching pen.
[0006] This invention first captures the periodic characteristics of arc flicker by the temporal variation of the proportion of the saturated region in the image, and then projects the temporal sequence of the position residuals of each optical mark onto the arc flicker frequency. Using the power proportion at this frequency as the correlation, it distinguishes between real optical marks and arc-induced false positive marks, thus suppressing arc interference from the mark source level.
[0007] This invention further quantifies the arc interference intensity as a common input for credibility assessment and pose protection level calculation: on the one hand, it feeds back into visual credibility to reduce the weight of contaminated observations in fusion filtering; on the other hand, it enters the pose protection level as a gain term to explicitly estimate the upper bound of the error of the current fused pose.
[0008] This invention uses a multi-level nested gated state machine composed of time freshness, velocity boundary, acceleration boundary, workspace boundary and protection level alarm limit to perform step-by-step judgment on the reconstructed pen tip six-degree-of-freedom pose and output graded validity flags. Only valid poses are written into the teaching trajectory, thus preventing invalid poses from contaminating the teaching data from the result level.
[0009] This invention also enables the pose protection level, fusion filter observation covariance, and gated alarm limit to form a closed-loop adaptive adjustment. When arc light is enhanced or the marker is lost for a short time, it automatically tends to favor inertial short-term prediction and tightens the output. After visual recovery, it automatically returns to the visual correction dominant state.
[0010] To achieve the above objectives, the first aspect of the present invention provides a pen tip pose sensing method for a multimodal anti-interference handheld positioning teaching pen, comprising the following steps: Step S1: Acquire visual observation data of multiple non-collinear optical markers on the handheld positioning teaching pen collected by the visual sensor, and inertial observation data output by the inertial measurement unit inside the teaching pen, and time-align the two types of data. The visual observation data and inertial observation data are each timestamped and written into a numbered circular buffer queue. Time alignment is performed within a preset maximum time difference using adjacent timestamp interpolation or nearest neighbor matching. When the circular buffer queue overflows, the earliest unconsumed data is discarded.
[0011] Step S2: Determine visual confidence based on multiple visual quality features. These features include the number of visible optical markers, the geometric distance residual between optical markers, reprojection error, the proportion of saturated regions in the image, and the marker recognition confidence score. Visual confidence is calculated using the following formula:
[0012] In the formula, N is the normalized value of the number of visible optical markers, dr is the normalized value of the geometric distance residual between optical markers, rp is the normalized value of the reprojection error, sa is the normalized value of the proportion of the image saturation region, qm is the marker recognition confidence score, and wN, wD, wR, wS, and wQ are weighting coefficients and their sum is 1.
[0013] In S2, the arc flicker frequency is estimated from the time-domain sequence of the image saturation region proportion. The arc flicker frequency is estimated by performing spectral analysis or autocorrelation analysis on the time-domain sequence of the image saturation region proportion.
[0014] In step S2, arc-induced false positive markers are identified based on the correlation between the positional residuals of each optical marker and the arc flicker frequency. The correlation is calculated using the following formula:
[0015] In the formula, Fi(f) is the discrete Fourier transform of the time-domain sequence of the position residual of the i-th optical marker, fa is the arc flicker frequency, the numerator is the power of the position residual at the arc flicker frequency, and the denominator is the total power of the position residual across the entire frequency band. When the correlation exceeds a preset threshold, the corresponding optical marker is identified as an arc-induced false positive marker and is removed, and pose estimation is completed using the remaining optical markers.
[0016] In step S2, the arc interference intensity is quantified and the visual confidence level is fed back. The arc interference intensity is calculated using the following formula:
[0017] In the formula, Sarc is the energy of the image saturation region proportion time-domain sequence at the arc flicker frequency, Parc is the power difference of the residual position of the marker before and after the arc-induced false positive marker is removed, Rarc is the spatial diffusion of the overexposed region of the image, and α, β, and γ are weighting coefficients and their sum is 1.
[0018] Step S3: Predict the pose using inertial observation data. When the visual confidence level meets the update conditions, correct the predicted pose using visual observation data to obtain the fused pose. Pose prediction and correction are accomplished through extended Kalman filtering, unscented Kalman filtering, or complementary filtering. The visual observation covariance increases as the visual confidence level decreases. The inertial confidence level is determined based on the acceleration modulus deviation and angular velocity range status, and the inertial prediction weights are adjusted based on the inertial confidence level. When the number of visible optical markers is less than the preset number, a consistency check is performed on the visual observation residuals. Abnormal markers with the largest residuals are identified and removed. Short-term restricted updates are completed using the remaining markers and the inertial predicted pose. When the continuous failure time exceeds the extrapolation threshold, the graded validity flag is set to invalid.
[0019] Step S4: Calculate the pose protection level, which characterizes the upper bound of the fused pose error, based on the visual observation residual statistics and the arc interference intensity. The arc interference intensity is included as a gain term, and the pose protection level is calculated using the following formula:
[0020] In the formula, G is the optical marker geometry factor, σ is the visual observation residual statistic, kp is the quantile corresponding to the missed detection probability, λ is the inertial extrapolation growth coefficient, Δt is the inertial extrapolation duration after visual correction failure, Aarc is the arc light interference intensity, and δ is the arc light intensity gain coefficient.
[0021] Step S5: The pose is fused through the optical marker array to the calibration rigid body offset transformation of the pen tip, resulting in the six-DOF pose of the pen tip. The rigid body offset from the optical marker array to the pen tip is obtained through offline calibration, and the calibration version number is retained. The consistency of the calibration version is verified during online reconstruction.
[0022] Step S6: The validity of the six-DOF pose of the pen tip is determined through multi-level gating, and graded validity flags are generated. Only valid poses are written into the teaching trajectory. Multi-level gating uses a nested gating state machine to sequentially execute time freshness judgment, velocity boundary judgment, acceleration boundary judgment, workspace boundary judgment, and protection level alarm limit judgment. If any judgment fails, a graded validity flag (restricted validity or invalid) is output according to the failed level. If all judgments pass, a valid flag is output. The graded validity flags include three levels: valid, restricted validity, and invalid. When the number of consecutive invalid flags output by the nested gating state machine exceeds a preset threshold, the alarm limit is tightened and the inertial prediction weight is reduced. When the visual confidence level is continuously lower than a preset threshold, the visual observation covariance is increased.
[0023] The second aspect of the present invention provides a pen tip pose sensing system for a multimodal anti-interference handheld positioning teaching pen, including a handheld positioning teaching pen, a visual sensor, and a processor; the handheld positioning teaching pen includes a housing, a pen tip, a plurality of non-collinear optical markers disposed at the front end of the housing and having a fixed rigid body geometric relationship with the pen tip, an inertial measurement unit, a triggering unit, and a communication unit, wherein the communication unit is used to send inertial observation data with timestamps and triggering status, and the processor is configured to execute the method of the first aspect described above.
[0024] The present invention also provides a handheld positioning teaching pen, including a housing, a pen tip located at the front end of the housing, multiple non-collinear optical markers disposed at the front end of the housing, an inertial measurement unit, a triggering unit, and a communication unit disposed within the housing; the multiple optical markers maintain a fixed rigid body geometric relationship with the pen tip, the inertial measurement unit outputs acceleration and angular velocity data with timestamps, the triggering unit generates a trajectory record triggering state when pressed, and the communication unit sends the inertial observation data and triggering state to an external processor, which then executes the above method in conjunction with visual observation data from a visual sensor.
[0025] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.
[0026] The present invention has the following advantages: (1) It uses the frequency domain correlation between the arc flicker frequency and the marker position residual to identify false positive markers. Compared with the scheme that only relies on reprojection error, it can significantly reduce the pollution of pose calculation by false positive markers in arc flicker and metal reflection scenarios.
[0027] (2) The intensity of arc interference is simultaneously fed back into the visual credibility and included in the pose protection level as a gain term, so that the fusion weight and error upper bound estimation are linked with the real interference intensity, avoiding the over-reliance on visual observation when the interference is enhanced by fixed weight fusion.
[0028] (3) The pen tip pose is evaluated step by step by a multi-level nested gating state machine and a graded validity flag is output. Only valid poses are written into the teaching trajectory. In cases such as short-term loss of the marker, pose jump, or exceeding the workspace, invalid poses are prevented from entering the teaching data.
[0029] (4) A closed-loop adaptive adjustment is formed between the pose protection level, the covariance of the fusion filter observation, the gate alarm limit and the inertial prediction weight, taking into account both the continuous output capability under strong interference and the accuracy regression after visual recovery, which is suitable for handheld teaching operations on the steel structure welding site. Attached Figure Description
[0030] Figure 1 This is a flowchart illustrating the pen tip pose sensing method provided in an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating the structural relationship between the handheld positioning teaching pen and the vision sensor provided in an embodiment of the present invention; Figure 3 A schematic diagram of the judgment process of a multi-level gated state machine provided in an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the coordinated adjustment between pose protection level, fusion filtering, and gating state machine provided in an embodiment of the present invention. Figure 5 This is a schematic diagram of the arc flicker sensing and false positive labeling suppression process provided in an embodiment of the present invention.
[0031] Figure labeling: 10, teaching pen; 11, optical marker array; 12, pen tip; 13, inertial measurement unit; 14, trigger unit; 20, vision sensor; 30, time alignment module; 40, visual credibility assessment module; 45, arc flicker suppression module; 46, arc interference intensity estimation module; 50, fusion filtering module; 60, pose protection level calculation module; 70, pen tip reconstruction module; 80, multi-level gating state machine; 90, trajectory writing module; M1, M2, M3, optical markers. Detailed Implementation
[0032] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of the invention. Furthermore, the advantages of the invention will become clearer and easier to understand through explanation.
[0033] The present invention discloses a pen tip pose perception method for a multimodal anti-interference handheld positioning teaching pen, comprising: step S1, acquiring visual observation data of multiple non-collinear optical marks on the handheld positioning teaching pen collected by a visual sensor and inertial observation data output by the inertial measurement unit inside the teaching pen, and aligning the two types of data in time; the visual observation data and the inertial observation data are respectively timestamped and written into a numbered circular buffer queue, the time alignment is completed within a preset maximum time difference by adjacent timestamp interpolation or nearest neighbor matching, and the earliest unconsumed data is discarded when the circular buffer queue overflows. Step S2: Determine visual credibility based on multiple visual quality features. Estimate the arc flicker frequency from the temporal sequence of the image saturation region proportion. Identify and suppress arc-induced false positive markers based on the correlation of the residuals at each marker position at that frequency. Quantify the arc interference intensity and feed back the visual credibility. Step S3: Predict the pose using inertial observation data. Correct the predicted pose with visual observation data when the visual credibility meets the update conditions to obtain the fused pose. Step S4: Calculate the pose protection level characterizing the upper bound of the fused pose error based on the visual observation residual statistics and the arc interference intensity. This intensity is included as a gain term. Step S5: Transform the fused pose through the optical marker array to the calibration rigid body offset of the pen tip to obtain the six-DOF pose of the pen tip. Step S6: Perform validity judgment on the six-DOF pose of the pen tip through multi-level gating and generate graded validity flags. Only write the valid pose into the teaching trajectory. When the pose protection level increases, increase the visual observation covariance and tighten the gating alarm limit.
[0034] The multiple visual quality features include the number of visible optical markers, the geometric distance residual between optical markers, reprojection error, the proportion of image saturation regions, and marker recognition confidence score. The visual confidence score is calculated using the following formula:
[0035] Where N is the normalized value of the number of visible optical markers, dr is the normalized value of the geometric distance residual between optical markers, and r p s is the normalized value of the reprojection error. a q is the normalized value of the proportion of the saturated region in the image. m To label and identify confidence scores, w N w D w R w S w Q These are the weighting coefficients, and their sum is 1.
[0036] The arc flicker frequency is estimated by performing spectral analysis or autocorrelation analysis on the time-domain sequence of the proportion of the saturated region in the image.
[0037] The relevance is calculated using the following formula:
[0038] Where Fi(f) is the discrete Fourier transform of the time-domain sequence of the position residual of the i-th optical marker, fa is the arc flicker frequency, the numerator is the power of the position residual at the arc flicker frequency, and the denominator is the total power of the position residual across the entire frequency band. When the correlation exceeds a preset threshold, the corresponding optical marker is identified as an arc-induced false positive marker and is removed, and pose estimation is completed with the remaining optical markers.
[0039] The intensity of the arc interference is calculated using the following formula:
[0040] Where Sarc is the energy of the image saturation region proportion time-domain sequence at the arc flicker frequency, Parc is the power difference of the residual position of the marker before and after the arc-induced false positive marker is removed, Rarc is the spatial diffusion of the overexposed region of the image, and α, β, and γ are weighting coefficients and their sum is 1.
[0041] The pose protection level is calculated using the following formula:
[0042] Wherein, G is the optical marker geometric configuration factor, σ is the visual observation residual statistic, kp is the quantile corresponding to the missed detection probability, λ is the inertial extrapolation growth coefficient, Δt is the inertial extrapolation duration after visual correction failure, Aarc is the arc light interference intensity, and δ is the arc light intensity gain coefficient.
[0043] The multi-level gating system employs a nested gating state machine to sequentially perform time freshness judgment, velocity boundary judgment, acceleration boundary judgment, workspace boundary judgment, and protection level alarm limit judgment. If any judgment fails, a graded validity flag (restricted validity or invalid) is output according to the failed level. If all judgments pass, a valid flag is output. The graded validity flag includes three levels: valid, restricted validity, and invalid. When the nested gating state machine outputs invalid flags more than a preset threshold consecutively, the alarm limit is tightened and the inertial prediction weight is reduced. When the visual confidence level is continuously lower than a preset threshold, the visual observation covariance is increased.
[0044] The pose prediction and correction are accomplished through extended Kalman filtering, unscented Kalman filtering, or complementary filtering, and the visual observation covariance increases as the visual confidence level decreases. The inertial confidence level is determined based on the acceleration modulus deviation and angular velocity range status, and the inertial prediction weight is adjusted based on the inertial confidence level. When the number of visible optical markers is less than a preset number, a consistency check is performed on the visual observation residuals, and the abnormal markers with the largest residuals are identified and removed. The remaining markers and the inertial prediction pose are used to complete a short-term restricted update. When the continuous failure time exceeds the extrapolation threshold, the graded validity flag is set to invalid.
[0045] A pen tip pose sensing system for a multimodal anti-interference handheld positioning teaching pen, characterized in that it includes a handheld positioning teaching pen, a visual sensor, and a processor; the handheld positioning teaching pen includes a housing, a pen tip, multiple non-collinear optical markers disposed at the front end of the housing and having a fixed rigid body geometric relationship with the pen tip, an inertial measurement unit, a triggering unit, and a communication unit, wherein the communication unit is used to send inertial observation data with timestamps and triggering states, and the processor is configured to execute the pen tip pose sensing method of the multimodal anti-interference handheld positioning teaching pen according to any one of claims 1 to 8.
[0046] A handheld positioning teaching pen includes a housing, a pen tip located at the front end of the housing, multiple non-collinear optical markers disposed at the front end of the housing, an inertial measurement unit, a triggering unit, and a communication unit disposed within the housing; the multiple optical markers maintain a fixed rigid body geometric relationship with the pen tip; the inertial measurement unit outputs acceleration and angular velocity data with timestamps; the triggering unit generates a trajectory record triggering state when pressed; the communication unit sends the inertial observation data and the triggering state to an external processor; the external processor, in conjunction with visual observation data from a visual sensor, executes the pen tip pose perception method of the multimodal anti-interference handheld positioning teaching pen as described in any one of claims 1 to 8.
[0047] Example The hardware components of this embodiment are combined Figure 2 illustrate. Figure 2 In the diagram, the teaching pen 10 has a long, rectangular shell structure with a tapered tip 12 at its left end. The area enclosed by a dashed frame at the front of the shell is an optical marker array 11, containing three non-collinear optical markers M1, M2, and M3. These three markers are arranged non-collinearly to ensure the solvability of the six-degree-of-freedom pose. Inside the shell of the teaching pen 10, a trigger unit 14 and an inertial measurement unit 13 are sequentially arranged along the axial direction. The trigger unit 14 generates a trajectory record of the trigger state when the operator presses the button. The inertial measurement unit 13 is a combination of a three-axis accelerometer and a three-axis gyroscope, outputting acceleration and angular velocity with timestamps. A vision sensor 20 is deployed on the right side of the teaching pen 10. Figure 2 The three dashed lines in the middle point from M1, M2, and M3 to the vision sensor 20, indicating that the three optical markers are all within the field of view of the vision sensor 20, and the vision sensor 20 acquires the marker images at a fixed frame rate.
[0048] The overall process of the method in this embodiment is combined with Figure 1 illustrate. Figure 1The top left visual sensor 20 outputs visual observation data, and the top right inertial measurement unit 13 outputs inertial observation data. The two data streams are fed into the time alignment module 30 to complete timestamp alignment. The aligned visual data enters the visual credibility assessment module 40, which includes two sub-modules: a multivariate weighted fusion module and an arc flicker suppression module 45. The former performs multi-feature credibility fusion, while the latter performs arc flicker frequency estimation, false positive marker identification, and interference intensity quantification. The inertial measurement unit 13 also has an additional... Figure 1 The right-side downward inertial short-time prediction branch is directly connected to the fusion filtering module 50, providing short-time predicted pose when vision fails. The fusion filtering module 50 includes two sub-stages: inertial prediction and visual correction, outputting the fused pose. The fused pose is divided into two paths: one enters the pose protection level calculation module 60, which calculates the pose protection level including arc intensity gain; the other enters the pen tip reconstruction module 70 to complete the rigid body offset transformation. After the two results are combined, they enter the multi-level gating state machine 80. The path that is determined to be valid enters the trajectory writing module 90 to the lower left to write the teaching trajectory, while the path that is determined to be invalid outputs an invalid flag to the lower right.
[0049] During the time alignment process in step S1, visual observation data and inertial observation data are each appended with their own hardware timestamps and written into a numbered circular buffer queue. The processor searches for the pair of data with the closest times within a preset maximum time difference and completes the alignment by using linear interpolation of adjacent timestamps or nearest neighbor matching. When a buffer queue overflows, the earliest data that has not yet been consumed is discarded to prevent old data from participating in the fusion.
[0050] In step S2, the visual credibility assessment module 40 extracts five visual quality features for each frame of visual observation: the number of visible optical markers, the geometric distance residual between optical markers, the reprojection error, the proportion of image saturation regions, and the marker recognition confidence score. After normalization, each feature is weighted and summed according to the following formula to obtain the visual credibility CV:
[0051] In this embodiment, the weight coefficients are wN=0.25, wD=0.2, wR=0.2, wS=0.2, and wQ=0.15, and their sum is 1. The value range of each normalized feature is 0 to 1. The higher the CV value, the more reliable the visual observation. The specific weights can be adjusted according to the on-site calibration.
[0052] The specific process of arc flicker sensing and false positive labeling suppression combined Figure 5 illustrate. Figure 5The top-left image saturation ratio time-domain sequence box outputs a time series composed of the saturation region ratios of each frame of the image, which enters the arc flicker frequency estimation box. The arc flicker frequency fa is obtained through spectral analysis or autocorrelation analysis. The top-right marker position residual time-domain sequence box outputs a time series composed of the residuals of each optical marker's position, frame by frame. Both sequences enter the arc flicker correlation calculation box, where Ci is equal to the power at the arc flicker frequency divided by the total power across the entire frequency band, calculated using the following formula:
[0053] The correlation coefficient Ci then enters the arc interference intensity estimation module 46. Module 46 is labeled Aarc, which is equal to the sum of α multiplied by Sarc, β multiplied by Parc, and γ multiplied by Rarc. The arc interference intensity is calculated using the following formula:
[0054] In this embodiment, α=0.65, β=0.35, and γ=0.05, and their sum is 1. The correlation coefficient Ci enters the judgment box. If Ci is greater than the threshold, the threshold in this embodiment is 0.6: if the judgment is yes, it enters the false positive marker removal box along the lower left branch, and the marker is removed from the pose estimation marker set of this frame; if the judgment is no, it enters the true marker retention box along the lower right branch, and the marker continues to participate in pose estimation. The arc interference intensity Aarc is fed back into the visual credibility assessment module 40 on one hand, and sent to the pose protection level calculation module 60 on the other.
[0055] In step S3, the fusion filtering module 50 uses extended Kalman filtering. The state vector includes the position, velocity, and attitude quaternions of the teaching pen coordinate system relative to the visual coordinate system. The acceleration and angular velocity output by the inertial measurement unit 13 are used for state prediction. Visual observations are used for state correction when the visual confidence meets the update conditions. The visual observation covariance increases as the visual confidence decreases, thus reducing the impact of contaminated observations on state updates. The inertial confidence is determined based on the acceleration modulus deviation and angular velocity range. When the acceleration modulus deviates from the reasonable range of gravity and motion synthesis or the angular velocity approaches the upper limit of the range, the inertial confidence is reduced, and the inertial prediction weight is reduced accordingly. When the number of visible optical markers is less than the preset number, the consistency of each visual observation residual is checked, the abnormal marker with the largest residual is identified and removed, and the short-term restricted update is completed by combining the remaining markers with the inertial prediction pose. When the continuous failure time exceeds the extrapolation threshold, the graded validity flag is directly set to invalid. The communication data uses data packets with sequence numbers and checksums. The processor performs cyclic redundancy check on the inertial data packets. Data packets that fail the check are discarded and retransmission is requested to prevent erroneous data from entering the filter.
[0056] In step S4, the pose protection level calculation module 60 calculates the pose protection level PL using the following formula:
[0057] In the formula, G is determined by the relative geometric configuration of the optical markers; the more uniform the marker distribution, the smaller G is. σ is the standard deviation of the visual observation residual within the nearest window; kp is the quantile corresponding to the missed detection probability; λ is the inertial extrapolation growth coefficient, reflecting the rate at which the inertial integration error increases over time; Δt is the inertial extrapolation duration after visual correction failure; δ is the arc light intensity gain coefficient, which is taken as δ=0.6 in this embodiment. PL characterizes the upper bound of the error of the current fused pose; the larger the PL, the more unreliable the pose.
[0058] The relationship between pose protection level and the coordinated adjustment between fusion filtering and gating state machine is combined. Figure 4 illustrate. Figure 4 The top pose protection level calculation module 60 outputs two diagonal action paths: one acts to the lower left of the fusion filter module 50, marking an increase in visual covariance, that is, when the protection level is raised, the visual observation covariance of the fusion filter is increased; the other acts to the lower right of the multi-level gating state machine 80, marking a tightening of alarm limits, that is, when the protection level is raised, the gating alarm limits are tightened accordingly. Figure 4 There is another feedback arrow between the bottom fusion filter module 50 and the multi-level gating state machine 80, pointing from the multi-level gating state machine 80 to the fusion filter module 50, indicating that the inertial prediction weight is reduced, that is, the fusion filter is adjusted in reverse when the gating continuously outputs invalid flags. Figure 4 The bottom label indicates that the three parameters will automatically adjust upon gating failure, signifying that the pose protection level, visual covariance, and alarm limit form a closed loop.
[0059] In step S5, the pen tip reconstruction module 70 fuses the teaching pen coordinate system pose output by the fusion filtering module 50, and then performs a calibration rigid body offset transformation from the optical marker array coordinate system to the pen tip coordinate system to obtain the six-degree-of-freedom pose of the pen tip 12. This rigid body offset is determined offline during factory or field calibration and the calibration version number is retained. During online reconstruction, it is verified that the currently used calibration version is consistent with the configuration version to prevent incorrect offsets after using different pen tips or changing the marker array.
[0060] Step S6 multi-level gating process combined Figure 3 illustrate. Figure 3The top six-DOF pose frame outputs the pose to be judged, which then enters five interconnected diamond-shaped judgment frames from top to bottom: the first level, time freshness judgment, checks if the difference between the pose timestamp and the current time is within the allowable range; the second level, velocity boundary judgment, checks if the differential velocity between adjacent poses exceeds the upper limit of human hand movement speed; the third level, acceleration boundary judgment, checks if the differential acceleration exceeds the reasonable upper limit; the fourth level, workspace boundary judgment, checks if the pose is within the preset teaching workspace; and the fifth level, protection level judgment, checks if the pose protection level is not greater than the alarm limit. A dashed "No" branch extends from the right side of each judgment frame. These five "No" branches converge along the right-side dashed line and then enter the output invalid flag frame. This means that if any level of judgment fails, it will not proceed to the next judgment and will directly output a restricted valid or invalid flag corresponding to the failed level. When all five levels of judgment pass, it enters the write welding teaching trajectory frame to the left along the bottom pass branch, writing the pose into the teaching trajectory. The graded validity flags include three levels: valid, restricted valid, and invalid. Restricted valid poses can be used for interface prompts but are not written into the trajectory, while invalid poses only output an invalid flag.
[0061] In the system embodiment, the above method is executed by a time alignment module 30, a visual credibility assessment module 40, an arc flicker suppression module 45, an arc interference intensity estimation module 46, a fusion filtering module 50, a pose protection level calculation module 60, a pen tip reconstruction module 70, a multi-level gating state machine 80, and a trajectory writing module 90 connected in sequence. Each module can be implemented by a processor running a program in a storage medium, or by an application-specific integrated circuit.
[0062] In an embodiment of the handheld positioning teaching pen device, the teaching pen 10 includes a housing, a pen tip 12 located at the front end of the housing, three non-collinear optical markers M1, M2, and M3 disposed at the front end of the housing, an inertial measurement unit 13 disposed within the housing, a triggering unit 14, and a communication unit; the optical markers maintain a fixed rigid body geometric relationship with the pen tip 12, the inertial measurement unit 13 outputs acceleration and angular velocity data with timestamps, the triggering unit 14 generates a trajectory record triggering state when pressed, and the communication unit sends the inertial observation data and triggering state to an external processor, which then performs the aforementioned steps in conjunction with the visual observation data from the visual sensor 20.
[0063] In the storage medium embodiment, a computer-readable storage medium stores a computer program that, when executed by a processor, implements the methods of steps S1 to S6. The storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory, a random access memory, a magnetic disk, or an optical disk.
[0064] All other technologies not described in detail are existing technologies.
Claims
1. A method for sensing the pen tip pose of a multimodal anti-interference handheld positioning teaching pen, characterized in that, include: Step S1: Obtain visual observation data of multiple non-collinear optical marks on the handheld positioning teaching pen collected by the visual sensor and inertial observation data output by the inertial measurement unit inside the teaching pen, and align the two types of data in time; the visual observation data and inertial observation data are respectively timestamped and written into a numbered circular buffer queue; the time alignment is completed by adjacent timestamp interpolation or nearest neighbor matching within a preset maximum time difference; when the circular buffer queue overflows, the earliest and unconsumed data is discarded. Step S2: Determine visual credibility based on multiple visual quality features. Estimate the arc flicker frequency from the temporal sequence of the image saturation region proportion. Identify and suppress arc-induced false positive markers based on the correlation of the residuals at each marker position at that frequency. Quantify the arc interference intensity and feed back the visual credibility. Step S3: Predict the pose using inertial observation data. Correct the predicted pose with visual observation data when the visual credibility meets the update conditions to obtain the fused pose. Step S4: Calculate the pose protection level characterizing the upper bound of the fused pose error based on the visual observation residual statistics and the arc interference intensity. This intensity is included as a gain term. Step S5: Transform the fused pose through the optical marker array to the calibration rigid body offset of the pen tip to obtain the six-DOF pose of the pen tip. Step S6: Perform validity judgment on the six-DOF pose of the pen tip through multi-level gating and generate graded validity flags. Only write the valid pose into the teaching trajectory. When the pose protection level increases, increase the visual observation covariance and tighten the gating alarm limit.
2. The pen tip pose sensing method for a multimodal anti-interference handheld positioning teaching pen according to claim 1, characterized in that, The multiple visual quality features include the number of visible optical markers, the geometric distance residual between optical markers, reprojection error, the proportion of image saturation regions, and marker recognition confidence score. The visual confidence score is calculated using the following formula: Where N is the normalized value of the number of visible optical markers, dr is the normalized value of the geometric distance residual between optical markers, and r p s is the normalized value of the reprojection error. a q is the normalized value of the proportion of the saturated region in the image. m To label and identify confidence scores, w N w D w R w S w Q These are the weighting coefficients, and their sum is 1.
3. The pen tip pose sensing method for a multimodal anti-interference handheld positioning teaching pen according to claim 1, characterized in that, The arc flicker frequency is estimated by performing spectral analysis or autocorrelation analysis on the time-domain sequence of the proportion of the saturated region in the image.
4. The pen tip pose sensing method for a multimodal anti-interference handheld positioning teaching pen according to claim 1, characterized in that, The relevance is calculated using the following formula: Where Fi(f) is the discrete Fourier transform of the time-domain sequence of the position residual of the i-th optical marker, fa is the arc flicker frequency, the numerator is the power of the position residual at the arc flicker frequency, and the denominator is the total power of the position residual across the entire frequency band. When the correlation exceeds a preset threshold, the corresponding optical marker is identified as an arc-induced false positive marker and is removed, and pose estimation is completed with the remaining optical markers.
5. The pen tip pose sensing method for a multimodal anti-interference handheld positioning teaching pen according to claim 1, characterized in that, The intensity of the arc interference is calculated using the following formula: Where Sarc is the energy of the image saturation region proportion time-domain sequence at the arc flicker frequency, Parc is the power difference of the residual position of the marker before and after the arc-induced false positive marker is removed, Rarc is the spatial diffusion of the overexposed region of the image, and α, β, and γ are weighting coefficients and their sum is 1.
6. The pen tip pose sensing method for a multimodal anti-interference handheld positioning teaching pen according to claim 5, characterized in that, The pose protection level is calculated using the following formula: Wherein, G is the optical marker geometric configuration factor, σ is the visual observation residual statistic, kp is the quantile corresponding to the missed detection probability, λ is the inertial extrapolation growth coefficient, Δt is the inertial extrapolation duration after visual correction failure, Aarc is the arc light interference intensity, and δ is the arc light intensity gain coefficient.
7. The pen tip pose sensing method for a multimodal anti-interference handheld positioning teaching pen according to claim 1, characterized in that, The multi-level gating system employs a nested gating state machine to sequentially perform time freshness judgment, velocity boundary judgment, acceleration boundary judgment, workspace boundary judgment, and protection level alarm limit judgment. If any judgment fails, a graded validity flag (restricted validity or invalid) is output according to the failed level. If all judgments pass, a valid flag is output. The graded validity flag includes three levels: valid, restricted validity, and invalid. When the nested gating state machine outputs invalid flags more than a preset threshold consecutively, the alarm limit is tightened and the inertial prediction weight is reduced. When the visual confidence level is continuously lower than a preset threshold, the visual observation covariance is increased.
8. The pen tip pose sensing method for a multimodal anti-interference handheld positioning teaching pen according to claim 1, characterized in that, The pose prediction and correction are accomplished through extended Kalman filtering, unscented Kalman filtering, or complementary filtering, and the visual observation covariance increases as the visual confidence level decreases. The inertial confidence level is determined based on the acceleration modulus deviation and angular velocity range status, and the inertial prediction weight is adjusted based on the inertial confidence level. When the number of visible optical markers is less than a preset number, a consistency check is performed on the visual observation residuals, and the abnormal markers with the largest residuals are identified and removed. The remaining markers and the inertial prediction pose are used to complete a short-term restricted update. When the continuous failure time exceeds the extrapolation threshold, the graded validity flag is set to invalid.
9. A pen tip pose sensing system for a multimodal anti-interference handheld positioning teaching pen, characterized in that, The invention includes a handheld positioning teaching pen, a vision sensor, and a processor. The handheld positioning teaching pen includes a housing, a pen tip, multiple non-collinear optical markers disposed at the front end of the housing and having a fixed rigid body geometric relationship with the pen tip, an inertial measurement unit, a triggering unit, and a communication unit. The communication unit is used to send time-stamped inertial observation data and triggering status. The processor is configured to execute the pen tip pose sensing method of the multimodal anti-interference handheld positioning teaching pen according to any one of claims 1 to 8.
10. A handheld positioning teaching pen, comprising a housing, a pen tip located at the front end of the housing, a plurality of non-collinear optical markers disposed at the front end of the housing, an inertial measurement unit, a triggering unit, and a communication unit disposed within the housing; the plurality of optical markers maintain a fixed rigid body geometric relationship with the pen tip, the inertial measurement unit outputs acceleration and angular velocity data with timestamps, the triggering unit generates a trajectory record triggering state when pressed, and the communication unit sends the inertial observation data and the triggering state to an external processor, which, in conjunction with visual observation data from a visual sensor, executes the pen tip pose perception method of the multimodal anti-interference handheld positioning teaching pen as described in any one of claims 1 to 8.
