Cross-coordinate system mechanical arm control method, system, equipment and medium

Through the cross-coordinate system robot arm control method, combined with the depth camera and coordinate system conversion, the problem of accurate grabbing and delivery of medicines in self-service medicine vending machines is solved, and the efficiency and accuracy of medicine purchasing are improved.

CN118528252APending Publication Date: 2024-08-23INSPUR FINANCIAL INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410489105.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-23
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

In self-service medicine vending machines, it is difficult to achieve accurate grabbing and delivery of medicines with existing technology, which affects the satisfaction of users' drug purchase needs and the efficiency of medicine purchase.

Method used

Using a cross-coordinate system robot arm control method, through coordinate system initialization and cooperation with the robot arm control module, the depth camera is used for preliminary detection, labeling judgment and stacking position judgment of drugs, including anti-shake recognition, QR code judgment, and inclination angle Judgment, labeling condition judgment and stacking position calculation and other operations ensure accurate identification and capture of drugs.

Benefits of technology

It realizes the accurate capture and delivery of medicines, improves the efficiency of medicine purchase, and can correctly and effectively meet users' medicine purchase needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118528252A
    Figure CN118528252A
Patent Text Reader

Abstract

The invention discloses a cross-coordinate-system mechanical arm control method, system and equipment and a medium. The method comprises the following steps that a mechanical arm coordinate system, a depth camera coordinate system and operation point position coordinates of a mechanical arm are established; establishing a conversion relation between a mechanical arm coordinate system and a depth camera coordinate system; on the basis of the mechanical arm coordinate system, the depth camera coordinate system and the operation point position coordinates, the mechanical arm is sequentially controlled to be matched with the depth camera to conduct preliminary detection, labeling judgment and stacking position judgment on discharged goods; according to the method, accurate grabbing control over the medicine in the self-service medicine selling machine and accurate recognition of the medicine in the medicine grabbing and sending-out process can be carried out in a cross-coordinate system mode, the medicine purchasing requirement of a user can be met correctly and effectively, the medicine purchasing efficiency is improved, and high application value is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology. Specifically, the present invention is applied to the field of self-service medicine vending machines, and in particular to a cross-coordinate system mechanical arm control method, system, device and medium. Background Art

[0002] At present, the new retail industry has been a rapidly developing field in recent years. As a landmark product in the new retail industry, the self-service medicine vending machine can realize 24-hour self-service sales of prescription drugs and over-the-counter drugs and fixed-point retail.

[0003] In self-service medicine vending machines, how to accurately pick up, label and deliver the medicines according to purchasing needs is a relatively important issue, which is related to whether the user's medicine purchasing needs can be correctly met. Summary of the invention

[0004] The object of the present invention is to provide a cross-coordinate system robotic arm control method, system, device and medium, thereby solving all or one of the above-mentioned problems existing in the prior art.

[0005] In order to solve the above technical problems, the specific technical solutions of the present invention are as follows: In one aspect, the present invention provides a cross-coordinate system robotic arm control method, comprising the following steps: Coordinate system initialization: Establish the robot arm coordinate system, depth camera coordinate system and the operation point coordinates of the robot arm; Establishing a conversion relationship between the robot arm coordinate system and the depth camera coordinate system; Robotic arm control: Based on the robotic arm coordinate system, the depth camera coordinate system and the operation point coordinates, the robotic arm is controlled in turn to cooperate with the depth camera to perform preliminary inspection, labeling judgment and stacking position judgment of the goods.

[0006] As an improved solution, the preliminary inspection process, labeling process and stacking position determination process of the shipped goods further include: The preliminary detection process is performed based on the hardware abnormality judgment operation, the shipment anti-shake recognition operation, and the recognition timeout judgment operation; The labeling process is performed based on a two-dimensional code judgment operation, a cargo inclination judgment operation, a cargo movement judgment operation, a labeling condition judgment operation, a cargo correctness judgment operation, and a coordinate validity judgment operation; The stack position determination process is performed based on a stack position calculation operation and a boundary value recognition operation.

