Chess playing robot system and control method thereof

Through the distributed deployment structure and magnetic chess piece system, the problems of flexibility and accuracy of chess robot gripping chess pieces are solved, flexible gripping of chess pieces and scalability of the system are achieved, manufacturing costs and control difficulty are reduced, and the overall performance and reliability of the system are improved.

CN120606409APending Publication Date: 2025-09-09TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510598609.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

Existing chess-playing robots lack flexibility and accuracy in gripping chess pieces, and are unable to adapt to chess pieces of different shapes and textures. Their structural design is limited by degrees of freedom, making system design difficult to iterate and update, and centralized systems have weak scalability and adaptability.

Method used

A distributed deployment structure is adopted, including recognition module, decision module and control module. Magnetic chess pieces and magnet boxes are used to achieve flexible gripping of chess pieces. Distributed deployment improves the scalability and adaptability of the system. The preset evaluation function and inverse kinematics solution are combined to optimize the control of the robotic arm.

Benefits of technology

It realizes flexible gripping of chess pieces, improves the scalability and adaptability of the system, reduces manufacturing costs and control difficulty, enhances the overall performance and reliability of the system, and supports more complex algorithm iterative updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120606409A_ABST
    Figure CN120606409A_ABST
Patent Text Reader

Abstract

The invention relates to a chess playing robot system and a control method thereof.The chess playing robot system comprises a chess playing robot, a magnetic chessboard and at least one chess piece box corresponding to the magnetic chessboard, and the chess playing robot adopts a tail end self-adaptive execution module connected with a mechanical arm; comprising an identification module, a decision-making module and a control module which adopt a distributed deployment structure, the identification module is used for obtaining chessboard information and chess piece coordinates of a final chess piece placing position of a user; the decision-making module is used for determining chess piece coordinates of the current optimal chess piece placing point; and the control module is used for determining a control signal of the mechanical arm, controlling the mechanical arm to move the magnet box based on the control signal to attract the magnetic chess piece from the target chess piece box, and placing the attracted magnetic chess piece at a position corresponding to the chess piece coordinate of the current optimal chess piece dropping point. Therefore, the problems that the robot is easily limited by the degree of freedom to clamp the chess pieces and the system is difficult to iteratively update are solved, the robot is not limited by the degree of freedom, and the expandability and the adaptability of the system are high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of robotics technology, and in particular to a chess-playing robot system and a control method thereof. Background Art

[0002] In today's era of rapid technological advancement, the development of robotic systems that can interactively play chess with humans is gaining increasing attention. Implementing this functionality requires the coordinated cooperation of multiple key elements. First, the robotic arm, the core actuator, must possess high-precision positioning capabilities. Furthermore, the robot requires a specialized end-effector design to accurately pick up chess pieces of varying sizes and weights.

[0003] In the related art, when it comes to gripping chess pieces, the gripping methods used by chess-playing robots lack flexibility and precision. Traditional claw-type and suction-cup-type end effectors often exhibit limitations when faced with chess pieces of varying shapes and textures, making it difficult to precisely control the gripping force. This technical flaw often results in chess pieces becoming unstable during the gripping process, making them prone to falling or being damaged due to excessive force. Furthermore, when there is a slight deviation between the actual position of a chess piece and the ideal gripping position, traditional gripping methods often struggle to adapt, resulting in failure to grip the chess piece.

[0004] In terms of structural design, chess-playing robots are generally irrational. To precisely control the position and posture of the end effector during chess play, robots typically require 5 to 6 degrees of freedom. Robots with low degrees of freedom have limitations in terms of spatial layout and joint flexibility, resulting in a restricted range of motion and slow movements. This makes it difficult for the robot to quickly and accurately complete chess moves, and some positions cannot be achieved. While robots with higher degrees of freedom offer a wider range of motion and greater flexibility, they are expensive to manufacture, and their higher dimensionality leads to complex control algorithms, requiring higher computing resources and fine-tuning, which undoubtedly increases the economic and technical burden.

[0005] In terms of software platforms, existing chess-playing robots have shortcomings in their operating systems. Their strategy AI and visual processing code cannot be updated and iterated, resulting in low operational efficiency. This makes it difficult to quickly and accurately analyze complex chess positions, leading to lengthy decision-making times and severely impacting the user experience. This can also lead to significant consumption of system resources, increasing the burden on hardware and further impacting the robot's overall performance and stability.

[0006] In terms of system design, most existing systems utilize a centralized design, resulting in low collaborative efficiency and limited operability. Since all decision-making and motion control are centralized on a single terminal, the system may face performance bottlenecks when handling complex chess games and cannot fully utilize the parallel computing capabilities of multi-core processors. Furthermore, the risk of single points of failure is high; if a terminal fails, the entire robot will cease to function properly. Furthermore, a centralized design consumes a significant amount of computing power when processing robot decisions, potentially leading to insufficient computing resources in the robot's control system, impacting motion accuracy and responsiveness. Furthermore, during human-computer interaction, the system's scalability and adaptability are relatively weak, making it difficult to flexibly adjust to different chess games and user needs. Summary of the Invention

[0007] The present application provides a chess-playing robot system and a control method thereof to solve the problems of poor flexibility and accuracy in gripping chess pieces, difficulty in adapting to chess pieces of different shapes and textures, susceptibility to limitations on degrees of freedom in structural design, and difficulty in iterative updates in system design. The system can achieve flexible gripping of chess pieces without being restricted by degrees of freedom, adopts a distributed deployment structure, and has strong scalability and adaptability.

