A control method for a robot with a double-arm and four-finger structure for Rubik's Cube restoration

Through the two-arm four-finger structure robot combining camera image processing and two-stage algorithm, the mechanical action path is optimized, which solves the problems of Rubik's Cube state recognition and mechanical step optimization, and achieves the efficient completion of the Rubik's Cube recovery task.

CN116117819BActive Publication Date: 2025-05-30UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310183145.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2022-12-09
Filing Date
2023-03-01
Publication Date
2025-05-30
Estimated Expiration
2043-03-01

AI Technical Summary

Technical Problem

The existing Rubik's Cube state recognition method is cumbersome and time-consuming, and the recognition success rate is reduced when the lighting conditions change, and the mechanical step optimization is insufficient, resulting in low efficiency in the recovery task of Rubik's Cube.

Method used

A two-arm four-finger structure robot is used to collect images through four monocular cameras, perform color block pixel extraction and K-means clustering, and combine the two-stage algorithm kociemba to solve the Rubik's Cube restore step, and optimize the mechanical action path through path binary tree depth-first search to achieve the mechanical action execution of the optimal path.

Benefits of technology

It realizes the rapid and accurate identification of the Rubik's Cube state and optimized path execution of mechanical actions, improving the efficiency and success rate of the Rubik's Cube recovery task.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116117819B_ABST
    Figure CN116117819B_ABST
Patent Text Reader

Abstract

The invention discloses a control method for a robot with a double-arm and four-finger structure for Rubik's Cube restoration, which belongs to the field of mechanical control. The method of the invention can solve the problems of rapid and accurate identification of the state of the Rubik's Cube and the optimization of the steps of mechanical action restoration in the Rubik's Cube restoration task by the robot with a double-arm and four-finger structure. This method enables the robot to perform the mechanical action restoration task on the Rubik's Cube in any scrambled state. Compared with general similar methods, the invention has a higher success rate of Rubik's Cube recognition through a single-camera pre-calibration clustering strategy; improves the stability of the robot to complete the Rubik's Cube restoration task by adjusting the motor speed adaptively according to the state of the Rubik's Cube; and ensures the rapidity of restoring the Rubik's Cube through a strategy of establishing a path binary tree according to preset rules and performing depth-first search.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of robot control. Background Art

[0002] Currently, the commonly used Rubik's Cube state recognition methods have relatively cumbersome preprocessing steps, including edge recognition, contour extraction, region interception, mean calculation, etc. These steps are not only time-consuming but also unnecessary. In terms of color block recognition methods, generally SVM, YOLO, etc. are used, which require model training in advance and are relatively cumbersome. There are also simple threshold processing methods, but this method has a strong dependence on the environmental light conditions. When the light conditions change, the recognition success rate will drop sharply. Generally, after calculating the Rubik's Cube restoration steps, mechanical actions and coordinate conversions are directly carried out in sequence. Although this method can complete the Rubik's Cube restoration task, it will result in more mechanical steps. It does not consider optimizing the mechanical steps from a global perspective to reduce the time for restoring the Rubik's Cube. Or when optimizing, the difference in the time used for each mechanical action is not considered. This undifferentiated processing method will also result in the optimization result not being globally optimal. Summary of the Invention

[0003] The present invention provides a control method for a double-arm four-finger structure robot for Rubik's Cube restoration, which can effectively solve the Rubik's Cube restoration task problems based on various double-arm four-finger structure robots, thereby fully tapping the potential of the mechanism and enabling it to quickly and stably complete the Rubik's Cube restoration task.

[0004] The method of the present invention can solve the problems of quickly and accurately recognizing the state of the Rubik's Cube and optimizing the steps of mechanical action restoration in the Rubik's Cube restoration task of a double-arm four-finger structure robot. This method allows the robot to perform mechanical action restoration tasks on Rubik's Cubes in any scrambled state. When completing this task, first, four single-eye cameras of the robot are used to collect four images, and the four images contain the color block states of the six faces of the Rubik's Cube. Further, color block pixels are extracted from the four images in sequence, and then the color block pixels extracted from the four images are clustered using the K-means method. Subsequently, the results of the four clusters are merged to obtain the state of the Rubik's Cube; the two-stage algorithm kociemba is used to solve the Rubik's Cube to obtain the Rubik's Cube restoration step instructions; then a path binary tree is established and depth-first search is performed on this step. By calculating and comparing the total time used for each path, the globally optimal path with the least mechanical action time is obtained, and this path is sent to the controller for mechanical action execution to complete the Rubik's Cube restoration task.

