Disclosure of Invention
In view of the drawbacks of the prior art, an object of the present invention is to provide an end effector guiding system and method based on a 2D camera and a laser rangefinder.
The end effector guiding system based on the 2D camera and the laser range finder comprises a robot, a measuring system and an end effector, wherein the end effector and the measuring system are arranged at the tail end of the robot;
the measuring system acquires the space information of the working plane, and the robot adjusts the pose of the end effector according to the position information, so that the feeding direction of the end effector is perpendicular to the working plane, and moves the end effector to the working plane to finish the working instruction.
Preferably, the measuring system comprises a 2D camera and a laser range finder, wherein the method for acquiring the space information of the operation plane comprises the steps of acquiring the two-dimensional plane information of three points which are not collinear in the operation plane through the 2D camera, acquiring the height information of the three points through the laser range finder, obtaining the three-dimensional coordinate information of the three points, and obtaining the space information of the operation plane according to the three-dimensional coordinate information.
According to the end effector guiding method based on the 2D camera and the laser range finder, which is provided by the invention, the end effector guiding method comprises the following steps:
step S1, determining a reference plane of the end effector, and obtaining a feed direction vector OA of the end effector compared with the reference plane;
step S2, determining a working plane of the end effector, acquiring coordinates of any three points in the working plane, and calculating a normal vector OA' of the working plane;
step S3, calculating the included angle between the normal vector OA' of the working plane and the feed direction vector OA of the end effector ;
Step S4, according to the included angleAdjusting the feeding direction of the end effector to obtain a feeding direction vector of the end effector after adjustment;
Step S5, measuring the shooting height of the 2D camera, if the shooting height exceeds the reference height range, adjusting the shooting height of the 2D camera, and repeatedly executing the steps S2-S4 until the reference height requirement is met;
the reference height is set in a self-defining mode according to the operation content;
and S6, determining characteristic points on the working plane, acquiring position information of the characteristic points, controlling the end effector to move to the characteristic points, and executing a working instruction.
Preferably, the reference plane is an initial calibration plane of the end effector, and in an original state, a feeding direction of the end effector is perpendicular to the reference plane.
Preferably, the coordinate acquisition mode of any three points in the working plane is that the working plane is shot by a 2D camera, two-dimensional coordinate information (x 1, y 1), (x 2, y 2) and (x 3, y 3) of the three points are determined, and coordinate values Z1, Z2 and Z3 of the three points in the Z direction are obtained according to the distance from the laser range finder to any one reference point on the reference plane and the distance from the laser range finder to the three points in the working plane.
Preferably, the said angle is based onThe method for adjusting the feed direction of the end effector includes:
the rotation of the end effector is represented by a quaternion, which is: Wherein q is a rotation quaternion, Is the angle between OA' and OA,、AndFor each component of the vector (a, b, c) orthogonal to OA' and OA,、AndIn imaginary units.
Preferably, step S4 further comprises setting a range of angles over which end effector rotation is not required.
Preferably, the method for measuring the shooting height of the 2D camera comprises the steps of selecting any point in a reference plane as a reference point, measuring the distance from the reference point through a laser range finder, and obtaining the distance from the 2D camera to the reference point through conversion based on the position relation between the laser range finder and the 2D camera, wherein the distance is regarded as the distance from the 2D camera to a working plane.
Compared with the prior art, the invention has the following beneficial effects:
1. Compared with the prior 2D camera, the system for guiding the end effector based on the 2D camera and the laser range finder can measure depth information and can operate the end effector on planes with different heights and different inclinations.
2. Compared with the scheme of adopting a 3D camera at present, the invention provides a system for guiding an end effector based on a 2D camera and a laser range finder, which can greatly reduce the acquisition cost of equipment under the same precision requirement.
3. The invention provides a method for guiding an end effector based on a 2D camera and a laser range finder, which can adapt to planes with different heights and different inclinations to enable the end effector to accurately operate perpendicular to an operation plane.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the present invention, but are not intended to limit the invention in any way. It should be noted that variations and modifications could be made by those skilled in the art without departing from the inventive concept. These are all within the scope of the present invention.
The invention provides an end effector 300 guiding system based on a 2D camera 201 and a laser range finder 202, which is shown with reference to figures 1 and 2 and comprises a robot 100, a measuring system 200 and an end effector 300. Wherein the end effector 300 and the measurement system 200 are both mounted at the end of the robot 100. The measurement system 200 comprises a 2D camera 201 and a laser range finder 202, three-dimensional coordinate information of a target point is obtained through measurement and calculation of the 2D camera 201 and the laser range finder 202, and the robot 100 controls the end effector 300 to finish a set operation instruction according to the three-dimensional coordinate information.
In one particular embodiment, the end effector 300 includes, but is not limited to, a dispenser, a welder, a hole maker, and the like.
The 2D camera 201 serves as a server, the 2D camera 201 performs network communication with the robot 100 through TCP/IP, the robot 100 transmits a program execution instruction to the 2D camera 201, and the 2D camera 201 recognizes the feature point and then transmits the two-dimensional coordinates of the feature point to the robot 100.
The laser rangefinder 202 serves as a server and the robot 100 serves as a client for network communication via TCP/IP. The robot 100 transmits a program execution instruction to the laser rangefinder 202, and the laser rangefinder 202 transmits the depth data at that time to the robot 100.
The end effector 300 performs a final execution operation, the end effector 300 is controlled by the robot 100 through the DI/DO module, and after the robot 100 transmits a program execution signal, the end effector 300 starts a corresponding operation.
The end effector 300 guidance system disclosed by the invention works in the following principles:
First, the 2D camera 201 recognizes a feature point, which may be a point in the operation plane, or a center point of the work area, or a work start point of the end effector 300, and transmits two-dimensional plane information thereof to the robot 100. The two-dimensional plane information is two-dimensional coordinate information of the feature points in a reference plane, which is an initial calibration plane of the robot 100, and in an initial stage, a feeding direction of the robot 100 is perpendicular to the reference plane.
Next, the TCP of the robot 100 is changed according to the inclination of the operation plane so that the feeding direction of the robot 100 is perpendicular to the operation plane, and in a specific embodiment, the TCP of the robot 100 is the working end point of the end effector 300. The height of the robot 100 is changed according to the height of the operation plane from the TCP;
finally, the robot 100 controls the end effector 300 to move to the vicinity of the feature point based on the information transmitted from the 2D camera 201 and the laser range finder 202, and performs the operation of the end effector 300. The method provided by the invention can adapt to the requirements of high-precision positioning of the end effector 300 on different planes. Wherein the operating plane is the plane in which the end effector 300 operates, and is at an angle and height difference from the reference plane.
The invention also provides a guiding method of the end effector 300 based on the 2D camera 201 and the laser range finder 202, which is based on the guiding system of the end effector 300 based on the 2D camera 201 and the laser range finder 202 and is used for guiding the end effector 300 to execute operation instructions. Specifically, referring to fig. 3, the booting includes the steps of:
step S1, determining a reference plane of the end effector 300, and obtaining a feed direction vector OA of the end effector 300 compared with the reference plane.
Specifically, the reference plane is an initial calibration plane of the end effector 300, and in the original state, the feeding direction of the end effector 300 is perpendicular to the reference plane. Feed direction vector oa= (0, 1) of end effector 300 compared to the reference plane in the initial state
Step S2, determining a working plane of the end effector 300, acquiring coordinates of any three points in the working plane, and calculating a normal vector OA' of the working plane;
In a specific embodiment, the coordinate acquisition mode of any three points in the working plane is that the working plane is shot by the 2D camera 201, two-dimensional coordinate information (x 1, y 1), (x 2, y 2) and (x 3, y 3) of the three points are determined, and coordinate values Z1, Z2 and Z3 of the three points in the Z direction are obtained according to the distance from the laser range finder 202 to any one reference point on the reference plane and the distance from the laser range finder 202 to the three points in the working plane.
Step S3, calculating the included angle between the normal vector OA' of the working plane and the feed direction vector OA of the end effector 300;
Step S4, according to the included angleAdjusting the feed direction of the end effector 300 results in an adjusted feed direction vector of the end effector 300.
The specific adjusting method is that the quaternion is used for expressing rotation, namely: The robot 100 (100) may be rotated to a new end effector feed direction vector by multiplying the current quaternion by the rotation quaternion q, where, In order to rotate the quaternion,Is the angle between OA and OA',、AndFor each component of the vector (a, b, c) orthogonal to OA and OA',、AndIn imaginary units.
In a preferred embodiment, the setting is such that there is no need to rotate the end effector 300 over a range of angles, where the smaller the range of angles, the better the perpendicularity of the end effector 300 to the plane, but the greater the number of rotations that the end effector 300 needs to make, and the greater the range of angles, the worse the perpendicularity of the end effector 300 to the plane, but the fewer the number of rotations that the end effector 300 needs to make.
Step S5, the laser range finder 202 is used for measuring the shooting height of the 2D camera 201, if the shooting height exceeds the reference height range, the height of the 2D camera 201 is adjusted, and the steps S2-S4 are repeatedly executed until the normal vector OA' of the working plane and the feed direction vector OA of the end effector 300 form an included angleThe requirements are met, and the adjusted height is within the reference height range.
The feature point may be a point in the work plane, and the feature point may be a start point of an end execution work or a center point of a work area. The reference height range is a range artificially set according to actual working conditions.
The 2D camera 201 has a difference in imaging viewing angle of the camera at different photographing heights, and the ratio of the obtained images is changed according to the perspective principle. Therefore, after the posture of the end effector 300 is adjusted, the distance value from the 2D camera 201 to the working plane needs to be measured, and if the distance value exceeds the reference height range, it is determined that there is an error between the posture of the end effector 300 and the final ideal posture. At this time, after adjusting the distance from the 2D camera 201 to the work plane, the normal vector of the work plane is re-measured, thereby further calibrating the posture of the end effector 300.
In a specific embodiment, the distance value between the 2D camera 201 and the working plane is measured by selecting any point in the reference plane as a reference point, measuring the distance between the reference point by the laser range finder 202, and converting the distance between the 2D camera 201 and the reference point based on the position relation between the laser range finder 202 and the 2D camera 201 to be regarded as the distance between the 2D camera 201 and the working plane.
Step S7, coordinate information and height information of the feature points are acquired, the end effector 300 is controlled to move to the feature points, and a working instruction is executed.
Those skilled in the art will appreciate that the invention provides a system and its individual devices, modules, units, etc. that can be implemented entirely by logic programming of method steps, in addition to being implemented as pure computer readable program code, in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Therefore, the system and the devices, modules and units thereof provided by the invention can be regarded as a hardware component, and the devices, modules and units for realizing various functions included in the system can be regarded as structures in the hardware component, and the devices, modules and units for realizing various functions can be regarded as structures in the hardware component as well as software modules for realizing the method.
In the description of the present application, it should be understood that the terms "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, are merely for convenience in describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present application.
The foregoing describes specific embodiments of the present application. It is to be understood that the application is not limited to the particular embodiments described above, and that various changes or modifications may be made by those skilled in the art within the scope of the appended claims without affecting the spirit of the application. The embodiments of the application and the features of the embodiments may be combined with each other arbitrarily without conflict.