Positioning deviation correction method, device and equipment based on color code sensor, medium and product
Through the positioning and deviation correction method based on color mark sensors, the complex problem of material positioning and deviation correction process in industrial production is solved, and high-precision and low-cost material positioning is achieved, reducing system complexity and environmental impact.
Patent Information
- Application Number
- CN202411519837.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-25
AI Technical Summary
In industrial production, the material positioning and correction process is too complicated, and the traditional visual system is costly, greatly affected by the environment, and has poor real-time performance.
The positioning and deviation correction method based on the color mark sensor is adopted, and the movement trajectory of the color mark sensor is calibrated, the angle between the movement trajectory and the preset axis is obtained, the edge points of the material are recorded, the actual corner point coordinates of the material are calculated, and the fitting position is calculated based on the actual corner point coordinates and standard corner point coordinates are calculated to achieve positioning and deviation correction of the material.
It realizes accurate positioning of materials without relying on complex vision systems, reduces system costs, improves positioning accuracy and system stability, and realizes a low-cost, high-reliability and high-precision material positioning and deviation correction solution.
Smart Images

Figure CN119511934A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of machine positioning and control, and in particular to a positioning and deviation correction method, device, equipment, medium and product based on a color mark sensor. Background Art
[0002] In industrial automation production, accurate positioning and automatic deviation correction of materials moving on the production line is a key technology. Especially in industries such as paper processing and packaging, since materials are prone to deviation during movement on the conveyor belt, it is necessary to detect the material position in real time and perform position correction to ensure the accuracy of subsequent processing procedures. With the rapid development of the manufacturing industry, the speed of the production line is constantly increasing, and the requirements for material positioning accuracy and real-time performance are also getting higher and higher, which poses greater challenges to positioning technology.
[0003] At present, the commonly used material positioning method in industrial production mainly adopts machine vision system, which collects images through industrial cameras, combines image processing algorithms to identify material edge features, and calculates the actual position of materials. This method requires the installation of industrial cameras above the production line and is equipped with a special image processing system and light source module. In practical applications, such systems usually also need to be configured with high-performance image processors and complex algorithm models to ensure the recognition efficiency and accuracy of the system. At the same time, in order to adapt to different production environments, a lot of parameter debugging and calibration work is often required.
[0004] However, this positioning solution based on industrial cameras has some problems in practical applications. First, the cost of industrial cameras and their supporting systems is relatively high, and for small and medium-sized enterprises, the procurement and maintenance costs are relatively high; second, in a high-speed production environment, due to the limitation of camera exposure time, image blur may occur, affecting the accuracy of edge feature extraction; in addition, ambient light interference and material surface reflections will also cause image quality to deteriorate and reduce positioning accuracy. These problems often cause the system to shut down for debugging in actual production, affecting production efficiency. Especially in some special production environments, such as places with many interference factors such as strong light and dust, the reliability of traditional vision systems will be greatly affected. Summary of the invention
[0005] The main purpose of this application is to provide a positioning and correction method, device, equipment, medium and product based on a color mark sensor, aiming to solve the technical problem of overly complex material positioning and correction in the production process.
[0006] To achieve the above purpose, the present application proposes a positioning and deviation correction method based on a color mark sensor, and the positioning and deviation correction method based on a color mark sensor includes:
[0007] Calibrate the motion trajectory of the color mark sensor to obtain the angle between the motion trajectory and the preset axis;
[0008] Scan the material by the color mark sensor, record the first point detected by the color mark sensor as the starting point, and record the coordinates of the starting point;
[0009] Record the distances of two points detected on one side of the starting point as a first marking point and a second marking point from the starting point, calculate the coordinates of the first marking point and the second marking point based on the angle, and record a first movement distance within a time interval between the starting point and the recording of the first marking point coordinates and a second movement distance within a time interval between the starting point and the recording of the second marking point;
[0010] Calculate the actual corner point coordinates of the material based on the starting point coordinates, the first marking point coordinates, the second marking point coordinates, the first movement distance, and the second movement distance;
[0011] Calculating the fitting position based on the actual corner point coordinates and the standard corner point coordinates;
[0012] The positioning and deviation correction of the material are performed according to the bonding position.
[0013] In one embodiment, the step of calibrating the motion trajectory of the color mark sensor to obtain the angle between the motion trajectory and the x-axis specifically includes:
[0014] A plane rectangular coordinate system is established with the material movement direction as the positive x-axis and the direction perpendicular to the x-axis as the y-axis;
[0015] Marking a third marking point and a fourth marking point where the color mark sensor moves on the conveyor belt;
[0016] Starting the conveyor belt to move the third marking point and the fourth marking point into the motion range of the manipulator;
[0017] Recording a first distance of movement of the conveyor belt, coordinates of a fifth marking point corresponding to the third marking point, and coordinates of a sixth marking point corresponding to the fourth marking point;
[0018] Calculate the third marking point coordinates and the fourth marking point coordinates according to the first distance, the fifth marking point coordinates and the sixth marking point coordinates;
[0019] The angle is calculated according to the coordinates of the third marking point and the coordinates of the fourth marking point.
[0020] In one embodiment, the step of scanning the material by the color mark sensor, recording the first point detected by the color mark sensor as the starting point, and recording the coordinates of the starting point specifically includes:
[0021] When the color mark sensor scans from the preset color conveyor belt to the preset color material, a level change occurs, and the position of the linear module encoder is recorded at this time;
[0022] The starting point coordinates are determined according to the position of the linear module encoder, and the first position of the belt encoder at this time is recorded.
[0023] In one embodiment, the step of recording the distances of two points detected on one side of the starting point as a first marking point and a second marking point from the starting point, calculating the coordinates of the first marking point and the second marking point based on the angle, and recording a first movement distance within a time interval between the starting point and recording the coordinates of the first marking point and a second movement distance within a time interval between the starting point and recording the coordinates of the second marking point, specifically includes:
[0024] When the color mark sensor moves to the side edge of the material on the side of the starting point, a level change occurs, the position of the linear module encoder at that moment is recorded, and the coordinates of the first marking point are determined based on the angle, and the second position of the belt encoder at this moment is recorded;
[0025] When the color mark sensor moves to the side edge of the material on the side of the starting point again, a level change occurs, the position of the linear module encoder at that moment is recorded, and the coordinates of the second marking point are determined based on the angle, and the third position of the belt encoder at this moment is recorded;
[0026] The first movement distance and the second movement distance are calculated based on the first position, the second position, and the third position.
[0027] In one embodiment, the step of calculating the actual corner point coordinates of the material based on the starting point coordinates, the first marking point coordinates, the second marking point coordinates, the first movement distance, and the second movement distance specifically includes:
[0028] Calculate a first coordinate on the material corresponding to the first marking point coordinate based on the first marking point coordinate and the first movement distance;
[0029] Calculate the second coordinates on the material corresponding to the second marking point coordinates based on the second marking point coordinates and the second movement distance;
[0030] The actual corner point is calculated according to the first coordinate, the second coordinate and the starting point coordinate.
[0031] In one embodiment, the step of calculating the fitting position based on the actual corner point coordinates and the standard corner point coordinates specifically includes:
[0032] The first coordinate and the second coordinate are used to calculate the actual angle of the material;
[0033] Based on the actual corner point coordinates, the standard corner point coordinates, the actual material angle and the standard material angle, a rigid transformation is performed to calculate the fitting position.
[0034] In addition, to achieve the above purpose, the present application also proposes a positioning and correction device based on a color mark sensor, the device comprising:
[0035] A sensor module, used for controlling the movement of the color mark sensor, and recording the coordinates of the starting point, the coordinates of the first marking point, the coordinates of the second marking point, and the distances of the first marking point and the second marking point from the starting point;
[0036] A conveyor belt module, used for controlling the movement of the conveyor belt and recording the first movement distance and the second movement distance;
[0037] A calculation module is used to calculate the coordinates of the first marking point and the second marking point based on the distances of the first marking point and the second marking point from the starting point and the angle, calculate the actual corner point coordinates of the material based on the starting point coordinates, the first marking point coordinates, the second marking point coordinates, the first movement distance and the second movement distance, and calculate the fitting position based on the actual corner point coordinates and the standard corner point coordinates to achieve positioning and correction of the material.
[0038] In addition, to achieve the above-mentioned purpose, the present application also proposes a positioning and correction device based on a color mark sensor, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the positioning and correction method based on the color mark sensor as described above.
[0039] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the positioning and correction method based on the color mark sensor as described above are implemented.
[0040] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the positioning and correction method based on the color mark sensor as described above are implemented.
[0041] One or more technical solutions proposed in this application have at least the following technical effects:
[0042] The present application first calibrates the motion trajectory of the color mark sensor; scans the material through the color mark sensor, records and calculates multiple material edge points; calculates the actual corner point coordinates of the material based on the multiple material edge points; finally, calculates the fitting position based on the actual corner point coordinates and the standard corner point coordinates, and positions and corrects the material according to the fitting position.
[0043] Specifically, the present application uses a color code sensor to scan and locate the material, obtains the angle between the sensor's motion trajectory and the x-axis through calibration, and calculates the corner point by combining the coordinate information of the starting point, the first mark point and the second mark point and the motion distance, so that the material can be accurately positioned without relying on a complex visual system, effectively solving the problems of high cost, great environmental impact and poor real-time performance of the traditional visual positioning system. Specifically, the color code sensor obtains the key point position by detecting the color difference change of the material, which is not affected by ambient light and surface reflection, and has higher reliability; at the same time, the system can accurately restore the position and posture of the material in space by recording the motion distance within the time interval and combining the principle of geometric calculation, thereby achieving a more accurate positioning effect. In addition, the scheme only requires a simple color code sensor and encoder to complete the positioning, which greatly reduces the system cost. By comparing the actual corner point coordinates with the standard corner point coordinates to calculate the fitting position, the system can complete the position correction of the material in real time, thereby improving production efficiency. Compared with the traditional scheme, the present application not only simplifies the hardware structure and reduces the system complexity, but also improves the positioning accuracy and system stability, thereby realizing a low-cost, high-reliability and high-precision material positioning and correction scheme. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0045] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0046] Figure 1 A flow chart of the first embodiment of the positioning and deviation correction method based on the color mark sensor of the present application;
[0047] Figure 2 A flow chart of the second embodiment of the positioning and deviation correction method based on the color mark sensor of the present application;
[0048] Figure 3A flow chart of the third embodiment of the positioning and deviation correction method based on the color mark sensor of the present application;
[0049] Figure 4 Schematic diagram of the device structure of the hardware operating environment involved in the positioning and correction method based on the color mark sensor in the embodiment of the present application.
[0050] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0051] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0052] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0053] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, etc. The following takes the positioning and correction system based on the color mark sensor as an example to illustrate this embodiment and the following embodiments.
[0054] Based on this, the embodiment of the present application provides a positioning and correction method based on a color mark sensor, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the positioning and deviation correction method based on the color mark sensor of the present application.
[0055] In this embodiment, the positioning and deviation correction method based on the color mark sensor includes steps S10 to S40:
[0056] Step S10, calibrating the motion trajectory of the color mark sensor to obtain the angle between the motion trajectory and the preset axis;
[0057] Among them, the color mark sensor refers to a sensor that can detect the color difference between objects of different colors, and is used to detect the color difference changes between materials and conveyor belts; the motion trajectory refers to the actual motion path of the color mark sensor driven by the linear module; calibration means obtaining the spatial position parameters of the motion trajectory of the color mark sensor through a specific method; the preset axis refers to the x-axis with the material movement direction as the positive direction, which is used to establish a plane rectangular coordinate system; the angle refers to the angular difference between the motion trajectory of the color mark sensor and the preset axis.
[0058] This step is performed after the system is installed and before the actual positioning operation begins. Specifically, first, two light spots A and B are projected on the conveyor belt by a laser device to mark the two light spots; then the conveyor belt is moved so that the marked points enter the range of motion of the robot, and the distance the conveyor belt moves is recorded; finally, the robot is used to teach the two marked points for positioning, and the actual coordinates of points A and B in the robot coordinate system are calculated based on the moving distance and the coordinates of the marked points. Based on the actual coordinates, the angle between the sensor motion trajectory and the x-axis is calculated.
[0059] In some embodiments, the motion trajectory of the color mark sensor can be calibrated in a variety of ways: optionally, a standard square is placed on the conveyor belt, the edge of the square is scanned using the color mark sensor, the edge point position and the conveyor belt movement distance are recorded, and the angle is calculated using the edge point coordinates. It is understandable that other calibration methods can also be used to obtain the angle relationship between the sensor motion trajectory and the reference axis, which is not limited here.
[0060] Step S20, scanning the material by the color mark sensor, recording the first point detected by the color mark sensor as the starting point, and recording the coordinates of the starting point;
[0061] Among them, scanning refers to the process of the color mark sensor performing reciprocating detection on the material under the drive of the linear module; the material refers to the workpiece that needs to be positioned, usually paper and other items with obvious color difference from the conveyor belt; the starting point refers to the position point when the color mark sensor first detects the edge of the material; the starting point coordinates refer to the spatial position information of the position point in the robot coordinate system.
[0062] This step is performed after the sensor calibration is completed and the actual material positioning detection begins. Specifically, the linear module is controlled to drive the color mark sensor to reciprocate along the calibrated trajectory. When the sensor detects the color difference change at the edge of the material, the system immediately records the spatial position of the sensor and the conveyor belt position at this time, takes the first detected edge point as the starting point, and records its position information in the robot coordinate system to provide benchmark data for subsequent position calculations.
[0063] In some embodiments, the detection and recording of the starting point of the material can be achieved in a variety of ways: optionally, using the digital output signal of the sensor, triggering the system to record the position of the linear module encoder and the conveyor encoder when the signal jumps, and calculating the coordinates of the starting point in combination with the known sensor installation position; optionally, using the probe function of the controller and the probe function of the bus driver, synchronously collecting the position information of each axis when the sensor signal changes, and obtaining the spatial position of the starting point through coordinate conversion. It is understandable that other methods can also be used to achieve the detection and position recording of the edge points of the material, which are not limited here.
[0064] Step S30, recording the distances of two points detected on one side of the starting point as a first marking point and a second marking point from the starting point, and calculating the coordinates of the first marking point and the second marking point based on the angle, and recording the first movement distance within the time interval between the starting point and the recording of the first marking point coordinates and recording the second movement distance within the time interval between the starting point and the recording of the second marking point;
[0065] Among them, the first marking point and the second marking point represent two material edge points detected by scanning after the starting point, and these two points are located on one side of the starting point at the same time; the distance refers to the spatial straight-line distance from the two points to the starting point; the angle refers to the angle between the sensor motion trajectory obtained in step S10 and the x-axis; the coordinates of the first marking point and the second marking point refer to the position information of the two points in the robot coordinate system; the time interval represents the time difference from the detection of the starting point to the detection of each marking point; the first movement distance and the second movement distance refer to the moving distance of the conveyor belt in their respective time intervals.
[0066] This step is performed when the material edge scanning continues after the starting point is detected. Specifically, the color mark sensor continues to move along the track after detecting the starting point. When the material edge is detected again, it is recorded as the first mark point. When it continues to move and detects the third edge point, it is recorded as the second mark point. The system synchronously records the sensor position and the conveyor belt position, and calculates the spatial coordinates of the two points through coordinate transformation based on the known angle and sensor position. At the same time, the system also needs to record the distance the conveyor belt moves from detecting the starting point to detecting the first mark point, as well as the distance the conveyor belt moves from detecting the starting point to detecting the first mark point, according to the conveyor belt position.
[0067] In some embodiments, the detection and coordinate calculation of the marking point can be achieved in a variety of ways: optionally, using a high-speed acquisition card to collect sensor signals, triggering position acquisition when the signal changes, recording the position of the linear module and the conveyor encoder, and calculating the spatial position of the marking point by coordinate conversion based on the sensor installation position and angle; optionally, using the high-speed interrupt function of the industrial controller, recording the system timestamp and the position information of each axis when the sensor signal jumps, and calculating the precise coordinates of the actual triggering moment through the interpolation algorithm. It is understandable that other methods can also be used to achieve the detection of material edge points and spatial position calculation, which are not limited here.
[0068] Step S40, calculating the actual corner point coordinates of the material based on the starting point coordinates, the first marking point coordinates, the second marking point coordinates, the first movement distance, and the second movement distance;
[0069] Among them, the actual corner point represents the characteristic corner point position of the material in the actual space; the actual corner point coordinates refer to the three-dimensional position information of the corner point in the robot coordinate system; coordinate calculation refers to the mathematical process of deriving the target point position through the position information and geometric relationship of known points.
[0070] This step is performed after all necessary position and distance information is obtained. Specifically, the system first uses the coordinates of the first mark point and the first movement distance to calculate the actual position of the first mark point on the material (actual first mark point) by reversely compensating for the influence of the conveyor belt movement; similarly, the second mark point coordinates and the second movement distance are used to calculate the actual position of the second mark point on the material (actual second mark point). Then a straight line is determined by the actual first mark point and the actual second mark point. This straight line represents an edge of the material; at the same time, a straight line perpendicular to the edge line is drawn through the starting point. The intersection of these two straight lines is the coordinates of the actual corner point of the material.
[0071] In some embodiments, the calculation of the actual corner point coordinates can be achieved in a variety of ways: Optionally, first calculate the compensation amount of the first mark point in the x direction according to the first movement distance and perform coordinate correction to obtain the actual first mark point, then calculate the compensation amount of the second mark point in the x direction according to the second movement distance and perform coordinate correction to obtain the actual second mark point, use the two-point formula to obtain the equation of the straight line formed by the two points, then establish the equation of the straight line perpendicular to the straight line through the starting point, and finally solve the intersection of the two straight lines to obtain the actual corner point coordinates; Optionally, establish a coordinate transformation matrix, substitute the coordinates of the mark point and the corresponding movement distance into the matrix for coordinate transformation to obtain the actual mark point, then establish a set of equations through the perpendicular relationship of the vectors, and solve the set of equations to obtain the actual corner point coordinates. It can be understood that other mathematical methods can also be used to calculate the actual corner point coordinates of the material, which is not limited here.
[0072] Step S50, calculating the fitting position based on the actual corner point coordinates and the standard corner point coordinates;
[0073] Among them, the standard corner point coordinates represent the expected position of the material corner point in the robot coordinate system under ideal conditions; the fitting position refers to the spatial transformation required to correct the material to the standard position; the spatial transformation includes translation and rotation; the translation refers to the distance the material needs to move in the x, y, and z directions; the rotation refers to the angle at which the material needs to rotate around the corner point; the deviation refers to the difference between the actual corner point coordinates and the standard corner point coordinates.
[0074] This step is performed when the correction parameters need to be calculated after the actual corner point coordinates are obtained. Specifically, the system first reads the preset standard corner point coordinates, compares them with the actual corner point coordinates calculated in step S40, and calculates the position difference between the two coordinate points. Then, based on this difference, the coordinate transformation algorithm is used to calculate the translation distance and rotation angle required to adjust the material from the current position to the standard position. These calculation results will be used as input parameters for the subsequent robot to perform correction actions.
[0075] In some embodiments, the calculation of the fitting position can be achieved in a variety of ways: optionally, first calculate the coordinate difference between the actual corner point and the standard corner point in the x and y directions to obtain the translation amount, then obtain the rotation amount through the angle between the actual edge line and the standard edge line, and finally combine the translation amount and the rotation amount to form a complete space transformation matrix; optionally, establish a least squares optimization model, substitute the actual corner point coordinates and the standard corner point coordinates into the model, and obtain the optimal transformation parameters through iterative calculation to ensure that the fitting error after transformation is minimized. It is understandable that other mathematical methods can also be used to calculate the fitting position parameters of the material, which are not limited here.
[0076] Step S60, positioning and correcting the material according to the laminating position;
[0077] Among them, positioning and correction refers to the process of adjusting the material to the expected position through mechanical devices or performing subsequent operations based on the actual position of the material; position compensation refers to the correction amount made to the theoretical position after considering the error of the mechanical system; the expected position refers to the target position and posture that the material needs to achieve; subsequent operations refer to process processing based on the actual position of the material, such as marking, cutting, inspection, etc.; real-time position refers to the current spatial position information of the material during the processing.
[0078] This step is performed when the actual processing operation is performed after the fitting position parameters are obtained. Specifically, the system can choose two processing methods: one is to adjust the material to the expected position through a manipulator or other actuator, that is, to adjust the physical position of the material according to the fitting position parameters; the other is to keep the material unchanged at the current position, convert the calculated fitting position parameters into the compensation amount of the processing equipment, so that the processing equipment adjusts its working position according to the actual position of the material, thereby realizing accurate processing of the material. This flexible processing method can select the optimal execution strategy according to the actual process requirements.
[0079] In some embodiments, the positioning and deviation correction of materials can be achieved in a variety of ways: Optionally, when the physical deviation correction method is selected, the motion trajectory of the manipulator is first calculated according to the fitting position parameters, and the manipulator is controlled to move to the material grabbing position. After grabbing the material, the material is adjusted to the standard position according to the calculated translation and rotation amounts, and finally the position is confirmed and accurately placed to ensure that the material is in the expected position; Optionally, when the compensation processing method is selected, the fitting position parameters are first converted into the coordinate compensation amount of the processing equipment, and then the actual working position of the processing equipment is calculated according to the actual position and compensation amount of the material, and the processing equipment is controlled to process the material according to the compensated position, and the processing accuracy needs to be monitored in real time during the process. It is understandable that other methods can also be used to achieve the positioning and deviation correction of materials, which are not limited here.
[0080] In general, the present application first calibrates the motion trajectory of the color mark sensor; scans the material through the color mark sensor, records and calculates multiple material edge points; calculates the actual corner point coordinates of the material based on the multiple material edge points; finally, calculates the fitting position based on the actual corner point coordinates and the standard corner point coordinates, and positions and corrects the material according to the fitting position.
[0081] Specifically, the present application uses a color code sensor to scan and locate the material, obtains the angle between the sensor's motion trajectory and the x-axis through calibration, and calculates the corner point by combining the coordinate information of the starting point, the first mark point and the second mark point and the motion distance, so that the material can be accurately positioned without relying on a complex visual system, effectively solving the problems of high cost, great environmental impact and poor real-time performance of the traditional visual positioning system. Specifically, the color code sensor obtains the key point position by detecting the color difference change of the material, which is not affected by ambient light and surface reflection, and has higher reliability; at the same time, the system can accurately restore the position and posture of the material in space by recording the motion distance within the time interval and combining the principle of geometric calculation, thereby achieving a more accurate positioning effect. In addition, the scheme only requires a simple color code sensor and encoder to complete the positioning, which greatly reduces the system cost. By comparing the actual corner point coordinates with the standard corner point coordinates to calculate the fitting position, the system can complete the position correction of the material in real time, thereby improving production efficiency. Compared with the traditional scheme, the present application not only simplifies the hardware structure and reduces the system complexity, but also improves the positioning accuracy and system stability, thereby realizing a low-cost, high-reliability and high-precision material positioning and correction scheme.
[0082] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2Based on the first embodiment, this embodiment provides a more specific method for calibrating the motion trajectory of the color mark sensor, as follows:
[0083] Step S201, establishing a plane rectangular coordinate system with the material movement direction as the positive direction x-axis and the direction perpendicular to the x-axis as the y-axis;
[0084] Among them, the plane rectangular coordinate system represents a two-dimensional coordinate system composed of two mutually perpendicular axes, which is used to locate and describe the positional relationship between materials and sensors on the plane; the direction of material movement refers to the projection direction of the actual moving trajectory of the material on the conveyor belt; the x-axis represents the horizontal reference line, which is used to indicate the forward distance of the material on the conveyor belt; the y-axis represents the vertical reference line, which is used to indicate the lateral offset of the material; the origin refers to the intersection of the two axes, which serves as the reference point for position measurement.
[0085] This step is performed during the initialization phase before the system starts running. Specifically, first observe and determine the stable movement direction of the material on the conveyor belt, and define this direction as the positive direction of the x-axis, so that the coordinate value corresponds to the actual physical meaning. Then, based on this direction, determine the direction perpendicular to it as the y-axis, thereby establishing a complete plane rectangular coordinate system. This coordinate system will serve as the reference system for all subsequent position calculations and deviation corrections.
[0086] Step S202, marking a third marking point and a fourth marking point where the color mark sensor moves on the conveyor belt;
[0087] Among them, the conveyor belt represents a continuously moving platform for conveying materials; the third marking point and the fourth marking point represent two reference points for determining the motion trajectory of the color mark sensor; the color mark sensor refers to a photoelectric detection device for detecting marking points; the mark refers to a characteristic point set on the surface of the conveyor belt that can be recognized by the sensor; the motion trajectory refers to the movement path of the sensor during the scanning process.
[0088] This step sets the marking points after the coordinate system is established. Specifically, you first need to select appropriate locations on the conveyor belt surface to place the marking points based on the range of motion of the color mark sensor. The locations of these marking points must meet the following requirements: they must be within the effective scanning range of the sensor, maintain an appropriate distance from each other to improve calculation accuracy, not affect the normal transportation of materials, and maintain long-term stability. The material and size of the marking points must ensure that they can be reliably identified by the color mark sensor.
[0089] Step S203, starting the conveyor belt to move the third marking point and the fourth marking point into the movement range of the manipulator;
[0090] Among them, starting the conveyor belt means that the conveyor belt motor starts to run through the control system and drives the conveyor belt to move at a predetermined speed; the conveyor belt refers to a continuously moving platform for carrying and transporting materials; the marking point refers to the characteristic point set on the surface of the conveyor belt for position reference; the manipulator motion range refers to the spatial area where the manipulator can stably grasp and place materials; movement refers to the process of the conveyor belt driving the marking point to move from the initial position to the target position.
[0091] This step is performed after the coordinate system is established and the marking points are set. Specifically, the control system first initializes the conveyor motor, including setting parameters such as the operating speed and acceleration. Then, according to the preset startup program, the conveyor motor is controlled to start smoothly, so that the conveyor gradually accelerates to the predetermined speed. The system monitors the operating status of the conveyor in real time, including parameters such as speed and tension, to ensure the smooth operation of the conveyor. When the third and fourth marking points move with the conveyor into the working range of the manipulator, the system records the relevant position information to prepare for subsequent coordinate calculations.
[0092] Step S204, recording the first distance of the conveyor belt movement, the coordinates of the fifth marking point corresponding to the third marking point, and the coordinates of the sixth marking point corresponding to the fourth marking point;
[0093] Among them, the first distance represents the movement distance of the conveyor belt from starting to stopping; the coordinates of the fifth marking point and the sixth marking point represent the spatial positions of the third marking point and the fourth marking point when they move into the movement range of the robot; the corresponding relationship refers to the mapping relationship between the initial marking point and the position after movement.
[0094] This step collects position data during the operation of the conveyor belt. Specifically, the system first records the movement distance of the conveyor belt through a position sensor or encoder. When the third mark point moves into the working range of the robot, the system immediately collects its spatial coordinates and records them as the coordinates of the fifth mark point; similarly, when the fourth mark point reaches the specified position, its spatial coordinates are collected as the coordinates of the sixth mark point. These position data will be used to subsequently calculate the angle between the sensor's motion trajectory and the coordinate axis, which is an important parameter for determining the precise position of the material.
[0095] Step S205, calculating the third marking point coordinates and the fourth marking point coordinates according to the first distance, the fifth marking point coordinates and the sixth marking point coordinates;
[0096] Among them, coordinate calculation refers to the process of deriving the original position of the marker point through mathematical methods; the displacement vector refers to the direction and distance of movement of the marker point; the coordinate transformation refers to the position conversion relationship between different reference systems; and the error compensation refers to the correction of the theoretical calculation results after considering the system error.
[0097] This step is performed after obtaining the conveyor belt movement distance and the position data of the mark point after movement. Specifically, the system first establishes a coordinate transformation equation, takes the coordinates of the fifth mark point and the sixth mark point as known quantities, and establishes a displacement vector according to the conveyor belt movement direction and the first distance. Then, through reverse calculation, the coordinates after movement are offset in the opposite direction of the displacement vector by the distance of the first distance to obtain the initial position coordinates of the mark point. In the calculation process, it is necessary to consider the nonlinear characteristics of the conveyor belt movement and the accumulated error of the system, and improve the calculation accuracy through the compensation algorithm.
[0098] Step S206, calculating the angle according to the coordinates of the third marking point and the coordinates of the fourth marking point.
[0099] Among them, the angle refers to the angle between the line connecting the marked points and the coordinate axis; the vector direction refers to the direction from one marked point to another marked point; the coordinate difference refers to the distance difference between the two points in the x-axis and y-axis directions; the angle calculation refers to the process of solving the angle through the trigonometric function relationship; the accuracy assessment refers to the quantitative analysis of the accuracy of the calculation results.
[0100] This step performs angle calculation after obtaining the initial coordinates of the marker points. Specifically, the system first calculates the projection distances of the two marker points in the x-axis and y-axis directions based on their coordinate values. Then the inverse tangent function is used to calculate the angle between the connecting line and the x-axis, which is the angle between the sensor's motion trajectory and the coordinate axis. Quadrant judgment needs to be considered during the calculation process to ensure that the angle value obtained is within the correct range. At the same time, the reliability of the calculation results is evaluated through statistical analysis of multiple sets of data.
[0101] In general, in the embodiment of the present application, since a method for calibrating the motion trajectory of a color code sensor is innovatively proposed, a plane rectangular coordinate system is established in the direction of material movement, the third and fourth marking points of the sensor movement are marked on the conveyor belt, and the conveyor belt is started to move the marking points to the range of motion of the manipulator, and the conveyor belt movement distance and the corresponding coordinates of the fifth and sixth marking points are recorded, the angle between the sensor motion trajectory and the x-axis can be accurately calculated through geometric relationships, which effectively solves the problem that the traditional calibration method requires complex calibration tools and cumbersome calibration processes, and thus realizes a simple, efficient, and high-precision automatic calibration solution for the sensor motion trajectory. This calibration method can accurately calculate the actual motion trajectory of the sensor by combining the conveyor belt movement and the manipulator positioning, and using the known motion distance and coordinate point information; at the same time, the calibration process only needs to make simple marks on the conveyor belt and record the relevant position information to complete, which greatly simplifies the calibration process and improves the calibration efficiency and accuracy.
[0102] Based on the first and second embodiments of the present application, in the third embodiment of the present application, the same or similar contents as those of the above-mentioned first and second embodiments can be referred to the above introduction, and will not be described in detail later. Figure 3 This embodiment provides a more specific positioning and deviation correction method based on a color mark sensor, as follows:
[0103] Step S301, calibrating the motion trajectory of the color mark sensor to obtain the angle between the motion trajectory and the preset axis;
[0104] This step may refer to the second embodiment or step S10, and will not be described in detail here.
[0105] Step S302, when the color mark sensor scans from the preset color conveyor belt to the preset color material, a level change occurs, and the position of the linear module encoder is recorded at this time;
[0106] Among them, the color mark sensor refers to a photoelectric detection device that can identify different colors and output corresponding electrical signals; the preset color represents a specific color value pre-defined by the system for identification; the conveyor belt color refers to the reference color of the conveyor belt surface; the material color refers to the surface color of the object to be detected; the level change refers to the process in which the sensor output signal jumps from one state to another; the instant refers to the time point when the signal changes; the linear module encoder refers to a high-precision measuring device used to measure the position of linear motion; and the position recording refers to the operation of saving the encoder reading.
[0107] This step is performed when the color mark sensor starts scanning and detecting. Specifically, the system first ensures that the color mark sensor is in normal working condition and sets the appropriate detection sensitivity. When the sensor transfers from scanning the conveyor surface to the material surface, the color difference between the two will cause the sensor output signal to jump. The system captures this jump moment through a high-speed sampling circuit and immediately triggers the position reading operation of the linear module encoder. The position data represents the precise position when the sensor detects the edge of the material, which is of great significance for the subsequent determination of the material position.
[0108] Step S303, determining the starting point coordinates according to the position of the linear module encoder, and recording the first position of the belt encoder at this time;
[0109] Among them, the color mark sensor refers to a photoelectric detection device that can identify different colors and output corresponding electrical signals; the preset color represents a specific color value pre-defined by the system for identification; the conveyor belt color refers to the reference color of the conveyor belt surface; the material color refers to the surface color of the object to be detected; the level change refers to the process in which the sensor output signal jumps from one state to another; the instant refers to the time point when the signal changes; the linear module encoder refers to a high-precision measuring device used to measure the position of linear motion; and the position recording refers to the operation of saving the encoder reading.
[0110] This step is performed when the color mark sensor starts scanning and detecting. Specifically, the system first ensures that the color mark sensor is in normal working condition and sets the appropriate detection sensitivity. When the sensor transfers from scanning the conveyor surface to the material surface, the color difference between the two will cause the sensor output signal to jump. The system captures this jump moment through a high-speed sampling circuit and immediately triggers the position reading operation of the linear module encoder. The position data represents the precise position when the sensor detects the edge of the material, which is of great significance for the subsequent determination of the material position.
[0111] Step S304, when the color mark sensor moves to the side edge of the material on the side of the starting point, a level change occurs, the position of the linear module encoder at that moment is recorded, and the coordinates of the first marking point are determined based on the angle, and the second position of the belt encoder at this moment is recorded;
[0112] Among them, the starting point side represents a specific direction area with the starting point as a reference; the material side edge refers to the boundary line of the material contour; the level change indicates the state transition of the sensor output signal; the linear module encoder position refers to the precise reading of the sensor movement position; the angle refers to the angle between the material edge and the reference coordinate axis; the first mark point coordinates represent the spatial position of the feature point of the material edge; the second position refers to the position reading of the conveyor belt at that moment; coordinate conversion refers to the process of converting position data to the target coordinate system.
[0113] This step is performed when the color mark sensor continues to scan after the starting point is determined. Specifically, the sensor moves along the preset trajectory, and the output signal jumps when the edge of the material is detected. The system immediately captures the position value of the linear module encoder, and combines the previously obtained angle information to calculate the position of the point in the spatial coordinate system through coordinate transformation, which is recorded as the first marking point. At the same time, the system records the position value of the belt encoder as the second position for subsequent calculation of the actual position of the material. The entire process requires that the scanning speed of the sensor be stable to obtain accurate edge detection results.
[0114] Step S305, when the color mark sensor moves to the side edge of the material on the side of the starting point again, a level change occurs, the position of the linear module encoder at that moment is recorded, and the coordinates of the second marking point are determined based on the angle, and the third position of the belt encoder at this time is recorded;
[0115] Among them, "again" means that the sensor scans the same feature position for the second time; the second mark point coordinate refers to the edge point position detected for the second time; the third position represents the position reading of the conveyor belt during the second detection; data acquisition refers to the process of acquiring and recording sensor signals; position calibration refers to the process of determining the spatial position; timing control refers to the process of ensuring that the timing of data acquisition is correct.
[0116] This step is performed after the first marking point is obtained and the conveyor belt moves a certain distance. Specifically, the system controls the sensor to perform a second scan, and when the edge of the material is detected again, the position recording and coordinate calculation process is repeated. The system records the position of the linear module encoder at this time, and uses the known angle to calculate the spatial coordinates of the second marking point. At the same time, the third position of the belt encoder is recorded for subsequent calculation of the actual position of the material. The execution of this step requires ensuring that the time interval between the two detections is appropriate so that the material movement distance meets the measurement accuracy requirements.
[0117] Step S306, calculating the first movement distance and the second movement distance based on the first position, the second position and the third position;
[0118] Among them, the first movement distance represents the displacement of the material from the starting point to the first marking point; the second movement distance refers to the total displacement from the recording starting point to the recording second marking point; the position difference represents the numerical difference between the two positions;
[0119] This step is performed after obtaining the three position data. Specifically, the system first preprocesses the three position readings of the belt encoder to eliminate possible noise and interference. Then the difference between the first position and the second position is calculated to obtain the first movement distance, and the difference between the first position and the third position is calculated to obtain the second movement distance. The second movement distance reflects the overall displacement of the material from the start of recording to the second detection. During the calculation process, the influence of factors such as encoder resolution and belt slippage needs to be considered, and compensation corrections should be made when necessary. At the same time, the system will verify the rationality of the calculation results to ensure that the distance value is within the expected range.
[0120] Step S307, calculating a first coordinate on the material corresponding to the first marking point coordinate based on the first marking point coordinate and the first movement distance;
[0121] Among them, the first marking point coordinates represent the actual position information of the first marking point on the material; the first movement distance refers to the displacement of the material from the initial recording to the first detection; the first coordinates represent the real-time spatial position of the first marking point on the material after considering motion compensation; position mapping refers to the process of converting the detected position into the actual position;
[0122] This step is performed after obtaining the coordinates of the first marking point and the first movement distance. Specifically, the system uses the actual position of the first marking point on the material as the reference point, and combines the movement direction of the material on the conveyor belt and the first movement distance to calculate the real-time spatial position of the marking point after the material moves. The calculation process needs to consider the movement characteristics of the conveyor belt, including speed uniformity, straightness of the movement trajectory and other factors. At the same time, the coordinate system conversion relationship must be considered to ensure that the final calculation result can accurately reflect the real-time position of the marking point. The system also needs to perform error analysis to evaluate the reliability of the calculation results.
[0123] Step S308, calculating a second coordinate on the material corresponding to the second marking point coordinate based on the second marking point coordinate and the second movement distance;
[0124] The coordinates of the second marking point represent the actual position information of the second marking point on the material; the second movement distance refers to the total displacement from the initial recording to the second detection; the second coordinates represent the real-time position of the second marking point after considering motion compensation;
[0125] This step is performed after obtaining the coordinates of the second marking point and the second movement distance. Specifically, the system uses a method similar to the calculation of the first coordinates, taking the actual position of the second marking point on the material as a reference, and combining the total displacement of the material on the conveyor belt to calculate the real-time spatial position of the marking point. Since the second movement distance is large, special attention should be paid to the impact of cumulative errors, and error compensation should be performed when necessary.
[0126] Step S309, calculating the actual corner point according to the first coordinate, the second coordinate and the starting point coordinate;
[0127] Among them, the first coordinate represents the actual spatial position information of the first marking point; the second coordinate represents the actual spatial position information of the second marking point; the starting point coordinate refers to the reference point coordinate of the initial position of the material; the actual corner point represents the position coordinate of the intersection of two straight lines; the edge line refers to the straight line formed by the two marking points; the vertical line refers to the straight line drawn from the starting point and perpendicular to the edge line; the intersection calculation represents the process of determining the intersection position of two straight lines; the vertical relationship refers to the geometric constraint between the two straight lines.
[0128] This step is performed after obtaining the first coordinate, the second coordinate and the starting point coordinate. Specifically, the system first determines a sideline of the material through the first coordinate and the second coordinate, and the sideline represents the actual edge of the material. Then a straight line perpendicular to the sideline is drawn from the starting point. The intersection of these two straight lines is the required actual corner point of the material. The calculation process needs to consider the selection and conversion of the coordinate system to ensure the accuracy of the calculation. At the same time, it is necessary to verify the perpendicular relationship between the two straight lines and check the rationality of the calculation results.
[0129] Step S310, calculating the actual angle of the material using the first coordinate and the second coordinate;
[0130] Among them, the actual angle of the material represents the angle between the actual edge of the material and the x-axis; the first coordinate and the second coordinate are used to determine the position and direction of the actual edge of the material; the x-axis refers to the horizontal reference axis of the reference coordinate system; angle calculation refers to the process of determining the angle between two straight lines; the direction vector represents the directional characteristics of the straight line; quadrant judgment is used to determine the sign of the angle; angle normalization refers to converting the calculated angle to a specified range.
[0131] This step is performed after obtaining the first coordinate and the second coordinate. Specifically, the system uses the edge formed by the first coordinate and the second coordinate to calculate the angle between the edge and the x-axis to obtain the actual angle of the material. The calculation process needs to consider the directionality of the angle, usually taking the counterclockwise direction as positive. The system also needs to normalize the calculated angle to keep it within a reasonable range.
[0132] Step S311, performing rigid transformation to calculate the fitting position based on the actual corner point coordinates, the standard corner point coordinates, the actual material angle and the standard material angle;
[0133] Among them, rigid transformation refers to the transformation method that keeps the shape and size of the object unchanged during the spatial transformation process, which only includes translation and rotation; the fitting position refers to the target installation position that the material should reach after the rigid transformation; the actual corner point coordinates represent the corner point position of the material in the current state; the standard corner point coordinates refer to the corner point position of the material's expected installation position; the actual angle of the material represents the current angle between the material and the x-axis; the standard material angle refers to the angle that the material should form with the x-axis at the target position; the rotation matrix is used to achieve angle transformation; the translation vector represents the change in position.
[0134] This step is performed after obtaining the position angle information of the material's current state and target state. Specifically, the system first calculates the rotation transformation required for the material, and rotates the material from the actual angle to the standard angle. This process is achieved through the rotation matrix. Then the translation between the rotated position and the standard position is calculated, and the material is moved to the target position through the translation vector. The entire transformation process strictly follows the characteristics of rigid transformation.
[0135] In some embodiments, the calculation of the fitting position of the rigid transformation can be achieved in a variety of ways: optionally, a matrix decomposition method is used, firstly a rigid transformation matrix from the current state to the target state is constructed, and then the matrix is decomposed into two parts: a rotation matrix and a translation vector, and then the rotation transformation corresponding to the angle difference and the translation transformation corresponding to the position difference are calculated respectively, and finally the two transformations are applied to the actual corner points in sequence to obtain the fitting position; optionally, a two-step transformation method is used, firstly the difference between the actual angle and the standard angle is calculated to construct a rotation matrix, a pure rotation transformation is performed on the material, and then the difference between the position after rotation and the standard position is calculated as a translation vector, and the material is moved to the final position through the translation transformation. It is understandable that other methods such as quaternion transformation, homogeneous coordinate transformation, etc. can also be used to implement rigid transformation calculation, which is not limited here.
[0136] Step S312, positioning and correcting the material according to the bonding position;
[0137] Refer to step S60, which will not be described in detail here.
[0138] In general, in the embodiment of the present application, a positioning and deviation correction method of a color mark sensor is innovatively proposed. The color mark sensor is used to continuously scan the material, and the position information of the linear module encoder and the belt encoder is synchronously recorded in combination with the level change moments of the starting point, the first mark point and the second mark point. Based on the pre-calibrated sensor motion trajectory angle, the coordinates of each mark point and the movement distance within the time interval are calculated, and finally the actual corner point coordinates and the fitting position of the material are obtained through geometric transformation. Therefore, high-precision edge detection and position calculation can be achieved when the material is in continuous motion, which effectively solves the technical problems that the traditional detection method is difficult to simultaneously obtain the spatial position and motion compensation information of the material, cannot accurately restore the actual posture of the material, and the positioning accuracy is greatly affected by the movement of the material, thereby realizing an accurate and reliable material edge detection and posture calculation scheme. The scheme establishes a complete material spatial position description through multi-point sampling and time-series recording of the material edge; uses dual encoders to record the movement distance to achieve accurate position compensation; and uses rigid transformation to correspond the detection coordinates with the standard coordinates to ensure the accurate fitting of the material. In addition, the solution fully considers the impact of material movement on positioning and adopts a real-time compensation strategy to ensure positioning accuracy in a high-speed production environment. The entire detection process is highly automated and does not require human intervention, which significantly improves the system's reliability and work efficiency.
[0139] In addition, the embodiment of the present application also provides a positioning and correction device based on a color mark sensor, the device comprising:
[0140] A sensor module, used for controlling the movement of the color mark sensor, and recording the coordinates of the starting point, the coordinates of the first marking point, the coordinates of the second marking point, and the distances of the first marking point and the second marking point from the starting point;
[0141] A conveyor belt module, used for controlling the movement of the conveyor belt and recording the first movement distance and the second movement distance;
[0142] A calculation module is used to calculate the coordinates of the first marking point and the second marking point based on the distances of the first marking point and the second marking point from the starting point and the angle, calculate the actual corner point coordinates of the material based on the starting point coordinates, the first marking point coordinates, the second marking point coordinates, the first movement distance and the second movement distance, and calculate the fitting position based on the actual corner point coordinates and the standard corner point coordinates to achieve positioning and correction of the material.
[0143] The positioning and deviation correction device based on the color mark sensor provided in the embodiment of the present application adopts the positioning and deviation correction method based on the color mark sensor in the above embodiment, which can solve the technical problem that the material positioning and deviation correction in the production process are too complicated. Compared with the prior art, the beneficial effects of the positioning and deviation correction device based on the color mark sensor provided in the embodiment of the present application are the same as the beneficial effects of the positioning and deviation correction method based on the color mark sensor provided in the above embodiment, and the other technical features of the positioning and deviation correction device based on the color mark sensor are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0144] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the positioning and correction method based on the color mark sensor of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.
[0145] The present application provides a positioning and correcting device based on a color mark sensor, and the positioning and correcting device based on a color mark sensor includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the positioning and correcting method based on the color mark sensor in the above-mentioned embodiment 1.
[0146] Reference below Figure 4, which shows a schematic diagram of the structure of a positioning and deviation correction device based on a color mark sensor suitable for implementing the embodiment of the present application. The positioning and deviation correction device based on a color mark sensor in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The positioning and correction device based on the color mark sensor shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0147] like Figure 4 As shown, the positioning and correcting device based on the color mark sensor may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM: Read Only Memory) 1002 or the program loaded from the storage device 1003 to the random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the positioning and correcting device based on the color mark sensor are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the positioning and correction device based on the color mark sensor to communicate with other devices wirelessly or by wire to exchange data. Although the color mark sensor-based positioning and correction device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.
[0148] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0149] The positioning and deviation correction device based on the color mark sensor provided in the present application adopts the positioning and deviation correction method based on the color mark sensor in the above embodiment, which can solve the technical problem that the material positioning and deviation correction in the production process are too complicated. Compared with the prior art, the beneficial effects of the positioning and deviation correction device based on the color mark sensor provided in the present application are the same as the beneficial effects of the positioning and deviation correction method based on the color mark sensor provided in the above embodiment, and the other technical features of the positioning and deviation correction device based on the color mark sensor are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0150] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0151] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0152] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the positioning and deviation correction method based on the color mark sensor in the above-mentioned embodiment.
[0153] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0154] The computer-readable storage medium may be included in the positioning and correcting device based on the color mark sensor; or may exist independently without being assembled into the positioning and correcting device based on the color mark sensor.
[0155] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0156] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned positioning and deviation correction method based on the color mark sensor, and can solve the technical problem that the material positioning and deviation correction in the production process are too complicated. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the positioning and deviation correction method based on the color mark sensor provided by the above-mentioned embodiment, and will not be repeated here.
[0157] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned positioning and deviation correction method based on the color mark sensor when executed by a processor.
[0158] The computer program product provided by the present application can solve the technical problem that the material positioning and deviation correction in the production process are too complicated. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the positioning and deviation correction method based on the color mark sensor provided in the above embodiment, which will not be repeated here.
[0159] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A positioning and correction method based on a color mark sensor, characterized in that: The positioning and deviation correction method based on the color mark sensor includes: Calibrate the motion trajectory of the color mark sensor to obtain the angle between the motion trajectory and the preset axis; Scan the material by the color mark sensor, record the first point detected by the color mark sensor as the starting point, and record the coordinates of the starting point; Record the distances of two points detected on one side of the starting point as a first marking point and a second marking point from the starting point, calculate the coordinates of the first marking point and the second marking point based on the angle, and record a first movement distance within a time interval between the starting point and the recording of the first marking point coordinates and a second movement distance within a time interval between the starting point and the recording of the second marking point; Calculate the actual corner coordinates of the material based on the starting point coordinates, the first marking point coordinates, the second marking point coordinates, the first movement distance, and the second movement distance; Calculating the fitting position based on the actual corner point coordinates and the standard corner point coordinates; The positioning and deviation correction of the material are performed according to the bonding position.
2. The method according to claim 1, characterized in that The step of calibrating the motion trajectory of the color mark sensor and obtaining the angle between the motion trajectory and the preset axis specifically includes: A plane rectangular coordinate system is established with the material movement direction as the positive x-axis and the direction perpendicular to the x-axis as the y-axis; Marking a third marking point and a fourth marking point where the color mark sensor moves on the conveyor belt; Starting the conveyor belt to move the third marking point and the fourth marking point into the motion range of the manipulator; Recording a first distance of movement of the conveyor belt, coordinates of a fifth marking point corresponding to the third marking point, and coordinates of a sixth marking point corresponding to the fourth marking point; Calculate the third marking point coordinates and the fourth marking point coordinates according to the first distance, the fifth marking point coordinates and the sixth marking point coordinates; The angle is calculated according to the coordinates of the third marking point and the coordinates of the fourth marking point.
3. The method according to claim 2, characterized in that The step of scanning the material by the color mark sensor, recording the first point detected by the color mark sensor as the starting point, and recording the coordinates of the starting point specifically includes: When the color mark sensor scans from the preset color conveyor belt to the preset color material, a level change occurs, and the position of the linear module encoder is recorded at this time; The starting point coordinates are determined according to the position of the linear module encoder, and the first position of the belt encoder at this time is recorded.
4. The method according to claim 3, characterized in that The step of recording the distances of two points detected on one side of the starting point as a first marking point and a second marking point from the starting point, and calculating the coordinates of the first marking point and the second marking point based on the angle, and recording a first movement distance within a time interval between the starting point and recording the coordinates of the first marking point and a second movement distance within a time interval between the starting point and recording the coordinates of the second marking point, specifically includes: When the color mark sensor moves to the side edge of the material on the side of the starting point, a level change occurs, the position of the linear module encoder at that moment is recorded, and the coordinates of the first marking point are determined based on the angle, and the second position of the belt encoder at this moment is recorded; When the color mark sensor moves to the side edge of the material on the side of the starting point again, a level change occurs, the position of the linear module encoder at that moment is recorded, and the coordinates of the second marking point are determined based on the angle, and the third position of the belt encoder at this moment is recorded; The first movement distance and the second movement distance are calculated based on the first position, the second position, and the third position.
5. The method according to claim 4, characterized in that The step of calculating the actual corner point coordinates of the material based on the starting point coordinates, the first marking point coordinates, the second marking point coordinates, the first movement distance, and the second movement distance specifically includes: Calculate a first coordinate on the material corresponding to the first marking point coordinate based on the first marking point coordinate and the first movement distance; Calculate the second coordinates on the material corresponding to the second marking point coordinates based on the second marking point coordinates and the second movement distance; The actual corner point is calculated according to the first coordinate, the second coordinate and the starting point coordinate.
6. The method according to claim 5, characterized in that The step of calculating the fitting position based on the actual corner point coordinates and the standard corner point coordinates specifically includes: The first coordinate and the second coordinate are used to calculate the actual angle of the material; Based on the actual corner point coordinates, the standard corner point coordinates, the actual material angle and the standard material angle, a rigid transformation is performed to calculate the fitting position.
7. A positioning and correction device based on a color mark sensor, characterized in that: The device comprises: A sensor module, used for controlling the movement of the color mark sensor, and recording the coordinates of the starting point, the coordinates of the first marking point, the coordinates of the second marking point, and the distances of the first marking point and the second marking point from the starting point; A conveyor belt module, used for controlling the movement of the conveyor belt and recording the first movement distance and the second movement distance; A calculation module is used to calculate the coordinates of the first marking point and the second marking point based on the distances of the first marking point and the second marking point from the starting point and the angle, calculate the actual corner point coordinates of the material based on the starting point coordinates, the first marking point coordinates, the second marking point coordinates, the first movement distance and the second movement distance, and calculate the fitting position based on the actual corner point coordinates and the standard corner point coordinates to achieve positioning and correction of the material.
8. A positioning and correction device based on a color mark sensor, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the positioning and deviation correction method based on a color mark sensor as described in any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the positioning and deviation correction method based on a color mark sensor as claimed in any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the positioning and deviation correction method based on a color mark sensor as claimed in any one of claims 1 to 6 are implemented.