[0005] The technical solution of the present invention is a control method for a double-arm four-finger structure robot for Rubik's Cube restoration. This method includes 4 cameras with fixed positions and a double-arm four-finger structure robot. The 4 cameras are respectively arranged around the Rubik's Cube so that the 4 cameras can simultaneously capture the six faces of the Rubik's Cube; the steps of this method include:

[0006] Step 1: Fix the environmental light conditions. After setting the camera exposure, white balance, brightness, and contrast parameters, calibrate the positions of the 9 color blocks on each face of the Rubik's Cube.

[0007] Step 2: Read the images from 4 cameras. Extract the pixel values from the four images in sequence, then identify the distribution of each color block on each face of the Rubik's Cube, and merge the results of the four identifications to obtain the state of the Rubik's Cube.

[0008] Step 3: Use the two-stage algorithm kociemba to solve the Rubik's Cube for the state obtained in Step 2, and get the Rubik's Cube restoration step instructions.

[0009] Step 4: For the result obtained in Step 3, establish a path binary tree according to the pre-set rules, and perform a depth-first search on the binary tree. By comparing the total time used for each path, obtain the global optimal path with the least mechanical movement time.

[0010] S4-1. Prepare to establish a binary tree representing the mechanical movement path, and complete the depth-first search of the tree while building the tree. In this tree, a path from the root node to any tail node represents a path that can restore the Rubik's Cube. Further, there are as many paths that can restore the Rubik's Cube as there are tail nodes. The data structure of each node includes, but is not limited to: steps not taken, steps already taken, and the time cost of this path. Assign the steps of the Rubik's Cube restoration solved in Step S3 that have not been mechanically moved to the root node and put them into the stack.

[0011] S4-2. Determine whether the stack is empty. If it is empty, the program ends, and return the time cost of the optimal path, path information, and the corresponding set of mechanical movement steps. If it is not empty, pop the top node of the stack, visit this node, and enter Step S4-3.

[0012] S4-3. Determine whether the steps not taken of this node are empty. If they are empty, convert the steps already taken by this node into mechanical movement steps, and calculate the time cost of all steps as the time cost of this path. Then, compare the time cost of this path with the time cost of the currently saved optimal path. If this path is faster, replace the current optimal path with this path. If it is not empty, enter Step S4-4.

[0013] S4-4. Determine whether the first step of the steps not taken of this node can generate a binary tree branch. If so, initialize the left and right child nodes and put them into the stack, and then return to Step S4-2. If not, move this step to the steps already taken, perform coordinate transformation on the subsequent steps, and then return to Step S4-4.

[0014] Among them, regarding the judgment condition of whether the first step of the unperformed step at S4-4 can generate a binary tree branch, and the corresponding initialization methods of the left and right child nodes are as follows: First, define the three adjacent faces of the Rubik's Cube as: R, U, B. Additionally, the opposite face of R is L, the opposite face of U is D, and the opposite face of B is F;

[0015] Condition 1: If the first step of the unperformed step at this node is R, then initialize the left child node as the step set whose coordinate transformation method for this step is from the R face to the B face, and initialize the right child node as the step set whose coordinate transformation method for this step is from the R face to the D face;

[0016] Condition 2: If the first step of the unperformed step at this node is L, then initialize the left child node as the step set whose coordinate transformation method for this step is from the L face to the B face, and initialize the right child node as the step set whose coordinate transformation method for this step is from the L face to the D face;

[0017] Condition 3: If the first step of the unperformed step at this node is U and the second step is D, then initialize the left child node as the step set after swapping the order of the first step and the second step, and initialize the right child node as the step set without swapping the order;

[0018] Condition 4: If the first step of the unperformed step at this node is F and the second step is B, then initialize the left child node as the step set after swapping the order of the first step and the second step, and initialize the right child node as the step set without swapping the order;

