A hybrid feature visual servoing method combined with reinforcement learning
By combining reinforcement learning and XY/Z separation strategies in the visual servo system, image moments and point information are used to control the Z-axis motion of the robotic arm, which solves the problems of Z-axis motion sensitivity and image moment motion insensitivity in the existing technology. A more stable robotic arm control effect is achieved.
Patent Information
- Application Number
- CN202210666640.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-14
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2042-06-14
AI Technical Summary
In the existing technology, simple point features are sensitive to Z-axis motion, and image moments are insensitive to the motion of the robotic arm around the x and y axes, resulting in poor visual servo control effects.
Combined with the reinforcement learning method, the XY/Z separation strategy is adopted, the image moment information is used to control the Z-axis motion, and the point information is used to control other degrees of freedom. The entire system is optimized through reinforcement learning to realize the design and output of joint control instructions.
Through the hybrid feature visual servo method, the control effect is optimized, the sensitivity problem of point features to Z-axis motion is overcome, the robustness and control accuracy of the system are improved, the camera degradation phenomenon is reduced, and the control of Z-axis motion is enhanced. ability.
Smart Images

Figure CN115131400B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a robot visual servo technology, and more specifically to a hybrid feature visual servo method combined with reinforcement learning. Background Art
[0002] Visual servoing is a technology that uses visual information feedback to control robot motion. It has good robustness to camera parameter calibration errors. The selection of image features is one of the hot issues in the current field of visual servoing. Point features are the most widely used image features in the field of visual servoing. Other features include line, moment, entropy, mutual information, etc. Among them, image moments are global features of the image and can reflect the overall information of the image, but image moments are not sensitive to the movement of the robot arm around x and y.
[0003] The term "reinforcement learning" was first proposed by Minsky, who applied it to the chess program. The paper uses the training mechanism of reinforcement learning to learn the optimal strategy of chess pieces in each state. Later, Sutton proposed the temporal difference algorithm in reinforcement learning, which solved the problem of reinforcement learning based on time series prediction. In 1992, Watkins et al. proposed Q-learning and proved the convergence of Q-learning. In recent years, artificial intelligence technology has flourished, providing new ideas for the development of reinforcement learning. This is deep reinforcement learning. DRL is an important branch of the rapid development of artificial intelligence in recent years. It combines the powerful representation ability of deep learning and the characteristics of reinforcement learning to optimize decision-making. Mnih et al. combined the convolutional neural network with the Q-learning algorithm based on value function in reinforcement learning, proposed the deep Q network, and opened up a new situation in the field of deep reinforcement learning. Summary of the invention
[0004] Technical issues to be solved
[0005] In view of the above-mentioned deficiencies in the prior art, the present invention proposes a hybrid feature visual servoing method combined with reinforcement learning to solve the problem of sensitivity of simple point features to Z-axis motion, and optimizes the effect of the entire system through reinforcement learning.
[0006] Technical Solution
[0007] A hybrid feature visual servoing method combined with reinforcement learning, characterized by the following steps:
[0008] Step 1: Build the driver of UR3 robot arm and ZED camera, and use ROS to build the experimental environment;
[0009] Step 2: In the environment built in step 1, perform the internal calibration of the ZED camera and the positional relationship between the camera and the robotic arm. After the calibration is completed, perform preprocessing of the target image to obtain two target image features: point information and image moment information of the target image.
[0010] Step 3: By means of XY / Z separation, the movement of the Z axis is mapped by the image moment information feature, and the rest is controlled by the point information feature. The control law is designed on the UR3 robot arm, and the joint control command is output to complete the control;
[0011] Step 4: Design the reinforcement learning model based on the experimental model, connect the reinforcement learning to the visual servo system, and complete the joint debugging of the entire system to achieve the final experimental effect.
[0012] Step 2: Preprocessing includes filtering and edge extraction.
[0013] Beneficial Effects
[0014] The hybrid feature visual servoing method combined with reinforcement learning proposed in the present invention has the following beneficial effects:
[0015] 1. The present invention combines the respective optimizations of point feature and image moment feature visual servoing, making the two methods complementary.
[0016] 2. KTL is used to track point features, so that the method does not rely on special target images.
[0017] 3. Add reinforcement learning, and use the decision-making effect of reinforcement learning to interfere with the control output of the system, so that the control effect is optimized. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like components throughout the drawings.
[0019] Figure 1 Schematic diagram of pinhole imaging;
[0020] Figure 2 Reinforcement learning-hybrid feature visual servo system framework;
[0021] Figure 3 Camera internal and external parameter calibration experiment: (a) Camera internal parameter calibration; (b) Camera external parameter calibration;
[0022] Figure 4 Image feature extraction experiment;
[0023] Figure 5 Robotic arm visual servo experimental process;
[0024] Figure 6 Hybrid feature IBVS simulation: (a) servo convergence; (b) robot joint angle; (c) robot joint velocity; (d) overcoming camera degradation;
[0025] Figure 7 Reinforcement learning hybrid visual servo simulation: (a) Optimization of e1 and e2 under a set of parameters RL; (b) Optimization of e1 and e2 under RL conditions; (c) Optimization of e3 and e4 under RL conditions;
[0026] Figure 8 Robotic arm reinforcement learning hybrid visual servo experiment: (a) Convergence error comparison of translational freedom; (b) Convergence error comparison of rotational freedom. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0028] As attached Figure 1 As shown, the present embodiment provides a hybrid feature visual servoing method for a robotic arm combined with reinforcement learning, including four steps: calibration of internal and external parameters of a camera, acquisition of image features, reinforcement learning modeling, and overall experiment.
[0029] According to the form of the pinhole model, let a point be (x w ,y w ,z w ), the image point (x2, y2) on the imaging plane is converted into the image point (u, v). The intersection of the optical axis centerline on the imaging plane is recorded as (u0, v0), and the mapping relationship between the target point and the image point in the world coordinate system can be obtained:
[0030]
[0031] The camera space velocity consists of linear velocity and angular velocity. The linear velocity is expressed as [υ x ,υ y ,υ z ] T , the angular velocity is expressed as [ω x ,ω y ,ω z ] T . Then the speed of point P2 relative to the camera coordinate system is:
[0032]
[0033] Written in scalar form:
[0034]
[0035] Finally, combining the above formula, we can get:
[0036]
[0037] Combining the second half of the equation, we get:
[0038]
[0039] Where:
[0040]
[0041]
[0042] in,
[0043] The combined moment can represent the counterclockwise rotation angle of the image around the horizontal direction, so the combined image moment can reflect the movement change around the z-axis.
[0044] In the IBVS system, the control law requires point features to move along a straight line in the image plane, but for a rotating camera, the points tracked by KTL will naturally move along an arc. Therefore, point features are very sensitive to the movement of the Z axis. In the study of image moment visual servoing, the mapping between image moments and rotations around the x-axis and y-axis is difficult to design. Therefore, the idea of the present invention is to use point features to control some degrees of freedom, while the remaining degrees of freedom are controlled by image moments.
[0045] Using the XY / Z segmentation strategy to segment features, we get:
[0046]
[0047] where υ xy =(υ x υ y ω x ω y ),υ z =(υ z ω z ).
[0048] The above equation can be written as:
[0049]
[0050] Right now
[0051] in is the rate of change of image features, yes The pseudo-inverse matrix of It is the interaction matrix of movement in X and Y directions. is the interaction matrix for Z-direction motion.
[0052] Combined with the above image moments, let The present invention selects two image moments θ and σ as controllers for the motion about the Z axis, so the expected translation speed and rotation speed of the camera along the z axis are obtained by the controller:
[0053]
[0054]
[0055] This embodiment specifically includes the following steps:
[0056] 1.1) Calibrate the parameters of the ZED camera and robotic arm system. Use the calibration board to obtain the internal and external parameters of the system, and then obtain the feature information of the image through operations such as image filtering. Use the KLT algorithm to track the point optical flow, and then obtain the moment information of the image through the global information of the image. After that, complete the drive debugging of the robotic arm and prepare for the operation of the entire system.
[0057] 2.1) Integrate the entire system, adjust parameters, and conduct experimental verification. The point / moment combined visual servo control law derived by the present invention outputs control instructions to the robot arm, and then builds a reinforcement learning interactive model of the visual servo system according to the characteristics of the system, so that reinforcement learning can adjust the visual servo gain parameters of the system, and finally completes the experimental verification of the entire system.
[0058] The specific process is:
[0059] In order to verify the functionality of the algorithm, four feature points of the target image are selected in the simulation environment and tracked using the KLT algorithm. The control method uses the xy / z separation control rate. The motion characteristics of the xy axis are obtained from the point features, and the translation and rotation of the z axis are mapped using the image moment. The visual servo gain is adjusted by the reinforcement learning algorithm. The parameter setting selects gamma equal to 0.8, the number of iterations is 1000, and the step size is 1. After the basic parameters are set, the return value table and Q table are input. The Q table is initially set to a full 0 matrix. After the algorithm runs, the number of iterations is set to 100. In the simulation, it is necessary to verify that the use of the hybrid feature visual servo method to control the target can still ensure smooth convergence of the robot arm motion process.
[0060] Firstly, the effectiveness of the robot visual servo controller with point features and image moments as features is verified. In the simulation environment, the KTL algorithm is used to track the upper point features and the effect of the hybrid feature visual servoing is tracked throughout the servo process.
[0061] The simulation also needs to verify that the hybrid feature visual servoing method overcomes the "camera degradation" phenomenon under point feature control only. As shown in the figure, the degrees of freedom about the Z axis are pulled out separately. It can be seen that except for the jump at the beginning, the convergence is relatively stable at the rest of the time, overcoming a certain camera degradation phenomenon. Therefore, it is proved that the method of the present invention effectively overcomes the sensitive characteristics of point features about the Z-axis movement.
[0062] The end of the simulation is to verify the control optimization effect of the entire system after the reinforcement learning algorithm is added. The reinforcement learning algorithm is added to the control system, and the optimization of reinforcement learning is reflected by the convergence effect. After establishing the reward and punishment mechanism set by the present invention and the reward function, the learning process of the motion Sarsa algorithm is more conservative in the exploration and can more effectively suppress the occurrence of special situations. Therefore, the present invention adopts the temporal difference learning algorithm based on the model-free reinforcement learning algorithm. The parameter setting selects gamma equal to 0.8, the number of iterations is 1000 times, and the step size is 1. After the basic parameters are set, the reward value table and Q table are input, and the Q table is initially set to a full 0 matrix. After the algorithm runs, the number of iterations is set to 100 times. The algorithm will continuously update the Q table and finally form a state-behavior value table. According to the results of the table values, it can be seen that the system has learned the optimal strategy under different states. During the entire convergence process, the λ value changes continuously to achieve the highest reward value, and the more iterations, the better the effect.
[0063] The controller of the experimental equipment of the present invention adopts an Intel I5 dual-core processor with a main frequency of 2.30GHz and a RAM of 8G. The robot arm uses the Universal-Robots 3 robot arm, which is a six-degree-of-freedom articulated robot, and its main features are light weight and safety. Its workload can reach 3 kilograms, and the repeatability is 0.1mm. The camera uses a ZED camera. In the experiment, four manually selected feature points are first selected in the target image, and then the image point information of the four feature points is tracked using the KLT algorithm, and then the global image moment and point information of the target image are extracted and combined for visual servo control. The experiment is carried out in the ROS environment, and the UR3 is controlled to move to the target position through the output control instructions of the algorithm.
[0064] like Figure 2 It is the construction of the experimental environment. Through the image information sent back by ZED, the image processing unit tracks the feature points and obtains the moment information. After obtaining the feature information, the control instructions of the joint can be output through the control algorithm.
[0065] like Figure 3It is the process of calibrating the internal and external parameters of the system. In order to obtain as many x and y values as possible, the calibration plate should be moved as slowly as possible during the calibration process so that the position of the calibration plate appears in various places in the image (top, middle, bottom, left, and right). In order to obtain rich Size values, the calibration plate needs to be moved slowly so that the calibration plate can collect rich size information from far to near. It is best to have an image in which the calibration plate occupies most of the field of view. In order to obtain rich Skew information, move the calibration plate slowly to change the pitch, yaw, and roll of the calibration plate. During the operation, do not move the calibration plate too fast, and pause after each move to a position. If the four marking bars are found to turn green, it means that enough information has been collected. And if the calibration can be performed, CALIBRATE will light up.
[0066] When calibrating external parameters, it is also best to select several angles to collect the calibration plate, determine the position relationship of each coordinate system through the coordinate transformation relationship in the previous chapter, and subscribe to the relationship between the camera coordinate system and the robot end coordinate system through the TF transformation under ROS. During the data collection process, try to determine the position of the camera from all sides of the calibration plate.
[0067] After obtaining the image features, the control experiment of the robotic arm was carried out. The experimental parameters were adjusted, gamma was set to 0.7, and the image threshold was adjusted to the optimal state. The visual servo experiment of the robotic arm without reinforcement learning was first carried out. The experimental results showed that the control process often failed, but the movement along the Z axis was controlled by the image moment as a feature, so it did not affect the movement of other degrees of freedom. When the control was successful, the robotic arm could well complete the experimental goals.
[0068] like Figure 7 This is the comparative effect of using the method of the present invention and not reinforcing learning. Figure (a) shows the error change of the translational degree of freedom during the control process, and Figure (b) shows the error change of the rotation. It can be seen from the figure that the learning curve converges faster and enters the minimum error faster. Therefore, it can be seen that the visual servo gain output by reinforcement learning can effectively improve the quality of control. In order to see the experimental effect more intuitively, the sum of the absolute values of the errors is used as the statistical basis, which can reflect the degree of convergence of the errors and the speed of control time. Figure 8 This is a comparison of the control effect of the design method in this chapter with the traditional IBVS. (a) shows the change of translational freedom during error control, and (b) shows the change of rotational error. It can be seen from the figure that under the effect of reinforcement learning, the learning curve of the visual servo algorithm based on hybrid features converges faster and the time to minimize the input error is also faster. Therefore, it can be seen from the figure that the visual servo gain output can effectively improve the control quality through reinforcement learning.
[0069] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should be included in the protection scope of the present invention.
Claims
1. A hybrid feature visual servoing method combined with reinforcement learning, characterized in that Here are the steps: Step 1: Build the driver of UR3 robot arm and ZED camera, and use ROS to build the experimental environment; Step 2: In the environment built in step 1, perform the internal calibration of the ZED camera and the positional relationship between the camera and the robotic arm. After the calibration is completed, perform preprocessing of the target image to obtain two target image features: point information and image moment information of the target image. Step 3: By means of XY / Z separation, the movement of the Z axis is mapped by the image moment information feature, and the rest is controlled by the point information feature. The control law is designed on the UR3 robot arm, and the joint control command is output to complete the control; Step 4: Design the reinforcement learning model based on the experimental model, connect the reinforcement learning to the visual servo system, and complete the joint debugging of the entire system to achieve the final experimental effect.
2. The hybrid feature visual servoing method combined with reinforcement learning according to claim 1, characterized in that: Step 2: Preprocessing includes filtering and edge extraction.
