Passive chess piece taking device, go robot and control method of go robot
Through the passive sub-retrieval device, the negative pressure adsorption chess piece is formed by using mechanical linkage and air pressure sensors. Combined with intelligent image recognition and machine learning, the problem of accurate and low efficiency of Go robots is solved, and efficient and portable Go robots are realized. Function.
Patent Information
- Application Number
- CN202411446975.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-10-16
AI Technical Summary
The existing Go robot sub-take mechanism relies on external energy, has high noise, poor user interaction experience, high cost, low accuracy and efficiency of sub-take, making it difficult to adapt to different types of chess pieces and insufficient light.
Passive sub-retrieval device is adopted to form negative pressure adsorption chess pieces through mechanical linkage mechanism and exhaust solenoid valve, and combine with air pressure sensor to determine the success of sub-retrieval, and use intelligent image recognition system and machine learning algorithm to optimize recognition accuracy, reduce noise and improve portability and accuracy.
High accuracy and high efficiency of separating without external energy is achieved, reducing costs and noise, and improving user experience and robot adaptability.
Smart Images

Figure CN119141565A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of go robots, and in particular to a passive piece-taking device, a go robot and a control method thereof. Background Art
[0002] The statements in this section merely provide background art related to the present invention and do not necessarily constitute prior art.
[0003] In the development of Go robot technology, despite significant progress, it still faces a series of challenges, including but not limited to dependence on external energy, insufficient accuracy and stability in picking pieces, poor user interaction experience, limited technical adaptability, low efficiency and success rate in picking pieces, lighting problems, and cost issues. Existing technologies have failed to fully solve these problems, limiting the practicality and popularity of Go robots.
[0004] (1) Existing mechanisms for retrieving pieces often rely on external gas or power sources, which not only increases the complexity of the Go robot, but also limits the portability and application scope of the robot, and also causes energy consumption.
[0005] (2) In terms of user interaction, some robots generate a lot of noise during the process of picking up the child, which affects the user interaction experience.
[0006] (3) Cost is also one of the key factors limiting the popularization of Go robots.
[0007] (4) As the usage time increases, inaccurate placement or failure to select pieces often occurs, which directly affects the smoothness of the game and the user experience.
[0008] (5) The existing piece-taking mechanism is unable to meet the needs of Go pieces of different types and materials, which limits the versatility of the robot.
[0009] (6) The efficiency and success rate of chess piece retrieval are affected by the way the chess pieces are stacked. The existing chess piece sorting device has a single function and cannot meet the needs of online chess piece retrieval, resulting in great difficulties in the chess piece retrieval process.
[0010] (7) Insufficient light inside the chess box directly affects the accuracy of picking pieces. Summary of the invention
[0011] In order to address the deficiencies in the prior art, the present invention provides a passive piece-taking device, a Go robot and a control method thereof. Through the operation of a mechanical linkage mechanism and an exhaust solenoid valve, the cavity contracts, causing the internal air to be discharged, forming a negative pressure to adsorb the chess pieces. No external energy is required, noise is reduced, portability is improved and cost is reduced. Moreover, the air pressure information uploaded by the air pressure sensor can be used to determine whether the piece taking is successful, significantly improving the accuracy and efficiency of piece taking.
[0012] In order to achieve the above object, the present invention adopts the following technical solution:
[0013] A first aspect of the present invention provides a passive sub-extraction device.
[0014] A passive sub-removal device, comprising an X-axis moving mechanism, a Y-axis moving mechanism, a Z-axis moving mechanism and a suction cup mechanism, wherein the suction cup mechanism comprises a fixing part, an exhaust solenoid valve, an air pressure sensor, a multi-layer suction cup and a tee;
[0015] The Z-axis moving mechanism is connected to the fixing member, the tee is fixed on the fixing member, the first end of the tee is connected to the multi-layer suction cup, the second end of the tee is connected to the air pressure sensor, and the third end of the tee is provided with an exhaust solenoid valve; the Z-axis moving mechanism is used to drive the multi-layer suction cup to move along the Z-axis direction, and cooperate with the exhaust solenoid valve to form a negative pressure in the cavity of the multi-layer suction cup to adsorb the chess pieces;
[0016] The X-axis moving mechanism, Y-axis moving mechanism, Z-axis moving mechanism, exhaust solenoid valve and air pressure sensor are all connected to a controller; the controller is used to control the movements of the X-axis moving mechanism and the Y-axis moving mechanism, move the multi-layer suction cup to directly above the chess piece, and control the switch of the solenoid valve, the movement and moving distance of the Z-axis moving mechanism, and determine whether the chess piece is successfully taken according to the air pressure information uploaded by the air pressure sensor during the chess piece taking process.
[0017] Furthermore, the X-axis moving mechanism includes a shell, a first motor arranged in the shell and a roller arranged on one side of the shell, the output shaft of the first motor is connected to a transmission wheel, the roller is connected to the transmission wheel connected to the output shaft of the first motor through a transmission belt, the rotation of the first motor drives the roller to rotate, and the X-axis moving mechanism drives the Y-axis moving mechanism and the Z-axis moving mechanism to move along the X-axis direction of the chessboard or the chessboard carrier.
[0018] Furthermore, the Y-axis moving mechanism includes a shell, a second motor and a synchronous belt arranged in the shell; a sliding groove is provided on one side of the shell of the Y-axis moving mechanism, and a slider adapted to the sliding groove is provided on the outer side of the shell of the Z-axis moving mechanism, the slider is connected to the synchronous belt, and the output shaft of the second motor is connected to the synchronous belt through a transmission wheel. The rotation of the second motor drives the synchronous belt to rotate, and the synchronous belt drives the slider to move along the sliding groove, thereby driving the Z-axis moving mechanism to move along the Y-axis direction of the chessboard or the chessboard carrier.
[0019] Furthermore, there are two X-axis moving mechanisms, which are detachably connected to the two ends of the Y-axis moving mechanism;
[0020] The Z-axis moving mechanism can be detachably arranged on the Y-axis moving mechanism.
[0021] Furthermore, the controller is used to control the movement of the X-axis moving mechanism and the Y-axis moving mechanism when placing the chess piece. After the multi-layer suction cup is moved to just above the placement point, the exhaust solenoid valve is controlled to open, and the multi-layer suction cup is restored to its original shape as air enters, and the adsorbed chess piece is separated from the multi-layer suction cup, completing the placement of the chess piece.
[0022] Furthermore, the controller is used to control the actions of the X-axis moving mechanism and the Y-axis moving mechanism when picking up the chess piece. After the multi-layer suction cup is moved to just above the chess piece picking point, the exhaust solenoid valve is controlled to be fully opened, and the Z-axis moving mechanism moves downward. The air cavity or air bag of the multi-layer suction cup is compressed as the Z-axis moving mechanism moves downward. When the moving distance of the Z-axis moving mechanism exceeds the set value, the exhaust solenoid valve is controlled to be fully closed, and the surface of the multi-layer suction cup is tightly attached to the adsorbed chess piece. The Z-axis moving mechanism is controlled to move upward to pick up the chess piece. When the Z-axis moving mechanism moves upward, it is determined whether the air pressure information uploaded by the air pressure sensor is lower than the threshold value. If so, the chess piece is successfully picked up.
[0023] Furthermore, the controller is connected to an intelligent image recognition system; the intelligent image recognition system is used to identify the pixel coordinates of each chessboard grid line in the chessboard, the category of each chess piece and the position of each chess piece.
[0024] Furthermore, the pixel coordinates of each chessboard grid line are obtained by image dedistortion and reprojection, chessboard reconstruction, Hough line detection and histogram statistics;
[0025] The category of each chess piece and the position of each chess piece are obtained through a trained chess piece detection model.
[0026] A second aspect of the present invention provides a Go-playing robot.
[0027] A Go robot comprises a controller and a passive piece-taking device as described in the first aspect.
[0028] The third aspect of the present invention provides a control method of a Go robot as described in the second aspect, comprising:
[0029] Control the movements of the X-axis moving mechanism and the Y-axis moving mechanism to move the multi-layer suction cup to the top of the chess piece;
[0030] Control the switch of the exhaust solenoid valve and the movement and moving distance of the Z-axis moving mechanism to pick up and drop the pieces, and judge whether the picking is successful based on the air pressure information uploaded by the air pressure sensor during the picking process.
[0031] Compared with the prior art, the present invention has the following beneficial effects:
[0032] 1. The passive chess piece retrieval device described in the present invention operates through a mechanical linkage mechanism and an exhaust solenoid valve, causing the cavity to contract, causing the internal air to be discharged, forming a negative pressure, and adsorbing chess pieces. No external energy is required, which reduces noise, improves portability, and reduces costs. Moreover, the air pressure information uploaded by the air pressure sensor can be used to determine whether the chess piece retrieval is successful, which significantly improves the accuracy and efficiency of chess piece retrieval.
[0033] 2. The passive child retrieval device described in the present invention adopts a high-precision synchronous belt and a matching transmission wheel to drive the mechanical linkage mechanism, ensuring no slippage during the transmission process, achieving precise speed control and position positioning, ensuring the synchronous operation of the child retrieval device, and improving the stability and reliability of the child retrieval.
[0034] 3. The passive chess piece retrieval device described in the present invention adopts a machine learning algorithm, which can continuously optimize the recognition accuracy and adapt to chess pieces of different colors, shapes and sizes. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments and descriptions of the present invention are used to explain the present invention and do not constitute improper limitations on the present invention.
[0036] Figure 1 is a structural diagram of a suction cup mechanism according to Embodiment 1 of the present invention;
[0037] Figure 2 It is a front view of a passive sub-extraction device according to embodiment 1 of the present invention;
[0038] Figure 3 A side view of a passive sub-extraction device according to embodiment 1 of the present invention;
[0039] Figure 4 It is a front view of the Z-axis moving mechanism of Example 1 of the present invention;
[0040] Figure 5 It is a side view of the Z-axis moving mechanism of Example 1 of the present invention;
[0041] Figure 6 This is a flowchart of chessboard detection according to Embodiment 1 of the present invention;
[0042] Figure 7 This is a schematic diagram of a reconstructed chessboard according to Embodiment 1 of the present invention;
[0043] Figure 8 is a schematic diagram of a chessboard image according to Embodiment 1 of the present invention;
[0044] Fig. 9 A histogram showing the number of white pixels on the X-axis according to Embodiment 1 of the present invention;
[0045] Fig.10 A histogram showing the number of white pixels on the Y axis according to Embodiment 1 of the present invention;
[0046] Fig.11 This is a chess piece detection result diagram of Example 1 of the present invention;
[0047] Fig.12 A two-dimensional matrix distribution diagram of chess pieces according to Embodiment 1 of the present invention;
[0048] Fig.13 A structural diagram of a Go robot according to Embodiment 2 of the present invention;
[0049] Fig.14 This is a flow chart of a Go robot control method according to Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0050] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0051] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0052] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0053] In the present invention, terms such as "upper", "lower", "left", "right", "front", "back", "vertical", "horizontal", "side", "bottom", etc. indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings. They are relational words determined only for the convenience of describing the structural relationships of the various parts or elements of the present invention, and do not specifically refer to any part or element in the present invention and should not be understood as limitations on the present invention.
[0054] In the present invention, terms such as "fixed connection", "connected", "connection", etc. should be understood in a broad sense, indicating that it can be fixedly connected, integrally connected or detachably connected; it can be directly connected or indirectly connected through an intermediate medium. Relevant scientific research or technical personnel in this field can determine the specific meanings of the above terms in the present invention according to specific circumstances, and they should not be understood as limiting the present invention.
[0055] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0056] Example 1
[0057] Embodiment 1 of the present invention provides a passive sub-extraction device.
[0058] The passive child retrieval device provided in this embodiment aims to improve the accuracy and stability of child retrieval, optimize the user interaction experience, enhance the technical adaptability, improve the child retrieval efficiency and success rate, solve the light problem, and reduce costs and save energy and protect the environment.
[0059] The passive child-retrieving device provided in this embodiment includes a monocular camera, a controller, a host computer (equipped with an intelligent image recognition system), a mechanical linkage mechanism and a suction cup mechanism.
[0060] like Figure 2 and Figure 3 As shown, the mechanical linkage mechanism includes an X-axis moving mechanism 6, a Y-axis moving mechanism 7 and a Z-axis moving mechanism 8.
[0061] There are two X-axis moving mechanisms 6 , which are fixedly connected or detachably connected to two ends of the Y-axis moving mechanism 7 , and the Z-axis moving mechanism 8 is arranged on the Y-axis moving mechanism 7 .
[0062] like Figure 2 and Figure 3 As shown, each X-axis moving mechanism 6 includes a cross-shaped housing, a first motor disposed in the cross-shaped housing, and three rollers disposed on one side of the cross-shaped housing. The three rollers are arranged in an inverted isosceles triangle. The output shaft of the first motor is connected to a transmission wheel, and the two upper rollers are connected to the transmission wheel connected to the output shaft of the first motor through a transmission belt. The two upper rollers can be placed on the top surface of the chessboard or chessboard support platform, and the lower roller contacts the bottom surface of the chessboard or chessboard support platform. The first motor rotates, driving the rollers to rotate, and the X-axis moving mechanism 6 moves along the X-axis direction of the chessboard or chessboard support platform.
[0063] The Y-axis moving mechanism 7 comprises a rectangular housing, a second motor and a synchronous belt arranged in the rectangular housing. The Z-axis moving mechanism 8 adopts a 7-shaped housing. The 7-shaped housing is placed on the rectangular housing. A sliding groove is provided on one side of the rectangular housing of the Y-axis moving mechanism 7, and a slider adapted to the sliding groove is provided on the outer side of the 7-shaped housing, and the slider is fixedly connected to the synchronous belt or detachably linked. The output shaft of the second motor is connected to the synchronous belt through a transmission wheel, and the rotation of the second motor drives the synchronous belt to rotate, and the synchronous belt drives the slider to move along the sliding groove, thereby driving the entire Z-axis moving mechanism 8 to move along the Y-axis direction of the chessboard or the chessboard carrier.
[0064] The synchronous belt adopts 2GT-232mm, with a pitch of 2mm, precise arc tooth shape and small tooth gap to achieve high-precision positioning and smooth torque transmission. At the same time, the parameters such as tooth shape, tooth pitch, tooth width and wheel diameter of the transmission wheel are matched with the synchronous belt specifications, and suitable materials and surface treatment are used to improve wear resistance and corrosion resistance.
[0065] like Figure 1 and Figure 2 As shown, the suction cup mechanism includes a fixing part 1, an exhaust solenoid valve 2, an air pressure sensor 3, a multi-layer suction cup 4, and a tee 5.
[0066] like Figure 1 As shown, the fixing member 1 includes a mounting plate and a box body with a bottom but no cover fixed to one side of the mounting plate, and through holes are opened on the bottom and one side of the box body, the diameter of the through holes is equal to the outer diameter of the tee 5, the tee is arranged inside the box body, and the tee 5 is fixedly connected to the box body.
[0067] The first end of the tee 5 passes through the through hole at the bottom of the box, the second end of the tee 5 passes through the through hole at one side of the box, and the third end of the tee 5 faces the top of the box.
[0068] The first end of the tee 5 passes through the through hole at the bottom of the box body and is connected to the first end of the multi-layer suction cup 4 .
[0069] The second end of the tee 5 passes through a through hole on a side surface of the box body and is connected to the air pressure sensor 3 .
[0070] The third end of the three-way valve 5 is provided with an exhaust solenoid valve 2 .
[0071] The Z-axis moving mechanism is connected to the top of the fixing member 1 .
[0072] like Figure 4 and Figure 5 As shown, the Z-axis moving mechanism includes an inverted 7-shaped housing, a fixed plate, a third motor, a semi-rotating disk and a connecting rod. The two sides of the fixed plate are fixed to the inner side of the 7-shaped housing, the fixed plate is penetrated with a through hole, the third motor is fixed to one side of the fixed plate, the output shaft of the third motor passes through the through hole on the fixed plate, and is fixedly connected to the center of the semi-rotating disk, the edge of the semi-rotating disk is rotatably connected to the first end of the connecting rod, and the second end of the connecting rod is rotatably connected to the top of the mounting plate of the fixing member 1.
[0073] As an implementation mode, a sliding block is provided on a side of the mounting plate of the fixing member 1 close to the fixing plate, and a sliding rail matching with the sliding block on the mounting plate is provided on the fixing plate, and the sliding rail is perpendicular to the horizontal plane.
[0074] The third motor rotates to drive the semi-turntable to rotate, the connecting rod rises, the slider on the mounting plate slides along the slide rail on the fixed plate, and drives the suction cup mechanism to rise and fall in the opposite direction, which is simple and quick.
[0075] The multi-layer suction cup 4 is made of silicone or rubber, etc. The suction cup is made of soft and durable material to adapt to chessboard surfaces of different materials.
[0076] During use, the Z-axis moving mechanism moves, driving the fixing part 1 to move downward along the Z-axis. After the second end of the multi-layer suction cup 4 contacts the chess piece, it continues to be compressed. After compression, the exhaust solenoid valve 2 is closed, and the Z-axis moving mechanism moves, lifting the fixing part 1 along the Z-axis. Through the elasticity of the multi-layer suction cup 4 itself, a small negative pressure is generated during the recovery process to adsorb the chess piece. After reaching the specified position, the exhaust solenoid valve 2 opens, and the atmospheric pressure is connected to the chess piece to separate from the multi-layer suction cup 4.
[0077] The passive chess piece retrieval device provided in this embodiment has a multi-layer suction cup 4 as its core. A deformable cavity structure is designed inside the suction cup, and negative pressure is formed or released by changing the volume of the cavity. Through the operation of the mechanical linkage mechanism and the exhaust solenoid valve, the contraction of the cavity causes the internal air to be discharged, forming negative pressure to adsorb the chess pieces. When expanding, external air enters the cavity, releasing the negative pressure, thereby releasing the chess pieces. Local negative pressure is formed by the automatic contraction of the cavity of the multi-layer suction cup 4, thereby achieving adsorption of Go chess pieces.
[0078] The contraction and expansion of the multi-layer suction cup 4 is controlled by a series of mechanical linkage mechanisms and exhaust solenoid valves. The mechanical linkage mechanism uses the lever principle and the restoring force of the spring to achieve automatic contraction and expansion of the cavity without the need for external energy, thereby improving the portability and stability of the passive sub-removal device.
[0079] In this embodiment, the design of the mechanical linkage mechanism allows fine adjustment to control the force when adsorbing and releasing the chess piece.
[0080] As an implementation method, an adaptive piece-taking strategy is designed: based on the information provided by the intelligent image recognition system, an intelligent algorithm is developed to enable the piece-taking device to adapt to different placements of chess pieces and adjust the force of piece-taking; and based on the position information provided by the intelligent image recognition system, the position of the piece-taking device is adjusted in real time to ensure accurate piece taking.
[0081] Specifically, the first motor, the second motor, the Z-axis moving mechanism, the exhaust solenoid valve 2 and the air pressure sensor 3 are all connected to the controller, and the controller is also connected to an intelligent image recognition system. A passive chess piece picking device provided in this embodiment uses ESP32 as the underlying master control to control all motor actuators and solenoid valves, controls the movement of the motor through a serial communication connection, communicates with RV1106 through another serial port, realizes the communication control of visual detection and processing, receives the given position of picking or dropping the chess piece, and then ESP32 controls the motor to pick up the chess piece at the picking position (picking point), put down the chess piece at the dropping position (dropping point), and then returns to the picking position, and so on.
[0082] Among them, the intelligent image recognition system can identify the pixel coordinates of each chessboard grid line in the chessboard, the category of each chess piece and the position of each chess piece, and can also identify the position of the chess box and the category and position of the chess pieces in the chess box.
[0083] In this embodiment, the intelligent image recognition system is configured as follows:
[0084] (1) Before playing chess, perform chessboard inspection. The steps are as follows: Figure 6 As shown in FIG, specifically, it includes: 1) image dedistortion and reprojection: the camera's intrinsic parameter matrix and distortion parameters are obtained through monocular camera calibration, and the image captured by the camera is dedistorted. The obtained image is then reprojected (projection transformation), and after the chessboard top view is obtained, the local chessboard grid is detected; 2) chessboard grid line reconstruction: if the chessboard top view includes chess pieces, chess piece detection is performed, and the chess piece pixel coordinates are obtained according to the results of the image chess piece detection, and the detected chess pieces are replaced with the crosshairs of the chessboard for the next step of detection, such as Figure 7 3) Hough line detection: After reconstructing the chessboard, the straight lines (including horizontal and vertical lines) in the picture are detected by the Hough line detection function of OpenCV to obtain the chessboard image. The detected horizontal and vertical lines are possible chessboard grid lines. The coordinates of the four corner points of the circumscribed rectangle containing the intersection of these grid lines are calculated to obtain the maximum quadrilateral area surrounded by these Hough lines, as shown in Figure 8 As shown; 4) Statistical histogram: scan the chessboard grid lines (including horizontal lines and vertical lines) in the chessboard image of the previous step, statistical histogram, determine the chessboard grid lines, obtain the pixel coordinates corresponding to each grid of the chessboard, that is, the pixel coordinates of the chessboard grid lines, and save the detection results of the chessboard grid lines.
[0085] In this embodiment, the steps of determining the chessboard grid lines are as follows:
[0086] ① A histogram is a graphical representation of the distribution of pixel values in a chessboard image. In a binary image, there are only two pixel values: 0 (black) and 255 (white). Each bar on the histogram represents the number of white pixels in a column (X-axis histogram) or a row (Y-axis histogram) in the image.
[0087] like Fig. 9 As shown in the figure, the X-axis histogram shows the number of white pixels in each column of the chessboard image. In the chessboard image, if a column contains the vertical lines of the chessboard, the number of white pixels in this column will be significantly higher than other columns, so it will appear as a taller bar on the histogram.
[0088] like Fig.10As shown in the figure, the Y-axis histogram shows the number of white pixels in each row of the image. In the chessboard image, if a row contains the horizontal lines of the chessboard, the number of white pixels in this row will be significantly higher than other rows, so it will appear as a taller bar on the histogram.
[0089] ② Through the histogram, we can find several columns and rows where the number of white pixels is significantly higher than other positions. The positions of these columns and rows are the most likely vertical and horizontal lines in the chessboard grid. Determine the border of the chessboard: First, you need to find the highest peaks in the histogram, which represent the border of the chessboard. Determine the grid lines: Within the border, find several other significant peaks, which represent the internal grid lines of the chessboard. Determine the number of squares within the ground deformation unit surrounded by the border and internal grid lines. If it meets the standard, proceed to step ③; otherwise, redetermine the border of the chessboard.
[0090] ③ Calculate the coordinates of each grid: Through adjacent grid lines, the pixel coordinates of each chessboard square can be calculated.
[0091] ④ Determine whether the grid lines are reasonable, such as whether the spacing and number of grid lines are consistent. If reasonable, exit the thread; otherwise, the camera re-captures the image and re-detects the local chessboard grid.
[0092] Example:
[0093] Suppose the X-axis histogram shows significant peaks at columns 50 and 150, which means the left and right boundaries of the chessboard may be between these two lines. If there is also a peak at column 75, then this may be the first vertical grid line of the chessboard.
[0094] Similarly, the Y-axis histogram shows that there are significant peaks at lines 100 and 300, which means that the upper and lower boundaries of the chessboard may be between these two lines. If there are also peaks at lines 150 and 250, then these may be the two horizontal grid lines of the chessboard.
[0095] With this information, the borders and internal grid lines of the chessboard can be determined, and the pixel coordinates of each chessboard square can be calculated.
[0096] Note: Make sure the image path is correct, otherwise an exception will be thrown. The image should be a binary image, that is, the pixel values are only 0 and 255.
[0097] Through the above analysis, we can effectively read the binary image, count the distribution of white pixels, and draw a histogram, so as to have an intuitive understanding of the position of the chessboard and the pixel coordinates of each grid. This method is very useful in image processing and computer vision, especially when performing image recognition and pattern recognition tasks.
[0098] (2) During the chess game, chess piece detection is performed: RV1106 uses the VI model to collect image data from the CSI camera and processes the image data through the VPSS module (cropping, color space conversion, image dedistortion, etc.). The image data is then used by the NPU processor to detect the category and coordinates of the chess pieces to obtain the category and pixel coordinates of the chess pieces, such as Fig.11 Output the distribution of chess pieces on the chessboard: According to the pixel coordinates of the chess pieces and the chessboard grid pixel coordinates detected by the chess pieces, the distribution of the chess pieces on the chessboard is obtained, and a two-dimensional matrix distribution map of the chess pieces is output and stored in the chess record, such as Fig.12 shown.
[0099] The specific steps of detecting the category and coordinates of chess pieces include: cutting out the chessboard area in the image data as the detection area, calculating the projection transformation matrix and applying the projection transformation to obtain a top view of the chessboard, inputting the top view of the chessboard into the chess piece detection model, and obtaining the category and coordinates of each chess piece.
[0100] It should be noted that, if chess piece detection is performed during chessboard detection, the chessboard area is the boundary of the chessboard top view.
[0101] Among them, the training process of the chess piece detection model is:
[0102] ① Collect video data or image data of Go game: cut out the chessboard area in the image data or video data as the detection area, calculate the projection transformation matrix and apply the projection transformation to obtain the top view of the chessboard;
[0103] ② Data labeling: Label the chess pieces in the top view of the chessboard with the category of the chess pieces (black or white) and the coordinates of the chess pieces’ detection frames and save them in a label file. Each image corresponds to a label file.
[0104] ③Training chess piece detection model: Use the yolov5s algorithm model officially provided by luckfox, take the previous pictures and labels as input, set the training parameters, and run the instructions for training the chess piece detection model;
[0105] ④Model conversion: The previous step finally gets a best.pt file, and then the pt model is converted to an onnx model through the tool provided by yolov5s. Then the onnx model is converted to an rknn model available for RV1106 through the conversion tool officially provided by luckfox, and the trained chess piece detection model is converted into an available chess piece detection model.
[0106] Go records are a way to record Go games. They record in detail the positions of each move made by both sides, as well as the final outcome of the game. Records are not only records of games, but also important tools for learning and studying Go. Here are some basic concepts of Go records: Board layout: Go records usually start with a 19×19 grid, which is the standard size of a Go board. The intersections on the board are where the pieces can be placed. Piece representation: In records, black pieces are usually represented by black dots "●" and white pieces are represented by white circles "○"; in some modern records, the positions of pieces are also directly represented by numerical coordinates. Game record: The record records every move of the game, including the order and position of the pieces. The record usually starts with the first move of the black pieces, followed by the response of the white pieces, and so on, until the end of the game. Dead or alive mark: In the record, special marks are sometimes used to indicate the dead or alive status of a certain area, such as a square "□" to mark live pieces and a circle "○" to mark dead pieces. Branch variations: In a chess record, branch variations may be included. These are possible alternative moves to show different tactical options and possible game developments. Commentary and annotations: High-level chess records usually include commentary and annotations from professional players. These commentary and annotations help understand the strategy and tactics of the game. Record format: Chess records can be recorded in different formats, such as text format, SGF (Smart Game Format), etc. SGF is an international standard Go recording format that can contain a variety of information such as records, branch variations, and commentary. Record analysis: Through the analysis of chess records, players can learn different layout strategies, mid-game tactics, and endgame techniques, thereby improving their Go level. Historical games: Famous games in history, such as ancient famous games or classic games of modern professional chess players, are often widely studied and circulated as records. Personal game records: Chess players can also record their own game records for review and self-analysis to find out the highlights and mistakes in the game. Go records are an important part of Go culture. They not only record the history of the games, but are also an important medium for the inheritance and improvement of Go skills.
[0107] The controller controls the first motor, the second motor, the Z-axis moving mechanism and the exhaust solenoid valve 2 according to the information recognized by the intelligent image recognition system.
[0108] Specifically, the upper computer also determines the position of the chess piece to be taken or placed according to the position of the chess piece and the next action.
[0109] Specifically, the controller controls the first motor and the second motor to move the multilayer suction cup 4 to the top of the chess piece according to the position of picking up or dropping the chess piece. If picking up the chess piece, the controller controls the movement of the X-axis moving mechanism and the Y-axis moving mechanism, and after the multilayer suction cup is moved to the top of the picking point, the exhaust solenoid valve is controlled to be fully opened, and the Z-axis moving mechanism moves downward. The air cavity or air bag of the multilayer suction cup is compressed as the Z-axis moving mechanism moves downward. When the moving distance of the Z-axis moving mechanism exceeds the set value, the exhaust solenoid valve is controlled to be fully closed, and the surface of the multilayer suction cup is closely attached to the adsorbed chess piece. The Z-axis moving mechanism is controlled to move upward to pick up the chess piece. When the Z-axis moving mechanism moves upward, it is determined whether the air pressure information uploaded by the air pressure sensor is lower than the threshold value. If so, the picking up of the chess piece is successful, otherwise, the picking up of the chess piece fails. If the picking up of the chess piece fails, the first motor and the second motor are controlled to move, and the position of the multilayer suction cup 4 is adjusted to pick up the chess piece again. If it is a chess piece placement, the X-axis moving mechanism and the Y-axis moving mechanism are controlled to move the multi-layer suction cup to the top of the chess piece placement point, and the exhaust solenoid valve is controlled to open. The multi-layer suction cup returns to its original shape as the gas enters. The adsorbed chess piece is separated from the multi-layer suction cup, and the chess piece placement is completed. At this time, the air pressure information uploaded by the air pressure sensor is the atmospheric pressure.
[0110] As an implementation mode, the setting value of the moving distance of the Z-axis moving mechanism is different according to the different properties of the chess piece, such as weight, shape and material.
[0111] As an implementation method, for chess pieces with different attributes, their height h, diameter R, radian r and weight w are measured, and the set value L=k((r*w) / (h*R)) of the moving distance of the Z-axis moving mechanism is calculated, where k is the set coefficient and the calculated value is stored.
[0112] Among them, the set value of the moving distance of the Z-axis moving mechanism determines the force of picking up and placing pieces; optimizing it will help to ensure the stability of picking up and placing pieces when facing different chess pieces.
[0113] The passive piece retrieval device provided in this embodiment can integrate a high-resolution camera and an advanced image processing algorithm to accurately identify the position of chess pieces on the chessboard, provide operation guidance for the mechanical linkage mechanism, and significantly improve the accuracy and efficiency of piece retrieval.
[0114] The passive chess piece retrieval device provided in this embodiment adopts a machine learning algorithm, which can continuously optimize the recognition accuracy and adapt to chess pieces of different colors, shapes and sizes.
[0115] The passive sub-removal device provided in this embodiment adopts a modular design, which is convenient for rapid replacement and upgrading, and improves flexibility and maintainability.
[0116] The passive child retrieval device provided in this embodiment adopts a high-precision synchronous belt and a matching transmission wheel to drive a mechanical linkage mechanism, thereby ensuring no slippage during the transmission process, achieving precise speed control and position positioning, ensuring the synchronous operation of the child retrieval device, and improving the stability and reliability of the child retrieval.
[0117] The passive sub-retrieving device provided in this embodiment focuses on energy conservation and environmental protection, and selects lightweight and high-strength materials to reduce weight. The energy consumption is reduced by optimizing the mechanical structure and control strategy.
[0118] The passive piece-taking device provided in this embodiment not only improves the performance and user experience of the Go robot, but also focuses on energy conservation, environmental protection and economic benefits, and has high market application value and promotion prospects.
[0119] The passive sub-removal device provided in this embodiment does not require external energy, thereby improving portability and stability.
[0120] The passive piece-taking device provided in this embodiment uses an intelligent image recognition system and an adaptive piece-taking strategy to significantly improve the accuracy and efficiency of piece-taking. By using an intelligent algorithm, the piece-taking device can recognize and adapt to chess pieces placed in different positions, and can automatically adjust the force of taking and dropping chess pieces. The intelligent image recognition system provides accurate position information of chess pieces, and guides the mechanical linkage mechanism to adjust its position and angle in real time, ensuring that each piece-taking is accurate, thereby significantly improving the efficiency and success rate of piece-taking.
[0121] Example 2
[0122] Embodiment 2 of the present invention provides a Go-playing robot.
[0123] This embodiment provides a Go robot, such as Fig.13 As shown, the chessboard support platform 9, the chess box 10, the camera 11, the intelligent image recognition system, the controller and the passive piece retrieval device described in Example 1.
[0124] The Go robot provided in this embodiment adopts the ESP-IDF framework and a standardized serial communication interface.
[0125] Slideways are arranged on both sides of the chessboard support platform 9, and the rollers of the passive chess piece retrieval device described in Example 1 roll along the slideways.
[0126] Two chess boxes 10 are arranged at one end of the chessboard supporting platform 9 , and a camera 11 is arranged between the two chess boxes 10 .
[0127] The Go robot provided in this embodiment is equipped with a high-resolution camera and an advanced image processing algorithm, and can accurately identify the position and posture of chess pieces on the board under different lighting conditions. The application of light source compensation technology ensures that high recognition accuracy can be maintained even inside the chess box with insufficient light, thereby directly improving the accuracy of picking pieces. Through the integration of these technologies, the Go robot can maintain stable performance in various lighting environments.
[0128] The Go robot provided in this embodiment can also be equipped with light source compensation technology to ensure accurate recognition of chess pieces under different lighting conditions.
[0129] The Go robot provided in this embodiment adopts a standardized interface design, so that different modules can be seamlessly connected, thereby improving compatibility.
[0130] Example 3
[0131] Embodiment 3 of the present invention provides a control method of a Go robot as in Embodiment 2, such as Fig.14 As shown, including:
[0132] Step 1: Start the program and initialize it.
[0133] Among them, the initialization step includes multiple threads: (1) calling the server and initializing the chessboard interface; (2) processing serial port data, that is, opening the serial port and starting a new thread to read serial port data, such as the robot arm homing signal and the user button signal; (3) RTSP streaming of image data, that is, starting a new thread to stream the processed image data through RTSP, and the host side plays it through VLC to observe the data processing results during the game, which is convenient for debugging; (4) detecting the chessboard grid, that is, starting a new thread to run the chessboard detection step mentioned in Example 1, and the detection results of the chessboard grid lines (pixel coordinates of the chessboard grid) are saved to the chess record and will be used in the main thread; if the chessboard detection result meets certain conditions, it can be considered that the detection is accurate, and the thread is exited after the detection result is saved.
[0134] Step 2, waiting for the user to play chess. If the serial port receives a confirmation signal, it indicates that the user has made a move. If there is no signal, continue to wait for the user to make a move. After the user has made a move, obtain an image and perform chess piece detection to obtain a chess piece two-dimensional matrix distribution map, wherein the chess piece detection step adopts the steps mentioned in Example 1. Compare the chess record, that is, compare the current chess piece two-dimensional matrix distribution map with the previous chess piece two-dimensional matrix distribution map stored in the chess record, and find the position where the user has made a move (that is, the position where the user makes a move), and store the image obtained this time, the detection result of the chess piece in the image (chess piece two-dimensional matrix distribution map), and the position where the user has made a move, that is, save them to the chess record.
[0135] Step 3: According to the chess piece two-dimensional matrix distribution map, determine whether there is a capture situation, and process the chess pieces on the chessboard according to the capture situation. After processing, re-check the chess pieces, update the chess piece two-dimensional matrix distribution map, and save it to the chess record.
[0136] In this embodiment, the chess pieces on the chessboard are processed according to the capture situation, which can be processed manually by the user or by controlling the passive piece-taking device.
[0137] Step 4: Send the chess piece two-dimensional matrix distribution map and the user's chess position to the server, query KataGo, obtain the machine's next chess position, and convert the machine's chess position into a chess command to be executed by the lower computer (controller) (including taking the piece from the chess box, the position of the piece, placing the piece at the chess position, and the position of the piece).
[0138] Step 5. After the lower computer executes the chess-playing command, the lower computer sends a signal for the robot arm to return to its original position, and waits for the robot to return to its original position. After receiving the signal for the robot arm to return to its original position, the lower computer acquires the image again and performs chess piece detection, and updates the chess piece two-dimensional matrix distribution map to detect whether the position of the machine's chess-playing is correct. If correct, the image acquired this time, the detection results of the chess pieces in the image (chess piece two-dimensional matrix distribution map), and the position where the machine places the chess pieces are stored, that is, saved to the chess record.
[0139] When the lower computer executes the chess-playing command, it performs the following control:
[0140] Control the movements of the X-axis moving mechanism and the Y-axis moving mechanism to move the multi-layer suction cup to the top of the chess piece;
[0141] Control the switch of the exhaust solenoid valve, the movement and moving distance of the Z-axis moving mechanism, pick up and drop the pieces, and judge whether the picking is successful based on the air pressure information uploaded by the air pressure sensor during the picking process.
[0142] Step 6: Based on the latest chess piece two-dimensional matrix distribution map, check whether the machine has captured any piece after playing chess. If so, process the position of the captured piece on the chessboard. After processing, return to step 2.
[0143] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A passive sub-removal device, characterized in that: It includes an X-axis moving mechanism, a Y-axis moving mechanism, a Z-axis moving mechanism and a suction cup mechanism, wherein the suction cup mechanism includes a fixing part, an exhaust solenoid valve, an air pressure sensor, a multi-layer suction cup and a tee; The Z-axis moving mechanism is connected to the fixing member, the tee is fixed on the fixing member, the first end of the tee is connected to the multi-layer suction cup, the second end of the tee is connected to the air pressure sensor, and the third end of the tee is provided with an exhaust solenoid valve; the Z-axis moving mechanism is used to drive the multi-layer suction cup to move along the Z-axis direction, and cooperate with the exhaust solenoid valve to form a negative pressure in the cavity of the multi-layer suction cup to adsorb the chess pieces; The X-axis moving mechanism, Y-axis moving mechanism, Z-axis moving mechanism, exhaust solenoid valve and air pressure sensor are all connected to a controller; the controller is used to control the movements of the X-axis moving mechanism and the Y-axis moving mechanism, move the multi-layer suction cup to directly above the chess piece, and control the switch of the exhaust solenoid valve, the movement and moving distance of the Z-axis moving mechanism to pick up and place the chess piece, and during the process of picking up the chess piece, determine whether the picking up of the chess piece is successful based on the air pressure information uploaded by the air pressure sensor.
2. A passive sub-removal device as claimed in claim 1, characterized in that: The X-axis moving mechanism includes a shell, a first motor arranged in the shell and a roller arranged on one side of the shell, the output shaft of the first motor is connected to a transmission wheel, the roller is connected to the transmission wheel connected to the output shaft of the first motor through a transmission belt, the first motor rotates to drive the roller to rotate, and the X-axis moving mechanism drives the Y-axis moving mechanism and the Z-axis moving mechanism to move along the X-axis direction of the chessboard or the chessboard carrier.
3. A passive sub-removal device as claimed in claim 1, characterized in that: The Y-axis moving mechanism includes a shell, a second motor and a synchronous belt arranged in the shell; a sliding groove is provided on one side of the shell of the Y-axis moving mechanism, and a slider adapted to the sliding groove is provided on the outer side of the shell of the Z-axis moving mechanism, the slider is connected to the synchronous belt, and the output shaft of the second motor is connected to the synchronous belt through a transmission wheel. The rotation of the second motor drives the synchronous belt to rotate, and the synchronous belt drives the slider to move along the sliding groove, thereby driving the Z-axis moving mechanism to move along the Y-axis direction of the chessboard or the chessboard carrier.
4. A passive sub-removal device as claimed in claim 1, characterized in that: There are two X-axis moving mechanisms, which are detachably connected to the two ends of the Y-axis moving mechanism; The Z-axis moving mechanism can be detachably arranged on the Y-axis moving mechanism.
5. A passive sub-removal device as claimed in claim 1, characterized in that: The controller is used to control the movement of the X-axis moving mechanism and the Y-axis moving mechanism when placing a chess piece. After the multi-layer suction cup is moved to the top of the chess piece placement point, the exhaust solenoid valve is controlled to open, and the multi-layer suction cup is restored to its original shape as air enters. The adsorbed chess piece is separated from the multi-layer suction cup, and the chess piece is placed.
6. A passive sub-removal device as claimed in claim 1, characterized in that: The controller is used to control the actions of the X-axis moving mechanism and the Y-axis moving mechanism when picking up the chess piece. After the multi-layer suction cup is moved to just above the chess piece picking point, the exhaust solenoid valve is controlled to be fully opened, and the Z-axis moving mechanism moves downward. The air cavity or air bag of the multi-layer suction cup is compressed as the Z-axis moving mechanism moves downward. When the moving distance of the Z-axis moving mechanism exceeds the set value, the exhaust solenoid valve is controlled to be fully closed, and the surface of the multi-layer suction cup is tightly attached to the adsorbed chess piece. The Z-axis moving mechanism is controlled to move upward to pick up the chess piece. When the Z-axis moving mechanism moves upward, it is determined whether the air pressure information uploaded by the air pressure sensor is lower than the threshold value. If so, the chess piece is successfully picked up.
7. A passive sub-removal device as claimed in claim 1, characterized in that: The controller is connected to an intelligent image recognition system; the intelligent image recognition system is used to identify the pixel coordinates of each chessboard grid line in the chessboard, the category of each chess piece and the position of each chess piece.
8. A passive sub-removal device as claimed in claim 1, characterized in that: The pixel coordinates of each chessboard grid line are obtained by image dedistortion and reprojection, chessboard reconstruction, Hough line detection and histogram statistics; The category of each chess piece and the position of each chess piece are obtained through a trained chess piece detection model.
9. A Go-playing robot, characterized in that: The invention comprises a controller and a passive sub-extraction device as claimed in any one of claims 1 to 8.
10. A control method for a Go robot as claimed in claim 9, characterized in that: Control the movements of the X-axis moving mechanism and the Y-axis moving mechanism to move the multi-layer suction cup to the top of the chess piece; Control the switch of the exhaust solenoid valve, the opening of the exhaust solenoid valve, and the movement and moving distance of the Z-axis moving mechanism to pick up and drop the pieces, and judge whether the picking is successful based on the air pressure information uploaded by the air pressure sensor during the picking process.
Citation Information
Patent Citations
Self-adsorptive type sensor fixed device
CN102095442A
Self-adaptive electric control vacuum chuck manipulator for label-removed waste plastic bottles and control method
CN114261038A
Chess playing robot and working method
CN115056243A
Folding go robot
CN116141345A
Mechanical impact recorder pointer line drawing identification method
CN117994267A
