Robot position detection calibration method, robot and related device
Patent Information
- Application Number
- CN202610962512.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-09-25
AI Technical Summary
该方式虽然能够完成检测路径生成,但对操作人员经验依赖较强,并且当车辆工件、工装或机器人相对位置发生变化后,往往需要重新示教或重新注册坐标系,导致检测任务调整周期较长、现场适应性较差,难以兼顾检测效率和部署灵活性
[0050]借由上述技术方案,本申请的机器人检测位置标定方法,首先,基于预先标定的车辆坐标系与机器人坐标系之间的第一转换参数,将车辆坐标系下待检测点的检测位置和法向量统一映射到机器人坐标系下,得到第一检测位置和第一法向量,使车辆设计数据能够转换为机器人可识别的检测空间信息。
Smart Images

Figure CN122813764A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of data processing and vehicle body inspection technology, and more specifically, to a robot detection position calibration method, a robot, and related equipment. Background Technology
[0002] In vehicle manufacturing and body component inspection, robots carrying inspection tools are typically used to automatically inspect multiple points on the vehicle body or tooling. The design data for the points to be inspected is generally established in the vehicle coordinate system, while the robot needs to perform motion control based on the target points in the robot coordinate system when performing the inspection task.
[0003] In the existing method, the operator moves the robot's end effector point by point to the corresponding detection position and records the detection points. Although this method can generate the detection path, it is highly dependent on the operator's experience. Furthermore, when the relative positions of the vehicle, workpiece, tooling, or robot change, it is often necessary to re-teach or re-register the coordinate system. This results in a long adjustment cycle for the detection task, poor on-site adaptability, and difficulty in balancing detection efficiency and deployment flexibility. Summary of the Invention
[0004] In view of the above problems, this application is proposed to provide a robot detection position calibration method, a robot, and related equipment to improve the efficiency and flexibility of robot detection. The specific solution is as follows:
[0005] Firstly, this application provides a robot detection position calibration method, including:
[0006] Obtain the detection position and normal vector of the point to be detected in the vehicle coordinate system;
[0007] Based on the first transformation parameters between the pre-calibrated vehicle coordinate system and robot coordinate system, the detection position and the normal vector are transformed into the robot coordinate system to obtain the first detection position and the first normal vector;
[0008] The posture information of the robot end effector in the robot coordinate system is determined based on the first normal vector, so that the operation axis direction of the detection tool in the posture information is parallel to the first normal vector;
[0009] The first detection position and the posture information are used as the target detection pose for controlling the robot to carry the detection tool to perform detection.
[0010] In one possible implementation, in another implementation of the first aspect of the embodiments of this application, the process of determining the posture information of the robot end effector in the robot coordinate system based on the first normal vector includes:
[0011] Using the first normal vector as an orientation constraint, the target space orientation of the operation axis of the robot end effector at the first detection position is determined, and the target space orientation is parallel to the first normal vector.
[0012] Based on the target space orientation and the preset reference direction, establish the tool coordinate system corresponding to the detection tool at the first detection position;
[0013] The direction vectors corresponding to each coordinate axis in the tool coordinate system are combined to obtain the rotation parameters of the tool coordinate system relative to the robot coordinate system, which are used as the attitude information of the detection tool in the robot coordinate system.
[0014] In one possible implementation, in another implementation of the first aspect of the embodiments of this application, after establishing the tool coordinate system corresponding to the detection tool at the first detection position, the method further includes:
[0015] Obtain robot posture constraints;
[0016] While keeping the target space orientation consistent with the direction between the first normal vector and the target space orientation, the rotation angle of the tool coordinate system about the operation axis is adjusted to obtain multiple candidate tool coordinate systems;
[0017] The tool coordinate system that satisfies the robot posture constraints is selected from a plurality of candidate tool coordinate systems.
[0018] In one possible implementation, in another implementation of the first aspect of the embodiments of this application, the process of selecting a tool coordinate system that satisfies the robot posture constraints from a plurality of candidate tool coordinate systems includes:
[0019] Each of the candidate tool coordinate systems is converted into a candidate pose in the robot coordinate system;
[0020] Calculate the attitude deviation between each candidate attitude and the desired attitude corresponding to the robot attitude constraint;
[0021] The candidate tool coordinate system corresponding to the candidate posture with the smallest posture deviation is selected as the tool coordinate system that satisfies the robot posture constraints.
[0022] In one possible implementation, in another implementation of the first aspect of the embodiments of this application, the calibration process of the first transformation parameter between the vehicle coordinate system and the robot coordinate system includes:
[0023] Obtain the center coordinates of at least three non-collinear standard spheres set on the tooling in the vehicle coordinate system;
[0024] The robot is controlled to carry sensors to collect multiple pose points on the surface of each standard sphere, thereby obtaining the coordinates of multiple spherical points corresponding to each standard sphere in the robot coordinate system.
[0025] Based on the coordinates of the spherical point in the robot coordinate system and the coordinates of the center of the sphere in the vehicle coordinate system corresponding to each standard sphere, the spatial correspondence between the vehicle coordinate system and the robot coordinate system is determined, and the first transformation parameter is determined according to the spatial correspondence.
[0026] In one possible implementation, in another implementation of the first aspect of the embodiments of this application, the process of controlling the robot to carry sensors to perform multi-pose point sampling on the spherical surface of each of the standard spheres, and obtaining the spherical point coordinates of multiple spherical sampling points corresponding to each standard sphere in the robot coordinate system, includes:
[0027] Each time a data point is sampled, the current operating axis direction of the sensor and the current sensor reading are obtained.
[0028] The sensor obtains a pre-calibrated sensor reference reading, and the sensor is used to detect the distance between the measured surface or measured point and the sensor. The sensor reference reading is used to characterize the reading of the sensor when the measured point is at a preset reference point. The preset reference point is a known reference point of the sensor in the robot coordinate system.
[0029] Based on the current operating axis direction, the current sensor reading, the current spatial coordinates of the preset reference point in the robot coordinate system, and the sensor reference reading, determine the spherical point coordinates of the corresponding spherical acquisition point in the robot coordinate system.
[0030] In one possible implementation, in another implementation of the first aspect of this application, the process of determining the spatial correspondence between the vehicle coordinate system and the robot coordinate system based on the coordinates of the spherical point in the robot coordinate system and the coordinates of the center of the sphere in the vehicle coordinate system corresponding to each of the standard spheres, and determining the first transformation parameter according to the spatial correspondence, includes:
[0031] By performing sphere center fitting on the coordinates of multiple spherical points corresponding to each standard sphere, the sphere center coordinates of each standard sphere in the robot coordinate system are obtained;
[0032] The first transformation parameter is obtained by solving for the rigid change between the center coordinates of all the standard spheres in the vehicle coordinate system and the center coordinates of the spheres in the robot coordinate system.
[0033] In one possible implementation, in another implementation of the first aspect of this application, the process of determining the spatial correspondence between the vehicle coordinate system and the robot coordinate system based on the coordinates of the spherical point in the robot coordinate system and the coordinates of the center of the sphere in the vehicle coordinate system corresponding to each of the standard spheres, and determining the first transformation parameter according to the spatial correspondence, includes:
[0034] Obtain the standard sphere radius for each of the aforementioned standard spheres;
[0035] Construct an objective function consisting of radius deviation terms corresponding to each of the standard spheres. For any standard sphere, the radius deviation term is: the difference between the spatial distance between the coordinates of the sphere's surface point and the predicted center coordinates in the robot coordinate system and the radius of the standard sphere. The predicted center coordinates are the coordinates of the standard sphere's center in the vehicle coordinate system, which are obtained after being transformed to the robot coordinate system by the transformation parameters to be solved.
[0036] The first transformation parameter is obtained by minimizing the objective function.
[0037] In one possible implementation, in another implementation of the first aspect of the embodiments of this application, the method further includes:
[0038] The robot is controlled to move the detection tool to a preset range of the point to be detected based on the target detection pose.
[0039] The real-time sensor reading corresponding to the detection tool is obtained, and the sensor is used to detect the distance between the detection point and the sensor based on the difference between the real-time sensor reading and the sensor preset reading. The sensor preset reading is used to characterize the sensor reading when the detection point is at a preset position.
[0040] If the difference exceeds a preset threshold, determine the position compensation amount of the detection tool along the operating axis; based on the position compensation amount, control the robot to correct the position of the detection tool along the operating axis.
[0041] Repeatedly acquire the real-time sensor readings and correct the position of the detection tool until the deviation between the real-time sensor reading and the sensor reference reading is not greater than the preset threshold.
[0042] Secondly, this application provides a robot, including: a robot body, a detection tool, and a controller, wherein the detection tool is disposed at the end of the robot body;
[0043] The controller is used to implement the robot detection position calibration method described in any of the first aspects of this application, to obtain a target detection pose for controlling the robot to carry the detection tool to perform detection, and to control the robot body to move the detection tool according to the target detection pose to detect the point to be detected.
[0044] In one possible implementation, in another embodiment of the second aspect of this application, the robot further includes a spectral confocal sensor for acquiring attitude points of at least three non-collinear standard spheres disposed on the tooling.
[0045] Thirdly, this application provides an electronic device, including: a memory and a processor;
[0046] The memory is used to store programs;
[0047] The processor is configured to execute the program to implement the robot detection position calibration method described in any of the first aspects of this application.
[0048] Fourthly, this application provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the robot detection position calibration method described in any of the first aspects of this application.
[0049] Fifthly, a computer program product is provided, including a computer program that, when executed by a processor, implements the robot detection position calibration method described in any of the first aspects of this application.
[0050] Using the above technical solution, the robot detection position calibration method of this application firstly maps the detection position and normal vector of the point to be detected in the vehicle coordinate system to the robot coordinate system based on the first transformation parameter between the pre-calibrated vehicle coordinate system and the robot coordinate system, thereby obtaining the first detection position and the first normal vector, so that the vehicle design data can be converted into detection space information that the robot can recognize.
[0051] Furthermore, the posture information of the robot's end effector in the robot coordinate system is determined based on the first normal vector, ensuring that the operation axis direction of the end effector is parallel to the first normal vector. This guarantees that when the end effector reaches the point to be inspected, it can perform inspection along a normal that matches the surface being measured, reducing repeated posture adjustments, path exploration, and re-teaching caused by unclear end effector orientation, thereby improving the efficiency of inspection path planning and deployment and the flexibility of scene adaptation. Finally, by associating and integrating the spatial coordinate information represented by the first inspection position with the posture information of the inspection tool, the complete pose parameters of the end effector when the robot performs inspection at the point to be inspected are obtained, serving as a motion target that can be directly called by the robot controller. Attached Figure Description
[0052] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0053] Figure 1 This is a schematic diagram of an implementation system architecture for the robot detection position calibration method provided in the embodiments of this application;
[0054] Figure 2 A flowchart illustrating a robot detection position calibration method provided in this application embodiment;
[0055] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0056] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0057] This application can be applied to industrial inspection scenarios such as automobile manufacturing, body parts inspection, headlight inspection, tooling fixture inspection, and online measurement of precision structural parts.
[0058] Taking an automotive manufacturing production line as an example, vehicle coordinate systems are established during the design phase for vehicle parts or tooling. The locations of inspection points on objects such as the body, headlights, interior and exterior trim brackets, and welding fixtures are typically stored in inspection planning documents, coordinate measuring machine (CMM) inspection documents, or process design documents in the form of data within the vehicle coordinate system. However, during actual inspection, the robot controller relies on the robot coordinate system to execute movements. The actual movement position and posture of the robot's end effector inspection tool need to be converted into a target pose that the robot can recognize. Therefore, before the robot carries the inspection tool to perform automatic inspection, the conversion between inspection points in the vehicle coordinate system and the execution pose in the robot coordinate system needs to be resolved.
[0059] However, in actual production lines, the aforementioned problems exhibit strong characteristics of on-site changes. For example, changing vehicle models, adjusting tooling base plates, moving fixtures, replacing robots, reinstalling inspection tools, or changing workpiece clamping positions can all alter the relative spatial relationship between the vehicle coordinate system and the robot coordinate system. If manual teaching is still used, operators must use a teach pendant to move the robot point by point to each inspection point and record the robot's position and posture at each point. For workpieces with dozens or even hundreds of inspection points, manual teaching is not only time-consuming but also heavily reliant on operator experience. When the tooling position changes again, the original teaching points often become unusable, requiring re-teaching, resulting in long deployment cycles for inspection programs and poor on-site adjustment flexibility.
[0060] To address the low efficiency of manual teaching, existing solutions have proposed offline programming methods based on commercial measurement software. This involves first generating a detection path in the robot coordinate system for each detection point using measurement software such as PC-DMIS or PolyWorks, and then exporting the detection path for robot execution. While this method can reduce the workload of point-by-point teaching to some extent, it still requires re-registering the coordinate system, re-transforming the path, or re-calibrating the point position when the tooling or workpiece position changes. This results in low calibration efficiency and poor adaptability to tooling changes.
[0061] Based on the actual needs of the above application scenarios and the shortcomings of existing technologies, this application provides a robot detection position calibration method. Specifically, this application uses a standard sphere calibration object on the tooling to establish a transformation relationship between the vehicle coordinate system and the robot coordinate system, enabling vehicle design data to be directly mapped to the robot execution space. Then, the position and corresponding orientation information of the point to be inspected are transformed to the robot coordinate system, and the target pose of the inspection tool is automatically generated accordingly. Thus, without the need for point-by-point teaching or reconfiguration of each inspection point, the robot detection pose can be automatically obtained based on the design data. When the position of the tooling or inspection point changes, only the coordinate system transformation relationship needs to be re-determined or the calibration based on the geometric information of the inspection point needs to be performed to quickly update all inspection poses, enabling rapid deployment of inspection tasks, improving the efficiency of detection position calibration, and enhancing adaptability to changes in the field. The robot detection position calibration method of this application embodiment will be described in detail below with reference to the accompanying drawings.
[0062] See Figure 1 , Figure 1 A schematic diagram of a system architecture is shown. The system may include a robot, a vehicle, and a tooling base plate; the robot may include one or more (…). Figure 1 (The example includes a robot).
[0063] The tooling base plate serves as the basic support platform for assembly, testing, and production workstations. Both vehicles and robots can be positioned on top of the tooling base plate. Vehicles can be placed in the central area of the tooling base plate and secured by multiple sets of supporting and positioning fixtures on the base plate, allowing the vehicle body to be suspended above the base plate and positioned in the center of the workstation, so that robots can perform assembly, testing, and other operations on the vehicle.
[0064] The robot may include a robot body, an inspection tool, and a controller. The inspection tool is located at the end effector of the robot body. The controller drives the robotic arm of the robot body to move the end effector inspection tool, enabling automated processing and inspection of vehicles fixed to a tooling base plate.
[0065] In this embodiment, the robot can independently execute the robot detection position calibration method provided in this embodiment to obtain the target detection pose for controlling the robot to carry the detection tool to perform detection, and based on the target detection pose, control the robot body to move the detection tool to complete the detection operation of the point to be detected. In addition, the robot can also cooperate with other terminals, servers, and other devices to jointly execute the robot detection position calibration method provided in this embodiment.
[0066] This application provides a robot position calibration method, illustrated by its application to a robot controller. (Refer to...) Figure 2The present application provides a flowchart of a robot detection position calibration method, which may include steps S110 to S140, and these steps are described in detail below.
[0067] Step S110: Obtain the detection position and normal vector of the point to be detected in the vehicle coordinate system.
[0068] The point to be tested can refer to Figure 1 The specific target location in a vehicle that needs to be inspected for dimensions, gaps, or appearance. The inspection location can be represented in the form of three-dimensional coordinates (X,Y,Z), representing the absolute spatial position of the point to be inspected in the vehicle coordinate system; the normal vector can be a unit vector perpendicular to the surface being measured where the point to be inspected is located, and can be represented in the form of (Nx,Ny,Nz) to indicate the ideal angular direction when the inspection tool contacts or approaches the surface being measured.
[0069] The detection position and normal vector of the point to be inspected can be obtained by reading the vehicle's design data or by exporting inspection files previously measured using a coordinate measuring machine, such as the DMO format file output by PC-DMIS software. Specifically, the controller parses the DMO file to extract the three-dimensional coordinates of each point to be inspected in the vehicle's own coordinate system (i.e., the vehicle coordinate system) and its corresponding surface normal information. By reading this predefined geometric information, a basic data source is provided for subsequent coordinate transformation and attitude planning, ensuring that the inspection task strictly adheres to vehicle design specifications.
[0070] Step S120: Based on the first transformation parameters between the pre-calibrated vehicle coordinate system and robot coordinate system, the detection position and normal vector are transformed to the robot coordinate system to obtain the first detection position and the first normal vector.
[0071] The first transformation parameter is a parameter that characterizes the spatial rigid transformation relationship between the vehicle coordinate system and the robot coordinate system, and may include the rotation matrix R and the translation vector T. Based on the first transformation parameter, for any detection position P_body and normal vector N_body, they can be transformed to the robot coordinate system by formula (1) to obtain the first detection position P_robot and N_robot.
[0072] (1)
[0073] The first transformation parameter between the vehicle coordinate system and the robot coordinate system can be pre-calibrated in various ways. In one optional calibration method, the theoretical positional relationship of the same calibration object in the vehicle coordinate system and the measured positional relationship in the robot coordinate system can be obtained first. Then, the first transformation parameter between the vehicle coordinate system and the robot coordinate system can be determined through point-to-point matching, geometric datum construction, rigid transformation solution, or coordinate transformation link synthesis. In another optional calibration method, it can also be determined based on known calibration feature points on the tooling. In this embodiment, this application does not impose a single limitation.
[0074] Step S130: Determine the attitude information of the robot end effector in the robot coordinate system based on the first normal vector, so that the operation axis direction of the detection tool in the attitude information is parallel to the first normal vector.
[0075] The inspection tool can refer to the actuator installed at the end of a robot, such as a spectral confocal distance sensor, a laser scanner, or a tactile probe. Its operating axis direction can be understood as the Z-axis direction of the tool coordinate system. The attitude information of the robot's end-effector inspection tool can be understood as data describing the spatial orientation of the inspection tool in the robot coordinate system, which can be represented by rotation matrices, quaternions, or Euler angles (RPY).
[0076] In the embodiments of this application, the attitude information of the robot end effector in the robot coordinate system can be determined in various ways. In one optional implementation, the first detection position can be used as the position constraint of the robot end effector, and the parallelism between the operation axis direction of the detection tool and the first normal vector can be used as the orientation constraint of the robot end effector. Inverse kinematics is then performed by combining robot joint limits, obstacle avoidance conditions, attitude continuity conditions, or the user's desired attitude to obtain the robot end effector attitude that satisfies both the position and orientation constraints. This robot end effector attitude is then used as the attitude information of the detection tool. In another implementation, an attitude template library including multiple candidate attitudes can be pre-established. Based on the orientation deviation between the first normal vector and the corresponding operation axis direction of each candidate attitude, a target candidate attitude is selected from the attitude template library. The target candidate attitude is then oriented and corrected so that the operation axis direction of the detection tool is parallel to the first normal vector in the corrected attitude, thereby obtaining the attitude information of the detection tool.
[0077] Therefore, the embodiments of this application constrain the measurement direction of the detection tool by using the first normal vector, which can transform the direction of the measured surface where the point to be detected is located into the robot end posture requirements, so that the robot can obtain the target detection pose that meets the actual measurement conditions of the detection tool.
[0078] Step S140: Use the first detection position and posture information as the target detection pose for controlling the robot to carry the detection tool to perform detection.
[0079] It is understandable that target detection pose is formed by encapsulating the initial detection position and attitude information into motion commands that can be directly executed by the robot controller. This target detection pose data can drive the robot body to move the detection tool to a specified position and perform the detection operation at a specified angle.
[0080] In summary, the robot detection position calibration method of this application firstly maps the detection position and normal vector of the point to be detected in the vehicle coordinate system to the robot coordinate system based on the pre-calibrated first transformation parameters between the vehicle coordinate system and the robot coordinate system, thus obtaining the first detection position and the first normal vector. This allows the vehicle design data to be converted into detection spatial information that the robot can recognize. Furthermore, in practical applications, when the tooling or vehicle position changes slightly, only the first transformation parameters need to be recalibrated and updated, without regenerating or modifying the specific detection point program. All target detection poses will automatically update as the coordinate system changes. In this way, the automated generation and flexible reuse of detection position calibration are achieved, reducing the time cost of manual teaching and improving the adaptability of the production line to multi-model mixed-line production.
[0081] Furthermore, the posture information of the robot's end effector in the robot coordinate system is determined based on the first normal vector, ensuring that the operation axis direction of the end effector is parallel to the first normal vector. This guarantees that when the end effector reaches the point to be inspected, it can perform inspection along a normal that matches the surface being measured, reducing repeated posture adjustments, path exploration, and re-teaching caused by unclear end effector orientation, thereby improving the efficiency of inspection path planning and deployment and the flexibility of scene adaptation. Finally, by associating and integrating the spatial coordinate information represented by the first inspection position with the posture information of the inspection tool, the complete pose parameters of the end effector when the robot performs inspection at the point to be inspected are obtained, serving as a motion target that can be directly called by the robot controller.
[0082] Next, other possible implementations of the robot detection position calibration method proposed in this application will be described in detail through the following embodiments.
[0083] In one possible implementation, the calibration process of the first transformation parameter between the vehicle coordinate system and the robot coordinate system required in step S120 includes: obtaining the center coordinates of at least three non-collinear standard spheres set on the tooling in the vehicle coordinate system; controlling the robot to carry sensors to perform multi-pose point sampling on the surface of each standard sphere to obtain the spherical point coordinates of multiple spherical sampling points corresponding to each standard sphere in the robot coordinate system; determining the spatial correspondence between the vehicle coordinate system and the robot coordinate system based on the spherical point coordinates in the robot coordinate system and the center coordinates of each standard sphere in the vehicle coordinate system, and determining the first transformation parameter according to the spatial correspondence.
[0084] The standard sphere refers to a reference element with known geometric dimensions, which is fixedly mounted on the tooling base plate used to support the vehicle to be tested. The center coordinates of the sphere are the three-dimensional spatial coordinates of the center point of the standard sphere in the vehicle coordinate system. The center coordinates and dimensions (such as the radius of the standard sphere) of the standard sphere can be obtained from the design drawings of the tooling or pre-measured and stored in the controller as known true values.
[0085] Furthermore, at least three non-collinear standard spheres are selected from among many standard spheres as the detection objects. It is understandable that at least three non-collinear standard spheres can form a spatial reference frame (such as a triangular plane), allowing the derivation of the rigid body transformation relationship between this spatial reference frame in the vehicle coordinate system and the robot coordinate system, thereby determining the rigid body transformation relationship between the vehicle coordinate system and the robot coordinate system. However, if the center of the sphere is empty, rotation around the line connecting the centers of the spheres cannot be constrained, resulting in directional uncertainty in the calibration's coordinate system transformation relationship, leading to inaccurate correspondence results and calibration failure.
[0086] Based on this, the controller controls the robot body to drive the sensors installed at the robot's end effector to approach and measure different spherical sampling points on the same standard sphere from multiple directions with different joint angle combinations and end effector postures. The controller obtains the sensor readings for each spherical sampling point and determines the spherical coordinates of each sampling point in the robot's coordinate system.
[0087] The sensor is used to measure the distance between the measured point or surface (such as a spherical acquisition point) and the sensor. Optionally, the sensor can be a spectral confocal sensor. Therefore, the sensor does not directly output the three-dimensional spatial coordinates of the spherical acquisition point; instead, the spherical point coordinates need to be calculated based on the sensor readings and / or the robot's current end-effector pose. In one possible implementation, the controller can determine the starting point and direction of the sensor's measurement ray in the robot coordinate system based on the robot's current end-effector pose and sensor installation parameters, and determine the measurement distance along the ray direction based on the current sensor readings. Subsequently, using the ray starting point as the starting point, the controller moves the measurement distance along the ray direction to obtain the spherical point coordinates in the robot coordinate system.
[0088] In another possible implementation, the process of obtaining the coordinates of each spherical point may include: obtaining the current operating axis direction of the sensor and the current sensor reading each time a point is sampled; obtaining a pre-calibrated sensor reference reading; and, the sensor is used to detect the distance between the measured surface or measured point and the sensor, the sensor reference reading is used to characterize the sensor reading when the measured point is at a preset reference point, the preset reference point being a known reference point of the sensor in the robot coordinate system; and determining the spherical point coordinates of the corresponding spherical sampling point in the robot coordinate system based on the current operating axis direction, the current sensor reading, the current spatial coordinates of the preset reference point in the robot coordinate system, and the sensor reference reading.
[0089] Once the robot has moved to a certain sampling pose and stabilized, the controller reads the pose matrix of the robot's end flange through the communication interface and extracts the Z-axis vector of the tool coordinate system as the current operating axis direction. Simultaneously, it triggers the sensor to perform a distance measurement, obtaining a high-precision current sensor reading. This reading represents the straight-line distance from the front of the sensor lens to the reflection point of the measured spherical surface. Based on this, it ensures that the calculation of the coordinates of each spherical point is based on accurate instantaneous pose information, avoiding data asynchrony and inaccuracy caused by robot jitter or delay.
[0090] The sensor reference reading (RefValue) is a preset constant parameter used to characterize the sensor reading when the measured point is located at the preset reference point, and to convert the current sensor reading into the offset of the measured point relative to the preset reference point. In this embodiment, the preset reference point can be understood as the robot tool center point (TCP) or a measurement reference position with a fixed geometric relationship to the TCP.
[0091] It's important to note that the TCP (Center for Reference Point) is not a point directly measured by the sensor. Instead, it's a reference point used by the robot control system to describe the spatial position of the end effector. The sensor output is the position reading of the measured point relative to the sensor's measurement range along the sensor's measurement direction. Therefore, when calculating the spatial coordinates of the measured point based on the robot's TCP position and sensor readings, it's crucial to determine what reading the sensor should output when the measured point is precisely located at the TCP position. This reading is the sensor's reference reading. Because spectral confocal sensors have a finite range, and sensor readings are typically used to characterize the measured point's position within that range, the corresponding sensor reference reading will differ depending on the TCP's calibration at different reference positions within the sensor's range.
[0092] Specifically, if the TCP is calibrated at the sensor focal point or optimal measurement position, the sensor reference reading can be set to the reading corresponding to that focal point or optimal measurement position. If the focal point or optimal measurement position is located at the midpoint of the sensor range, the reference reading can be set to the midpoint value of the sensor range. If the TCP is calibrated at the near end or far end of the sensor range, the reference reading can be set to the near end reading or the far end reading accordingly. Taking a spectral confocal sensor with a range of 10 mm as an example, under the reading definition used in this embodiment, if the TCP is defined at the sensor focal point, and that focal point corresponds to the midpoint of the range of 5 mm, the sensor reference reading can be set to 5.0 mm. At this time, when the current sensor reading is also 5.0 mm, it indicates that the measured point is located at the preset reference point corresponding to the TCP, and the distance compensation along the measurement direction is zero.
[0093] Therefore, the spherical point coordinates need to be calculated based on the robot's current TCP position, combined with the difference between the sensor reading and the reference reading, and the offset is calculated along the sensor measurement direction. If the TCP is defined at the midpoint, near end, or far end of the sensor's range, the offset of the current sensor reading relative to the TCP will not be the same. If the reference reading does not match the actual TCP calibration position, it will cause a systematic deviation in the calculated spherical point coordinates along the sensor measurement direction, thus affecting the accuracy of subsequent sphere center fitting and coordinate system transformation parameter solving. By introducing sensor reference readings, this embodiment can unify different TCP calibration methods into a calculation framework of "preset reference point coordinates + reading offset", thereby adapting to different sensor installation methods and TCP calibration habits.
[0094] Based on the above understanding, referring to the following formula (2), the three-dimensional coordinates of the measured point in the robot base coordinate system are calculated using the previously obtained operating axis direction, sensor readings and reference readings.
[0095] P_surface=P_TCP+(RefValue-SensorReading)×Z_tool(2)
[0096] Where P_surface is the coordinate of the spherical point to be solved, P_TCP is the spatial coordinate of the current robot end effector TCP in the robot coordinate system, RefValue is the sensor reference reading, SensorReading is the current sensor reading, and Z_tool is the unit vector of the current operating axis direction.
[0097] Therefore, this embodiment of the application utilizes pre-calibrated reference readings as benchmark anchor points, and combines real-time changing sensor readings with the operating axis direction vector to construct a unified spherical point space reconstruction model. This allows the calibration method to flexibly adapt to various TCP setting strategies such as focus calibration, near-end calibration, or far-end calibration, and also improves the consistency and accuracy of spherical point coordinate calculation under different installation conditions.
[0098] Next, using the coordinates of the spherical points corresponding to each standard sphere in the robot coordinate system, and combining them with the coordinates of the center of each standard sphere in the vehicle coordinate system, the spatial correspondence between the vehicle coordinate system and the robot coordinate system is determined, and the first transformation parameter is determined based on this spatial correspondence. In one possible implementation, a theoretical model of the standard sphere in the vehicle coordinate system can be constructed based on the center coordinates and radii of each standard sphere in the vehicle coordinate system. Subsequently, the theoretical model is transformed based on the transformation parameters to be solved, resulting in a predicted model of the standard sphere. Simultaneously, a measured model of the standard sphere in the robot coordinate system is constructed based on the coordinates of multiple spherical points collected by the robot. By minimizing the deviation between the predicted and measured models of the standard sphere, the transformation parameters are obtained and used as the first transformation parameter.
[0099] In another possible implementation, the process of determining the first transformation parameter may include: fitting the center of the sphere to the coordinates of multiple spherical points corresponding to each standard sphere to obtain the center coordinates of each standard sphere in the robot coordinate system; and solving for the first transformation parameter based on the rigidity change between the center coordinates of all standard spheres in the vehicle coordinate system and the center coordinates of the spheres in the robot coordinate system.
[0100] First, the center coordinates of multiple spherical points corresponding to each standard sphere are fitted to reconstruct the estimated center coordinates of each standard sphere in the robot coordinate system. The specific implementation of the center fitting can include a free fitting strategy and a fixed radius fitting strategy. In the free fitting strategy, the center coordinates (X, Y, Z) and the sphere radius R are treated as four unknowns. An algebraic least squares objective function is constructed, and the center coordinates are obtained by minimizing the sum of the squared distances from all spherical points to the fitted center. In the fixed radius fitting strategy, the precise design radius of the standard sphere is known and used as a constraint. Only the center coordinates are treated as three unknowns, and the Gauss-Newton iteration method is used to solve the problem. This method can provide more stable center estimation results when the sampling angle coverage is incomplete (e.g., only the upper hemisphere is sampled).
[0101] Furthermore, we construct the set of sphere center coordinates {P_body_i} in the vehicle coordinate system and the set of sphere center coordinates {P_robot_i} in the robot coordinate system. Using the singular value decomposition (SVD) algorithm or the quaternion method, we solve for the rotation matrix R and translation vector T that can describe the rigid body transformation relationship from the vehicle coordinate system to the robot coordinate system, so as to minimize the error function after transformation.
[0102] Based on this, the embodiments of this application perform high-precision center-fitting on the multi-pose spherical points of each standard sphere, transforming discrete sensor measurement data into center points with clear geometric meaning, thus eliminating random errors caused by sensor reading noise and robot positioning jitter. Furthermore, utilizing the rigidity invariance of the center coordinates of all standard spheres in both coordinate systems, the complex coordinate system calibration problem is transformed into a classic absolute orientation problem, and the unique optimal rigid body transformation parameters are quickly solved using mature algorithms such as SVD. This processing logic of first local fitting and then global registration not only fully utilizes the spatial constraint information provided by multiple standard spheres, improving the accuracy of the calibration results, but also ensures the consistency between the vehicle body structure and the robot's execution space through the rigidity change assumption, making the subsequent detection point transformation based on this first transformation parameter highly reliable, thereby significantly improving the efficiency of automatic robot calibration and the final detection accuracy.
[0103] In another possible implementation, the process of determining the first transformation parameter may include: obtaining the standard sphere radius of each standard sphere; constructing an objective function composed of the radius deviation term corresponding to each standard sphere, wherein for any standard sphere, the radius deviation term is the difference between the spatial distance between the coordinates of the sphere's surface point in the robot coordinate system and the predicted sphere center coordinates, and the radius of the standard sphere, where the predicted sphere center coordinates are the coordinates of the standard sphere's center in the vehicle coordinate system, which are obtained after being transformed to the robot coordinate system by the transformation parameter to be solved; and minimizing the objective function to obtain the first transformation parameter.
[0104] In this embodiment, the standard sphere radius serves as a strong constraint in the joint optimization process, limiting the degrees of freedom in the solution space. By introducing the standard sphere radius, fitting errors caused by uneven distribution of sampling points (such as only collecting data from the upper half of the sphere) can be effectively corrected in subsequent optimization processes, ensuring the geometric consistency of the calibration results.
[0105] Based on this, an objective function F(R,T) containing the transformation parameters to be solved is constructed. This objective function consists of the radius deviation term corresponding to each standard sphere, as shown in equation (3).
[0106] (3)
[0107] Where P_meas_ij represents the spherical coordinates of the j-th spherical sampling point of the i-th standard sphere, P_body_i represents the coordinates of the center of the i-th standard sphere in the vehicle coordinate system, and r i Let represent the standard sphere radius of the i-th standard sphere.
[0108] Understandably, by using the transformation parameters (R and T) to be solved, the coordinates of the sphere centers in the vehicle coordinate system are transformed to the robot coordinate system, resulting in the theoretical center of each standard sphere in the robot coordinate system. For each standard sphere, the actual distance between the coordinates of each point on the sphere and the theoretical center is calculated. Theoretically, assuming the transformation relationship between the vehicle and robot coordinate systems represented by the transformation parameters to be solved is correct, the actual distance is equal to the radius ri of the standard sphere, meaning the objective function approaches 0.
[0109] Based on an understanding of the content, iterative solutions can be used, such as the Levenberg-Marquardt algorithm or the Gauss-Newton algorithm, to find the rotation matrix R and translation vector T that minimize the objective function value.
[0110] Therefore, by minimizing the objective function, solving for the objective function yields the first transformation parameters (R and T). In this way, the algorithm no longer relies on the intermediate sphere center fitting results, but directly utilizes the original measurement data and geometric constraints for global optimization, thus avoiding the step-by-step propagation of errors. Furthermore, by minimizing the overall residual using a nonlinear optimization algorithm, high-precision rigid body transformation parameters can still be obtained even when the quality of the sampled data from different standard spheres is inconsistent, ensuring the accuracy and stability of the robot's detection pose calibration.
[0111] In summary, this application embodiment constructs a stable spatial reference by acquiring at least three non-collinear standard spheres with known coordinates on the tooling. It then utilizes multi-pose point sampling of the standard spheres by a robot carrying sensors, and leverages the geometric coupling between sensor readings and robot pose to accurately invert the spatial morphology of the standard spheres in the robot coordinate system. Furthermore, based on the rigid matching of two sets of sphere center coordinates, high-precision spatial transformation parameters are solved. This process not only decouples the dependency between sensor measurement and robot motion control to adapt to different TCP calibration methods, improving the universality of this application, but also effectively eliminates random errors in single measurements through multi-point fitting and optimization algorithms, significantly improving the robustness of the calibration results. Additionally, this application embodiment can effectively replace the traditional high-cost laser tracker calibration scheme, enabling coordinate system calibration to be completed quickly and cost-effectively on the production line. Especially when the tooling position changes, it can support recalibration in a very short time, thereby ensuring the continuity and accuracy of the inspection task.
[0112] Next, using the first transformation parameters obtained from the above calibration, the detection position and normal vector are transformed into the robot coordinate system to obtain the first detection position and the first normal vector. Based on the obtained first normal vector, step S130 is executed.
[0113] In one possible implementation, the process of implementing step S130 may include: determining the target space orientation of the operation axis of the robot end effector at the first detection position using the first normal vector as the orientation constraint, wherein the target space orientation is parallel to the first normal vector; establishing a tool coordinate system corresponding to the detection tool at the first detection position based on the target space orientation and a preset reference direction; and combining the direction vectors corresponding to each coordinate axis in the tool coordinate system to obtain the rotation parameters of the tool coordinate system relative to the robot coordinate system, which serve as the attitude information of the detection tool in the robot coordinate system.
[0114] The target spatial orientation refers to the direction in which the operating axis (i.e., the Z-axis of the tool coordinate system) of the robot's end effector should point in three-dimensional space when performing an inspection task. In this embodiment, the target spatial orientation is configured to be parallel to the first normal vector, meaning that the direction of the operating axis of the inspection tool will coincide with or be opposite to the normal direction of the surface being measured, to ensure that the sensor can perform measurements perpendicular to the surface being measured, thereby obtaining the most accurate readings.
[0115] It is understandable that the tool coordinate system is a local Cartesian coordinate system defined on the robot's end effector, used to describe the spatial pose of the tool relative to the robot's base. However, since a three-dimensional coordinate system cannot be uniquely determined solely by the target spatial orientation (i.e., a single axis) (as there is a degree of freedom of rotation around that axis), this application introduces a preset reference direction to eliminate this redundant degree of freedom.
[0116] The preset reference direction can be a fixed axis in the robot's base coordinate system (such as the global X-axis or Y-axis), or an intermediate direction determined based on the sensor's field of view. Specifically, the target space orientation can first be used as a principal axis of the tool coordinate system (e.g., the Z_tool axis). Then, a cross product operation is performed between the preset reference direction and this principal axis to generate a second axis perpendicular to it (e.g., the X_tool axis). Finally, a third axis (e.g., the Y_tool axis) is generated through another cross product operation, thus constructing a complete, orthogonal right-handed Cartesian coordinate system, ensuring the geometric rationality and consistency of the posture generation.
[0117] Furthermore, the unit direction vectors of the three coordinate axes (X_tool, Y_tool, Z_tool) of the tool coordinate system in the robot coordinate system are respectively used as column vectors (or row vectors, depending on the coordinate system definition convention), and combined into a 3×3 rotation matrix. It can be understood that rotation parameters are mathematical quantities used to characterize the rotation state of the tool coordinate system relative to the robot coordinate system, and the rotation matrix can be used to characterize the attitude information of the detection tool in the robot coordinate system.
[0118] Optionally, the rotation matrix can be converted into corresponding Euler angle values according to the kinematic conventions of the specific robot brand, such as quaternions, RPY angles, WPR angles, etc. The resulting attitude information not only satisfies the constraint that the operating axis of the detection tool is parallel to the normal vector, but also locks the angle of rotation around the axis through a preset reference direction. This allows the generated attitude to be directly used for solving the robot's inverse kinematics, effectively avoiding the problems of attitude inaccessibility or gimbal lock.
[0119] Optionally, after establishing the tool coordinate system corresponding to the detection tool at the first detection position, the robot detection position calibration method may further include: obtaining robot posture constraints; while keeping the direction between the target space orientation and the first normal vector consistent, adjusting the rotation angle of the tool coordinate system around the operation axis to obtain multiple candidate tool coordinate systems; and selecting the tool coordinate system that satisfies the robot posture constraints from the multiple candidate tool coordinate systems.
[0120] Since the direction of the operating axis of the detection tool (i.e., the Z_tool axis of the tool coordinate system) has been constrained to be parallel to the first normal vector, the tool coordinate system still has one degree of freedom to rotate freely around this operating axis. By traversing rotation angles from 0° to 360° in preset steps (e.g., 5° or 10°) on this degree of freedom, a series of tool coordinate systems with the same position and target space orientation but different rotation angles around the axis can be generated, which are the candidate tool coordinate systems.
[0121] Based on this, without compromising the core detection condition that the target orientation of the operating axis is perpendicular to the measured surface, the system obtains multiple possibilities for the detection tool in the attitude space. For example, if the first normal vector points directly upward, the system can generate eight candidate tool coordinate systems that rotate around the Z_tool axis by 0°, 45°, 90° up to 315°. By generating these multiple candidate tool coordinate systems, a rich selection space is provided for subsequently avoiding the elbow limit or waist torsional limit of the robot arm, realizing a diversified expansion of the attitude solution under a single normal vector constraint.
[0122] Furthermore, robot posture constraints are obtained. These constraints can be a set of parameters that limit the range of motion or state of the robot's end effector. The sources of these constraints can be joint limit data stored within the robot controller or the desired rotation angle input by the user. The robot posture constraints are used as the criterion for selecting candidate tool coordinate systems. Invalid postures that, while meeting the requirement of alignment between the target space orientation and the first normal vector, would lead to robot joint over-limits, self-collisions, or entry into singular configurations, thus failing to meet the robot posture constraints, are eliminated.
[0123] When the robot's posture constraint is joint limitation, for each candidate tool coordinate system, the corresponding joint angles can be calculated using inverse kinematics algorithms. It is then determined whether each joint angle exceeds the joint limit, causes link interference, or approaches a singularity. Only when all joint states corresponding to a candidate tool coordinate system fully meet the constraints is that candidate tool coordinate system retained as a selection result.
[0124] When the robot's posture constraint is the desired posture, such as the expected rotation angle of the Z-axis of the end-effector coordinate system, the process of selecting the tool coordinate system that satisfies the robot's posture constraint from multiple candidate tool coordinate systems may include: converting the multiple candidate tool coordinate systems into candidate postures in the robot coordinate system; calculating the posture deviation between each candidate posture and the desired posture corresponding to the robot's posture constraint; and selecting the candidate tool coordinate system corresponding to the candidate posture with the smallest posture deviation as the selected tool coordinate system that satisfies the robot's posture constraint.
[0125] Specifically, for each candidate tool coordinate system, its rotation matrix relative to the robot's base coordinate system is extracted as the candidate pose corresponding to that tool coordinate system. The pose deviation is determined by calculating the norm distance between the candidate pose vector and the desired pose vector. From all candidate tool coordinate systems, the one with the smallest pose deviation is selected as the tool coordinate system that satisfies the robot's pose constraints. For example, the rotation angle Rz of the z_tool axis under the candidate pose is calculated, and the deviation between this rotation angle Rz and the user-desired rotation angle Rz_target is calculated. From all candidate tool coordinate systems, the one with the smallest deviation is selected as the final tool coordinate system used to determine the detected tool pose information.
[0126] Understandably, this application achieves optimal posture selection under multiple constraints by converting multiple candidate tool coordinate systems into candidate poses, calculating their posture deviations from the desired pose, and finally selecting the tool coordinate system corresponding to the candidate pose with the smallest deviation. Through quantitative comparison between candidate and desired poses, not only can the uncertainty of rotational degrees of freedom around the axis caused by normal vector constraints be eliminated, but the selected pose can also be ensured to conform to specific process specifications or the optimal solution of robot kinematics. This enables the robot to automatically generate stable, consistent, and efficient execution postures when facing complex surface inspection tasks, significantly improving the intelligence level of the calibration method and the repeatability accuracy of the inspection process.
[0127] Based on the above process, the spatial coordinate information (X,Y,Z) represented by the first detection position is finally associated and integrated with the posture information (R,T) of the detection tool to obtain the complete pose parameters of the end-effector when the robot performs detection on the point to be detected. This serves as a motion target that can be directly called by the robot controller to achieve the calibration of the robot's detection position.
[0128] In addition, the robot detection position calibration method may also include: controlling the robot to move the detection tool to a preset range of the point to be detected according to the target detection pose; acquiring the real-time sensor reading corresponding to the current detection tool, and using the difference between the real-time sensor reading and the preset sensor reading, whereby the sensor is used to detect the distance between the point to be detected and the sensor, and the preset sensor reading is used to characterize the sensor reading when the point to be detected is at a preset position; determining the position compensation amount of the detection tool along the operating axis direction when the difference exceeds a preset threshold; controlling the robot to correct the position of the detection tool along the operating axis direction based on the position compensation amount; repeatedly acquiring real-time sensor readings and correcting the position of the detection tool until the deviation between the real-time sensor reading and the sensor reference reading is not greater than the preset threshold.
[0129] Understandably, since the absolute positioning accuracy of robots or industrial robots usually has a certain systematic error, directly moving according to the target detection position often cannot make the detection tool accurately reach the theoretical detection point. Therefore, this application only requires moving the detection tool to the vicinity of the point to be detected, i.e., within a preset range. The size of this preset range can depend on the robot's repeatability and the effective range of the sensor. For example, it can be set as a spherical space with a radius of 5mm centered on the theoretical detection point. Through this coarse positioning strategy, it is possible to ensure that the detection tool enters the effective working range of the sensor, providing initial conditions for subsequent precise closed-loop correction.
[0130] Furthermore, after the robot completes coarse positioning, it determines the actual distance between the sensor focal point and the measured surface at the current moment using the real-time output values of a spectral confocal sensor or other distance sensors. By calculating the difference between the real-time sensor reading *sensorVal* and the preset sensor reading *P_current*, the degree of deviation of the current inspection tool position from the theoretical inspection point surface can be quantified. For example, if the preset reading is 5.0 mm and the real-time reading is 4.8 mm, it indicates that the sensor is 0.2 mm closer to the workpiece surface than expected, meaning the current position of the inspection tool is ahead of the theoretical plane to be inspected.
[0131] The system determines whether the absolute value of the difference between the real-time sensor reading and the preset sensor reading is greater than a preset threshold. If the absolute value of the difference is not greater than the preset threshold, it indicates that the point to be detected is already within the effective detection range of the sensor, and the positioning error of the detection tool along the operating axis meets the detection accuracy requirements. Therefore, the current position and attitude of the detection tool can be maintained and detection can be performed. If the absolute value of the difference is greater than the preset threshold, it indicates that the point to be detected still has a distance deviation that is too close or too far from the preset detection position of the sensor, and the current position of the detection tool does not yet meet the detection requirements. Therefore, a positioning correction mechanism is triggered, and the position of the detection tool is compensated along the operating axis of the detection tool based on the difference.
[0132] During the positioning correction process, the position compensation amount of the detection tool along the operating axis is first determined. It can be understood that the sensor is used to detect the distance between the point to be detected and the sensor along the operating axis. The difference between the real-time sensor reading and the preset sensor reading essentially reflects the distance deviation of the point to be detected relative to the preset detection position of the sensor along the operating axis. Since the orientation of the detection tool has been determined in the aforementioned target detection pose, and the operating axis direction of the detection tool has also been determined, without changing the detection orientation of the tool, simply adjusting the position of the detection tool along this operating axis direction will allow the point to be detected to fall back into the preset detection position of the sensor. In other words, the difference itself corresponds to the distance that the detection tool needs to compensate along the operating axis direction; the only difference is that the compensation direction needs to be determined based on the actual direction represented by the increase or decrease in the sensor reading.
[0133] Based on this, the difference between the preset sensor reading and the real-time sensor reading can be determined as the position compensation amount of the detection tool along the operating axis; alternatively, the inverse of the difference between the real-time sensor reading and the preset sensor reading can be used as the position compensation amount. The specific sign and direction can be preset based on the rule governing the change in sensor reading with increasing distance and the definition of the positive direction of the operating axis. For example, if the preset sensor reading is RefValue and the real-time sensor reading is sensorVal, the deviation value can be calculated as deviation = RefValue - sensorVal, and this deviation value can be used as the position compensation amount along the current operating axis. Subsequently, the robot is controlled to move a distance corresponding to the position compensation amount along the operating axis from the current detection tool position, gradually bringing the detection tool closer to the preset detection position that meets the detection requirements.
[0134] After completing a position correction, the process does not end immediately. Instead, it returns to the steps described above, acquires new real-time sensor readings again, and recalculates the deviation from the preset sensor readings. If the new deviation is still greater than the preset threshold, a new compensation amount is calculated and correction is performed. If the deviation decreases to within the preset threshold, positioning is considered successful, and the iteration stops. Through multiple iterative corrections, the shortcomings of insufficient open-loop control accuracy in robots can be effectively overcome, and the error is gradually converged through multiple fine adjustments.
[0135] Therefore, the embodiments of this application can compensate for robot absolute positioning errors, coordinate transformation residuals, tooling assembly deviations, and local position deviations of the points to be inspected without changing the posture and measurement direction of the inspection tool. This avoids the problem of inaccurate detection distance caused by the robot relying solely on a single coordinate transformation result for direct detection. This closed-loop correction mechanism allows the target detection pose obtained from the aforementioned calibration to be further calibrated during the on-site execution phase, thereby improving single-point detection accuracy and detection stability, and enhancing the adaptability of the solution to changes in tooling position and on-site assembly errors.
[0136] This application also provides an electronic device in its embodiments. (See reference...) Figure 3 The diagram illustrates a structural schematic suitable for implementing the electronic device in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, tablets, large-screen teaching displays, wearable devices, etc. Figure 3 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0137] like Figure 3As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 1, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 2 or a program loaded from a storage device 8 into a random access memory (RAM) 3, to implement the robot detection position calibration method of the foregoing embodiments of this application. When the electronic device is powered on, the RAM 3 also stores various programs and data required for the operation of the electronic device. The processing unit 1, ROM 2, and RAM 3 are interconnected via a bus 4. An input / output (I / O) interface 5 is also connected to the bus 4.
[0138] Typically, the following devices can be connected to I / O interface 5: input devices 6 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 7 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 8 including, for example, memory cards, hard drives, etc.; and communication devices 9. Communication device 9 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 3 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0139] This application also provides a computer program product, including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the robot detection position calibration methods provided in this application.
[0140] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the robot detection position calibration methods provided in this application.
[0141] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0142] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0143] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0144] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0145] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
Claims
1. A method for calibrating the detection position of a robot, characterized in that, include: Obtain the detection position and normal vector of the point to be detected in the vehicle coordinate system; Based on the first transformation parameters between the pre-calibrated vehicle coordinate system and robot coordinate system, the detection position and the normal vector are transformed into the robot coordinate system to obtain the first detection position and the first normal vector; The posture information of the robot end effector in the robot coordinate system is determined based on the first normal vector, so that the operation axis direction of the detection tool in the posture information is parallel to the first normal vector; The first detection position and the posture information are used as the target detection pose for controlling the robot to carry the detection tool to perform detection.
2. The robot detection position calibration method according to claim 1, characterized in that, The process of determining the pose information of the robot end effector in the robot coordinate system based on the first normal vector includes: Using the first normal vector as an orientation constraint, the target space orientation of the operation axis of the robot end effector at the first detection position is determined, and the target space orientation is parallel to the first normal vector. Based on the target space orientation and the preset reference direction, establish the tool coordinate system corresponding to the detection tool at the first detection position; The direction vectors corresponding to each coordinate axis in the tool coordinate system are combined to obtain the rotation parameters of the tool coordinate system relative to the robot coordinate system, which are used as the attitude information of the detection tool in the robot coordinate system.
3. The robot detection position calibration method according to claim 2, characterized in that, After establishing the tool coordinate system corresponding to the detection tool at the first detection position, the method further includes: Obtain robot posture constraints; While keeping the target space orientation consistent with the direction between the first normal vector and the target space orientation, the rotation angle of the tool coordinate system about the operation axis is adjusted to obtain multiple candidate tool coordinate systems; The tool coordinate system that satisfies the robot posture constraints is selected from a plurality of candidate tool coordinate systems.
4. The robot detection position calibration method according to claim 3, characterized in that, The process of selecting a tool coordinate system that satisfies the robot posture constraints from a plurality of candidate tool coordinate systems includes: Each of the candidate tool coordinate systems is converted into a candidate pose in the robot coordinate system; Calculate the attitude deviation between each candidate attitude and the desired attitude corresponding to the robot attitude constraint; The candidate tool coordinate system corresponding to the candidate posture with the smallest posture deviation is selected as the tool coordinate system that satisfies the robot posture constraints.
5. The robot detection position calibration method according to claim 1, characterized in that, The calibration process for the first transformation parameter between the vehicle coordinate system and the robot coordinate system includes: Obtain the center coordinates of at least three non-collinear standard spheres set on the tooling in the vehicle coordinate system; The robot is controlled to carry sensors to collect multiple pose points on the surface of each standard sphere, thereby obtaining the coordinates of multiple spherical points corresponding to each standard sphere in the robot coordinate system. Based on the coordinates of the spherical point in the robot coordinate system and the coordinates of the center of the sphere in the vehicle coordinate system corresponding to each standard sphere, the spatial correspondence between the vehicle coordinate system and the robot coordinate system is determined, and the first transformation parameter is determined according to the spatial correspondence.
6. The robot detection position calibration method according to claim 5, characterized in that, The process of controlling the robot to carry sensors to perform multi-pose point sampling on the surface of each standard sphere, and obtaining the coordinates of multiple spherical points corresponding to each standard sphere in the robot coordinate system, includes: Each time a data point is sampled, the current operating axis direction of the sensor and the current sensor reading are obtained. The sensor obtains a pre-calibrated sensor reference reading, and the sensor is used to detect the distance between the measured surface or measured point and the sensor. The sensor reference reading is used to characterize the reading of the sensor when the measured point is at a preset reference point. The preset reference point is a known reference point of the sensor in the robot coordinate system. Based on the current operating axis direction, the current sensor reading, the current spatial coordinates of the preset reference point in the robot coordinate system, and the sensor reference reading, determine the spherical point coordinates of the corresponding spherical acquisition point in the robot coordinate system.
7. The robot detection position calibration method according to claim 5, characterized in that, The process of determining the spatial correspondence between the vehicle coordinate system and the robot coordinate system based on the coordinates of the spherical points in the robot coordinate system and the coordinates of the center of the sphere in the vehicle coordinate system corresponding to each standard sphere, and determining the first transformation parameter according to the spatial correspondence, includes: By performing sphere center fitting on the coordinates of multiple spherical points corresponding to each standard sphere, the sphere center coordinates of each standard sphere in the robot coordinate system are obtained; The first transformation parameter is obtained by solving for the rigid change between the center coordinates of all the standard spheres in the vehicle coordinate system and the center coordinates of the spheres in the robot coordinate system.
8. The robot detection position calibration method according to claim 5, characterized in that, The process of determining the spatial correspondence between the vehicle coordinate system and the robot coordinate system based on the coordinates of the spherical points in the robot coordinate system and the coordinates of the center of the sphere in the vehicle coordinate system corresponding to each standard sphere, and determining the first transformation parameter according to the spatial correspondence, includes: Obtain the standard sphere radius for each of the aforementioned standard spheres; Construct an objective function consisting of radius deviation terms corresponding to each of the standard spheres. For any standard sphere, the radius deviation term is: the difference between the spatial distance between the coordinates of the sphere's surface point and the predicted center coordinates in the robot coordinate system and the radius of the standard sphere. The predicted center coordinates are the coordinates of the standard sphere's center in the vehicle coordinate system, which are obtained after being transformed to the robot coordinate system by the transformation parameters to be solved. The first transformation parameter is obtained by minimizing the objective function.
9. The robot detection position calibration method according to any one of claims 1-8, characterized in that, The method further includes: The robot is controlled to move the detection tool to a preset range of the point to be detected based on the target detection pose. The real-time sensor reading corresponding to the detection tool is obtained, and the sensor is used to detect the distance between the detection point and the sensor based on the difference between the real-time sensor reading and the sensor preset reading. The sensor preset reading is used to characterize the sensor reading when the detection point is at a preset position. If the difference exceeds a preset threshold, determine the position compensation amount of the detection tool along the operating axis; based on the position compensation amount, control the robot to correct the position of the detection tool along the operating axis. Repeatedly acquire the real-time sensor readings and correct the position of the detection tool until the deviation between the real-time sensor reading and the sensor reference reading is not greater than the preset threshold.
10. A robot, characterized in that, include: The robot body, the detection tool, and the controller, wherein the detection tool is located at the end of the robot body; The controller is used to process the robot detection position calibration method according to any one of claims 1-9 to obtain the target detection pose for controlling the robot to carry the detection tool to perform detection, and according to the target detection pose, to control the robot body to drive the detection tool to move and detect the point to be detected.
11. The robot according to claim 10, characterized in that, The robot also includes a spectral confocal sensor for acquiring attitude points of at least three non-collinear standard spheres mounted on a tooling.
12. An electronic device, characterized in that, include: Memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the robot detection position calibration method as described in any one of claims 1-9.