[0019] Step 5: Send the optimal path obtained in Step 4 to the controller. After the controller parses the instructions, it controls the power unit to realize the actions of the robotic arm and the robotic finger, and completes the task of restoring the Rubik's Cube.

[0020] Furthermore, the specific method of Step 2 is as follows:

[0021] Set the initial spatial centers of each color category, generally making them far away from each other; then select a point in the dataset of the colors of the color blocks and bind it to the nearest center; when all points are bound, the initial clusters are formed; calculate the centroids of these clusters as the new centers; then bind each point to the center closest to it; repeat this process, and these centers will gradually move until they no longer change; this algorithm aims to minimize the variance:

[0022]

[0023] Among them, x i and v j are the vector values in the RGB space of the colors of two certain color blocks, ||x i -v j || is the Euclidean distance between x i and v j The calculation formula is as follows, ci is the number of centroids of i colors, and c is the number of colors;

[0024]

[0025] Given the initial k means m1, ..., mk as the initial spatial centers of each color, the algorithm will loop between two steps:

[0026] Assignment step: Assign the color space vector value of each color patch to be recognized to the color center with the smallest Euclidean distance to the mean;

[0027]

[0028] where the color vector value x of each color patch p is exactly assigned to a color category S i (t) , m i and m j are the centers of the i-th and j-th colors respectively;

[0029] Update step: Recalculate the mean of the observations of each color after assignment;

[0030]

[0031] When the assignment no longer changes, the algorithm has converged; the algorithm assigns the vector values of the colors of the color patches to the nearest color category clusters according to the distance; each data point contains information on three color components in the RGB color space; through this algorithm, all samples can be well classified into 6 color categories of the Rubik's Cube.

[0032] Furthermore, when the robot's arm moves, an adaptive speed regulation mechanism for the motor according to the state of the Rubik's Cube is introduced, which can avoid dislocating the Rubik's Cube while ensuring the quick and stable restoration of the Rubik's Cube, and improve the restoration success rate. The detailed description of this mechanism is as follows:

[0033] Three different rotational speeds are assigned to the motor. The low speed corresponds to driving the Rubik's Cube to avoid dislocating the Rubik's Cube due to too high a speed. At this time, the rotating robotic arm corresponds to the mechanical finger clamping the Rubik's Cube, and the non-rotating robotic arm corresponds to the mechanical finger releasing the Rubik's Cube; the medium speed corresponds to twisting the Rubik's Cube. At this time, the rotating robotic arm corresponds to the mechanical finger clamping the Rubik's Cube, and the non-rotating robotic arm corresponds to the mechanical finger also clamping the Rubik's Cube; the high speed corresponds to the idling of the robotic arm. At this time, the rotating robotic arm corresponds to the mechanical finger releasing the Rubik's Cube, and the non-rotating robotic arm corresponds to the mechanical finger clamping the Rubik's Cube; the three rotational speeds correspond to three different execution times respectively. After calculating the mechanical action steps, the time used for each step is accumulated to obtain the time cost of this path.

[0034] The method of the present invention can solve the problems of quickly and accurately identifying the state of the Rubik's Cube by a robot with a two-arm and four-finger structure during the Rubik's Cube restoration task

[0035] and the step optimization problem of mechanical action restoration. This method allows the robot to perform the mechanical action restoration task on a Rubik's Cube in any scrambled state. Compared with general similar methods, the present invention has a higher success rate of Rubik's Cube recognition through a single-camera pre-calibration clustering strategy; the stability of the robot to complete the Rubik's Cube restoration task is improved by the method of adaptively adjusting the motor speed according to the state of the Rubik's Cube; the rapidity of restoring the Rubik's Cube is ensured by the strategy of establishing a path binary tree according to preset rules and performing depth-first search Brief Description of the Drawings

[0036] Figure 1 is a logic step diagram of the method of the present invention

[0037] Figure 2 is a schematic diagram of the relative position between the camera and the Rubik's Cube

[0038] Figure 3 is a program flow chart of the method of the present invention

[0039] Figure 4 is a flow chart for identifying the initial state of the Rubik's Cube

[0040] Figure 5 is a schematic diagram of the path binary tree

[0041] Figure 6 is a flow chart for searching the optimal mechanical action path