[0008] In a first aspect, an embodiment of the present application provides a chess-playing robot system, comprising a chess-playing robot, a magnetic chessboard, and at least one chess piece box corresponding to the magnetic chessboard, each chess piece box containing a plurality of magnetic chess pieces. The chess-playing robot employs an end-adaptive execution module connected to a robotic arm, the end-adaptive execution module comprising a shaft and a magnet box, wherein magnets for attracting the magnetic chess pieces are placed in the magnet box. The chess-playing robot comprises: an identification module, a decision module, and a robot control module in a distributed deployment structure.

[0009] The recognition module is used to obtain the last chess-playing robot's chess-playing surface image and the user's last chess-playing surface image, and obtain chessboard information and chess piece coordinates of the user's last chess piece placement position based on the last chess-playing robot's chess-playing surface image and the user's last chess piece placement image;

[0010] The decision module is configured to determine the chess piece coordinates of the current optimal placement point based on the chessboard information and the chess piece coordinates of the user's last placement position based on a preset evaluation function;

[0011] The control module is used to determine the control signal of the robotic arm according to the chess piece coordinates of the current optimal placement point, and control the robotic arm to move the magnet box to absorb the magnetic chess piece from the target chess piece box based on the control signal, and place the absorbed magnetic chess piece at a position corresponding to the chess piece coordinates of the current optimal placement point. When the chess-playing robot places the chess piece on the magnetic chessboard, the suction force between the absorbed magnetic chess piece and the magnetic chessboard is greater than the suction force between the absorbed magnetic chess piece and the magnet box.

[0012] Optionally, in some embodiments, the identification module includes:

[0013] A preprocessing unit, configured to preprocess the last chess-playing image of the chess-playing robot and the last chess-playing image of the user to obtain a first preprocessed image and a second preprocessed image;

[0014] a projection transformation unit, configured to detect chessboard corners based on the first pre-processed image and the second pre-processed image, and perform projection transformation based on the chessboard corners to transform the chessboard image of the last move of the chess-playing robot into a first top-view image, and to transform the chessboard image of the last move of the user into a second top-view image;

[0015] The chess piece position detection module is used to obtain the chessboard information and the chess piece coordinates of the user's last chess piece placement position according to the grayscale values ​​of the first overhead view image and the second overhead view image.

[0016] Optionally, in some embodiments, the pre-processing unit includes:

[0017] a grayscale conversion subunit, configured to perform grayscale conversion on the last chess-playing robot's chess-playing surface image and the last chess-playing surface image of the user to obtain a first grayscale chess-playing surface image and a second grayscale chess-playing surface image;

[0018] A denoising subunit, configured to perform denoising on the first grayscale image and the second grayscale image using Gaussian filtering to obtain a first denoised chess surface image and a second denoised chess surface image;

[0019] The enhancement subunit is used to enhance the first denoised chess surface image and the second denoised chess surface image to obtain the first pre-processed image and the second pre-processed image.

[0020] Optionally, in some embodiments, the preset evaluation function is:

[0021] f(position)=W eye E(position)+W liberties L(position)+W patternsP(position)+W safety S(position)+W Territory T(position);

[0022] Among them, Weye is the weight of the eye position, E(position) is the quantization function of the eye position, Wliberties is the weight of connectivity, L(position) is the quantization function of connectivity, Wpatterns is the weight of the chess pattern, P(position) is the quantization function of the chess pattern, Wsafety is the weight of safety, S(position) is the quantization function of safety, WTerritory is the weight of the land, and T(position) is the quantization function of the land.

[0023] Optionally, in some embodiments, the control module includes:

[0024] A timing logic control unit, configured to generate an action sequence for the robotic arm according to the chess piece coordinates of the optimal placement point, and output position coordinates based on the action sequence;

[0025] A trajectory planning unit, configured to generate motion trajectory points according to the position coordinates using a preset position interpolation function;

[0026] The inverse kinematics solving unit is used to determine the joint angles of the robot joints according to the motion trajectory points, and to determine the control signals of the robot arm according to the joint angles of the robot joints.

[0027] Optionally, in some embodiments, the preset position interpolation function is:

[0028] q i (t) = a i0 +a i1 t+a i2 t 2 +a i3 t 3 +a i4 t 4 +a i5 t 5 ;

[0029] Among them, q i (t) is the position of the i-th joint at time t, a i0 is the initial position of the i-th joint at the initial moment, a i1 is the initial velocity of the i-th joint at the initial moment, a i2 is the initial acceleration of the i-th joint at the initial moment, a i3 、a i4 and a i5is a high-order dynamic parameter.

[0030] Optionally, in some embodiments, the method further includes:

[0031] A communication module is used to connect the communication between the identification module, the decision module and the control module.

[0032] A second embodiment of the present application provides a control method for a chess-playing robot system, comprising the following steps:

[0033] Obtaining the last chess-playing robot's chess-playing surface image and the user's last chess-playing surface image, and obtaining chessboard information and chess piece coordinates of the user's last chess-playing position based on the last chess-playing robot's chess-playing surface image and the user's last chess-playing surface image;

[0034] Based on a preset evaluation function, determining the chess piece coordinates of the current optimal placement point according to the chessboard information and the chess piece coordinates of the user's last placement position;

[0035] According to the chess piece coordinates of the current optimal placement point, the control signal of the robotic arm is determined, and the robotic arm is controlled to move the magnet box based on the control signal to absorb the magnetic chess piece from the target chess piece box, and place the absorbed magnetic chess piece at the corresponding position of the chess piece coordinates of the current optimal placement point.

[0036] Optionally, in some embodiments, obtaining chessboard information and chess piece coordinates of the user's last chess piece placement position based on the chess robot's last chess piece placement image and the user's last chess piece placement image includes:

[0037] Preprocessing the last chess-playing image of the chess-playing robot and the last chess-playing image of the user respectively to obtain a first preprocessed image and a second preprocessed image;

[0038] detecting chessboard corners based on the first pre-processed image and the second pre-processed image, and performing a projection transformation based on the chessboard corners to transform the chessboard image of the last move of the chess-playing robot into a first top-view image, and transform the chessboard image of the last move of the user into a second top-view image;

[0039] The chessboard information and the chess piece coordinates of the last chess piece placement position of the user are obtained according to the grayscale values ​​of the first overhead view image and the second overhead view image.

[0040] Optionally, in some embodiments, preprocessing the chess robot's last move chess image and the user's last move chess image to obtain a first preprocessed image and a second preprocessed image respectively includes:

[0041] Performing grayscale conversion on the chess-playing robot's last chess-playing image and the user's last chess-playing image to obtain a first grayscale chess-playing image and a second grayscale chess-playing image;

[0042] Denoising the first grayscale image and the second grayscale image using Gaussian filtering to obtain a first denoised chess surface image and a second denoised chess surface image;

[0043] The first denoised chess surface image and the second denoised chess surface image are enhanced to obtain the first pre-processed image and the second pre-processed image.

[0044] Thus, by acquiring the chess robot's last chessboard image and the user's last chessboard image, the chessboard information and the coordinates of the chess piece at the user's last chessboard position are obtained; based on a preset evaluation function, the coordinates of the chess piece at the current optimal chessboard position are determined according to the chessboard information and the coordinates of the chess piece at the user's last chessboard position; based on the coordinates of the chess piece at the current optimal chessboard position, a control signal for the robotic arm is determined, and the robotic arm is controlled to move the magnet box based on the control signal to absorb the magnetic chess piece from the target chess box, and place the absorbed magnetic chess piece at the position corresponding to the coordinates of the chess piece at the current optimal chessboard position. This solves the problems of the chess robot's lack of flexibility and accuracy in gripping chess pieces, its difficulty in adapting to chess pieces of varying shapes and textures, its susceptibility to degrees of freedom restrictions in structural design, and its difficulty in iterative updates in system design. The system can now achieve flexible gripping of chess pieces without being restricted by degrees of freedom, and adopts a distributed deployment structure, making the system highly scalable and adaptable.

[0045] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0047] Figure 1 Schematic diagram of a chess-playing robot system according to an embodiment of the present application;

[0048] Figure 2 A schematic diagram of the principle of a chess-playing robot system provided according to one embodiment of the present application;

[0049] Figure 3 A schematic diagram of a three-degree-of-freedom robot equipped with an adaptive end placement module according to one embodiment of the present application;

[0050] Figure 4 This is a schematic diagram of a control module according to one embodiment of the present application;

[0051] Figure 5 A schematic diagram of a sequential logic unit according to an embodiment of the present application;

[0052] Figure 6 A schematic diagram of the upper half of the shaft and the magnet box according to one embodiment of the present application;

[0053] Figure 7 A schematic diagram of the lower half of a magnet box provided according to one embodiment of the present application;

[0054] Figure 8 This is a flowchart of a control method for a chess-playing robot system provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0055] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0056] The following describes a chess-playing robot system and its control method according to an embodiment of the present application with reference to the accompanying drawings. In response to the problems mentioned in the above background technology, such as the poor flexibility and accuracy of the chess-playing robot in gripping chess pieces, the difficulty in adapting to chess pieces of different shapes and textures, the susceptibility to degree of freedom restrictions in structural design, and the difficulty in iterative updates in system design, the present application provides a chess-playing robot system, in which chessboard information and the coordinates of the chess piece at the user's last chess-playing position are obtained by acquiring the chess-playing robot's last chess-playing image and the user's last chess-playing image; based on a preset evaluation function, the coordinates of the chess piece at the current optimal chess-playing position are determined according to the chessboard information and the coordinates of the chess piece at the user's last chess-playing position; a control signal for a robotic arm is determined according to the coordinates of the chess piece at the current optimal chess-playing position, and the robotic arm is controlled to move a magnet box based on the control signal to absorb a magnetic chess piece from a target chess piece box, and place the absorbed magnetic chess piece at a position corresponding to the coordinates of the chess piece at the current optimal chess-playing position. This solves the problems of chess robots' poor flexibility and accuracy in gripping chess pieces, difficulty in adapting to chess pieces of different shapes and textures, susceptibility to limitations in degrees of freedom in structural design, and difficulty in iterative updates in system design. The system can be flexible in gripping chess pieces without being restricted by degrees of freedom, and adopts a distributed deployment structure, making the system highly scalable and adaptable.

[0057] Specifically, Figure 1 A schematic block diagram of a chess-playing robot system provided in an embodiment of the present application.

[0058] The chess-playing robot system of an embodiment of the present application includes: a chess-playing robot, a magnetic chessboard and at least one chess piece box configured corresponding to the magnetic chessboard, each chess piece box contains multiple magnetic chess pieces, the chess-playing robot adopts an end-adaptive execution module connected to a robotic arm, the end-adaptive execution module includes an axis and a magnet box, and magnets for adsorbing magnetic chess pieces are placed in the magnet box, wherein the chess-playing robot includes: an identification module 100, a decision module 200 and a control module 300 adopting a distributed deployment structure.

[0059] Among them, the recognition module 100 is used to obtain the last chess-playing robot's chess-playing surface image and the user's last chess-playing surface image, and obtain the chessboard information and the chess piece coordinates of the user's last chess piece placement position based on the last chess-playing robot's chess-playing surface image and the user's last chess piece placement image.

[0060] The decision module 200 is used to determine the chess piece coordinates of the current optimal placement point based on a preset evaluation function, according to the chessboard information and the chess piece coordinates of the user's last placement position.