[0007] As an improved solution, the shipment anti-shake identification operation includes: The depth camera is called to perform depth recognition on the goods in the shipping area, and whether the goods are in motion is determined based on the depth information of the goods.

[0008] As an improved solution, the two-dimensional code determination operation includes: Determine whether the shipment has a QR code; In response to the presence of the QR code, identifying height information of the shipment based on the QR code; In response to the absence of the QR code, depth information of the shipment is identified based on AI, and height information of the shipment is calculated based on the depth information.

[0009] As an improved solution, the cargo outflow inclination angle determination operation includes: Determining the inclination state of the shipped goods, and recovering the shipped goods according to the inclination state; The cargo movement determination operation includes: The initial movement state of the outgoing goods is determined, and the robotic arm is called to perform edge treatment on the outgoing goods according to the initial movement state.

[0010] As an improved solution, the labeling condition judgment operation includes: Determining whether the goods meet the labeling conditions according to the side length of the goods; In response to the shipment not satisfying the labeling condition, performing a special size determination; The robotic arm is called to selectively push down the goods according to the result of the special size judgment.

[0011] As an improved solution, the stacking position calculation operation includes: Calculate whether the cumulative height of the shipped goods exceeds the maximum stacking height; The boundary value identification operation includes: In response to the cumulative height of the shipped goods exceeding the maximum stacking height, the depth camera is called to identify the stacking boundary of the shipped goods; and the starting placement position of the next shipped goods is determined according to the stacking boundary.

[0012] On the other hand, the present invention also provides a cross-coordinate system robotic arm control system, comprising: A coordinate system initialization module is used to: establish a robot arm coordinate system, a depth camera coordinate system, and the coordinates of the operation points of the robot arm; and establish a conversion relationship between the robot arm coordinate system and the depth camera coordinate system; The robot control module is used to control the robot arm to cooperate with the depth camera to perform preliminary inspection, labeling judgment and stacking position judgment of the goods based on the robot coordinate system, the depth camera coordinate system and the operation point coordinates.

[0013] On the other hand, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the cross-coordinate system robot control method are implemented.

[0014] On the other hand, the present invention further provides a computer device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: The memory is used to store computer programs; The processor is used to execute the steps of the cross-coordinate system robot control method by running the program stored in the memory.

[0015] The beneficial effects of the technical solution of the present invention are: The cross-coordinate system robotic arm control method described in the present invention can realize the precise grabbing control of medicines in the self-service medicine vending machine across the coordinate system, as well as the precise identification of medicines during the process of grabbing and delivering the medicines, which is conducive to correctly and effectively meeting the user's demand for medicine purchases, improving the efficiency of medicine purchases, and has high application value.

[0016] The cross-coordinate system robotic arm control system described in the present invention can realize the precise grabbing and control of medicines in the self-service medicine vending machine across coordinate systems and the precise identification of medicines during the grabbing and delivery process through the mutual cooperation of the coordinate system initialization module and the robotic arm control module, which is beneficial to correctly and effectively meet the user's needs for purchasing medicines, improve the efficiency of purchasing medicines, and has high application value.

[0017] The computer-readable storage medium described in the present invention can realize the coordination between the guiding coordinate system initialization module and the robotic arm control module, thereby realizing the cross-coordinate system robotic arm control method described in the present invention, and the computer-readable storage medium described in the present invention also effectively improves the operability of the cross-coordinate system robotic arm control method.

