Method and system for robot zeroing accuracy self-checking based on cumulative encoder position versus command position deviation
By using a cumulative method based on the deviation between encoder position and command position, a non-contact calibration baseline is obtained in stages, the source of error is distinguished and a zero-point correction amount is generated, which solves the shortcomings of the existing technology in the zero-return accuracy inspection of robotic arms and improves the safety and accuracy of bird's nest picking.
Patent Information
- Application Number
- CN202611481503.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-22
- Publication Date
- 2026-11-27
AI Technical Summary
Existing methods for checking the zero-point accuracy of robotic arms are difficult to integrate with the action stages, trajectory positions, and movement directions of bird's nest picking tasks, making it difficult to distinguish the source of error and potentially leading to inappropriate zero-point compensation and failure of feather extraction.
By collecting images of bird's nests and data from the robotic arm controller, an accumulation method based on the deviation between encoder position and command position is established. Non-contact calibration baselines are obtained in stages, and zero-point drift, transmission backlash, and contact disturbance are distinguished. Zero-point correction is generated and non-contact zero-return verification is performed.
This improved the accuracy of the robotic arm's zero-return precision self-check, reduced the impact of inappropriate parameter corrections on subsequent feather picking operations, and ensured the safe extraction of feathers.
Smart Images

Figure CN123169097A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of robotic arm control and food processing automation technology, specifically relating to a self-testing method and system for robotic arm zero-return accuracy based on the cumulative deviation between encoder position and command position. Background Technology
[0002] During the process of removing feathers from bird's nests, it is necessary to identify and extract feathers from between the bird's nest strands. When using a robotic arm to perform automated feather removal, the position of the feather is usually determined first through a vision system, and then the suction end of the robotic arm is controlled to approach the base of the feather and remove it. Since the base of the feather may be close to the bird's nest strands, even a small positional deviation of the robotic arm's end may cause the suction position to deviate, the feather to fail to be extracted, or the bird's nest strands to be disturbed.
[0003] After continuous operation, joint zero-point drift, transmission backlash, and disturbances caused by the suction contact can all cause deviations between the target position output by the robotic arm controller and the encoder feedback position. The spatial offset formed after this deviation is transmitted to the suction end effector is related to the current posture of the robotic arm, abnormal joints, and joint movement direction. It is difficult to directly determine whether the positional deviation of a single joint affects the safe retrieval of the feather.
[0004] Current methods for checking the zero-return accuracy of robotic arms typically rely on single-time zero-return position deviations, fixed error thresholds, or external calibration results. They rarely consider establishing a corresponding baseline based on the action phase, trajectory position, and direction of motion during the feather-picking task, and struggle to distinguish between zero-point drift, transmission backlash, and suction contact disturbances. When temporary deviations caused by suction contact are used to correct zero-point parameters, inappropriate zero-point compensation may occur. Furthermore, there is a lack of correlation between joint position deviations and the feather root, feather extension direction, and the boundary of the nearest bird's nest strand, making it difficult to determine whether correction is needed based on the available space around the feather. Therefore, a self-checking method for the zero-return accuracy of robotic arms is needed that can combine data from bird's nest picking tasks to determine error sources, assess end-effector offset, and verify zero-point correction. Summary of the Invention
[0005] To address the aforementioned problems in existing technologies, namely the difficulty in associating the safe range for picking feathers from bird's nests and distinguishing the sources of error, this invention provides a self-testing method and system for the zero-return accuracy of a robotic arm based on the cumulative deviation between encoder position and command position.
[0006] In a first aspect, this invention proposes a self-testing method for the zero-return accuracy of a robotic arm based on the cumulative deviation between encoder position and command position, comprising: Collect images of bird's nests, the target positions of each joint output by the robotic arm controller, the encoder feedback positions of each joint, the action status, and the timestamps; Synchronize the target position, encoder feedback position and motion status according to the timestamp, divide the task into approach, extraction and return to zero stages, and obtain the non-contact calibration baseline and return to zero direction difference threshold of the joint trajectory position and motion direction corresponding to each stage. The stable position residual is extracted at the stable velocity and corresponding trajectory position, and the baseline correction residual is obtained by subtracting the non-contact calibration baseline. The cumulative excess of baseline correction residuals in continuous effective tasks that are in the same stage, at the same joint, and with the same sign and exceed the upper limit of baseline fluctuation. The cumulative excess at each joint stage is used to form a joint deviation vector, which is then mapped to an absorption-type end-effector spatial offset by the kinematics of the robotic arm corresponding to the target position. This offset is then compared with the safe extraction area determined by the feather root, the feather extension direction, and the boundary of the nearest bird's nest strand. When the error exceeds the limit, compare the sign of the baseline correction residuals for positive and negative return to zero and the absolute value of the difference between the cumulative excess amount in each stage to distinguish between zero drift, transmission backlash and contact disturbance absorption. After confirming zero-point drift, generate zero-point correction and verify contactless zeroing. If successful, write to the valid zero-point parameter area and recalculate the path of unexecuted tasks; otherwise, restore the original zero-point parameters and stop absorption.
[0007] Furthermore, the synchronization of the target position, encoder feedback position, and action status by timestamp includes: When the sampling periods are the same, they are paired according to the timestamp; when they are different, they are resampled to the common time interval using the shorter sampling period. When the continuous missing data does not exceed the continuity range determined by the normal sampling period and the allowable missing duration, linear interpolation of adjacent valid locations is used and the missing data is marked. The interpolated data is only used to maintain the continuity of the stage boundary and is not used to establish a contactless calibration baseline or update the stage cumulative excess. If data is missing, exceeds the limit, timestamps are in reverse order or duplicated, or adjacent time intervals exceed the continuity limit, the task will be marked as invalid.
[0008] Furthermore, the bird's nest image is normalized for brightness and suppressed for background to obtain candidate feather regions; Edge extraction and skeletonization of the candidate feather region are performed to obtain the feather centerline, and the end of the centerline closest to the main body of the bird's nest is determined as the candidate point of the feather root. Boundary bands with edge density exceeding the edge density threshold or texture continuity exceeding the texture length threshold are extracted around candidate points at the feather root. The nearest bird's nest strand boundary is determined, and the position coordinates of the feather root and the nearest bird's nest strand boundary, as well as the working coordinate vector of the feather extension direction, are output by the ratio of image coordinates to robotic arm working coordinates, rotation and translation relationship.
[0009] Furthermore, the synchronization of the target position, encoder feedback position, and action status by timestamp includes: The start and end times of a phase are determined by the timestamp of the action event; When the action event timestamp is missing, the start and end times of the stage are determined by extracting the action state changes, joint velocity changes, and end target pose changes calculated based on the target position. The approach and homing phases are marked as non-contact phases, and the extraction phase is marked as a contact-related phase. The start and end times of each phase, the target trajectory within the phase, the direction of joint movement, and the contact markers are recorded.
[0010] Furthermore, the contactless calibration baseline is obtained in the following manner: Within a safe working area that does not come into contact with the bird's nest, perform non-contact calibration movements according to the joint trajectories corresponding to the approach phase, the extraction phase, and the return-to-zero phase; When the joint speed is within the preset stable speed range and the position change is less than the stable position threshold within a continuous preset control cycle, multiple stable position residuals of the same joint, the same trajectory position interval and the same direction of movement are collected, the median is taken to obtain the baseline center, and the median of the absolute deviation between the multiple stable position residuals and the baseline center is taken to obtain the baseline fluctuation amount. The product of the baseline fluctuation amount and the preset multiple is used as the upper limit of the baseline fluctuation. Calculate the median of the absolute value of the cumulative excess difference and the median of the absolute deviation during multiple forward and reverse calibration movements. Multiply the former and the latter by a preset multiple and use the sum as the zero-return direction difference threshold.
[0011] Furthermore, the baseline-corrected residual and the stage cumulative excess are obtained in the following manner: The control cycle position residual is obtained by subtracting the encoder feedback position from the target position. Align the control cycle position residuals according to the corresponding trajectory position intervals, extract the stable position residuals at stable speeds and subtract the non-contact calibration baselines, and obtain the mission-level baseline correction residuals by the median. When the baseline correction residuals in a continuous effective mission have the same sign and exceed the upper limit of baseline fluctuation, the excess amount will be added to the current continuous segment stage cumulative excess amount according to the sign. When the sign is changed, the data is invalid, or the baseline correction residual returns to within the upper limit of the baseline fluctuation, the current continuous segment count and the stage cumulative excess are cleared, and only the historical cumulative record is retained.
[0012] Furthermore, the suction-type end spatial offset and safe extraction area are determined in the following manner: The cumulative excess at each joint stage is used to form a joint deviation vector. The spatial offset vector is obtained by inputting the kinematic mapping matrix corresponding to the target position. Take the absolute values of the projections of the spatial offset vector along the feather extension direction and the direction pointing to the nearest bird's nest strand boundary, and use them as the tangential offset and normal offset, respectively. The allowable normal offset is obtained by subtracting the image positioning error, the robotic arm repetitive positioning error, and the suction-type end effector following error from the distance from the feather root to the nearest bird's nest strand boundary. The allowable tangential offset is obtained by subtracting the tangential safety margin from the extractable length of the feather root along the feather extension direction. If any offset exceeds the corresponding allowed offset, the job will be output as an error.
[0013] Furthermore, the distinction between zero-point drift, transmission backlash, and absorption contact disturbance includes: If the baseline correction residuals of the same joint in the approach phase and the zeroing phase maintain the same sign in continuous effective tasks, and the absolute value of the difference between the cumulative excess of the positive and negative zeroing phases does not exceed the zeroing direction difference threshold, and the baseline correction residuals in the extraction phase do not exceed the upper limit of the baseline fluctuation, they are marked as zero-point drift candidates. When the signs of the baseline correction residuals for positive and negative return to zero are opposite and the absolute value of the difference between the cumulative excess of the stages exceeds the return to zero direction difference threshold, it is marked as a candidate for transmission clearance. When the baseline correction residual exceeds the upper limit of baseline fluctuation in the extraction phase but returns to within the upper limit of baseline fluctuation in the approach and return-to-zero phases, it is marked as an absorption contact disturbance, and its cumulative excess in the update phase is prohibited.
[0014] Further confirmation and refinement of the zero-drift candidates include: When the spatial offset of the suction end exceeds the safe extraction area, the forward zero-return sequence and the reverse zero-return sequence are executed respectively along the same non-contact calibration path; Zero drift is confirmed when the absolute value of the difference between the stable position residuals of the corresponding joints of the two sequences with the same sign and the cumulative excess of the stage does not exceed the zero return direction difference threshold, and the spatial offset direction of the absorption end of the two sequences is consistent with the offset direction of the safe extraction area. The zero-point correction amount for each joint is generated by the negative value of the average cumulative excess amount of the joints in the two sequences. After temporary storage, a contactless zero-return verification is performed. If the verification is successful, the zero-point parameter is written to the valid zero-point parameter area; otherwise, the original zero-point parameter is restored and the aspiration stops.
[0015] In a second aspect, the present invention proposes a self-testing system for the zero-return accuracy of a robotic arm based on the cumulative deviation between encoder position and command position, comprising: Image acquisition and processing module, position acquisition module, synchronous segmentation module, baseline establishment module, residual accumulation module, offset comparison module, error determination module and zero point verification module; The image acquisition and processing module acquires images of bird's nest and determines the feather roots, the direction of feather extension, and the boundary of the nearest bird's nest strand. The position acquisition module acquires the target position and the encoder feedback position; The synchronization segmentation module is used to synchronize the action status, target position, and encoder feedback position according to the timestamp and divide the process into approach, extraction, and zeroing stages. The baseline establishment module acquires the non-contact calibration baseline and the zero-return direction difference threshold. The residual accumulation module calculates the stable position residual and the baseline correction residual, and accumulates the stage accumulation excess in the same stage, the same joint, the same sign and the stage exceeding the upper limit of the baseline fluctuation in continuous effective tasks. The offset comparison module maps the stage cumulative excess amount to the kinematics of the robotic arm corresponding to the target position as an absorption-type end-effector spatial offset and compares it with the safe extraction area; The error determination module distinguishes between zero-point drift, transmission backlash, and absorbed contact disturbance; The zero-point verification module generates zero-point correction values, verifies contactless zeroing, retains or restores zero-point parameters, recalculates unexecuted task paths, or stops the absorption process.
[0016] The beneficial effects of this invention are: This invention synchronizes the target position, encoder feedback position, and action status according to timestamps, and establishes contactless calibration baselines for different stages, trajectory positions, and motion directions. This allows the position residuals during mission operation to be compared with the benchmark under the corresponding operating conditions, reducing the impact of differences in trajectory position and motion direction on the zero-return accuracy judgment.
[0017] This invention addresses the baseline correction residual accumulation excess that maintains the same sign and exceeds the upper limit of baseline fluctuation in continuous effective tasks, and obtains an absorbable end-effector spatial offset through robotic arm kinematic mapping, so that the joint side position deviation can be converted into an end-effector spatial offset corresponding to the current robotic arm posture.
[0018] This invention determines the safe extraction area based on the feather root, the feather extension direction, and the boundary of the nearest bird's nest strand. It decomposes the end spatial offset into tangential offset and normal offset, thereby determining whether the positional deviation affects the extraction operation based on the actual spatial relationship between the current feather and the bird's nest strand.
[0019] This invention distinguishes between zero drift, transmission backlash, and absorption contact disturbance by comparing the absolute value of the difference between the signs of the baseline correction residuals for positive and negative zero return and the cumulative excess amount in each stage, thus avoiding the direct use of absorption contact disturbance for zero parameter correction.
[0020] This invention performs contactless zero-return verification after generating the zero-point correction amount. If the verification is successful, the value is written to the valid zero-point parameter area and the unexecuted task path is recalculated. If the verification fails, the original zero-point parameters are restored and the absorption is stopped. This allows the zero-point correction to have a verification and rollback process, reducing the impact of unverified correction parameters on subsequent picking operations. Attached Figure Description
[0021] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a flowchart illustrating the self-testing method for the zero-return accuracy of a robotic arm based on the cumulative deviation between encoder position and command position, as per the present invention. Figure 2 This is a flowchart illustrating the process of determining the feather root, the feather extension direction, and the boundary of the nearest bird's nest strand in this invention. Figure 3 This is a schematic diagram of the process for obtaining baseline corrected residuals and stage cumulative excess in this invention; Figure 4 This is a schematic diagram of the process of determining the spatial offset of the suction end and comparing it with the safe extraction area in this invention; Figure 5 This is a schematic diagram of the architecture of the robotic arm zero-return accuracy self-testing system based on the cumulative deviation between encoder position and command position of the present invention. Detailed Implementation
[0022] The present application 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 for illustrative purposes only and are not intended to limit the invention. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0023] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0024] This application applies to a bird's nest feather-picking device comprising a vision acquisition unit, a robotic arm controller, a joint encoder, and a suction-type end effector. The vision acquisition unit acquires images of the bird's nest to be picked; the robotic arm controller outputs the target position, motion status, and timestamps of each joint; the joint encoder provides feedback on the actual position of each joint; and the suction-type end effector approaches the feather root, initiates suction, removes the feather along the extraction direction, and releases the feather. This application does not limit the specific mechanical structure of the suction-type end effector, nor does it require the addition of a dedicated external zero-point calibration fixture.
[0025] A data communication connection is established between the robotic arm controller, the vision acquisition unit, and the data processing unit. The data processing unit can be located within the robotic arm controller or within an industrial computer that communicates with the robotic arm controller. The data processing unit associates the bird's nest image, target position sequence, encoder feedback position sequence, motion state sequence, timestamp, and subsequent calculation results with the task number, so that the image data, motion data, and judgment results of the same feather picking task can correspond to each other.
[0026] In this embodiment, the stable position residual refers to the difference between the target position and the encoder feedback position when the joint speed is within a preset stable speed range and the position change within a continuous preset control cycle is less than the stable position threshold. The non-contact calibration baseline refers to the stable position residual benchmark established according to the joint, motion stage, trajectory position interval, and motion direction when the robotic arm performs calibration movements within a safe working area without contacting the target position. The baseline correction residual is the residual obtained by subtracting the non-contact calibration baseline for the same joint, same stage, same trajectory position interval, and same motion direction from the stable position residual in the task. The stage cumulative excess refers to the amount obtained by accumulating the excess portion with a signed sign when the baseline correction residual maintains the same sign and exceeds the upper limit of baseline fluctuation in continuous effective tasks.
[0027] In this embodiment, "positive return to zero" and "reverse return to zero" respectively refer to the joint approaching the same return to zero position from both sides of the return to zero position along opposite directions of movement. The safe extraction area refers to the permissible spatial offset range along the feather extension direction and in the direction pointing to the nearest bird's nest strand boundary when the suction end moves around the feather root.
[0028] The various data flow according to the following relationships: the bird's nest image is used to determine the feather root, the feather extension direction, and the boundary of the nearest bird's nest strand; the target position, encoder feedback position, motion status, and timestamp are used to form the staged joint trajectory; non-contact calibration data is used to form the baseline center, the upper limit of baseline fluctuation, and the zero-return direction difference threshold; the task operation data is used to form the baseline correction residual and the stage cumulative excess; the stage cumulative excess is used to form the suction-type end-effector spatial offset through the kinematic mapping of the robotic arm; the comparison result of the spatial offset and the safe extraction area is used to trigger error source determination, zero-point correction, path recalculation, or stop suction.
[0029] The first embodiment of this invention proposes a self-testing method for the zero-return accuracy of a robotic arm based on the cumulative deviation between encoder position and command position, comprising the following steps: S10: Acquire images of bird's nest, target positions of each joint output by the robotic arm controller, encoder feedback positions of each joint, action status, and timestamps; S20: Synchronize the target position, encoder feedback position and action status according to the timestamp, divide the task into approach, extraction and return to zero stages, and obtain the non-contact calibration baseline and return to zero direction difference threshold of the joint trajectory position and motion direction corresponding to each stage. S30: Extract the stable position residual under stable velocity and corresponding trajectory position, subtract the non-contact calibration baseline to obtain the baseline correction residual; accumulate the excess amount of the baseline correction residual for the same stage, the same joint, the same sign and exceeding the upper limit of baseline fluctuation in continuous effective tasks. S40: The cumulative excess of each joint stage is used to form a joint deviation vector, which is then mapped to the end-effector spatial offset by the kinematics of the robotic arm corresponding to the target position. This offset is then compared with the safe extraction area determined by the feather root, the feather extension direction, and the boundary of the nearest bird's nest strand. S50: When exceeding the limit, compare the sign of the baseline correction residual for positive and negative return to zero and the absolute value of the difference between the cumulative excess amount in each stage, and distinguish between zero drift, transmission backlash and absorption of contact disturbance. To more clearly explain the self-testing method for robotic arm zero-return accuracy based on the cumulative deviation between encoder position and command position of the present invention, the following will be combined with... Figure 1 The steps in the embodiments of the present invention are described in detail below.
[0030] S10: Acquire images of bird's nest, target positions of each joint output by the robotic arm controller, encoder feedback positions of each joint, action status, and timestamps; like Figure 2 As shown, in this embodiment, step S10 includes: Step S11: Normalize the brightness and suppress the background of the bird's nest image to obtain the feather candidate region; Step S12: Extract the edges and skeletonize the candidate feather region to obtain the feather center line, and determine the end of the center line closest to the main body of the bird's nest as the candidate point of the feather root; extract the boundary bands around the candidate point of the feather root where the edge density exceeds the edge density threshold or the texture continuity length exceeds the texture length threshold, and determine the boundary of the nearest bird's nest strand. Step S13: Based on the ratio of image coordinates to robotic arm working coordinates, rotation and translation relationship, output the position coordinates of the feather root and the nearest bird's nest strand boundary, as well as the working coordinate vector of the feather extension direction.
[0031] Before each bird's nest feather sorting task begins, the vision acquisition unit acquires an image of the bird's nest before extraction and assigns a task number and a candidate region number to the candidate feather regions in the image. The task record includes at least the image acquisition time, the feather candidate region number, the image coordinates of the feather root, the feather's extension direction, the nearest bird's nest strand boundary, and the robot arm target pose for the current task. If a verification image is acquired after extraction, the extracted image is associated with the same task number to confirm whether the feather has been removed, but the extracted image does not replace the pre-extraction image in establishing a safe extraction area.
[0032] In step S11, the image grayscale or luminance components are normalized to limit exposure variations at different acquisition times to a uniform brightness range. Then, background unrelated to the bird's nest and feathers is suppressed using the workstation background image, the color range of the bearing surface, or a mask of the main bird's nest area. The connected regions after normalization and background suppression are filtered according to length, width, and elongation, retaining regions with feather-like extension structures as candidate feather regions. When multiple candidate regions are in contact, the centerline branches and endpoints of each candidate region are retained, preventing the entire adhered area from being directly treated as a single feather.
[0033] In step S12, edges are extracted from the feather candidate region and skeletalized, with the main continuous paths in the skeleton serving as the feather centerline. The distances between the two ends of the centerline and the main body of the bird's nest are compared; the end closer to the main body is designated as the feather root candidate point, and the other end points in the feather's extension direction. A local analysis region is established around the feather root candidate point, and the edge density and continuous texture length generated by the bird's nest strands are statistically analyzed within this region. Band-shaped regions with edge density reaching an edge density threshold or continuous texture length reaching a texture length threshold are retained as strand boundary candidates. The shortest distance from each strand boundary candidate to the feather root candidate point is calculated, and the boundary with the smallest distance is determined as the nearest bird's nest strand boundary.
[0034] In one example, the image calibration resolution can be 0.05 mm / px, and the local analysis region can be a region with a side length of 6 mm centered on the candidate point at the feather root. The edge density threshold can be obtained by adding 3 times the median absolute deviation of the density distribution of the silk edges in the featherless bird's nest image; the texture length threshold can be 1 / 3 of the side length of the local analysis region. The values are only used to illustrate one executable configuration and do not constitute a fixed limitation.
[0035] In step S13, when the equipment is put into operation, the transformation relationship from image coordinates to the working coordinates of the robotic arm is established using a calibration board or a known reference within the workstation. During the transformation, the pixel distance is first converted to the actual length according to the calibration ratio, then the direction is changed according to the rotation relationship between the camera coordinate system and the working coordinate system, and finally, a translation is added to obtain the working coordinates. The feather root and the boundary of the nearest bird's nest strand are formed into working coordinates according to the same transformation relationship; the feather extension direction only undergoes scaling and rotation processing, without adding a translation, and is normalized to a unit direction vector after processing. Calibration is re-performed when the camera, support station, or installation relationship changes; images that have not been calibrated must not be used to establish a safe extraction area.
[0036] During the robotic arm's task execution, the controller outputs the target position and motion status of each joint according to the control cycle, and the joint encoder outputs the feedback position. Each record simultaneously writes the joint number, task number, sampling timestamp, target position, feedback position, change in adjacent sampling positions, and the motion direction provided by the controller. The motion status includes at least approach, suction start, suction hold, extraction, release, and homing. When the suction-type end effector does not have a pressure sensor, the motion status is represented by the suction start, suction hold, and release commands issued by the control program; when a pressure sensor is present, the pressure status can be used as an auxiliary recording field, but is not a necessary input for implementing this method.
[0037] If the feather root cannot be determined, the feather candidate region cannot be separated from the silk boundary, the nearest silk boundary does not exist, or the image coordinate transformation relationship fails, the current task is marked as invalid image localization. A safe extraction region is not established, and the accumulated excess during the current task update phase is not used. The original image, candidate region, reason for failure, and task number are written to the exception log for subsequent review.
[0038] S20: Synchronize the target position, encoder feedback position and action status according to the timestamp, divide the task into approach, extraction and return to zero stages, and obtain the non-contact calibration baseline and return to zero direction difference threshold of the joint trajectory position and motion direction corresponding to each stage. In this embodiment, step S20 includes: Step S21: When the sampling periods are the same, they are paired according to the timestamp; when they are different, they are resampled to the common time interval with the shorter sampling period. Step S22: When the continuous missing data does not exceed the continuity range determined by the normal sampling period and the allowable missing duration, linear interpolation is used at adjacent valid locations and the missing data is marked. The interpolated data is only used to maintain the continuity of the stage boundary and is not used to establish a contactless calibration baseline or update the stage cumulative excess. Step S23: If the data is missing or exceeds the limit, the timestamp is in reverse order or duplicated, or the adjacent time interval exceeds the continuity limit, the task will be marked as invalid data. Step S24: Determine the start and end times of the phase using the action event timestamp; Step S25: When the action event timestamp is missing, the start and end times of the stage are determined by extracting the action state change, joint velocity change, and end target pose change calculated based on the target position. Step S26: Mark the approach phase and the return-to-zero phase as non-contact phases, mark the suction and extraction phase as contact-related phases, and record the phase start and end times, target trajectory within the phase, joint movement direction, and contact markers. Step S27: Within a safe working area that does not come into contact with the bird's nest, perform a non-contact calibration movement according to the joint trajectory corresponding to the approach phase, the extraction phase, and the return-to-zero phase. Step S28: When the joint speed is within the preset stable speed range and the position change is less than the stable position threshold within the consecutive preset control cycle, collect multiple stable position residuals of the same joint, the same trajectory position interval and the same motion direction, take the median to obtain the baseline center, and take the median of the absolute deviation between the multiple stable position residuals and the baseline center to obtain the baseline fluctuation amount. The product of the baseline fluctuation amount and the preset multiple ... Step S29: Calculate the median of the absolute value of the cumulative difference of the phases of multiple forward and reverse calibration movements and the median of the absolute deviation. Multiply the former and the latter by a preset multiple and use the sum as the zero-return direction difference threshold.
[0039] Step S21 performs time alignment on the target position sequence, encoder feedback position sequence, and action state sequence. When the sampling periods of the three types of data are the same and the timestamps can be matched one-to-one, the control cycle record is directly formed using the same timestamp. When the sampling periods are different, the shorter sampling period among the three types of data is used as the common time interval to map the slower sequence to the common time axis. The position sequence uses linear interpolation of adjacent valid positions to form temporary values for stage boundary judgment; the action state is mapped using the state preservation method of the most recently occurred action event to prevent the generation of non-existent intermediate action states between the start of absorption and release.
[0040] In one example, the control cycle is 4ms, and the allowed consecutive missing duration is 12ms. Therefore, interpolation can be performed when consecutive missing duration does not exceed 3 control cycles. A missing marker is set for each interpolation point. The missing marker is included in subsequent stage divisions along with the record, but position data with missing markers does not participate in baseline establishment, stable position residual statistics, or stage cumulative excess update. If consecutive missing duration reaches 4 control cycles, or the interval between adjacent valid timestamps exceeds 16ms, the current task is marked as invalid data. When timestamps are repeated, only one record uniquely corresponding to both the controller and encoder is retained. If the order of other repeated records cannot be uniquely determined, the entire task is treated as invalid data. When timestamps are in reverse order, the records are not reordered and continued to be used to avoid changing the true timing of actions and positions.
[0041] Step S24 prioritizes reading the action event timestamps written by the control program. The approach phase begins when the robotic arm leaves the safe position of the previous task and ends when the suction end reaches the predetermined approach position near the root of the feather; the suction extraction phase begins when the suction is initiated and ends when the suction end completes extraction and leaves the local area of the bird's nest; the return-to-zero phase begins when the robotic arm enters the return-to-zero path after release and ends when the robotic arm reaches a stable position on the return-to-zero path. The suction preparation and release processes can be saved as transition zones at the end of the approach phase and the beginning of the return-to-zero phase, respectively, but the acceleration, deceleration, and direction switching data in the transition zones are not used as stable position residuals.
[0042] When the action event timestamp is missing, step S25 simultaneously checks the absorption command status, joint velocity changes, and end-effector target pose changes. The absorption phase begins when the absorption command changes from off to on, the end-effector target pose changes from the approach point to the extraction direction, and at least one joint velocity leaves the stationary range. The absorption phase ends when the absorption holding ends, the end-effector target pose leaves the local area of the swallow's nest and turns to the release position. The zeroing phase begins when the release state ends and the target pose begins to move along the zeroing path. If the three criteria cannot form a consistent boundary, a single criterion is not used for forced division, and the current task is treated as an invalid phase boundary.
[0043] Step S27 reproduces the trajectories corresponding to the approach, extraction, and return-to-zero phases within the safe working area, but disables actual suction contact with the bird's nest. Each calibration trajectory is executed with both forward and reverse motions to cover differences in transmission direction. Non-contact calibration is re-performed upon initial equipment operation, replacement of the suction end effector, robotic arm maintenance, adjustment of camera or workstation relationships, abnormal continuous task data, or changes in zero-point parameters. Calibration records are grouped and saved according to joint number, phase, trajectory position range, and direction of motion to avoid mixing residuals from different postures or directions of motion into a single fixed baseline.
[0044] In step S28, the stable speed range can be set according to the controller's rated speed and calibration trajectory. In one example, the stable motion segment is defined as the target speed fluctuation not exceeding 5% of the target stable speed, and the stable stopping segment is defined as the absolute value of the joint speed not exceeding 0.5% of the rated speed; when the position increment difference for five consecutive control cycles is less than 0.005°, the position change is considered to meet the stability condition. Each group can perform 30 calibration movements. The median of the 30 stable position residuals is used to obtain the baseline center, and the median of the absolute difference between each stable position residual and the baseline center is used to obtain the baseline fluctuation. The upper limit of the baseline fluctuation is preferably three times the baseline fluctuation. If a group has fewer than 20 effective calibrations, no corresponding baseline is established, and the group's accumulated excess during the task data update phase is prohibited.
[0045] Step S29 groups the forward and reverse calibration results for the same joint, the same stage, and the same trajectory position interval. First, the absolute value of the cumulative excess difference between the forward and reverse stages in each group is calculated. Then, the median of the differences and the median of the absolute deviation are taken from multiple groups. The preferred zero-return direction difference threshold is the median of the difference plus three times the median of the absolute deviation. In one example, if the median of the difference is 0.01° and the median of the absolute deviation is 0.01°, then the zero-return direction difference threshold is 0.04°. The baseline center, baseline fluctuation, upper limit of baseline fluctuation, and zero-return direction difference threshold are all written into a baseline record containing the device number, parameter version, and establishment time.
[0046] S30: Extract the stable position residual under stable velocity and corresponding trajectory position, subtract the non-contact calibration baseline to obtain the baseline correction residual; accumulate the excess amount of the baseline correction residual for the same stage, the same joint, the same sign and exceeding the upper limit of baseline fluctuation in continuous effective tasks. like Figure 3 As shown, in this embodiment, step S30 includes: Step S31: Subtract the encoder feedback position from the target position to obtain the control cycle position residual; Step S32: Align the control cycle position residuals according to the corresponding trajectory position intervals, extract the stable position residuals at a stable speed and subtract the non-contact calibration baseline, and obtain the mission-level baseline correction residuals by the median. Step S33: When the baseline correction residuals in a continuous effective task have the same sign and exceed the upper limit of baseline fluctuation, the excess amount is added to the current continuous segment stage cumulative excess amount according to the sign. In step S34, when the sign is changed, the data is invalid, or the baseline correction residual returns to within the upper limit of the baseline fluctuation, the current continuous segment count and the stage cumulative excess are cleared, and only the historical cumulative record is retained.
[0047] Step S31: Calculate the difference between the target position and the encoder feedback position for each joint according to the control cycle. ; in, Indicates the joint number; Indicates the control cycle number within the current task; Indicates the first The joint in the first The target position for each control cycle; Indicates the first The encoder feedback position of each joint in the same control cycle; This represents the position residual of the control cycle. The target position and encoder feedback position use the same angular unit. Control cycles with misaligned timestamps or missing markers are not included in the residual statistics.
[0048] Step S32 divides the mission trajectory into continuous trajectory position intervals according to the target position. For each mission, data satisfying the stable speed condition is selected within the same trajectory position interval, excluding data from acceleration, deceleration, direction changes, and the moment of startup. The baseline centers of the same joint, the same stage, the same trajectory position interval, and the same direction of movement are subtracted point-by-point from the retained position residuals. The median of the subtraction results is then taken to form the mission-level baseline correction residual. If there is no usable baseline or fewer than 5 stable sampling points in a trajectory position interval, it is not replaced by a baseline from a neighboring direction or another stage; the mission-level baseline correction residual for the current joint in the current stage is marked as unusable.
[0049] Step S33 maintains a continuous cumulative record for each "joint-stage-direction of motion" combination. Let the first... Each joint in the stage go through The cumulative excess amount after each valid task is: ; in, This indicates the approach phase, the extraction phase, or the zeroing phase. Indicates the valid task sequence number arranged by task number; This indicates the total number of valid tasks contained in the current contiguous segment; Indicates the first The joint in the first Task-level baseline correction residuals for each task; Indicates the direction of movement; The upper bound of baseline fluctuations for the same joint, phase, and direction of motion; The sign of the baseline-corrected residual is 1 for positive residuals and -1 for negative residuals. This indicates the cumulative excess of the current continuous segment. The accumulation only includes the portion exceeding the upper limit of the baseline fluctuation; it does not involve a simple summation of all control cycle residuals.
[0050] Step S33 further includes: Step S331: Read the task-level baseline correction residuals for the same joint, the same stage, and the same direction of motion in the order of task number, and establish a cumulative record containing continuous symbols, consecutive counts, and the cumulative excess of the current continuous segment; Step S332: When the current residual is consistent with the continuous sign and exceeds the upper limit of the baseline fluctuation, update the continuous number and the cumulative excess of the current continuous segment; Step S333: When the symbols are inconsistent, the data is invalid, or the residual does not exceed the upper limit of the baseline fluctuation, the number of consecutive times and the cumulative excess of the current consecutive segment are cleared, and only the historical cumulative records are saved.
[0051] When a residual first exceeds the upper bound of the baseline fluctuation, the continuity sign is initialized with that residual sign, the continuity count is set to 1, and the excess portion is written into the current continuity segment's accumulated excess. For subsequent tasks, if the residual maintains the same sign and continues to exceed the upper bound, the continuity count is incremented, and the excess portion is added to the accumulated amount with the same sign. The continuity count can be used to exclude single, occasional fluctuations. In one example, a continuity count of 3 can be used as a condition for forming a valid continuity segment; records with fewer than 3 continuity counts are still saved, but end-spatial offset comparisons are not triggered.
[0052] When the sign of the baseline correction residual changes, the residual returns to within the upper limit of the baseline fluctuation, the task data becomes invalid, the stage boundary becomes invalid, or the image positioning becomes invalid, step S34 terminates the current continuous segment. The system writes the task number range, residual sequence, continuous sign, number of consecutive steps, and stage cumulative excess to the historical cumulative record before termination, and then clears the current continuous segment count and stage cumulative excess. The historical cumulative record is no longer included in the calculation of the current continuous segment, and therefore will not continue to accumulate old deviations after multiple normal tasks.
[0053] If only the residuals from the extraction phase exceed the upper limit of the baseline fluctuation, while both the approach and return-to-zero phases are within the upper limit of the baseline fluctuation, the residuals from the extraction phase are stored in the contact disturbance record. However, updating the phase cumulative excess used for zero-point drift determination is prohibited. When multiple joints are abnormal simultaneously, each joint generates a phase cumulative excess, which is then treated as the same joint deviation vector in step S40 to avoid performing zero-point correction separately when joint deviations may cancel each other out.
[0054] In this embodiment, neighboring interval weighted matching can also be performed based on continuous values of trajectory positions. However, the baselines participating in the matching must belong to the same stage and the same direction of movement, and the difference in target positions between neighboring intervals must not exceed the width of the current trajectory position interval. If no qualified neighboring interval exists, the data is still marked as unavailable, and cross-stage baseline replacement is not performed.
[0055] S40: The cumulative excess of each joint stage is used to form a joint deviation vector, which is then mapped to the end-effector spatial offset by the kinematics of the robotic arm corresponding to the target position. This offset is then compared with the safe extraction area determined by the feather root, the feather extension direction, and the boundary of the nearest bird's nest strand. like Figure 4 As shown, in this embodiment, step S40 includes: Step S41: The cumulative excess of each joint stage is used to form a joint deviation vector, and the kinematic mapping matrix corresponding to the target position is input to obtain the spatial offset vector. Step S42: Take the absolute values of the projections of the spatial offset vector along the feather extension direction and the direction pointing to the nearest bird's nest strand boundary, and use them as the tangential offset and normal offset, respectively. Step S43: Subtract the image positioning error, the robotic arm repetitive positioning error, and the suction-type end effector following error from the distance from the feather root to the nearest bird's nest strand boundary to obtain the normal allowable offset; subtract the tangential safety margin from the extractable length of the feather root along the feather extension direction to obtain the tangential allowable offset. Step S44: If any offset exceeds the corresponding allowed offset, output a job error.
[0056] Step S41 arranges the cumulative excess of the same stage into a joint deviation vector according to the joint numbering order of the robotic arm. For those with A robotic arm with 1 joint, the joint deviation vector includes Each joint component is present; if any necessary joint component is missing, it is not replaced with 0, but the current spatial offset calculation is marked as unavailable. The robotic arm controller calculates the kinematic mapping matrix from the joint position changes to the absorbable end-effector working coordinate changes based on the target positions of each joint in the current task, and executes: ; in, Indicates the first The target position vector is composed of the target positions of each joint in each task; This represents the kinematic mapping matrix that maps joint position changes to absorbable end-effector spatial displacement changes at the target position. Representation phase The joint deviation vector is composed of the cumulative excess of each joint stage. This represents the absorbent end-space offset vector in the working coordinate system. The target position vector contains... When there are 1 joint component, the number of columns in the mapping matrix is 1. The output should include at least the three-dimensional position offset components in the working coordinate system.
[0057] The kinematic mapping matrix is calculated at the current target position from the existing positive kinematic relationship of the robotic arm controller, without requiring additional external measuring equipment. When the current target position is close to a kinematic singularity, the mapping matrix value is abnormal, or the output offset exceeds the robotic arm's workspace, automatic correction stops, the task is marked as having invalid kinematic mapping, and the target position, mapping matrix, and abnormal state are saved.
[0058] Step S42 establishes a tangential unit vector pointing from the feather root to the feather extension, and a normal unit vector pointing from the feather root to the nearest bird's nest strand boundary. When the tangential and normal directions are not perpendicular in the image plane, orthogonalization can be performed on the normal direction, so that the two directions represent independent offset components along the feather extraction direction and near the strand boundary, respectively. The offset and allowable values are formed according to the following formula: ; in, Indicates the tangential offset; Indicates the normal offset; A unit vector representing the direction in which the feather extends; This represents a unit vector pointing towards the nearest boundary of the bird's nest strand; This indicates the distance from the base of the feather to the nearest edge of the bird's nest strand; Indicates image positioning error; This indicates the repeatability error of the robotic arm. This indicates the error in the end-effector tracking mechanism. Indicates the allowable offset of the normal direction; This indicates the extractable length of the feather root along the direction of feather extension; Indicates the tangential safety margin; This indicates the permissible tangential offset. All length quantities are converted to the same length unit in the robot arm's working coordinate system before being used in the calculation.
[0059] Image positioning error is determined by calibration residuals and feather root repeatability difference; robotic arm repeatability error is obtained from equipment specifications or non-contact repeatability records; suction-type end effector following error is determined by the end effector repeatability difference of the non-contact suction action. If any error term has no valid record, it is not set to 0, but rather the automatic safe area comparison for the current task is stopped. When the allowable normal offset is less than or equal to 0, it indicates that the existing error margin has filled the distance from the feather root to the silk boundary, and the current feather task is directly marked as unsafe for automatic extraction.
[0060] In one example, the distance from the feather root to the nearest bird's nest strand boundary is 1.20mm, the image positioning error is 0.15mm, the robotic arm repeatability error is 0.10mm, the suction-type end effector tracking error is 0.10mm, and the allowable normal offset is 0.85mm. If the calculated normal offset is 0.62mm, and the tangential offset does not exceed the allowable tangential offset, the operation record is retained and the task continues; if the normal offset is 0.91mm, an operation anomaly is output. An anomaly is triggered if either the tangential or normal offset exceeds the allowable amount, and the excess is not offset by the remaining margin in the other direction.
[0061] In this embodiment, when there is significant height movement at the end of the suction device, an allowable height offset perpendicular to the bird's nest bearing surface can be added. However, the height direction must not replace the comparison of the tangential and normal directions. When the deviations of multiple joints cancel each other out after kinematic mapping and the end space offset is still within the safe extraction area, zero-point correction is not performed on individual joints. Only the joint deviations and the offset end space offset records are saved.
[0062] S50: When exceeding the limit, compare the sign of the baseline correction residual for positive and negative return to zero and the absolute value of the difference between the cumulative excess amount in each stage, and distinguish between zero drift, transmission backlash and absorption of contact disturbance. In this embodiment, step S50 includes: Step S51: The baseline correction residuals of the same joint in the approach phase and the zeroing phase maintain the same sign in continuous effective tasks. The absolute value of the difference between the cumulative excess of the positive and negative zeroing phases does not exceed the zeroing direction difference threshold. When the baseline correction residuals of the extraction phase do not exceed the upper limit of the baseline fluctuation, they are marked as zero-point drift candidates. Step S52: When the signs of the baseline correction residuals for the positive and negative return to zero are opposite and the absolute value of the difference between the cumulative excess of the stages exceeds the return to zero direction difference threshold, it is marked as a candidate for transmission clearance. Step S53: Only when the baseline correction residual in the extraction phase exceeds the upper limit of the baseline fluctuation and the baseline correction residual in the approach phase and the zeroing phase returns to within the upper limit of the baseline fluctuation, is it marked as an absorption contact disturbance, and its cumulative excess in the update phase is prohibited.
[0063] Step S51 reads the task-level baseline correction residuals and the cumulative excess of the current continuous segment stage for each joint during the approach, extraction, and return-to-zero phases. Both the approach and return-to-zero phases are non-contact phases; the consecutive occurrence of the same sign deviation in both phases indicates that the deviation can maintain directional consistency across different non-contact trajectories. Subsequently, the cumulative excess of the positive and negative return-to-zero phases is read, the absolute values of the two are differed, and compared with the return-to-zero direction difference threshold established in step S29. If the difference does not exceed this threshold, and the extraction phase does not individually exceed the upper bound of baseline fluctuation, the current joint is marked as a zero-point drift candidate.
[0064] Zero-point drift candidates only indicate that they meet the conditions for further verification; the zero-point parameters are not modified immediately. If the residuals in the approach and return-to-zero stages have the same sign, but the difference between the positive and negative return-to-zero directions exceeds the return-to-zero direction difference threshold, or if there are independent contact anomalies in the extraction stage, automatic classification is paused, the record is saved as a composite anomaly, and automatic correction is stopped.
[0065] Step S52 is used to identify situations where the position deviation direction changes along with the direction of motion. If the baseline correction residual for positive zeroing is positive, the baseline correction residual for reverse zeroing is negative, or both are opposite, and the absolute value of the difference between the cumulative excesses in the two directions exceeds the zeroing direction difference threshold, it is marked as a transmission backlash candidate. Transmission backlash candidates do not generate zero-point correction amounts because directly modifying the zero-point parameters based on the deviation in one direction may amplify the error in the other direction. The system stops new absorption actions and outputs the joint number, positive and reverse residuals, direction difference, threshold, and suggested maintenance status.
[0066] Step S53 is used to isolate disturbances caused by the suction contact. The suction extraction phase includes the process of suction-type end contact with the feather, local deformation of the bird's nest strands, and the feather detaching from the strands. The phase residual may be affected by the contact force. If only the suction extraction phase exceeds the upper limit of the baseline fluctuation, while the approach and return-to-zero phases both return to within the upper limit of the baseline fluctuation, the task is marked as a suction contact disturbance. This residual is written to the contact disturbance record, but not to the zero-point drift accumulation record. If the images before and after suction show that the feather is still present, the current area image is reacquired and the suction path of the current feather is regenerated without modifying the zero-point parameters.
[0067] In one example, if the baseline correction residuals for the approach and return-to-zero phases of a joint remain positive for six consecutive times, with a cumulative excess of 0.19° in the forward return-to-zero phase and 0.17° in the reverse return-to-zero phase, and an absolute difference of 0.02°, and a return-to-zero direction difference threshold of 0.04°, and the residuals in the extraction phase are within the upper limit of baseline fluctuation, then it is marked as a candidate for zero-point drift. If the forward return-to-zero is 0.18° and the reverse return-to-zero is -0.11°, and the absolute difference between the two is 0.29° and exceeds the return-to-zero direction difference threshold of 0.04°, then it is marked as a candidate for transmission backlash. If the residuals in the approach phase are 0.03° and the residuals in the return-to-zero phase are 0.02°, neither exceeding the upper limit of baseline fluctuation of 0.04°, while the residuals in the extraction phase are 0.16°, then it is marked as an absorbed contact disturbance.
[0068] Each classification is recorded in an error determination log. The log includes the task number, joint number, stage, direction of motion, task-level baseline correction residual, number of consecutive classifications, cumulative stage exceedance, upper bound of baseline fluctuation, zero-return direction difference threshold, end-effector spatial offset, safe extraction region, and classification result. This log can be stored as a structured log in the controller's runtime storage area and read by task number via a debug interface to verify whether the internal algorithm obtains the same classification result under the same input.
[0069] S60: After confirming zero-point drift, generate zero-point correction and verify contactless zeroing. If successful, write to the valid zero-point parameter area and recalculate the unexecuted task path; otherwise, restore the original zero-point parameters and stop absorption.
[0070] In this embodiment, step S60 includes: Step S61: When the spatial offset of the suction end exceeds the safe extraction area, execute the forward zeroing sequence and the reverse zeroing sequence along the same non-contact calibration path respectively; when the absolute value of the difference between the stable position residuals of the corresponding joints of the two sequences having the same sign and the cumulative excess of the stage does not exceed the zeroing direction difference threshold, and the spatial offset direction of the suction end of the two sequences is consistent with the offset direction exceeding the safe extraction area, confirm the zero point drift. Step S62: Generate the zero-point correction amount for each joint using the negative value of the average cumulative excess amount of the corresponding joints in the two sequences. Step S63: After temporarily storing the zero-point correction values for each joint, perform a contactless zero-point verification. If the verification passes, write the value into the valid zero-point parameter area; otherwise, restore the original zero-point parameters and stop the aspiration process.
[0071] Step S61 is executed only when the spatial offset of the suction-type end point corresponding to the zero-point drift candidate has exceeded the permissible tangential or normal offset. The robotic arm exits the local area of the bird's nest and executes the forward zero-return sequence and the reverse zero-return sequence respectively in the safe working area along the same path points, speed range, stability judgment conditions, and sampling period as when the baseline was established. The trajectory position intervals of the two sequences must correspond one-to-one, and the zero-return results of different paths cannot be compared.
[0072] After completing the two sequences, calculate the stable position residuals of each joint, the mission-level baseline correction residuals, the stage cumulative excess, and the absorbent end-effector spatial offset. Zero-point drift is confirmed when the corresponding joint residuals maintain the same sign, the absolute value of the difference in stage cumulative excess does not exceed the zero-return direction difference threshold, and the absorbent end-effector spatial offset directions obtained from the mapping of the two sequences are consistent with the offset direction at the time of the anomaly trigger. Automatic zero-point correction is canceled if any sequence data is missing, the velocity does not enter the stable range, the residual signs are inconsistent, the direction difference exceeds the limit, or the end-effector offset direction is inconsistent. The output will show abnormal data, transmission backlash, or inconsistent verification status.
[0073] Step S62 generates the zero-point correction amount for each joint based on the stage cumulative excess of the forward and reverse zero-return sequences: ; in, Indicates the first The cumulative excess of each joint's positive return-to-zero sequence in the phase; Indicates the first The cumulative excess of each joint's reverse zero-return sequence; subscript Indicates the return-to-zero phase; Indicates the first The zero-point correction amount for each joint. The negative sign indicates that the zero-point correction direction is opposite to the direction of the detected continuous deviation. For joints where no zero-point drift is confirmed, the zero-point correction amount remains at 0 and is not automatically modified due to anomalies in other joints.
[0074] Step S63 further includes: Step S631: Write the original zero-point parameters, the temporarily stored zero-point corrections for each joint, the residual of the non-contact zero-return stable position, and the spatial offset of the absorption end point into the verification record according to the same verification task number. Step S632: First, determine whether the corrected contactless zero-return stable position residual is within the upper limit of the baseline fluctuation, and then determine whether the tangential offset and normal offset of the absorption end are within the corresponding allowable offset. Step S633: If both judgments are satisfied, the temporarily stored zero-point correction values of each joint are written into the valid zero-point parameter area. If either judgment is not satisfied, the original zero-point parameters are restored and the temporarily stored zero-point correction values of each joint are prohibited from participating in subsequent absorbing.
[0075] After generating the zero-point correction, the currently valid zero-point parameters are first copied to form a rollback version of the original parameters. Then, the zero-point correction and the original zero-point parameters are combined to form temporary parameters. The temporary parameters are only written to the runtime verification area and do not immediately overwrite the valid zero-point parameter area. The robotic arm performs non-contact zeroing in a safe area without touching the bird's nest, collecting the same trajectory position and direction of motion data as when the baseline was established.
[0076] During verification, the residuals of the stable positions of each joint are checked first. Only after all joints involved in the correction have returned to within the upper bound of the corresponding baseline fluctuation are the suction-type end-effector spatial offsets recalculated using the corrected joint deviation vectors. Verification passes when both the tangential and normal offsets are within their respective allowable offsets. After successful verification, the temporary parameters are transferred to the valid zero-point parameter area, and the approach path, suction extraction path, and zero-return path for all unexecuted feather tasks are recalculated using the new parameters. Tasks that have already been completed are not recalculated.
[0077] The verification fails if the residual of any joint's stable position still exceeds the upper limit of the baseline fluctuation, or if either the tangential offset or the normal offset exceeds the allowable amount. The controller restores the original zero-point parameters from the original parameter rollback version, clears the valid markers of temporary parameters in the running verification area, stops performing the sucking action on new feathers, and saves the reason for the verification failure. The temporary correction amount is only retained as an anomaly record and does not participate in subsequent target position generation and path calculation.
[0078] In one example, the cumulative excess during the forward homing phase is 0.19°, and the cumulative excess during the reverse homing phase is 0.17°, resulting in a zero-point correction of -0.18°. After writing the temporary parameters, a contactless homing is performed. The corrected stable position residual is 0.03°, below the upper limit of the baseline fluctuation of 0.04°. The normal offset obtained by remapping is 0.20 mm, below the allowable normal offset of 0.85 mm, and the tangential offset is also within the corresponding allowable range. Therefore, the temporary parameters are written into the valid zero-point parameter area. If the stable position residual is still 0.09°, the original zero-point parameters are directly restored, and the vehicle is no longer allowed to proceed based on the end offset being within the allowable range.
[0079] After zero-point correction, if subsequent images before and after extraction still show feather residue, and the contactless zeroing residual remains normal, the zero-point correction amount is not added again. Instead, image positioning is re-executed and the current feather extraction path is adjusted. Only when continuous accumulation in the same direction occurs again during the contactless approach and zeroing phases, and is re-verified through forward and reverse zeroing, is the next zero-point correction allowed to begin.
[0080] The first embodiment will be described in detail with specific examples. The following values are for illustrative purposes only and do not represent actual test results, optimal parameters, or limitations of fixed equipment.
[0081] In S10, a robotic arm with 6 joints performs the picking of bird's nest feathers, with a control cycle of 4ms. The vision acquisition unit obtains images of the feathers to be picked, with a calibrated resolution of 0.05mm / px. After brightness normalization, background suppression, edge extraction, and skeletonization, the center line and base of the feather are obtained. After coordinate transformation, the distance from the feather base to the nearest bird's nest strand boundary is 1.20mm, and the extractable length of the feather along its extension direction is 2.40mm.
[0082] In S20, the target position and encoder feedback position use the same 4ms sampling period, and are therefore directly paired according to timestamps. If two control cycles of position are missing in a single task, the missing duration is 8ms. For missing durations less than 12ms, linear interpolation is performed using adjacent valid positions and the results are marked. Interpolation points are only used to maintain the continuity of stage boundaries. The task is divided into approach, extraction, and homing stages based on the action event timestamps.
[0083] The robotic arm performed 30 forward calibrations and 30 reverse calibrations within a safe area. During the homing phase, the baseline center of a certain joint within its trajectory position interval was 0.02°, and the baseline fluctuation was 0.013°. After multiplying the baseline fluctuation by three, the upper limit of the baseline fluctuation was approximately 0.04°. The median absolute difference of multiple sets of forward and reverse calibration results was 0.01°, the median absolute deviation was 0.01°, and the homing direction difference threshold was set to 0.04°.
[0084] In S30, the task-level baseline correction residuals for the six consecutive effective tasks of this joint are 0.07°, 0.08°, 0.06°, 0.09°, 0.08°, and 0.07°, respectively, all positive and exceeding the upper limit of baseline fluctuation of 0.04°. The excesses for each task are 0.03°, 0.04°, 0.02°, 0.05°, 0.04°, and 0.03°, respectively, with a cumulative excess of 0.21° in the current continuous segment phase. The approach and return-to-zero phases both show accumulation in the same direction, while the residuals in the extraction phase remain within the upper limit of baseline fluctuation.
[0085] In S40, the cumulative excess values of the six joints are used to form a 6-dimensional joint deviation vector, and the kinematic mapping matrix corresponding to the current target position is input to obtain the extractable end-effector spatial offset vector. The absolute value of the projection of the spatial offset vector along the feather extension direction is 0.30 mm, and the absolute value of the projection along the direction pointing to the nearest bird's nest strand boundary is 0.91 mm.
[0086] The image positioning error is set at 0.15mm, the robotic arm repeatability error at 0.10mm, and the suction-type end effector tracking error at 0.10mm. The allowable normal offset is 1.20mm minus the above three errors, which equals 0.85mm. The tangential safety margin is 0.40mm, and the allowable tangential offset is 2.40mm minus 0.40mm, which equals 2.00mm. The tangential offset of 0.30mm does not exceed 2.00mm, but the normal offset of 0.91mm exceeds 0.85mm, therefore the output operation is abnormal.
[0087] In S50, a comparison of forward and reverse zeroing is performed on the joint. The cumulative excess during the forward zeroing phase is 0.19°, and the cumulative excess during the reverse zeroing phase is 0.17°. Both residuals are positive, with an absolute difference of 0.02°, which does not exceed the zeroing direction difference threshold of 0.04°. The residuals during the approach and zeroing phases maintain the same sign, and the residual during the extraction phase does not exceed the upper limit of baseline fluctuation, therefore it is marked as a zero-point drift candidate.
[0088] In S60, the robotic arm executes the forward and reverse zero-return sequences again along the same non-contact calibration path. The stable position residuals of the two sequences maintain the same sign, and the absolute value of the difference in cumulative excesses between stages remains 0.02°. The mapped end offset directions both point to the nearest bird's nest strand boundary at the time of triggering the anomaly, thus confirming zero-point drift. The average of the cumulative excesses in the forward and reverse stages is 0.18°, generating a zero-point correction of -0.18°.
[0089] The system saves the original zero-point parameters, temporarily stores -0.18° in the operational verification area, and performs contactless zero-return verification. The stable position residual after verification is 0.03°, within the upper limit of the baseline fluctuation of 0.04°; the recalculated normal offset is 0.20mm, and the tangential offset is 0.08mm, within the allowable ranges of 0.85mm and 2.00mm, respectively. The system writes the temporary correction amount into the valid zero-point parameter area and recalculates the absorption path for tasks not yet executed based on the corrected zero-point parameters. Thus, the process from operational data acquisition, stage division, baseline correction residual accumulation, end-point offset comparison, error source determination to zero-point correction verification is completed.
[0090] The second embodiment of this invention proposes a self-testing system for the zero-return accuracy of a robotic arm based on the accumulation of the deviation between the encoder position and the command position. This system includes an image acquisition and processing module, a position acquisition module, a synchronization segmentation module, a baseline establishment module, a residual accumulation module, an offset comparison module, an error determination module, and a zero-point verification module. See also... Figure 5 Each module transmits data through task number, stage number, joint number, trajectory position range, and parameter version.
[0091] The image acquisition and processing module acquires images of bird's nests and performs brightness normalization, background suppression, edge extraction, and skeletonization on the images to form candidate feather regions and feather center lines. The feather root is determined based on the positional relationship between the feather center line and the main body of the bird's nest, and the nearest bird's nest strand boundary is determined based on the edge density or texture continuity length around the feather root. The module outputs the feather root position coordinates, the feather extension direction working coordinate vector, and the nearest bird's nest strand boundary position coordinates by using the ratio, rotation, and translation relationship between the image coordinates and the robotic arm working coordinates.
[0092] The position acquisition module reads the target position of each joint from the robotic arm controller and the feedback position of each joint from the joint encoder, and writes the task number, joint number, and timestamp to the target position and feedback position. The position acquisition module also reads the approach, suction start, suction hold, extraction, release, and return to zero action states, and outputs the position sequence and action state sequence to the synchronization segmentation module.
[0093] The synchronization segmentation module synchronizes the action state, target position, and encoder feedback position according to the timestamp. For a small number of missing positions within the allowed range, the module performs labeled interpolation; for tasks with excessive missing positions, reversed or duplicated timestamps, or excessively large adjacent time intervals, the module outputs invalid data. Based on the action event timestamp or by extracting changes in action state, joint velocity, and end-effector pose, the module divides the task into approach, extraction, and homing phases, and outputs the start and end times of each phase, the target trajectory, joint movement direction, and contact markers.
[0094] The baseline establishment module receives the target position, feedback position, stage, trajectory position range, and direction of motion during the non-contact calibration motion. Under stable speed and position conditions, it extracts the residuals of multiple stable positions to form the baseline center, baseline fluctuation amount, and upper limit of baseline fluctuation. The baseline establishment module also forms a zero-return direction difference threshold based on the absolute value of the difference between the cumulative excess amounts of multiple forward and reverse calibration motion stages, and outputs all baseline parameters along with the device number and parameter version to the residual accumulation module and the error determination module.
[0095] The residual accumulation module calculates the control cycle position residual between the target position and the encoder feedback position, subtracts the non-contact calibration baseline according to the trajectory position interval and motion direction, and forms the task-level baseline correction residual. The residual accumulation module maintains the continuous sign, continuous count, and current continuous segment stage cumulative excess according to joint, stage, and motion direction; when the sign changes, the data becomes invalid, or the residual returns to within the upper limit of the baseline fluctuation, the current continuous segment ends and is cleared, while retaining the historical cumulative record.
[0096] The offset comparison module accumulates the excess values at each joint stage to form a joint deviation vector, obtains the robotic arm kinematic mapping matrix based on the target position, and outputs the suction-type end-effector spatial offset. The offset comparison module calculates the tangential and normal offsets along the feather extension direction and the direction pointing to the nearest bird's nest strand boundary, respectively. Based on image positioning error, robotic arm repetitive positioning error, suction-type end-effector motion following error, extractable feather length, and safety margin, it forms the permissible tangential and normal offsets. If any offset exceeds the corresponding permissible value, the offset comparison module outputs an operation anomaly.
[0097] The error determination module receives the baseline correction residual, cumulative excess amount, and zero return direction difference threshold from the approach phase, the extraction phase, and the homing phase. Following steps S51 to S53, the error determination module distinguishes between zero-point drift candidates, transmission clearance candidates, and extraction contact disturbances, excluding extraction contact disturbances from the zero-point drift cumulative update.
[0098] When the end-effector spatial offset corresponding to the zero-point drift candidate exceeds the safe extraction area, the zero-point verification module controls the robotic arm to execute forward and reverse non-contact zero-return sequences respectively. After confirming the zero-point drift, the zero-point verification module generates zero-point correction values for each joint, writes the original zero-point parameters and temporary correction values into the verification record, and performs non-contact zero-return verification. If the verification passes, the zero-point verification module writes the temporary correction values into the valid zero-point parameter area and triggers the controller to recalculate the unexecuted task path; if the verification fails, the zero-point verification module restores the original zero-point parameters, disables the temporary correction values from participating in subsequent extraction, and outputs a stop extraction command.
[0099] During system operation, task number, image number, stage start and end time, target position, feedback position, missing marker, baseline parameters, baseline correction residual, stage cumulative excess, kinematic mapping matrix, end-effector spatial offset, safe extraction area, error classification, zero-point parameter version, and verification results can be written to a structured operation log. The log can be stored in the non-volatile storage area of the robotic arm controller or the task database of the industrial control computer, and output through a debug interface read by task number for reviewing data synchronization, cumulative updates, error determination, and parameter rollback processes.
[0100] The modules described above can be implemented by program function units within the same data processing unit, or they can be deployed in a communicating robotic arm controller and industrial computer. The module division is only for illustrating data processing functions and does not limit the specific software structure or the number of hardware components.
[0101] Different embodiments and technical features in this application can be combined with each other without conflict. Module names are used to indicate corresponding processing functions. A module can be divided into multiple program units, and multiple modules can also be executed by the same processor.
[0102] The terms "first" and "second" used in this application are only used to distinguish similar technical objects and do not indicate quantity, order or importance; "including" and its variations indicate an open-ended inclusion relationship, and in the absence of explicit exclusion, other steps or components are not excluded.
[0103] The term "comprising" or any other similar term is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus / device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent in such process, method, article, or apparatus / device.
[0104] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.
Claims
1. A self-checking method for the zero-return accuracy of a robotic arm based on the cumulative deviation between encoder position and command position, characterized in that, include: Collect images of bird's nests, the target positions of each joint output by the robotic arm controller, the encoder feedback positions of each joint, the action status, and the timestamps; Synchronize the target position, encoder feedback position and motion status according to the timestamp, divide the task into approach, extraction and return to zero stages, and obtain the non-contact calibration baseline and return to zero direction difference threshold of the joint trajectory position and motion direction corresponding to each stage. The stable position residual is extracted at the stable velocity and corresponding trajectory position, and the baseline correction residual is obtained by subtracting the non-contact calibration baseline. The cumulative excess of baseline correction residuals in continuous effective tasks that are in the same stage, at the same joint, and with the same sign and exceed the upper limit of baseline fluctuation. The cumulative excess at each joint stage is used to form a joint deviation vector, which is then mapped to an absorption-type end-effector spatial offset by the kinematics of the robotic arm corresponding to the target position. This offset is then compared with the safe extraction area determined by the feather root, the feather extension direction, and the boundary of the nearest bird's nest strand. When the error exceeds the limit, compare the sign of the baseline correction residuals for positive and negative return to zero and the absolute value of the difference between the cumulative excess amount in each stage to distinguish between zero drift, transmission backlash and contact disturbance absorption. After confirming zero-point drift, generate zero-point correction and verify contactless zeroing. If successful, write to the valid zero-point parameter area and recalculate the path of unexecuted tasks; otherwise, restore the original zero-point parameters and stop absorption.
2. The method according to claim 1, characterized in that, The synchronization of the target position, encoder feedback position, and action status by timestamp includes: When the sampling periods are the same, they are paired according to the timestamp; when they are different, they are resampled to the common time interval using the shorter sampling period. When the continuous missing data does not exceed the continuity range determined by the normal sampling period and the allowable missing duration, linear interpolation of adjacent valid locations is used and the missing data is marked. The interpolated data is only used to maintain the continuity of the stage boundary and is not used to establish a contactless calibration baseline or update the stage cumulative excess. If data is missing, exceeds the limit, timestamps are in reverse order or duplicated, or adjacent time intervals exceed the continuity limit, the task will be marked as invalid.
3. The method according to claim 1, characterized in that, The bird's nest image was normalized for brightness and background suppressed to obtain candidate feather regions; Edge extraction and skeletonization of the candidate feather region are performed to obtain the feather centerline, and the end of the centerline closest to the main body of the bird's nest is determined as the candidate point of the feather root. Boundary bands with edge density exceeding the edge density threshold or texture continuity exceeding the texture length threshold are extracted around candidate points at the feather root. The nearest bird's nest strand boundary is determined, and the position coordinates of the feather root and the nearest bird's nest strand boundary, as well as the working coordinate vector of the feather extension direction, are output by the ratio of image coordinates to robotic arm working coordinates, rotation and translation relationship.
4. The method according to claim 1, characterized in that, The synchronization of the target position, encoder feedback position, and action status by timestamp includes: The start and end times of a phase are determined by the timestamp of the action event; When the action event timestamp is missing, the start and end times of the stage are determined by extracting the action state changes, joint velocity changes, and end target pose changes calculated based on the target position. The approach and homing phases are marked as non-contact phases, and the extraction phase is marked as a contact-related phase. The start and end times of each phase, the target trajectory within the phase, the direction of joint movement, and the contact markers are recorded.
5. The method according to claim 1, characterized in that, The contactless calibration baseline is obtained through the following method: Within a safe working area that does not come into contact with the bird's nest, perform non-contact calibration movements according to the joint trajectories corresponding to the approach phase, the extraction phase, and the return-to-zero phase; When the joint speed is within the preset stable speed range and the position change is less than the stable position threshold within a continuous preset control cycle, multiple stable position residuals of the same joint, the same trajectory position interval and the same direction of movement are collected, the median is taken to obtain the baseline center, and the median of the absolute deviation between the multiple stable position residuals and the baseline center is taken to obtain the baseline fluctuation amount. The product of the baseline fluctuation amount and the preset multiple is used as the upper limit of the baseline fluctuation. Calculate the median of the absolute value of the cumulative excess difference and the median of the absolute deviation during multiple forward and reverse calibration movements. Multiply the former and the latter by a preset multiple and use the sum as the zero-return direction difference threshold.
6. The method according to claim 5, characterized in that, The baseline-corrected residuals and stage cumulative excesses are obtained in the following manner: The control cycle position residual is obtained by subtracting the encoder feedback position from the target position. Align the control cycle position residuals according to the corresponding trajectory position intervals, extract the stable position residuals at stable speeds and subtract the non-contact calibration baselines, and obtain the mission-level baseline correction residuals by the median. When the baseline correction residuals in a continuous effective mission have the same sign and exceed the upper limit of baseline fluctuation, the excess amount will be added to the cumulative excess amount of the current continuous segment according to the sign. When the sign is changed, the data is invalid, or the baseline correction residual returns to within the upper limit of the baseline fluctuation, the current continuous segment count and the stage cumulative excess are cleared, and only the historical cumulative record is retained.
7. The method according to claim 6, characterized in that, The suction-type end spatial offset and safe extraction area are determined by the following methods: The cumulative excess at each joint stage is used to form a joint deviation vector. The spatial offset vector is obtained by inputting the kinematic mapping matrix corresponding to the target position. Take the absolute values of the projections of the spatial offset vector along the feather extension direction and the direction pointing to the nearest bird's nest strand boundary, and use them as the tangential offset and normal offset, respectively. The allowable normal offset is obtained by subtracting the image positioning error, the robotic arm repetitive positioning error, and the suction-type end effector following error from the distance from the feather root to the nearest bird's nest strand boundary. The allowable tangential offset is obtained by subtracting the tangential safety margin from the extractable length of the feather root along the feather extension direction. If any offset exceeds the corresponding allowed offset, the job will be output as an error.
8. The method according to claim 7, characterized in that, The distinction between zero-point drift, transmission backlash, and absorption contact disturbance includes: If the baseline correction residuals of the same joint in the approach phase and the zeroing phase maintain the same sign in continuous effective tasks, and the absolute value of the difference between the cumulative excess of the positive and negative zeroing phases does not exceed the zeroing direction difference threshold, and the baseline correction residuals in the extraction phase do not exceed the upper limit of the baseline fluctuation, they are marked as zero-point drift candidates. When the signs of the baseline correction residuals for positive and negative return to zero are opposite and the absolute value of the difference between the cumulative excess of the stages exceeds the return to zero direction difference threshold, it is marked as a candidate for transmission clearance. When the baseline correction residual exceeds the upper limit of baseline fluctuation in the extraction phase but returns to within the upper limit of baseline fluctuation in the approach and return-to-zero phases, it is marked as an absorption contact disturbance, and its cumulative excess in the update phase is prohibited.
9. The method according to claim 8, characterized in that, The confirmation and correction of zero-point drift candidates include: When the spatial offset of the suction end exceeds the safe extraction area, the forward zero-return sequence and the reverse zero-return sequence are executed respectively along the same non-contact calibration path; Zero drift is confirmed when the absolute value of the difference between the stable position residuals of the corresponding joints of the two sequences with the same sign and the cumulative excess of the stage does not exceed the zero return direction difference threshold, and the spatial offset direction of the absorption end of the two sequences is consistent with the offset direction of the safe extraction area. The zero-point correction amount for each joint is generated by the negative value of the average cumulative excess amount of the joints in the two sequences. After temporary storage, a contactless zero-return verification is performed. If the verification is successful, the zero-point parameter is written to the valid zero-point parameter area; otherwise, the original zero-point parameter is restored and the aspiration stops.
10. A self-checking system for the zero-return accuracy of a robotic arm based on the cumulative deviation between encoder position and command position, characterized in that, include: Image acquisition and processing module, position acquisition module, synchronous segmentation module, baseline establishment module, residual accumulation module, offset comparison module, error determination module and zero point verification module; The image acquisition and processing module acquires images of bird's nest and determines the feather roots, the direction of feather extension, and the boundary of the nearest bird's nest strand. The position acquisition module acquires the target position and the encoder feedback position; The synchronization segmentation module is used to synchronize the action status, target position, and encoder feedback position according to the timestamp and divide the process into approach, extraction, and zeroing stages. The baseline establishment module acquires the non-contact calibration baseline and the zero-return direction difference threshold. The residual accumulation module calculates the stable position residual and the baseline correction residual, and accumulates the stage accumulation excess in the same stage, the same joint, the same sign and the stage exceeding the upper limit of the baseline fluctuation in continuous effective tasks. The offset comparison module maps the stage cumulative excess amount to the kinematics of the robotic arm corresponding to the target position as an absorption-type end-effector spatial offset and compares it with the safe extraction area; The error determination module distinguishes between zero-point drift, transmission backlash, and absorbed contact disturbance; The zero-point verification module generates zero-point correction values, verifies contactless zeroing, retains or restores zero-point parameters, recalculates unexecuted task paths, or stops the absorption process.