[0042] Figure 7 is the definition of the Rubik's Cube coordinate plane

[0043] Figure 8 is a schematic diagram of a two-arm and four-finger structure robot Detailed Embodiment

[0044] The detailed embodiment of the method of the present invention is described as follows in conjunction with the drawings

[0045] As Figure 1 shown, the logical steps of this method can be summarized as: first, fix the environmental light conditions, then modify the parameters of each camera, calibrate the pixel values of 6 color blocks and the coordinate values of the centers of the color blocks for each camera. Subsequently, image acquisition, Rubik's Cube recognition, Rubik's Cube solution, path search, instruction conversion, and serial communication are completed in sequence on the computer side; then, serial communication, instruction parsing, and motion control of the robotic arm and robotic fingers are completed on the single-chip microcomputer side. Further, the steps are described in detail as follows

[0046] S1: Color block calibration. As Figure 2As shown in the figure, four cameras are respectively fixed on the upper and lower sides and the left and right sides of the Rubik's Cube. The four cameras can directly capture the six faces of the Rubik's Cube. There are multiple light sources around to fill light for each face of the Rubik's Cube. Adding light sources for filling light can make the lighting conditions on the surface of the Rubik's Cube more stable and less affected by changes in external environmental light. Subsequently, the four cameras are turned on in sequence, and the camera parameters are modified. The specific parameters include: exposure, brightness, contrast, white balance, and color temperature. Whether the modification is appropriate is based on the standard that it is relatively easy to distinguish the colors of different color blocks of the Rubik's Cube with the naked eye. The pixel values of different color blocks of the Rubik's Cube are calibrated for each camera under the current camera parameters in sequence, and then the coordinate values of the center of each color block in the image are calibrated.

[0047] S2: Identification of the initial state of the Rubik's Cube.

[0048] S2-1, as Figure 3 shown, after the main thread starts, a child thread is started, and the main thread waits for the Rubik's Cube recognition result of the child thread. The child thread turns on the four cameras and modifies the camera parameters. The specific parameters include: exposure, brightness, contrast, white balance, and color temperature. The modified values are the same as those in the color block calibration in step S1 to ensure that the pixel values of the Rubik's Cube color blocks in the image are not much different from the calibration results in step S1, which is convenient for clustering recognition.

[0049] S2-2, then start to read the images of the 4 cameras. As Figure 4 shown, after four images are read, start to process the image of the first camera, and extract the pixel values at the specified coordinates in the image. The coordinate values are the coordinate values calibrated for the color blocks in step S1.

[0050] S2-3, merge with the 6 color block calibration values calibrated for the color blocks of camera one in step S1, and perform calculation processing on the merged data set to complete the color recognition of the Rubik's Cube color blocks.

[0051] The specific calculation method is as follows: Set the initial spatial centers of each color category. Generally, they need to be far away from each other; then select a point in the data set of the color block colors and bind it to the nearest center; when all points are bound, the initial clusters are formed; calculate the centroid of these clusters as the new center; then bind each point to the center closest to it; loop like this, and these centers will gradually move until they no longer change; this algorithm aims to minimize the variance:

[0052]

[0053] Among them, x i and v j are the vector values in the RGB space of the colors of two certain color blocks, ||x i -v j || is x i and vj The Euclidean distance, the calculation formula is as follows, c i is the number of centroids of the i-th color, and c is the number of colors;

[0054]

[0055] Given the initial k means m1,..., mk as the initial spatial centers of each color, the algorithm will loop between two steps:

[0056] Assignment step: Assign the color space vector value of each color patch to be recognized to the color center with the smallest Euclidean distance to the mean;

[0057]

[0058] where the color vector value x of each color patch p is accurately assigned to a color category S i (t) , m i and m j are the centers of the i-th and j-th colors respectively;

[0059] Update step: Recalculate the mean of the observations of each color after assignment;

[0060]

[0061] When the assignment no longer changes, the algorithm has converged; the algorithm assigns the vector values of the colors of the color patches to the nearest color cluster according to the distance; each data point contains the information of three color components in the RGB color space; through this algorithm, all samples can be well classified into 6 color categories of the Rubik's Cube.