[0018] The computer device described in the present invention can store and execute the computer-readable storage medium, thereby realizing the cross-coordinate system robotic arm control method described in the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 is a schematic flow chart of the cross-coordinate system robotic arm control method described in Example 1 of the present invention; Figure 2 is a detailed flowchart of step S200 in the cross-coordinate system robotic arm control method described in Example 1 of the present invention; Figure 3 is a schematic diagram of the effective motion range of the robotic arm in the cross-coordinate system robotic arm control method described in Example 1 of the present invention; Figure 4 is a schematic diagram of the robot arm coordinate system in the cross-coordinate system robot arm control method described in Example 1 of the present invention; Figure 5 is a schematic diagram of the robot arm coordinate system in the cross-coordinate system robot arm control method described in Example 1 of the present invention from another perspective; Figure 6 It is a schematic diagram of the device positions in the self-service medicine vending machine in the cross-coordinate system mechanical arm control method described in Example 1 of the present invention; Figure 7 It is a schematic diagram of the delivery area described in the cross-coordinate system robotic arm control method described in Example 1 of the present invention; Figure 8 Schematic diagram of the architecture of the cross-coordinate system robotic arm control system according to Embodiment 2 of the present invention; Fig. 9 is a schematic diagram of the structure of the computer device described in Example 4 of the present invention; The symbols in the accompanying drawings are explained as follows: 1501, processor; 1502, communication interface; 1503, memory; 1504, communication bus. DETAILED DESCRIPTION

[0021] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.

[0022] In the description of the present invention, it should be noted that the embodiments described in the present invention are only part of the embodiments of the present invention, rather than all of the embodiments; based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0023] The terms "first", "second", etc. in the specification and claims of this article and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment. Example 1

[0024] This embodiment provides a cross-coordinate system robotic arm control method, such as Figure 1 to Figure 7 As shown, the following steps are included: This method is mainly used in the retail link of self-service medicine vending machines. It can calibrate the coordinates of shipped medicines, prescription medicine labels and packaging modules. By integrating the mechanical arm joint coordinate system, Cartesian coordinate system and camera recognition tooling coordinate system, it can realize cross-coordinate system calibration, correction, coordinate conversion and mechanical arm movement control, and finally realize accurate self-service labeling, packaging and shipping of medicines. The specific steps are as follows: S100, coordinate system initialization: In one implementation, the zero point of the mechanical arm is set: based on the effective motion range of the mechanical arm in the self-service medicine vending machine, the mechanical arm is returned to zero, thereby setting the zero point of the mechanical arm; In one implementation, the initial coordinates of the robot arm are calibrated: according to the effective motion range of the robot arm in the self-service medicine vending machine and the external design of the robot arm, the initial coordinates of the robot arm are calibrated based on the horizontal plane where the robot arm is located while ensuring that the motion trajectory of the robot arm during operation does not interfere; In one implementation, a robot arm coordinate system is established: the fixed base of the robot arm in the self-service medicine vending machine is used as a reference, the X-axis direction is perpendicular to the fixed base and points forward; the Y-axis direction is perpendicular to the fixed base and points to the left; the Z-axis conforms to the right-hand rule, and the vertical upward direction is the positive direction; the R-axis is the posture of the center of the terminal servo relative to the origin, and the counterclockwise direction is positive, and the R-axis coordinate is the sum of the J1-axis and J4-axis coordinates; In one implementation, a depth camera coordinate system is established: taking the position where the depth camera is located in the self-service medicine dispenser as a reference, obtaining the object coordinates, the coordinates of the four vertices of the object, the height from the camera, the length and width of the object, and the deflection angle at the medicine shipment area of the self-service medicine dispenser through AI detection; In one implementation, calibration conversion between coordinate systems is performed: First, move the robotic arm to a specified point, and measure the coordinates of multiple points that may be involved in the functional operations of the robotic arm in the robotic arm coordinate system, including but not limited to: a entrance robotic arm point, b track collision point, c far point of labeling height, d right center point, e medicine box stacking height point 1, f near point of labeling height, g label center point, h above the label center point, i above the recycling point, j stacking height point 2, k stacking height point 3, l label recycling point; among them, the following functional relationships are satisfied between the above points: point a: y > ya && x < xa, point b: y < yb && x < xb, points c and d: function: y - yd = (yd - yc) / (xd - xc) * (x - xd), function y < recognition y; After that, obtain the position and posture of the end of the robotic arm, and perform inverse kinematics calculation on the angles of each joint of the robotic arm to remove unnecessary points in the points; Finally, calculate the depth coordinates in the idle state of the device, and measure the coordinate conversion coefficient between coordinate systems; it should be noted that the above examples are only for explaining the present invention and cannot limit the protection scope of the present invention accordingly.