[0061] The control module 300 is used to determine the control signal of the robotic arm according to the chess piece coordinates of the current optimal placement point, and control the robotic arm to move the magnet box based on the control signal to absorb the magnetic chess piece from the target chess piece box, and place the absorbed magnetic chess piece at the corresponding position of the chess piece coordinates of the current optimal placement point. When the chess-playing robot drops the chess piece onto the magnetic chessboard, the suction force between the absorbed magnetic chess piece and the magnetic chessboard is greater than the suction force between the absorbed magnetic chess piece and the magnet box.

[0062] Specifically, this application deploys three terminals in a distributed manner, which are responsible for the recognition module 100, the decision module 200 and the robot control module 300 respectively. Figure 2 As shown in the figure, Terminal A uses the vision module to detect the position of the chess piece placed by the person and transmits the coordinates to Terminal B using the TCP / IP communication protocol. After receiving the coordinates, Terminal B runs the AI ​​program to generate the corresponding coordinates for the robot and transmits them to Terminal C using the TCP / IP communication protocol. Terminal C controls the robot's move based on the obtained coordinates. Terminal A then continues the recognition process after the person makes a move. This cycle continues.

[0063] The robot end effector designed in the embodiment of the present application is a non-powered adaptive end placement module that can solve the problem of insufficient degrees of freedom of the robot. It is suitable for robots with different degrees of freedom and configurations, as well as motion platforms that can achieve three-dimensional space point positioning.

[0064] Optionally, in some embodiments, the recognition module 100 includes: a pre-processing unit, a projection transformation and chess piece position detection module.

[0065] The preprocessing unit is used to preprocess the chess robot's last move chess surface image and the user's last move chess surface image to obtain a first preprocessed image and a second preprocessed image respectively.

[0066] The projection transformation unit is used to detect chessboard corner points based on the first preprocessed image and the second preprocessed image, and perform projection transformation based on the chessboard corner points, transforming the chess robot's last move chess surface image into the first top view image, and transforming the user's last move chess surface image into the second top view image.

[0067] The chess piece position detection module is used to obtain chessboard information and the coordinates of the chess piece at the user's last chess piece placement position according to the grayscale values ​​of the first overhead view image and the second overhead view image.

[0068] Furthermore, in some embodiments, the pre-processing unit includes: a grayscale conversion sub-unit, a denoising sub-unit, and an enhancement sub-unit.

[0069] Among them, the grayscale conversion subunit is used to grayscale convert the last chess-playing robot's chess-playing surface image and the user's last chess-playing surface image to obtain a first grayscale chess-playing surface image and a second grayscale chess-playing surface image.

[0070] The denoising subunit is used to perform denoising on the first grayscale image and the second grayscale image using Gaussian filtering to obtain a first denoised chess surface image and a second denoised chess surface image.

[0071] The enhancement subunit is used to enhance the first denoised chess surface image and the second denoised chess surface image to obtain a first pre-processed image and a second pre-processed image.

[0072] Specifically, a visual recognition module is deployed in Terminal A, which uses color and shape recognition technology to identify the types and positions of robot and human chess pieces, providing raw materials for decision-making. The following takes Go as an example.

[0073] (1) Image preprocessing: The embodiment of the present application uses the OpenCV library. First, the color image is converted into a grayscale image using grayscale conversion, then the image noise is removed using Gaussian filtering, and finally the edge detection algorithm Canny is used to enhance the edges of the chessboard and chess pieces.

[0074] (2) Perspective conversion: This embodiment uses the OpenCV library. First, Harris corner detection is used to find the corner points of the chessboard, and the pinhole model is used to perform perspective transformation:

[0075]

[0076] Where s is the scale factor, K is the camera intrinsic parameter matrix, (x, y) is the image plane coordinate, (X, Y, Z) is the world coordinate, and f x, f y is the focal length of the image in the x and y directions, c x ,c y are the coordinates of the principal point of the image, from which the top view can be obtained.

[0077] (3) Chess piece position detection: In the embodiment of the present application, the OpenCV library is used to apply the Blob detection algorithm to the top-view grayscale image, identifying circles with a grayscale greater than 200 as black pieces and circles with a grayscale less than 55 as white pieces. The coordinates of the chess pieces can be obtained in this way.

[0078] Thanks to the distributed deployment, the vision module can be modified without affecting the decision-making and control modules. The increased computing power of the distributed system can support faster operations and more complex algorithms, such as deep learning algorithms.

[0079] Regarding the decision module 200, the embodiment of the present application deploys the decision module in terminal B. The decision system of the chess robot is implemented through alpha-beta pruning and Monte Carlo tree search, combined with a preset evaluation function. Among them, the preset evaluation function is:

[0080] f(position)=W eye E(position)+W liberties L(position)+W patterns P(position)+W safety S(position)+W Territory T(position);

[0081] Among them, Weye is the weight of the eye position, E(position) is the quantization function of the eye position, Wliberties is the weight of connectivity, L(position) is the quantization function of connectivity, Wpatterns is the weight of the chess pattern, P(position) is the quantization function of the chess pattern, Wsafety is the weight of safety, S(position) is the quantization function of safety, WTerritory is the weight of the land, and T(position) is the quantization function of the land.

[0082] The preset evaluation function takes into account the number of chess pieces (points), chess shape and sphere of influence, live and dead pieces, eye position and connectivity, and threat level. These weights and the evaluation function together determine the total evaluation value, allowing for in-depth analysis of complex chess games within a limited time, generating and evaluating a large number of moves, and thus selecting the optimal move. Due to the use of distributed deployment, more complex algorithms, such as deep learning algorithms, can be updated and iterated.

