CN-122008177-A - Mechanical arm control method for real-time tracking of dynamic target
Abstract
The invention provides a mechanical arm control method for tracking a dynamic target in real time, which belongs to the technical field of mechanical arm control and comprises the steps of constructing a visual measurement system through a binocular infrared camera and a visible light camera, capturing a marker image on the dynamic target, extracting two-dimensional code data corresponding to the marker image based on a visual detection algorithm to track, identifying and detecting, calculating through a perspective gesture estimation algorithm when the dynamic target is detected to be the target to be tracked, acquiring real-time position information and real-time gesture information of the target to be tracked, fusing low-frequency visual measurement data constructed by the real-time position information and the real-time gesture information with a high-frequency motion signal based on an inter-frame difference method to acquire real-time gesture data, and controlling the movement of the mechanical arm by a visual servo controller according to a motion optimal solution acquired based on a mechanical arm kinematics model. The method realizes real-time tracking of the dynamic target, has higher operation grabbing efficiency, and is suitable for various task scenes.
Inventors
- HAN WEI
- XIONG DAN
- WANG XING
- HUANG YIYONG
- YANG YANJIE
- LIU HONGWEI
Assignees
- 中国人民解放军军事科学院国防科技创新研究院
Dates
- Publication Date
- 20260512
- Application Date
- 20250808
Claims (7)
- 1. The mechanical arm control method for tracking the dynamic target in real time is characterized by comprising the following steps: constructing a vision measurement system through a binocular infrared camera and a visible light camera, and capturing a marker image on a dynamic target; Based on a visual detection algorithm, extracting two-dimensional code data corresponding to the marker image for tracking, identifying and detecting, and calculating the gesture information of the marker image relative to a visual measurement system through a perspective gesture estimation algorithm when the dynamic target is detected to be a target to be tracked, so as to obtain the real-time position information and the real-time gesture information of the target to be tracked through the relative position of the marker image and the target to be tracked; Calculating the instantaneous speed and the angular speed of the target to be tracked based on an inter-frame difference method, obtaining an analog high-frequency motion signal, and carrying out fusion processing on low-frequency vision measurement data constructed by real-time position information and real-time posture information and the high-frequency motion signal to obtain real-time posture data; and constructing a mechanical arm kinematics model, solving a motion optimal solution of a joint angle of the mechanical arm according to real-time pose data of a target to be tracked, and controlling the mechanical arm to move by a visual servo controller according to the motion optimal solution.
- 2. The method for controlling a mechanical arm for real-time tracking of a dynamic target according to claim 1, wherein the steps of extracting two-dimensional code data corresponding to the marker image based on a visual detection algorithm to perform tracking identification detection, calculating gesture information of the marker image relative to a visual measurement system through a perspective gesture estimation algorithm when the dynamic target is detected to be the target to be tracked, and further obtaining real-time position information and real-time gesture information of the target to be tracked through relative positions of the marker image and the target to be tracked, comprises: acquiring a preprocessed marker image by carrying out Gaussian blur and histogram equalization preprocessing on the marker image; processing the preprocessing marker image based on a threshold segmentation algorithm to obtain a segmentation identifier image; extracting the outline of the divided identifier image, judging the outline of the quadrangle, and performing perspective transformation on the divided identifier image when detecting that the outline of the divided identifier image is the quadrangle outline to obtain a perspective identifier image; dividing the perspective identifier image based on Otsu gray level image threshold algorithm, and dividing the two-dimensional code pixel into images; Carrying out hamming code identification according to the two-dimensional code pixel segmentation map to obtain two-dimensional code data of a dynamic target; And carrying out matching recognition on the two-dimensional code data and the data in the predefined dictionary, and marking the dynamic target as a target to be tracked when the data matched with the two-dimensional code data is stored in the predefined dictionary.
- 3. The method for controlling the mechanical arm for tracking the dynamic target in real time according to claim 2, wherein the steps of carrying out Hamming code recognition according to the two-dimensional code pixel segmentation map and obtaining the two-dimensional code data of the dynamic target comprise the following steps: Setting the value of a black square in the two-dimensional code pixel segmentation map to 0, setting the value of a white square to 1, and converting the two-dimensional code pixel segmentation map into a matrix form to obtain two-dimensional code matrix data; Removing check bits in the two-dimensional code matrix data to obtain preprocessed two-dimensional code matrix data; And converting the preprocessed two-dimensional code matrix data into a binary form to acquire two-dimensional code data.
- 4. The method for controlling a mechanical arm for real-time tracking of a dynamic target according to claim 1, wherein the steps of extracting two-dimensional code data corresponding to the marker image based on a visual detection algorithm to perform tracking identification detection, calculating gesture information of the marker image relative to a visual measurement system through a perspective gesture estimation algorithm when the dynamic target is detected to be the target to be tracked, and further obtaining real-time position information and real-time gesture information of the target to be tracked through relative positions of the marker image and the target to be tracked, further comprise: constructing a target object task coordinate system based on a camera coordinate system, an image coordinate system, a world coordinate system and a target object coordinate system; Obtaining an internal reference matrix and a distortion vector of a vision measurement system through a camera calibration method, and solving a rotation matrix and a translation matrix of the identifier image relative to the vision measurement system; calculating the attitude information of the identifier image relative to a camera coordinate system through a perspective attitude estimation algorithm; Based on the relative position of the identifier image and the target to be tracked, acquiring real-time position information and real-time posture information of the target to be tracked.
- 5. The method for controlling a mechanical arm for real-time tracking of a dynamic target according to claim 4, wherein the steps of obtaining an internal reference matrix and a distortion vector of a vision measurement system by a camera calibration method and solving a rotation matrix and a translation matrix of the identifier image relative to the vision measurement system, comprises: Acquiring angular point coordinates of the identifier image by taking an image coordinate system as a reference; ; Wherein, the Corner coordinate data of the four corners of the identifier image in a world coordinate system are respectively, A side length for the identifier image; the projection coordinates of the identifier image projected on the horizontal plane are set as follows: ; Wherein, the Respectively projecting corresponding pixel coordinate data of the corner coordinate data on a horizontal plane, For pixel coordinate data Is a coordinate value of (a), For pixel coordinate data Is a coordinate value of (a), For pixel coordinate data Is a coordinate value of (a), For pixel coordinate data Coordinate values of (2); ; Wherein, the As a projection parameter, a projection parameter is used, 、 As a parameter of the focal length, Is a principal point coordinate parameter; ; Wherein, the In order to rotate the matrix is rotated, As a result of the rotation factor, Is a rotation vector factor; ; Wherein, the In order to translate the matrix, Is a translation factor; since the internal reference matrix is a fixed value, let ; ; Wherein, the In order to transform the matrix, In order for the transformation factor to be a factor, Is a corner coordinate data matrix; ; Obtaining constraint conditions; ; ; And calculating the rotation matrix and the translation matrix based on the constraint condition through the formula.
- 6. The method for controlling a mechanical arm for real-time tracking of a dynamic target according to claim 1, wherein the steps of calculating the instantaneous speed and the angular speed of the target to be tracked based on an inter-frame difference method, obtaining an analog high-frequency motion signal, and fusing low-frequency vision measurement data constructed by real-time position information and real-time posture information with the high-frequency motion signal to obtain real-time posture data comprise: ; Wherein, the Is that Real-time pose data of time, In order for the filter coefficients to be of a type, For the low-frequency vision measurement data, Is that Real-time pose data of time, For the instantaneous speed of the object to be tracked, Is a time interval.
- 7. The method for controlling a mechanical arm for real-time tracking of a dynamic target according to claim 1, wherein the steps of constructing a mechanical arm kinematic model, solving a motion optimal solution of a joint angle of the mechanical arm according to real-time pose data of the target to be tracked, and controlling the mechanical arm to move by a visual servo controller according to the motion optimal solution, comprise: establishing a six-degree-of-freedom mechanical arm kinematic model based on the D-H parameters; according to real-time pose data of a target to be tracked, obtaining a motion optimal solution of a joint angle of the mechanical arm through inverse kinematics solution; And the visual servo controller controls the mechanical arm to execute corresponding operation according to the motion optimal solution.
Description
Mechanical arm control method for real-time tracking of dynamic target Technical Field The invention relates to the technical field of mechanical arm control, in particular to a mechanical arm control method for tracking a dynamic target in real time. Background The mechanical arm is an automatic device for replacing manual work in industrial production, and performs the tasks of tracking, monitoring, grabbing and the like according to set programs, tracks and requirements. In the scenes of unmanned aerial vehicle capturing, modularized component replacement and the like, the existing mechanical arm dynamic target tracking technology mainly relies on static vision measurement or a low frame rate sensor to acquire the position information of a dynamic target, and the mechanical arm plans a motion track to execute corresponding operation. However, the static vision measurement frequency is low, tracking and identification of a high-speed dynamic target are difficult to meet, and the single sensor is used for data acquisition and is easily interfered by environmental factors such as illumination, so that deviation occurs in pose estimation of the dynamic target. Meanwhile, hysteresis exists in motion planning and execution of the mechanical arm, and accurate tracking and capturing of a dynamic target are difficult to achieve. Therefore, the invention provides a control method of the mechanical arm for tracking the dynamic target in real time. Disclosure of Invention In order to solve the technical problems, the invention provides a control method for a mechanical arm for tracking a dynamic target in real time, which is used for solving the problems that the dynamic target is difficult to track in real time in the traditional technology, so that the mechanical arm fails to grasp and the operation efficiency is low. The embodiment of the invention provides a mechanical arm control method for tracking a dynamic target in real time, which comprises the following steps: constructing a vision measurement system through a binocular infrared camera and a visible light camera, and capturing a marker image on a dynamic target; Based on a visual detection algorithm, extracting two-dimensional code data corresponding to the marker image for tracking, identifying and detecting, and calculating the gesture information of the marker image relative to a visual measurement system through a perspective gesture estimation algorithm when the dynamic target is detected to be a target to be tracked, so as to obtain the real-time position information and the real-time gesture information of the target to be tracked through the relative position of the marker image and the target to be tracked; Calculating the instantaneous speed and the angular speed of the target to be tracked based on an inter-frame difference method, obtaining an analog high-frequency motion signal, and carrying out fusion processing on low-frequency vision measurement data constructed by real-time position information and real-time posture information and the high-frequency motion signal to obtain real-time posture data; and constructing a mechanical arm kinematics model, solving a motion optimal solution of a joint angle of the mechanical arm according to real-time pose data of a target to be tracked, and controlling the mechanical arm to move by a visual servo controller according to the motion optimal solution. The invention further provides a control method for a mechanical arm for real-time tracking of a dynamic target, which comprises the steps of extracting two-dimensional code data corresponding to a marker image based on a visual detection algorithm for tracking identification detection, calculating gesture information of the marker image relative to a visual measurement system through a perspective gesture estimation algorithm when the dynamic target is detected to be the target to be tracked, and further obtaining real-time position information and real-time gesture information of the target to be tracked through the relative positions of the marker image and the target to be tracked, wherein the method comprises the following steps: acquiring a preprocessed marker image by carrying out Gaussian blur and histogram equalization preprocessing on the marker image; processing the preprocessing marker image based on a threshold segmentation algorithm to obtain a segmentation identifier image; extracting the outline of the divided identifier image, judging the outline of the quadrangle, and performing perspective transformation on the divided identifier image when detecting that the outline of the divided identifier image is the quadrangle outline to obtain a perspective identifier image; dividing the perspective identifier image based on Otsu gray level image threshold algorithm, and dividing the two-dimensional code pixel into images; Carrying out hamming code identification according to the two-dimensional code pixel segmentation map to obtain two-dimens