[0025] S200. Robotic arm control: In this step, control the robotic arm to participate in the entire medicine selling work of the self-service medicine dispenser based on the above initialized parameter content, as Figure 2 shown; In one implementation, a preliminary detection operation of the shipped medicine is performed: S201. Determine whether the hardware of the self-service medicine dispenser is abnormal. If it is abnormal (mechanical failures of devices such as cameras and robotic arms), end the process; if there is no abnormality, proceed to the next step; S202. Based on the above coordinate system, call the depth camera to perform depth recognition on the medicine in the shipment area. Anti-shake recognition is required during the first recognition; specifically, anti-shake is to prevent misrecognition of medicine boxes flying in, and the depth information results are compared multiple times; when the difference between x and y > 2px, or the depth difference > 1mm, it is determined that the medicine box is in a moving posture; finally, the processed results (there may be multiple) are obtained, including but not limited to: coordinate information, side lengths, tilt angle, rotation angle, and depth information, etc.; S203, set the first recognition time to 30s and the rest to 5s; determine whether the recognition process has timed out; if so, determine whether it is the first recognition timeout. The first recognition timeout is considered as a failure to dispense the medicine, and the non-first recognition timeout is considered as a failure to push down or move the recognition result to be empty, and the medicine is recovered; if not, proceed to the next step; In one implementation, the identification and labeling judgment operation of the shipped drugs is performed: S204, determine whether the drug has a QR code; if there is a QR code, scan the code for identification, and obtain the corresponding medicine box height according to the medicine box ID obtained by scanning the code; if there is no QR code, perform AI identification, calculate the medicine box height according to the obtained medicine box depth information, and take the result with the smallest xx to proceed to the next step; S205, determine the inclination angle of the medicine; identify whether the current state of the medicine box is tilted and has an inclination angle, and whether the inclination angle is greater than 20°; when the inclination angle is greater than 20°, the robot arm cannot grab it and the medicine box is recovered; when the inclination angle is less than 20°, proceed to the next step; S206, determine whether the medicine box has been moved (each medicine box is moved only once in this process, and if the medicine is still attached to the edge after moving once, it will not be processed anymore); if it has been moved, execute the next step; if it has not been moved, determine whether the medicine box is attached to the edge (the edge determination is to give the medicine box at the edge position a chance to change position, and the determination is made by satisfying that at least one of the four vertices of the medicine box is on the boundary); if it is not attached to the edge, execute the next step; if the medicine box is attached to the edge, the mechanical arm obtains the medicine box attached to the edge and moves it to the middle position of the shipping area, and then executes the next step; S207, judging whether the medicine box meets the labeling condition upward, identifying that the side length of the medicine box satisfies both the small side>50 and the large side>80; If satisfied, proceed to the next step; If not met, multiple steps are required: First, determine whether the medicine box is of a special size. Since the medicine box information entry has a restriction judgment, the special size is added to the fault-tolerant storage of the medicine box information. The special sizes include: small side <50 and height <50, such as 40*90*40, large side <80 and height <80, such as 60*60*60; If it is not a special size, the medicine box is recycled; If it is a special size, determine whether the medicine box has been knocked over for the first time (in this process, each medicine box is only knocked over once, and those that are still judged to need to be knocked over after being knocked over once are directly recycled); If it is not the first time to be pushed down, the medicine box will be recycled; If it is the first time to push down, calculate the starting and ending points of the push down: first determine the starting and ending points of the robot arm movement through the position and rotation angle of the medicine box identified by AI, when the rotation angle is -45°~45°, push in the x direction; when the rotation angle is above 45° and below -45°, push in the y direction; when pushing in the x direction, the position is on the left side of the center point of the area, push more in the x direction, otherwise push less in the x direction; when pushing in the y direction, the position is on the upper side of the center point of the area, push less in the y direction, otherwise push more in the y direction; use the robot arm to execute the push down process, during the push down process, control the robot arm movement distance> (minimum side of the medicine box + 2*diameter of the air pump), and finally set the push down target to push the medicine box as far as possible to the center of the shipping area; finally, when the calculated push down coordinates are invalid, the medicine box is recovered, and when the calculated push down coordinates are valid, control the robot arm to push the medicine box down; after pushing down, return to S201 for identification and detection; S208, after judging the surface of the sticker, identify whether the drug is the correct drug to be shipped; if not, recycle the drug; if correct, determine whether the current medicine box (the medicine box in this embodiment is the outer packaging box of the drug to be shipped) does not exceed the medicine box stacking height based on point e; if exceeded, recycle the drug; if not exceeded, execute the next step; S209, when the center coordinates of the medicine to be shipped are valid, use a robotic arm to obtain the label and label the medicine according to the point; when the center coordinates of the medicine to be shipped are invalid, recover the medicine; In one implementation, the stacking position determination operation of the shipped medicine is performed: S210, calculate the stacking position of the drugs after labeling: since the first drug is directly placed at the right center position, i.e., point d, after being discharged, the accumulated height needs to be calculated later to determine whether the drug stacking exceeds the standard, which may cause interference; therefore, when the current drug stacking height exceeds the maximum stacking height, the subsequent drugs need to be placed in a new stack to the left for offset, and the offset distance is finally set to half of the minimum side of the current drug; S211. After making the above judgment, the stacking boundary determined by camera recognition is called, and the entire process of unloading medicine is processed based on this boundary; specifically, the boundary value is identified before the end of the process to handle the recognition error problem when the unloading medicine flies out and sticks to the stacked medicine box; for the newly-flying medicine box (to be shipped), the above complete operation is performed again; it should be noted that the above examples are only for explaining the present invention and cannot limit the scope of protection of the present invention. Example 2