[0083] Optionally, in some embodiments, the control module 300 includes: a timing logic control unit, a trajectory planning unit, and an inverse kinematics solving unit.

[0084] Among them, the timing logic control unit is used to generate the action sequence of the robotic arm according to the chess piece coordinates of the optimal placement point, and output the position coordinates based on the action sequence.

[0085] The trajectory planning unit is used to generate motion trajectory points according to the position coordinates using a preset position interpolation function.

[0086] The inverse kinematics solving unit is used to determine the joint angles of each joint of the robot according to the motion trajectory points, and to determine the control signals of the robot arm according to the joint angles of each joint of the robot.

[0087] Specifically, the embodiment of the present application deploys the control module 300 in the terminal C, taking a three-degree-of-freedom robot as an example. Figure 3 shown.

[0088] The robot control in this embodiment of the application adopts simulink modular programming, which is divided into a sequential logic module, a trajectory planning and point selection module, and an inverse kinematics solution module. Among them, the control part block diagram is as follows Figure 4 shown.

[0089] (1) The implementation of sequential logic is as follows Figure 5 As shown, a selector is used. When its selection flag RT is a certain number, the data selector selects the output signal corresponding to the digital input. For example, signal 1 and other signals indicate the default elevated position, signal 2 indicates the position 20 cm above the grab position, signal 3 indicates the grab position, signal 4 indicates the position 20 cm above the chessboard placement position, and signal 5 indicates the chessboard placement position. A sequence generator is then used to generate signals 123456 in sequence to complete a grab and place operation.

[0090] In order to ensure that people have sufficient reaction time, the design uses a data storage device to record the time, and a register to record the last update time. Only when the update time of the information sent by computer B is greater than the preset time, the simulink sequence generator will work, and it will stop after each round of work.

[0091] (2) Trajectory planning is implemented as follows: The module uses joint space trajectory planning and uses quintic polynomials for position interpolation to ensure the continuity of velocity and acceleration and avoid impact.

[0092] The fifth-order polynomial is used as the position interpolation function:

[0093] q i (t) = a i0 +a i1 t+ai2 t 2 +a i3 t 3 +a i4 t 4 +a i5 t 5 ;

[0094] Among them, q i (t) is the position of the i-th joint at time t, a i0 is the initial position of the i-th joint at the initial time (t=0), a i1 is the initial velocity of the i-th joint at the initial moment, a i2 is the initial acceleration of the i-th joint at the initial moment, a i3 、a i4 and a i5 are high-order dynamic parameters used to ensure the acceleration continuity of the trajectory at the starting and ending points to avoid mechanical shock. These coefficients are obtained by solving the boundary equations based on the initial and ending conditions (position, velocity, acceleration) of the manipulator. The corresponding velocity and acceleration expressions are:

[0095] q′ i (t) = a i1 +2a i2 t+3a i3 t 2 +4a i4 t 3 +5a i5 t 4 ;

[0096] q″ i (t) = 2a i2 +6a i3 t+12a i4 t 2 +20a i5 t 3 ;

[0097] The parameters to be determined can be determined based on the following starting and ending conditions.

[0098] q i (0) = q i0 ,q′ i (0) = q′ i0 ,q″ i (0) = q″ i0

[0099] q i (t f )=q if ,q′ i (t f )=q′if ,q″ i (t f )=q″ if .

[0100] (3) The inverse kinematics solution is implemented as follows.

[0101] Robot parameter list

[0102] θ d a α 0-1 <![CDATA[θ1]]> 0 0 90 1-2 <![CDATA[θ2]]> 0 <![CDATA[a2]]> 0 2-3 <![CDATA[θ3]]> 0 <![CDATA[a3]]> 0

[0103] Get the transformation matrix based on the robot parameter list:

[0104]

[0105] Where A1, A2, and A3 are the homogeneous transformation matrices between adjacent joints, describing the spatial pose transformation relationships between links 0-1, 1-2, and 2-3, respectively. C1, C2, and C3 are the abbreviations of COSθ1, COSθ2, and COSθ3, respectively (C represents cosine), and a2 and a3 are the link lengths of links 1-2 and 2-3, respectively.

[0106] Get the final transformation matrix:

[0107] R T H =A1A2A3;

[0108] For the desired pose:

[0109]

[0110] Among them, n x 、n y 、n z They constitute the normal vector n, representing the direction component of the x-axis of the end coordinate system in the base coordinate system, o x 、o y 、o z are the direction vector o, which represents the direction component of the y-axis of the tool coordinate system in the base coordinate system. x 、a y 、a z They are respectively the approach vector a, which represents the direction component of the z-axis (approach direction) of the tool coordinate system in the base coordinate system.

[0111] Just solve the equation R T H =T D , you can get the angle of each joint and output the joint signal to the motor.

[0112] It should be noted that the embodiments of the present application achieve the operation of picking up and placing chess pieces through a unique solution. Specifically, magnets, magnetic chess pieces, and a magnetic chessboard are selected, wherein the magnetic force exerted by the magnets on the chess pieces is smaller than the magnetic force exerted by the chess board on the chess pieces, and the magnetic forces of both are greater than the gravity exerted on the chess pieces.

[0113] Based on this, a chess piece can be attracted to a magnet on a wooden board. The magnet carrying the chess piece is then moved to a specific position on the chessboard. When the magnet is removed from that position, the chess piece is attracted to the chessboard due to the strong magnetic force of the chessboard, thus completing the chess game. The force relationship is expressed as follows:

[0114] F 棋子重力 <F 磁铁与棋子 <F 棋子与棋盘 ;