[0062] S2-4. Compare the color patches of the Rubik's Cube in the color recognition result of one side of the Rubik's Cube in step S2-3 with the calibrated color patches to obtain the color recognition result of the color patches on this side of the Rubik's Cube. This method can quickly determine the number and distribution of the colors on each side of the Rubik's Cube. Then, perform the above processing on the images of cameras two, three, and four in turn, as Figure 4 shown.

[0063] S2-5, as Figure 4 shown, merge the color recognition results of the four cameras to obtain the Rubik's Cube state recognition result. Judge whether the result is 54 color patches and the number of color patches of each color is 9. If not, it means that the Rubik's Cube is not placed in the specified position or is blocked, and then go back to step S2-2; if so, it means that the Rubik's Cube has been placed in the specified position and is not blocked, and then this step S2 ends.

[0064] S3: Solve the Rubik's Cube restoration steps. Since the initial state of the Rubik's Cube has been obtained in step S2, the two-stage algorithm kociemba can be used to solve the Rubik's Cube restoration steps. After the Rubik's Cube restoration steps are calculated, this step ends.

[0065] S4: Search for the optimal mechanical action path.

[0066] S4-1, as Figure 5 shown, prepare to build a binary tree representing the mechanical action path and complete the depth-first search of the tree while building the tree. In this tree, from the root node to any tail node represents a path that can restore the Rubik's Cube. Further, there are as many paths that can restore the Rubik's Cube as there are tail nodes. The data structure of each node includes but is not limited to: steps not taken, steps already taken, and the time cost of this path. As Figure 6 shown, first, assign the steps not taken of the root node to the Rubik's Cube restoration steps solved in step S3 and put them on the stack.

[0067] S4-2, check if the stack is empty. If it is empty, the program ends and returns the time cost of the optimal path, path information, and the corresponding set of mechanical action steps. If it is not empty, pop the top node of the stack and visit this node, then enter step S4-3.

[0068] S4-3, check if the steps not taken of this node are empty. If they are empty, convert the steps already taken of this node into mechanical action steps and calculate the time cost of all steps as the time cost of this path. Then, compare the time cost of this path with the time cost of the currently saved optimal path. If this path is faster, replace the current optimal path with this path. If it is not empty, enter step S4-4.

[0069] Among them, when converting the steps already taken into mechanical action steps in S4-3, introduce a mechanism for the motor to adaptively adjust the speed according to the state of the Rubik's Cube, which can ensure the fast and stable restoration of the Rubik's Cube while avoiding dislocating the Rubik's Cube and improve the restoration success rate. The detailed description of this mechanism is as follows.

[0070] Assign three different rotational speeds to the motor. The low speed corresponds to driving the Rubik's Cube to avoid dislocating the Rubik's Cube due to too high a speed. At this time, the rotating robotic arm corresponds to the mechanical finger clamping the Rubik's Cube, and the non-rotating robotic arm corresponds to the mechanical finger loosening the Rubik's Cube. The medium speed corresponds to twisting the Rubik's Cube. At this time, the rotating robotic arm corresponds to the mechanical finger clamping the Rubik's Cube, and the non-rotating robotic arm also corresponds to the mechanical finger clamping the Rubik's Cube. The high speed corresponds to the idling of the robotic arm. At this time, the rotating robotic arm corresponds to the mechanical finger loosening the Rubik's Cube, and the non-rotating robotic arm corresponds to the mechanical finger clamping the Rubik's Cube. The three rotational speeds correspond to three different execution times. After calculating the mechanical action steps, accumulate the time used for each step to obtain the time cost of this path.

[0071] S4-4. Determine whether the first step of the steps not yet performed at this node can generate a binary tree branch. If yes, initialize the left and right child nodes and push them onto the stack, then return to step S4-2. If not, move this step to the steps already performed, perform coordinate transformation on the subsequent steps, and then return to step S4-4.

[0072] Among them, the judgment conditions for whether the first step of the steps not yet performed at this node in S4-4 can generate a binary tree branch, and the corresponding initialization methods for the left and right child nodes are described as follows; for the definition of the Rubik's Cube coordinate planes, refer to Figure 7 .

[0073] Condition 1: If the first step of the steps not yet performed at this node is R, initialize the left child node as the set of steps whose coordinate transformation method for this step is from the R plane to the B plane, and initialize the right child node as the set of steps whose coordinate transformation method for this step is from the R plane to the D plane.