[0026] This embodiment is based on the same inventive concept as the cross-coordinate system robot control method described in Embodiment 1, and provides a cross-coordinate system robot control system, such as Figure 8 As shown, including: The coordinate system initialization module is used to set the zero position of the robotic arm: Based on the effective movement range of the robotic arm in the self-service medicine dispenser, the robotic arm is reset to zero, and then the zero position of the robotic arm is set; The coordinate system initialization module is used to calibrate the initial coordinates of the robotic arm: According to the effective movement range of the robotic arm in the self-service medicine dispenser and the external design of the robotic arm, without interference in the movement trajectory during the operation of the robotic arm, the initial coordinates of the robotic arm are calibrated based on the horizontal plane where the robotic arm is located; The coordinate system initialization module is used to establish the robotic arm coordinate system: Let the fixed base of the robotic arm in the self-service medicine dispenser be used as a reference. Let the X-axis direction be perpendicular to the fixed base and forward; Let the Y-axis direction be perpendicular to the fixed base and to the left; Let the Z-axis conform to the right-hand rule, with the vertical upward direction as the positive direction; Let the R-axis be the attitude of the center of the end servo relative to the origin, with the counterclockwise direction as positive, and the R-axis coordinate is the sum of the J1-axis and J4-axis coordinates; The coordinate system initialization module is used to establish the depth camera coordinate system: Let the position where the depth camera is located in the self-service medicine dispenser be used as a reference. Through AI detection, obtain the object coordinates, the coordinates of the four vertices of the object, the height from the camera, the length and width of the object, and the deflection angle at the medicine output area of the self-service medicine dispenser; The coordinate system initialization module is used to calibrate and convert between coordinate systems. The specific operations are as follows: The coordinate system initialization module moves the robotic arm to a specified point, and calculates the coordinates of multiple points that may be involved in the robotic arm function operations in the robotic arm coordinate system, including but not limited to: a. The entry robotic arm point, b. The track collision point, c. The far point of the labeling height, d. The right center point, e. The medicine box stacking height point 1, f. The near point of the labeling height, g. The label center point, h. Above the label center point, i. Above the recycling point, j. The stacking height point 2, k. The stacking height point 3, l. The label recycling point; Among them, the following functional relationships are satisfied between the above points: Point a: y > ya && x < xa, Point b: y < yb && x < xb, Points c and d: Function: y - yd = (yd - yc) / (xd - xc) * (x - xd), Function y < Recognize y; The coordinate system initialization module obtains the position and attitude of the end of the robotic arm, and inversely calculates the angle values of each joint of the robotic arm, removing unnecessary points from the points; The coordinate system initialization module calculates the depth coordinates in the idle state of the device and measures the coordinate conversion coefficients between coordinate systems. It should be noted that the above examples are only for explaining the present invention and cannot limit the protection scope of the present invention.