[0115] In order to more flexibly utilize magnets for suction and placement operations, this application has developed a non-powered adaptive end placement module, the structural diagram of which is shown in FIG. Figure 6 and Figure 7 This module includes the following key structures: magnet box, shaft, and bearing. In the figure, 1 is the shaft and 2 is the upper magnet box.

[0116] The magnet is installed in the magnet box, and a shaft connected to the robot arm is provided above the magnet box. PLA material is used in the embodiment of the present application, and an H7 / h6 clearance fit is adopted between the shaft and the bearing to ensure free rotation. The adjacent magnet boxes are positioned by an H7 / k6 transition fit to prevent the magnets from falling off. In actual use, the module is installed at the end of the robot arm. For a three-degree-of-freedom robot arm, the module can ensure that the magnet grasped by the end can place the chess piece close to the chessboard in a vertical direction, thereby ensuring that the chess piece can be smoothly sucked out of the chess box and placed on the chessboard; for a robot arm with a higher degree of freedom, after adding the module, it is only necessary to meet its position requirements when solving the inverse solution in the position space, and the requirements for the attitude angle are reduced, which greatly improves the speed of the robot solution and reduces the cost and control difficulty of the robot arm.

[0117] The adaptive end placement module provided by the present application shows significant advantages for non-fully free manipulators (such as three-degree-of-freedom manipulators) by virtue of its unique structural design. Specifically, since the module contains a clearance-fitted shaft, when applied to a common three-degree-of-freedom manipulator, the magnet box will naturally stand upright under the action of gravity. This is because the three-degree-of-freedom manipulator has a relatively limited ability to move, and under the action of the component of gravity along the axis, the shaft will rotate and displace in the bearing, driving the magnet box to move, and ultimately causing the magnet box to naturally tend to a vertical state. This naturally vertical state ensures that the magnet grasped at the end can be close to the chessboard in a vertical direction, thereby enabling the chess pieces to be smoothly sucked out of the chess box and accurately placed on the chessboard.

[0118] For a robotic arm with a higher degree of freedom, it is only necessary to meet the position requirements during the inverse solution calculation of the position space, and the constraints on the attitude angle are reduced. The principle is that if the magnet is only directly fixed to the end of the robotic arm, in order to ensure that the chess piece is smoothly placed on the chessboard, the end of the robotic arm must be accurately close to the chessboard in a vertical downward direction, which has strict requirements on the attitude angle of the inverse solution calculation. However, the addition of the adaptive end placement module provided by the implementation of this application has changed this situation. Through its unique internal structure and working mechanism, the module can automatically adjust the posture of the magnet, so that the robotic arm does not need to accurately control the attitude angle while meeting the position requirements, thereby greatly improving the speed of the robot's solution, reducing the manufacturing cost and control difficulty of the robotic arm, and increasing the solution space of the robotic arm.

[0119] Optionally, in some embodiments, it also includes: a communication module.

[0120] Among them, the communication module is used to connect the communication between the identification module, the decision module and the control module.

[0121] Specifically, the TCP / IP protocol is used between terminals A, B, and C to exchange data at a frequency of 100Hz. The message structure and data segment data are defined in Table 1. Table 1 is a message structure table in TCP / IP communication. It is only necessary to know the IP addresses and ports of the three terminals. In this embodiment, the server is established using the TCPIP handle in MATLAB, and the stream client and stream server modules in Simulink can be used to achieve data exchange. The use of the TCP / IP communication protocol can ensure efficient and reliable data exchange between the visual recognition, decision-making, and control modules. The stability of the TCP / IP protocol ensures that the communication between the modules will not be interrupted even in a complex network environment, thereby ensuring that the robot can receive and process chess game information in real time and make fast and accurate decisions and actions. In addition, the wide compatibility of TCP / IP makes it easy to integrate terminals with different functions without worrying about compatibility issues.

[0122] Table 1

[0123]

[0124]

[0125] In summary, the embodiment of the present application provides a configuration-adaptive intelligent chess-playing robot system solution based on distributed deployment. The three distributed deployed terminals are responsible for visual recognition, decision-making and control respectively, which solves the problems of heavy computing power burden, low scalability, poor iterability and weak debuggability of the integrated system. The control module can be controlled using a visual simulation tool. At the same time, the unpowered adaptive end placement module of the robot end actuator can be applied to robots with different degrees of freedom and configurations and motion platforms that can achieve three-dimensional space point positioning, solving the contradiction between the economic cost of the robot and posture control. Therefore, the chess-playing robot system of the embodiment of the present application can improve the overall performance and efficiency of the system. Each terminal can process tasks in parallel, shorten the processing time, and enhance the reliability of the system. Even if a terminal fails, the other terminals can continue to work. Similarly, the distributed deployment design enables each module to be optimized and upgraded independently, which improves the flexibility and scalability of the system. In addition, compared with the end effector solution in the related art, a robot with a simpler configuration and lower degrees of freedom can be used, which is lower in cost, simpler in control algorithm, and consumes less computing resources.

[0126] According to the chess-playing robot system proposed in the embodiment of the present application, by obtaining the chess-playing robot's last chess-playing image and the user's last chess-playing image, and obtaining the chessboard information and the chess piece coordinates of the user's last chess-playing position based on the chess-playing robot's last chess-playing image and the user's last chess-playing image, based on the chessboard information and the user's last chess-playing position, the chess piece coordinates of the current optimal chess-playing position are determined based on the preset evaluation function; based on the chess piece coordinates of the current optimal chess-playing position, the control signal of the robotic arm is determined, and the robotic arm is controlled to move the magnet box based on the control signal to absorb the magnetic chess piece from the target chess piece box, and place the absorbed magnetic chess piece at the corresponding position of the chess piece coordinates of the current optimal chess-playing point. In this way, the problems of the chess-playing robot's poor flexibility and accuracy in gripping chess pieces, its difficulty in adapting to chess pieces of different shapes and textures, its susceptibility to freedom restrictions in structural design, and its difficulty in iterative updates in system design are solved. The system can be flexible in gripping chess pieces without being restricted by freedom, and adopts a distributed deployment structure, making the system highly scalable and adaptable.