[0074] Condition 2: If the first step of the steps not yet performed at this node is L, initialize the left child node as the set of steps whose coordinate transformation method for this step is from the L plane to the B plane, and initialize the right child node as the set of steps whose coordinate transformation method for this step is from the L plane to the D plane.

[0075] Condition 3: If the first step of the steps not yet performed at this node is U and the second step is D, initialize the left child node as the set of steps after swapping the order of the first and second steps, and initialize the right child node as the set of steps without swapping the order.

[0076] Condition 4: If the first step of the steps not yet performed at this node is F and the second step is B, initialize the left child node as the set of steps after swapping the order of the first and second steps, and initialize the right child node as the set of steps without swapping the order.

[0077] S5: The robotic arm and robotic fingers move to restore the Rubik's Cube. As Figure 1 shown, in the instruction conversion module, after converting the set of mechanical action steps corresponding to the optimal path returned at the end of the S4-2 program according to the communication protocol of the microcontroller side, it is sent to the microcontroller side in the form of serial communication. After the microcontroller completes the instruction parsing, it controls the power units of the robotic arm and robotic fingers to make them move and complete the task of restoring the Rubik's Cube. Among them, the mechanical structure of the double-arm and four fingers is as Figure 8 shown.

Claims

1. A control method for a robot with a double - arm and four - finger structure for Rubik's Cube restoration. This method includes 4 cameras with fixed positions and a robot with a double - arm and four - finger structure. The 4 cameras are respectively arranged around the Rubik's Cube so that the 4 cameras can simultaneously capture the six faces of the Rubik's Cube. The steps of this method include: Step 1: Fix the environmental lighting conditions. After setting the camera exposure, white balance, brightness, and contrast parameters, calibrate the positions of the 9 color blocks on each face of the Rubik's Cube; Step 2: Read the images of the 4 cameras, sequentially extract the pixel values of the four images, then identify the distribution of each color block on each face of the Rubik's Cube, and merge the results of the four identifications to obtain the state of the Rubik's Cube; Step 3: Use the two - stage algorithm kociemba to solve the Rubik's Cube for the Rubik's Cube state obtained in Step 2, and obtain the Rubik's Cube restoration step instructions; Step 4: For the result obtained in Step 3, establish a path binary tree according to the pre - set rules, and perform a depth - first search on the binary tree. By comparing the total time used for each path, obtain the global optimal path with the least mechanical movement time; S4 - 1, Prepare to establish a binary tree representing the mechanical movement path, and complete the depth - first search of the tree while establishing the tree. In this tree, from the root node to any end node represents a path that can restore the Rubik's Cube. Further, the number of end nodes is equal to the number of paths that can restore the Rubik's Cube; The data structure of each node includes: steps not taken, steps already done, and the time cost of this path. Assign the steps of the mechanical movement not performed at the root node to the Rubik's Cube restoration steps solved in Step S3 and put them into the stack; S4 - 2, Judge whether the stack is empty. If it is empty, the program ends, and return the time cost of the optimal path, path information, and the corresponding set of mechanical movement steps; if it is not empty, pop the top node of the stack, access this node, and enter Step S4 - 3; S4 - 3, Judge whether the steps not taken of this node are empty. If they are empty, convert the steps already done of this node into mechanical movement steps, and calculate the time cost of all steps as the time cost of this path. Then, compare the time cost of this path with the time cost of the currently saved optimal path. If this path is faster, replace the current optimal path with this path; if not, enter Step S4 - 4; S4 - 4, Judge whether the first step of the steps not taken of this node can generate a binary tree branch. If so, initialize the left and right child nodes and put them into the stack, and then return to Step S4 - 2; if not, move this step to the steps already done, perform coordinate transformation on the subsequent steps, and then return to Step S4 - 4; Among them, the judgment condition for whether the first step of the steps not taken of this node in S4 - 4 can generate a binary tree branch, and the corresponding initialization method of the left and right child nodes are as follows: First, define the 3 adjacent faces of the Rubik's Cube as: R, U, B. In addition, the opposite of R is L, the opposite of U is D, and the opposite of B is F; Condition 1: If the first step of the steps not taken of this node is R, then initialize the left child node as the set of steps whose coordinate transformation method for this step is from the R face to the B face, and initialize the right child node as the set of steps whose coordinate transformation method for this step is from the R face to the D face; Condition 2: If the first step of the step not taken by this node is L, then initialize the left child node as the step set whose coordinate transformation method for this step is from the L plane to the B plane, and initialize the right child node as the step set whose coordinate transformation method for this step is from the L plane to the D plane; Condition 3: If the first step of the step not taken by this node is U and the second step is D, then initialize the left child node as the step set after swapping the order of the first and second steps, and initialize the right child node as the step set without swapping the order; Condition 4: If the first step of the step not taken by this node is F and the second step is B, then initialize the left child node as the step set after swapping the order of the first and second steps, and initialize the right child node as the step set without swapping the order; Step 5: Send the optimal path obtained in Step 4 to the controller. After the controller parses the instructions, it controls the power unit to realize the actions of the robotic arm and robotic fingers, and completes the task of restoring the Rubik's Cube.