[0027] The robotic arm control module is used to control the robotic arm to participate in the entire medicine selling work of the self-service medicine dispenser based on the above initialized parameter content, such as Figure 2 shown; The robot arm control module is used to perform preliminary inspection operations for shipped drugs. The specific operations are as follows: the robot arm control module determines whether the hardware of the self-service drug vending machine is abnormal. If there is an abnormality (mechanical failure of the camera, robot arm and other equipment), the process ends. If there is no abnormality, the next step is performed. Based on the above coordinate system, the robot arm control module calls the depth camera to perform deep recognition of the drugs in the shipping area. Anti-shake recognition is required for the first recognition. Specifically, anti-shake is to prevent the false recognition of the medicine box flying in, and the depth information results are compared multiple times. When the difference between x and y is >2px, or the depth difference is >1mm, the medicine box is judged to be in a moving posture. The final processed results (there may be multiple) include but are not limited to: coordinate information, large and small side lengths, inclination angles, rotation angles, and depth information. The robot arm control module sets the first recognition time to 30s and the rest to 5s. Determine whether the recognition process has timed out. If it times out, determine whether it is the first recognition timeout. The first recognition timeout is determined as a failure to dispense the medicine. The non-first recognition timeout is determined as a push-down or empty recognition result after moving, and the medicine is recovered. If it does not time out, proceed to the next step. The robotic arm control module is used to perform identification and labeling operations for shipped drugs. The specific operations are as follows: the robotic arm control module determines whether the drug has a QR code; if there is a QR code, it will scan the code for identification, and obtain the corresponding medicine box height based on the medicine box ID obtained by scanning the code; if there is no QR code, AI identification will be performed, and the medicine box height will be calculated based on the obtained medicine box depth information, and the result with the smallest xx will be taken to proceed to the next step; the robotic arm control module determines the inclination angle of the drug; it identifies whether the current state of the medicine box is tilted and has an inclination angle, and whether the inclination angle is greater than 20°; when the inclination angle is greater than 20°, the robotic arm cannot grab it and recycles the medicine box; when the inclination angle is less than 20°, proceed to the next step; the robotic arm control module determines whether the medicine box has been moved (each medicine box is moved only once in this process, If the medicine is still attached to the edge after being moved once, it will no longer be processed); if it has been moved, execute the next step; if it has not been moved, determine whether the medicine box is attached to the edge (the edge determination is to give the medicine box in the edge position a chance to change position, and the determination is made by ensuring that at least one of the four vertices of the medicine box is on the boundary); if it is not attached to the edge, execute the next step; when the medicine box is attached to the edge, the robot arm obtains the medicine box attached to the edge and moves it to the middle position of the shipping area, and then executes the next step; the robot arm control module determines whether the medicine box meets the labeling conditions upward, and identifies that the side length of the medicine box satisfies both the small side>50 and the large side>80; if it meets the conditions, execute the next step; if it does not meet the conditions, multiple steps of determination are required: the robot arm control module first determines whether the medicine box is of a special size, because the medicine box information There is a restriction judgment during input, so special sizes are added to the fault-tolerant storage of medicine box information. Special sizes include: small side <50 and height <50, such as 40*90*40, large side <80 and height <80, such as 60*60*60; if it is not a special size, the medicine box is recycled; if it is a special size, it is determined whether the medicine box is pushed over for the first time (in this process, each medicine box is only pushed over once, and if it is still judged to need to be pushed over after being pushed over once, it is directly recycled); if it is not the first time to be pushed over, the medicine box is recycled; if it is the first time to be pushed over, the starting and ending points of the push-over are calculated: first, the starting and ending points of the robot arm movement are determined by the position and rotation angle of the medicine box recognized by AI. When the rotation angle is -45°~45°, push in the x direction; when the rotation angle is above 45° and below -45° When pushing in the x direction, the position is on the left side of the center point of the area, push towards the larger x direction, otherwise push towards the smaller x direction; when pushing in the y direction, the position is on the upper side of the center point of the area, push towards the smaller y direction, otherwise push towards the larger y direction; the robot arm is used to perform the pushing process, and during the pushing process, the robot arm movement distance is controlled to be greater than (the smallest side of the medicine box + 2*the diameter of the air pump), and the pushing target is finally set to push the medicine box as far as possible to the center of the shipping area; finally, when the calculated pushing coordinates are invalid, the medicine box is recovered, and when the calculated pushing coordinates are valid, the robot arm is controlled to push the medicine box; after pushing, return to S201 for identification and detection; after the robot arm control module makes a surface-attached judgment, it identifies whether the medicine is the correct medicine to be shipped; if not, the medicine is recovered;If it is correct, then based on the point e, it is determined whether the current medicine box (the medicine box in this embodiment is the outer packaging box of the medicine to be shipped) does not exceed the medicine box stacking height; if it exceeds, the medicine is recovered, and if it does not exceed, the next step is executed; the robotic arm control module uses the robotic arm to obtain the label and label the medicine according to the point when the center coordinates of the medicine to be shipped are valid; if the center coordinates of the medicine to be shipped are invalid, the medicine is recovered; The robot arm control module is used to perform the stacking position judgment operation of the shipped medicines, and the specific operation is as follows: the robot arm control module calculates the stacking position of the medicines after labeling: since the first medicine is directly placed at the center position on the right side, namely point d, after being shipped, it is necessary to calculate the cumulative height later to determine whether the medicine stacking exceeds the standard, which may cause interference; therefore, when the current medicine stacking height exceeds the maximum stacking height, the subsequent medicines need to be newly stacked to the left for offset, and finally the offset distance is set to half of the minimum side of the current medicine; after the robot arm control module makes the above judgment, it calls the stacking boundary determined by the camera identification, and performs the entire process of unloading the medicine box based on this boundary; specifically, the boundary value is identified before the end of the process to handle the recognition error problem when the unloading medicine box flies out and sticks to the stacked medicine box; for the newly flown medicine box (to be shipped), the above complete operation is performed again; it should be noted that the above examples are only for explaining the present invention and cannot limit the protection scope of the present invention. Example 3