[0127] Next, a control method for a chess-playing robot system according to an embodiment of the present application will be described with reference to the accompanying drawings.

[0128] Figure 8 This is a flowchart of a control method for a chess-playing robot system according to an embodiment of the present application.

[0129] In step S101, the last chess-playing robot's chess-playing surface image and the last chess-playing user's chess-playing surface image are obtained, and the chessboard information and the chess piece coordinates of the user's last chess piece placement position are obtained based on the last chess-playing robot's chess-playing surface image and the user's last chess piece placement image.

[0130] In step S102, based on a preset evaluation function, the chess piece coordinates of the current optimal placement point are determined according to the chessboard information and the chess piece coordinates of the user's last placement position.

[0131] In step S103, the control signal of the robotic arm is determined according to the chess piece coordinates of the current optimal placement point, and the robotic arm is controlled to move the magnet box based on the control signal to absorb the magnetic chess piece from the target chess piece box, and place the absorbed magnetic chess piece at the corresponding position of the chess piece coordinates of the current optimal placement point.

[0132] Optionally, in some embodiments, obtaining chessboard information and chess piece coordinates of the user's last chess piece placement position based on the chess robot's last chess piece placement image and the user's last chess piece placement image includes:

[0133] Preprocessing the chess robot's last move chess surface image and the user's last move chess surface image respectively to obtain a first preprocessed image and a second preprocessed image;

[0134] Detecting chessboard corners based on the first preprocessed image and the second preprocessed image, and performing projection transformation based on the chessboard corners to transform the chessboard image of the last move of the chess-playing robot into a first top-view image, and transforming the chessboard image of the last move of the user into a second top-view image;

[0135] According to the grayscale value of the first overhead view image and the grayscale value of the second overhead view image, the chessboard information and the chess piece coordinates of the user's last chess piece placement position are obtained.

[0136] Optionally, in some embodiments, preprocessing the chess robot's last move chess image and the user's last move chess image to obtain a first preprocessed image and a second preprocessed image respectively includes:

[0137] Performing grayscale conversion on the chess robot's last move chess surface image and the user's last move chess surface image to obtain a first grayscale chess surface image and a second grayscale chess surface image;

[0138] Denoising the first grayscale image and the second grayscale image using Gaussian filtering to obtain a first denoised chess surface image and a second denoised chess surface image;

[0139] The first denoised chess surface image and the second denoised chess surface image are enhanced to obtain a first pre-processed image and a second pre-processed image.

[0140] It should be noted that the aforementioned explanation of the chess-playing robot system embodiment is also applicable to the control method of the chess-playing robot system of this embodiment, and will not be repeated here.

[0141] According to the control method of the chess-playing robot system proposed in the embodiment of the present application, by obtaining the chess-playing robot's last chess-playing image and the user's last chess-playing image, and obtaining the chessboard information and the chess piece coordinates of the user's last chess-playing position based on the chess-playing robot's last chess-playing image and the user's last chess-playing image; based on a preset evaluation function, the chess piece coordinates of the current optimal chess-playing position are determined according to the chessboard information and the chess piece coordinates of the user's last chess-playing position; according to the chess piece coordinates of the current optimal chess-playing position, the control signal of the robotic arm is determined, and the robotic arm is controlled to move the magnet box based on the control signal to absorb the magnetic chess piece from the target chess piece box, and place the absorbed magnetic chess piece at the corresponding position of the chess piece coordinates of the current optimal chess-playing position. In this way, the problems of the chess-playing robot's poor flexibility and accuracy in gripping chess pieces, its difficulty in adapting to chess pieces of different shapes and textures, its susceptibility to freedom restrictions in structural design, and its difficulty in iterative updates in system design are solved. The system can be flexible in gripping chess pieces without being restricted by freedom, and adopts a distributed deployment structure, making the system highly scalable and adaptable.

[0142] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

[0143] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Thus, a feature specified as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of this application, "N" means at least two, for example, two, three, etc., unless otherwise specifically defined.

[0144] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present application belong.

[0145] It should be understood that various parts of the present application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiment, the N steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array, a field programmable gate array, etc.

[0146] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0147] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A chess-playing robot system, characterized in that: include: A chess-playing robot, a magnetic chessboard, and at least one chess piece box corresponding to the magnetic chessboard, each chess piece box containing a plurality of magnetic chess pieces. The chess-playing robot employs an end-adaptive execution module connected to a robotic arm, the end-adaptive execution module comprising a shaft and a magnet box, the magnet box containing magnets for attracting the magnetic chess pieces. The chess-playing robot comprises: an identification module, a decision module, and a control module in a distributed deployment structure. The recognition module is used to obtain the last chess-playing robot's chess-playing surface image and the user's last chess-playing surface image, and obtain chessboard information and chess piece coordinates of the user's last chess piece placement position based on the last chess-playing robot's chess-playing surface image and the user's last chess piece placement image; The decision module is configured to determine the chess piece coordinates of the current optimal placement point based on the chessboard information and the chess piece coordinates of the user's last placement position based on a preset evaluation function; The control module is used to determine the control signal of the robotic arm according to the chess piece coordinates of the current optimal placement point, and control the robotic arm to move the magnet box to absorb the magnetic chess piece from the target chess piece box based on the control signal, and place the absorbed magnetic chess piece at a position corresponding to the chess piece coordinates of the current optimal placement point. When the chess-playing robot places the chess piece on the magnetic chessboard, the suction force between the absorbed magnetic chess piece and the magnetic chessboard is greater than the suction force between the absorbed magnetic chess piece and the magnet box.