2. A control method for a robotic arm with two arms and four fingers for Rubik's Cube restoration as described in claim 1, characterized in that the specific method of the said Step 2 is: Set the initial spatial centers of each color category and make them move away from each other; then select a point in the dataset of the color of the color blocks and bind it to the nearest center; When all points are bound, the initial clusters are formed; Calculate the centroids of these clusters as the new centers; then bind each point to the center closest to it; repeat this process, and these centers will gradually move until they no longer change; the algorithm aims to minimize the variance: The species, x i and v j are the vector values of the RGB space of the colors of two certain color patches, ||x i - v j || is the Euclidean distance between x i and v j , and the calculation formula is as follows, c i is the number of centroids of the i-th color, and c is the number of colors; Given the initial k means m1,..., mk as the initial spatial centers of each color, the algorithm will loop between two steps: Assignment step: Assign the color space vector value of each color block to be recognized to the color center with the smallest Euclidean distance to the mean value; where the color vector value x of each color patch p is precisely assigned to a color category S i (t) , m i and m j are the centers of the i-th and j-th colors respectively; Update step: Recalculate the mean value of the observations of each color after assignment; When the assignment no longer changes, the algorithm has converged; the algorithm assigns the vector values of the colors of the color blocks to the nearest color category clusters according to the distance; each data point contains the information of three color components in the RGB color space; by this method, all samples are classified into 6 color categories of the Rubik's Cube.

3. A control method for a robotic arm with two arms and four fingers for Rubik's Cube restoration as described in claim 1, characterized in that When the robotic arm makes movements, introduce a motor self-adaptive speed regulation mechanism according to the state of the Rubik's Cube, which can avoid misplacing the Rubik's Cube while ensuring the fast and stable restoration of the Rubik's Cube, and improve the restoration success rate. The detailed description of this mechanism is as follows: Three different rotational speeds are assigned to the motor. The low speed corresponds to driving the Rubik's Cube, avoiding misplacing the Rubik's Cube due to too high a speed. At this time, the rotating robotic arm corresponds to the mechanical finger clamping the Rubik's Cube, and the non-rotating robotic arm corresponds to the mechanical finger releasing the Rubik's Cube; the medium speed corresponds to twisting the Rubik's Cube. At this time, the rotating robotic arm corresponds to the mechanical finger clamping the Rubik's Cube, and the non-rotating robotic arm corresponds to the mechanical finger also clamping the Rubik's Cube; the high speed corresponds to the idling of the robotic arm. At this time, the rotating robotic arm corresponds to the mechanical finger releasing the Rubik's Cube, and the non-rotating robotic arm corresponds to the mechanical finger clamping the Rubik's Cube. The three rotational speeds respectively correspond to three different execution times. After calculating the mechanical action steps, the time used for each step is accumulated to obtain the time cost of this path.

Citation Information

Patent Citations

  • Intelligent magic cube solving robot capable of autonomously grabbing magic cube, as well as magic cube solving method of intelligent magic cube solving robot

    CN103350419A

  • Smart cube system capable of bidirectionally and real-timely synchronizing motion gesture and state with mobile communication equipment

    CN107734195A