[0028] This embodiment provides a computer-readable storage medium, including: The storage medium is used to store computer software instructions used to implement the cross-coordinate system robotic arm control method described in the above-mentioned Example 1, which includes a program for executing the above-mentioned program set for the cross-coordinate system robotic arm control method; specifically, the executable program can be built into the cross-coordinate system robotic arm control system described in Example 2, so that the cross-coordinate system robotic arm control system can implement the cross-coordinate system robotic arm control method described in Example 1 by executing the built-in executable program.

[0029] In addition, the computer-readable storage medium of this embodiment may adopt any combination of one or more computer-readable storage media, wherein the computer-readable storage medium includes electrical, optical, electromagnetic, infrared or semiconductor systems, devices or components, or any combination thereof. Example 4

[0030] This embodiment provides an electronic device, such as Fig. 9 As shown, the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .

[0031] Memory 1503, used for storing computer programs; The processor 1501 is used to implement the steps of the cross-coordinate system robot control method described in the above-mentioned embodiment 1 when executing the computer program stored in the memory 1503.

[0032] As an embodiment of the present invention, the communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0033] As an implementation mode of the present invention, the communication interface is used for communication between the above-mentioned terminal and other devices.

[0034] As an embodiment of the present invention, the memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0035] As an embodiment of the present invention, the above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0036] Different from the existing technology, the present application adopts a cross-coordinate system robotic arm control method, system, equipment and medium, which can accurately grasp and control the medicines in the self-service medicine vending machine across the coordinate system, and accurately identify the medicines during the process of grasping and delivering the medicines, which is conducive to correctly and effectively meeting the user's demand for medicine purchase, improving the efficiency of medicine purchase, and has high application value.