2. The system according to claim 1, wherein: The identification module includes: A preprocessing unit, configured to preprocess the last chess-playing image of the chess-playing robot and the last chess-playing image of the user to obtain a first preprocessed image and a second preprocessed image; a projection transformation unit, configured to detect chessboard corners based on the first pre-processed image and the second pre-processed image, and perform projection transformation based on the chessboard corners to transform the chessboard image of the last move of the chess-playing robot into a first top-view image, and to transform the chessboard image of the last move of the user into a second top-view image; The chess piece position detection module is used to obtain the chessboard information and the chess piece coordinates of the user's last chess piece placement position according to the grayscale values ​​of the first overhead view image and the second overhead view image.

3. The system according to claim 2, characterized in that The pre-processing unit comprises: a grayscale conversion subunit, configured to perform grayscale conversion on the last chess-playing robot's chess-playing surface image and the last chess-playing surface image of the user to obtain a first grayscale chess-playing surface image and a second grayscale chess-playing surface image; A denoising subunit, configured to perform denoising on the first grayscale image and the second grayscale image using Gaussian filtering to obtain a first denoised chess surface image and a second denoised chess surface image; The enhancement subunit is used to enhance the first denoised chess surface image and the second denoised chess surface image to obtain the first pre-processed image and the second pre-processed image.

4. The system according to claim 1, wherein: The preset evaluation function is: f(position)=W eye ·E(position)+W liberties ·L(position)+W patterns ·P(position)+ W safety ·S(position)+W Territory ·T(position); Among them, Weye is the weight of the eye position, E(position) is the quantization function of the eye position, Wliberties is the weight of connectivity, L(position) is the quantization function of connectivity, Wpatterns is the weight of the chess pattern, P(position) is the quantization function of the chess pattern, Wsafety is the weight of safety, S(position) is the quantization function of safety, WTerritory is the weight of the land, and T(position) is the quantization function of the land.

5. The system according to claim 1, wherein: The control module includes: A timing logic control unit, configured to generate an action sequence for the robotic arm according to the chess piece coordinates of the optimal placement point, and output position coordinates based on the action sequence; A trajectory planning unit, configured to generate motion trajectory points according to the position coordinates using a preset position interpolation function; The inverse kinematics solving unit is used to determine the joint angles of the robot joints according to the motion trajectory points, and to determine the control signals of the robot arm according to the joint angles of the robot joints.

6. The system according to claim 5, characterized in that The preset position interpolation function is: q i (t)=a i0 +a i1 t+a i2 t 2 +a i3 t 3 +a i4 t 4 +a is t 5 ; Among them, q i (t) is the position of the i-th joint at time t, a i0 is the initial position of the i-th joint at the initial moment, a i1 is the initial velocity of the i-th joint at the initial moment, a i2 is the initial acceleration of the i-th joint at the initial moment, a i3 、a i4 and a i5 is a high-order dynamic parameter.

7. The system according to claim 1, wherein: Also includes: A communication module is used to connect the communication between the identification module, the decision module and the control module.

8. A control method for a chess-playing robot system, characterized in that: The following steps are involved: Obtaining the last chess-playing robot's chess-playing surface image and the user's last chess-playing surface image, and obtaining chessboard information and chess piece coordinates of the user's last chess-playing position based on the last chess-playing robot's chess-playing surface image and the user's last chess-playing surface image; Based on a preset evaluation function, determining the chess piece coordinates of the current optimal placement point according to the chessboard information and the chess piece coordinates of the user's last placement position; According to the chess piece coordinates of the current optimal placement point, a control signal of the robotic arm is determined, and the robotic arm is controlled to move the magnet box based on the control signal to absorb the magnetic chess piece from the target chess piece box, and place the absorbed magnetic chess piece at a position corresponding to the chess piece coordinates of the current optimal placement point. When the chess-playing robot places the chess piece on the magnetic chessboard, the suction force between the absorbed magnetic chess piece and the magnetic chessboard is greater than the suction force between the absorbed magnetic chess piece and the magnet box.

9. The method according to claim 8, characterized in that The method of obtaining chessboard information and chess piece coordinates of the user's last chess piece placement position based on the last chess piece placement image of the chess robot and the last chess piece placement image of the user includes: Preprocessing the last chess-playing image of the chess-playing robot and the last chess-playing image of the user respectively to obtain a first preprocessed image and a second preprocessed image; detecting chessboard corners based on the first pre-processed image and the second pre-processed image, and performing a projection transformation based on the chessboard corners to transform the chessboard image of the last move of the chess-playing robot into a first top-view image, and transform the chessboard image of the last move of the user into a second top-view image; The chessboard information and the chess piece coordinates of the last chess piece placement position of the user are obtained according to the grayscale values ​​of the first overhead view image and the second overhead view image.

10. The method according to claim 9, characterized in that The method of preprocessing the last chess-playing robot's chess-playing image and the last chess-playing user's chess-playing image to obtain a first preprocessed image and a second preprocessed image comprises: Performing grayscale conversion on the chess-playing robot's last chess-playing image and the user's last chess-playing image to obtain a first grayscale chess-playing image and a second grayscale chess-playing image; Denoising the first grayscale image and the second grayscale image using Gaussian filtering to obtain a first denoised chess surface image and a second denoised chess surface image; The first denoised chess surface image and the second denoised chess surface image are enhanced to obtain the first pre-processed image and the second pre-processed image.