[0037] It should be understood that in the various embodiments of this document, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this document.

[0038] It should also be understood that in the embodiments of this article, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0039] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this article.

[0040] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0041] In the several embodiments provided herein, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or can be electrical, mechanical or other forms of connection.

[0042] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of this article.

[0043] In addition, each functional unit in each embodiment of this invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.

[0044] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this article is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this article. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0045] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A cross-coordinate system robotic arm control method, characterized in that: The following steps are involved: Coordinate system initialization: Establish the robot arm coordinate system, depth camera coordinate system and the operation point coordinates of the robot arm; Establishing a conversion relationship between the robot arm coordinate system and the depth camera coordinate system; Robotic arm control: Based on the robotic arm coordinate system, the depth camera coordinate system and the operation point coordinates, the robotic arm is controlled in turn to cooperate with the depth camera to perform preliminary inspection, labeling judgment and stacking position judgment of the goods.

2. The cross-coordinate system robot control method according to claim 1, characterized in that: The preliminary inspection process, labeling process and stacking position determination process of the goods further include: The preliminary detection process is performed based on the hardware abnormality judgment operation, the shipment anti-shake recognition operation, and the recognition timeout judgment operation; The labeling process is performed based on a two-dimensional code judgment operation, a cargo inclination judgment operation, a cargo movement judgment operation, a labeling condition judgment operation, a cargo correctness judgment operation, and a coordinate validity judgment operation; The stack position determination process is performed based on a stack position calculation operation and a boundary value recognition operation.

3. The cross-coordinate system robot control method according to claim 2, characterized in that: The shipment anti-shake identification operation includes: The depth camera is called to perform depth recognition on the goods in the shipping area, and whether the goods are in motion is determined based on the depth information of the goods.

4. The cross-coordinate system robot control method according to claim 2, characterized in that: The two-dimensional code determination operation includes: Determine whether the shipment has a QR code; In response to the presence of the QR code, identifying height information of the shipment based on the QR code; In response to the absence of the QR code, depth information of the shipment is identified based on AI, and height information of the shipment is calculated based on the depth information.

5. The cross-coordinate system robot control method according to claim 2, characterized in that: The cargo outflow inclination angle determination operation includes: Determining the inclination state of the shipped goods, and recovering the shipped goods according to the inclination state; The cargo movement determination operation includes: The initial movement state of the outgoing goods is determined, and the robotic arm is called to perform edge treatment on the outgoing goods according to the initial movement state.

6. The cross-coordinate system robot control method according to claim 2, characterized in that: The labeling condition judgment operation includes: Determining whether the goods meet the labeling conditions according to the side length of the goods; In response to the shipment not satisfying the labeling condition, performing a special size determination; The robotic arm is called to selectively push down the goods according to the result of the special size judgment.

7. The cross-coordinate system robot control method according to claim 2, characterized in that: The stacking position calculation operation includes: Calculate whether the cumulative height of the shipped goods exceeds the maximum stacking height; The boundary value identification operation includes: In response to the cumulative height of the shipped goods exceeding the maximum stacking height, the depth camera is called to identify the stacking boundary of the shipped goods; and the starting placement position of the next shipped goods is determined according to the stacking boundary.

8. A cross-coordinate system robotic arm control system, characterized in that: include: The coordinate system initialization module is used to establish the robot arm coordinate system, the depth camera coordinate system, and the operation point coordinates of the robot arm; Establishing a conversion relationship between the robot arm coordinate system and the depth camera coordinate system; The robot control module is used to control the robot arm to cooperate with the depth camera to perform preliminary inspection, labeling judgment and stacking position judgment of the goods based on the robot coordinate system, the depth camera coordinate system and the operation point coordinates.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the cross-coordinate system robot control method described in any one of claims 1 to 7 are implemented.

10. A computer device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: The memory is used to store computer programs; The processor is used to execute the steps of the cross-coordinate system robot control method described in any one of claims 1 to 7 by running the program stored in the memory.

Citation Information

Cited By

  • Processing method applied to intelligent medicine selling machine for grabbing emphasized medicines

    CN120126250A