Control method and system of microgravity ground test system and storage medium
Through the method of binocular camera correction distortion and AprilTag detection combined with three-ring control, the problem of posture tracking error accumulation under high-frequency dynamic motion is solved, and real-time and precise control of the robot in the microgravity ground test system is realized.
Patent Information
- Application Number
- CN202510968931.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-07-15
AI Technical Summary
The existing suspension method is difficult to adapt to the real-time compensation needs under high-frequency dynamic motion, resulting in the accumulation of posture tracking errors.
Image distortion correction and AprilTag visual reference library are used to detect the target motion posture and position information, and closed-loop control is performed through three-ring control of current loop, speed loop, and position loop. Combined with the dynamic distortion compensation mechanism, the inter-frame differential method is used to control the motion speed.
Real-time and high-precision tracking and analysis of the robot in a high-frequency dynamic environment is realized, effectively avoiding pose loss, and ensuring that the robot can complete preset tasks stably and reliably in complex dynamic tasks.
Smart Images

Figure CN120491696A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot control technology, and in particular to a control method, system and storage medium for a microgravity ground test system. Background Art
[0002] As the core infrastructure for ground-based simulation of space robots and spacecraft, the microgravity ground test system has received extensive attention and significant investment from research institutions at home and abroad in recent years. Through high-precision gravity compensation and multi-dimensional dynamic simulation, the system provides crucial technical support for the ground-based verification of space equipment. As the complexity of space missions continues to increase, the requirements for ground-based test systems are also increasing. The system needs to have higher dynamic response accuracy, a wider range of operating conditions, and stronger multi-physics field coupling simulation capabilities to meet the needs of new missions such as deep space exploration and on-orbit servicing. The main existing methods for simulating microgravity environments on the ground include free fall, water flotation, air flotation, and suspension.
[0003] The free-fall motion method simulates microgravity through short periods of weightlessness generated by sounding rockets, parabolic flight maneuvers, and drop towers. However, it is limited by the short test time and the inability to achieve continuous multi-dimensional motion control. It is difficult to meet the long-term verification requirements of complex space missions and is also expensive. The water flotation method uses the buoyancy of water to offset gravity. Although it can achieve low-friction motion, the fluid damping effect is significant, and the dynamic characteristics of buoyancy and the real microgravity environment in space are quite different, which easily introduces additional interference. The air flotation method uses air film support technology to achieve a low-friction motion plane. It is suitable for microgravity simulation in a two-dimensional plane, but it relies on a complex air source system and precision machining platform. It is expensive and difficult to maintain, and it is difficult to expand to three-dimensional multi-degree-of-freedom motion scenarios. In comparison, the suspension method applies reverse gravity compensation to the object under test through ropes or rigid mechanisms. It has the advantages of simple system structure, low cost, and strong scalability, and has become one of the mainstream technical routes.
[0004] However, the traditional suspension method has significant defects: first, gravity compensation control is mostly based on static or quasi-static models, which are difficult to adapt to the real-time compensation needs under high-frequency dynamic motion, resulting in the accumulation of posture tracking errors; second, system operation relies on complex multi-level command interaction, and there are engineering difficulties such as low human-computer collaboration efficiency and long debugging cycle. Summary of the Invention
[0005] The technical problems to be solved by the present invention are:
[0006] The existing suspension method is difficult to adapt to the real-time compensation requirements under high-frequency dynamic motion, resulting in the accumulation of posture tracking errors.
[0007] The present invention is to solve the above technical problems using the following technical solutions:
[0008] The present invention provides a control method for a microgravity ground test system, comprising the following steps:
[0009] S100, acquiring image information through a binocular camera, correcting radial distortion and tangential distortion of the image acquired by the binocular camera, and detecting target motion posture and position information using the AprilTag visual reference library;
[0010] S200. Based on the motion posture and position information obtained by detection, the horizontal motion of the robot is closed-loop controlled through the current loop, speed loop, and position loop. A dynamic distortion compensation mechanism is introduced to reduce the influence of the robot's own motion or external disturbances, and the inter-frame difference method is used to control the motion speed.
[0011] Furthermore, the radial distortion and tangential distortion of the image acquired by the binocular camera are corrected in step S100, specifically:
[0012] The radial distortion is corrected by using a polynomial function of quadratic or higher related to the center distance. The radial distortion is expressed as: ; In the above formula, is the radial distortion coefficient, is the radial distance; The tangential distortion is expressed as follows: ; In the above formula, is the tangential distortion coefficient, is the tangential distance; The corrected coordinates are: ; Project the corrected coordinates to the pixel plane and transform the camera's intrinsic parameter matrix: ; In the above formula, is the coordinate of the pixel plane after correction, For the camera x 、 y The focal length of the direction, c x and c y is the coordinate of the camera light point in the pixel coordinate system; The pixel coordinates are: .
[0013] Furthermore, the detection of the target motion posture and position information using the AprilTag visual reference library in step S100 includes the following steps:
[0014] S110, processing the three-dimensional object image acquired by the binocular camera to obtain two-dimensional image information;
[0015] S120, detecting the edge of the target in the image according to the gradient;
[0016] S130, finding the required quadrilateral pattern in the edge image and screening it, eliminating non-straight edges, searching for adjacent edges on straight edges, and finally detecting a quadrilateral if a closed loop is formed;
[0017] S140, performing QR code encoding and decoding: using multiple black-bordered color block lengths for encoding, generating a point array within the detected quadrilateral for calculating the value of each color block for decoding, classifying the color blocks within the quadrilateral, obtaining the QR code and the encoded ID, and determining the rotation of the flying robot by comparing the changes before and after encoding.
[0018] S150: Calculate the motion posture and position information of the flying robot.
[0019] Furthermore, step S110 includes the following steps:
[0020] Assume that the optical center of the left camera is , the coordinate system is , the optical center of the right camera is , the coordinate system is , and The physical distance is the baseline of the binocular camera ; midpoint in space The images on the imaging planes of the left camera and the right camera are ; In the pixel coordinate system, the difference in the u-axis value is recorded as ; The focal lengths of the left and right cameras are ,but:
[0021]
[0022] but:
[0023] In the above formula, is parallax, The theoretical maximum depth measured by the binocular camera;
[0024] The corresponding three-dimensional point In the left camera coordinate system The coordinates below are:
[0025] .
[0026] Furthermore, step S150 includes the following process:
[0027] By comparing the four vertex coordinates detected in the QR code image with the four standard vertex coordinates of its original template, and utilizing the correspondence between the four sets of point pairs, a direct linear transformation algorithm is used to solve the single linear transformation matrix of the QR code; decomposing the matrix solves the rotation transformation vector Rvec and the translation transformation vector Tvec, and based on the obtained rotation vector, the correct posture of the QR code is solved, and finally the motion posture and position information of the flying robot are obtained.
[0028] Furthermore, the closed-loop control of the horizontal motion of the robot by the three-loop control of the current loop, the speed loop, and the position loop in step S200 includes the following process:
[0029] For current loop control, the three-phase current output by the actual motor is first sampled. Then, through Clark and Park transforms, the current is converted to the current corresponding to the rotor's orthogonal axis. The converted current is then compared with the expected current value to calculate the error. The voltage signal required to correct the error is calculated based on the error. The voltage signal is converted into a switching signal for the control circuit to achieve current adjustment. For the speed loop and position loop, an encoder is added to the current loop control to obtain the actual output speed and position. The speed and position errors are converted into current errors. The current loop is then used to control the current, thereby achieving speed and position control.
[0030] Furthermore, the current loop control in step S200 also includes dynamically adjusting the current expected value :
[0031]
[0032] In the above formula, is the position error, 、 is a dynamic adjustment parameter, and t is time.
[0033] Furthermore, the inter-frame difference method is used in step S200 to control the motion speed, specifically: when the robot motion speed is greater than the speed threshold When , the inter-frame difference method is used to update the distortion coefficient in real time:
[0034]
[0035] in, 、 is the distortion coefficient before updating, 、 is the updated distortion coefficient, , 、 is an adaptive parameter.
[0036] The present invention also provides a control system for a microgravity ground test system. The system has a program module corresponding to the steps of the method described in any one of the above technical solutions, and executes the steps in the above-mentioned control method of the microgravity ground test system during operation.
[0037] The present invention also provides a computer-readable storage medium, which stores a computer program. The computer program is configured to implement the steps in the control method of the microgravity ground test system described in any one of the above technical solutions when called by a processor.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] The present invention integrates real-time detection, compensation algorithms, and precise control strategies for high-frequency dynamic motion. For motion detection, the present invention uses a method based on the fusion of binocular vision and AprilTag code marking to perform real-time, high-precision tracking and analysis of the robot target carried by the test platform in a high-frequency dynamic environment. This algorithm significantly improves the system's response speed and robustness, accurately capturing the target's instantaneous position, velocity, and motion trend in real time, effectively preventing the target from being lost during rapid motion or sudden changes in posture, and providing a reliable basis for subsequent real-time compensation control. For motor control, the present invention uses a control strategy based on the current loop, velocity loop, and position loop based on real-time acquired motion state information. In tasks involving high-frequency dynamic motion, the robot carried by the demonstration platform is quickly and accurately moved to the target position. Furthermore, through a dynamic distortion compensation mechanism, the effects of the robot's own motion or external disturbances are effectively offset or reduced, ensuring that the robot can stably and reliably complete various complex and dynamic tasks preset on the test platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 This is a motion detection flow chart of a microgravity ground test system in an embodiment of the present invention;
[0041] Figure 2 A flowchart of coordinate system transformation for motion detection in an embodiment of the present invention;
[0042] Figure 3 This is an example diagram of the AprilTag for motion detection in an embodiment of the present invention;
[0043] Figure 4 Schematic diagram of the control interface of the microgravity ground demonstration system in an embodiment of the present invention;
[0044] Figure 5 This is a flow chart of motor control for a microgravity ground test system in an embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to enable those skilled in the art to better understand the present invention, exemplary embodiments or examples of the present invention will be described below with reference to the accompanying drawings. Obviously, the described embodiments or examples are only some of the embodiments or examples of the present invention, and not all of them. Based on the embodiments or examples of the present invention, all other embodiments or examples obtained by those skilled in the art without creative work should fall within the scope of protection of the present invention.
[0046] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0047] Specific implementation scheme 1: The present invention provides a control method for a microgravity ground test system, comprising the following steps:
[0048] Step S100: Acquire image information through a binocular camera, correct radial distortion and tangential distortion of the image acquired by the binocular camera, and detect the target motion posture and position information using the AprilTag visual reference library;
[0049] Step S200: Based on the motion posture and position information obtained by detection, the horizontal motion of the robot is closed-loop controlled through the current loop, speed loop, and position loop. A dynamic distortion compensation mechanism is introduced to reduce the influence of the robot's own motion or external disturbances, and the inter-frame difference method is used to control the motion speed.
[0050] In step S100, to ensure real-time and accurate capture of the target's motion posture and position, a long baseline binocular + AprilTag target visual detection solution based on OpenCV is used through compensation. The present invention uses a binocular camera as a sensor to obtain target information, collects left and right eye images with a height of 720 pixels and a width of 1280 pixels, establishes a pinhole camera projection model, a camera distortion model, and a binocular camera projection model to obtain image information, and uses OpenCV4.5.1 and a checkerboard calibration method to calibrate the internal and external parameters of the binocular camera. The present invention uses AprilTag to detect various edges in the image based on the gradient, finds the required quadrilateral pattern in the edge image and screens it, then performs QR code encoding and decoding, determines the ID of the observed code and the rotation of the code, calculates the single linear transformation matrix of the QR code, and decomposes the matrix to obtain the motion posture and position information of the flying robot.
[0051] Specific implementation plan 2: The main types of camera distortion are radial distortion and tangential distortion. Assume that the point on the plane The Cartesian coordinates of , polar coordinates are expressed as , radial distortion can be regarded as point The distance to the origin appears The tangential distortion can be seen as a change in the horizontal angle. The radial distortion and tangential distortion of the image acquired by the binocular camera are corrected in step S100, specifically:
[0052] The radial distortion is corrected by using a polynomial function of quadratic or higher related to the center distance. The radial distortion is expressed as: ; In the above formula, is the radial distortion coefficient, is the radial distance; The tangential distortion is expressed as follows: ; In the above formula, is the tangential distortion coefficient, is the tangential distance; The corrected coordinates are: ; Project the corrected coordinates to the pixel plane and transform the camera's intrinsic parameter matrix: ; In the above formula, is the coordinate of the pixel plane after correction, For the camera x 、 y The focal length of the direction, c x and c y is the coordinate of the camera light point in the pixel coordinate system; The pixel coordinates are: .
[0053] The rest of this embodiment is the same as the specific embodiment 1.
[0054] Specific implementation plan three: Figure 3 As shown, an AprilTag for motion detection is added to the actual flying robot. Through specific markers, the target is quickly detected and the relative position is calculated. Step S100 uses the AprilTag visual reference library to detect the target's motion posture and position information, including the following steps:
[0055] S110, processing the three-dimensional object image acquired by the binocular camera through a model to obtain two-dimensional image information, and projecting the three-dimensional object within the camera's field of view onto a two-dimensional imaging plane;
[0056] S120, detecting the edge of the target in the image according to the gradient;
[0057] S130, finding the required quadrilateral pattern in the edge image and screening it, eliminating non-straight edges, searching for adjacent edges on straight edges, and finally detecting a quadrilateral if a closed loop is formed;
[0058] S140, performing QR code encoding and decoding:
[0059] Three black-bordered color block lengths of 8, 7, and 6 are used for encoding. For the decoded content, a point array is generated within the detected quadrilateral to calculate the value of each color block. A simple classifier is then constructed based on local binary patterns to classify the color blocks within the quadrilateral. Positive color blocks are encoded as 1, and negative color blocks are encoded as 0. The code, code ID, and code rotation of the QR code are obtained. After the code is obtained, it is matched with the code in the known library to determine whether the decoded QR code is correct.
[0060] S150: Calculate the motion posture and position information of the flying robot.
[0061] The rest of this implementation plan is the same as the second specific implementation plan.
[0062] In this embodiment, the Canny operator method is used. Although the detected edges are reduced, the noise in the image is also reduced accordingly.
[0063] The resulting binary edge image requires polygon analysis. First, polygons are found using topological structural analysis of digitized binary images. This algorithm employs a coding principle, assigning different edge values to different edges. Starting from a starting point, the edge pixels are edited, searching for similar edge points to that starting point. When the starting point is reached, the polygon is closed. This process is repeated for the next starting point until all binary points have been traversed. Those with fewer than four edges are excluded, and those that meet the criteria are processed further.
[0064] Using the polygon convex hull finding algorithm (Finding the convex hull of a simple polygon), the convex hull of each polygon itself is calculated, and the area of the convex hull and its polygon are calculated. The two areas are compared. When the area of a polygon is larger than the convex hull, the polygon is excluded, and the remaining polygons that meet the conditions are retained.
[0065] For polygons that finally meet the conditions, the Douglas-Peucker algorithm is used for quadrilateral approximation. Find the two endpoints A and B of the curve, and draw the chord between the curves, which is the line segment AB. Find the point C on the curve that is farthest from the line segment AB, and find the distance d between them. Compare the distance d with the pre-set threshold. If it is less than the threshold, the straight line can be directly approximated as a curve, and the curve segment is processed. If the distance d is greater than the given threshold, use point C to split the curve into AC and BC, and perform processing 1 to 3 on the two segments respectively. When all curves have been processed, connect the broken lines formed by each splitting point in sequence, so that the curve before processing can be approximated as a straight line, excluding polygons with a vertex number of not 4 in this case.
[0066] Because the quadrilaterals detected using the above method may not necessarily meet the requirements, the quadrilaterals obtained in the previous step need to be encoded, matched, and checked. For the obtained quadrilateral, the internal point matrix must first be determined. The quadrilateral in the previous step is stored as four vertices. These four points can be used to determine the specific coordinates of the point matrix within the quadrilateral. Different encoding methods have different number of points, and the encoding method is determined by the user when calibrating the object. Different encoding methods generate different internal point coordinates.
[0067] The dot coordinates are clearly defined within the defined quadrilateral. The average value of the pixels in the outermost circle of the dot matrix is extracted from the grayscale image, Value1. The average value of the pixels in the second outermost circle of the dot matrix is then extracted, Value2. Based on the design of AprilTag's QR code library, under the same lighting environment, Value1 and Value2 have a clear threshold dividing line. The threshold is determined to be the average of Value1 and Value2. The entire dot matrix is re-traversed, and the pixel values above the threshold are encoded as 0, while those below the threshold are encoded as 1. Thus, encoding is performed starting from the first row until the entire dot matrix is encoded. Arranging the codes together yields a string of binary codes, the length of which is determined by the specific encoding method. Each quadrilateral receives a string of binary codes, representing the QR code encoding in that state. Incorrect quadrilaterals often generate incorrect codes, and incorrect codes cannot match corresponding IDs within the threshold range, making it easy to exclude incorrectly encoded quadrilaterals.
[0068] The code is then matched against a known code library to further determine its reliability. Since the observed code may be rotated, the code should first be rotated three times by 90° to obtain four codes in each direction. These codes are then compared against the code library one by one to calculate the Hamming distance between the codes. When the Hamming distance between the observed code and a code in the known library is less than a given threshold, the observed code's ID is determined to be a matching ID in the code library, and the Hamming distance is recorded. If no code library matches the observed code, the observed code is considered incorrect, and the quadrilateral corresponding to the code is discarded.
[0069] Specific implementation scheme 4: Step S110 includes the following steps:
[0070] like Figure 1 As shown, the binocular camera projection model estimates the depth of each pixel by using the parallax of the left and right images collected synchronously by the binocular camera, thereby determining the distance to the object. The left and right cameras of the binocular camera used in the present invention can both be regarded as pinhole cameras.
[0071] Assume that the optical center of the left camera is , the coordinate system is , the optical center of the right camera is , the coordinate system is , and The physical distance is the baseline of the binocular camera . Midpoint in space The images on the imaging planes of the left camera and the right camera are . In the pixel coordinate system, only the value of the u axis is different, which is recorded as The focal lengths of the left and right cameras are both , according to the similarity relationship of triangles, then:
[0072] (5)
[0073] but: (6)
[0074] In the above formula, is parallax, The theoretical maximum depth measured by the binocular camera;
[0075] The corresponding three-dimensional point In the left camera coordinate system The coordinates below are:
[0076] (7)
[0077] The rest of this implementation plan is the same as the specific implementation plan three.
[0078] This implementation scheme projects three-dimensional objects within the camera's field of view directly onto a two-dimensional imaging plane, and calibrates the camera's intrinsic parameters using Zhang's calibration method, layered calibration method, and the like.
[0079] like Figure 2 As shown, the pixel coordinate system is a coordinate system for a single image, with the upper left corner of the image as the origin, the horizontal left direction of the image as the horizontal axis, and the vertical downward direction of the image as the vertical axis. The pixel coordinate system uses pixels as units; if the pixel is converted into distance, the center of the image is used as the origin, and the direction of the coordinate axis remains unchanged, this coordinate system is called the image coordinate system. With the focal center of the camera as the origin, the horizontal left direction (parallel to the horizontal axis of the image coordinate system) of the plane parallel to the image coordinate system is the x-axis, the vertical downward direction is the y-axis, and the camera optical axis is the z-axis. The coordinate system is called the camera coordinate system. The world coordinate system can describe the position of the camera in real space. In the world coordinate system, the position and posture of any object can be determined by the rotation matrix. and translation vectors Convert to the camera coordinate system.
[0080] Specific implementation scheme five: Step S150 includes the following process:
[0081] The QR code's unilinear transformation matrix (homography matrix) is calculated, further decomposed into a rotation matrix and a translation matrix. The unilinear transformation matrix relative to the original coordinates is solved based on the coordinates of the four vertices of the quadrilateral. Combined with the information from multiple cameras, the QR code's pose information is obtained. Decomposing this matrix solves the rotation transformation vector Rvec and the translation transformation vector Tvec. Based on the obtained rotation vector, the correct pose of the QR code is determined, ultimately obtaining the flying robot's motion pose and position information. This implementation plan is otherwise identical to Specific Implementation Plan 4.
[0082] Specific implementation plan six: The closed-loop control of the robot's horizontal motion through the three-loop control of current loop, speed loop, and position loop as described in S200 includes the following process:
[0083] Motor control is used to precisely control arbitrary translational motion of the robot carried by the microgravity demonstration platform in the X and Y axes. Detected motion information enables the robot's freedom in these directions. In the Z direction, a suspension device balances the effects of gravity, and the robot's posture is adjusted in real time via an internal rotating structure. The microgravity ground test system's motor control utilizes Field-of-Clock (FOC) control, comprising three control loops: current loop, velocity loop, and position loop.
[0084] For current loop control, the three-phase current output of the actual motor is sampled. Clark and Park transforms are then used to convert this current to the current corresponding to the rotor's orthogonal axis. The converted current is then compared with the expected value to calculate the error. This error is fed into a PI controller to generate the voltage signal required to correct the error. This voltage signal is then converted into a switching signal for the actual control circuit to adjust the current. For speed and position loop control, an encoder is added to the current loop to obtain the actual output speed and position. A PID controller is then added to convert speed and position errors into current errors. The current loop is then used to control the current, thereby achieving speed and position control.
[0085] like Figure 5 As shown, the field oriented control (FOC) of this embodiment controls the rotation of the motor by controlling the current of the stator winding. Through Clark transformation and Park transformation, the controlled current is linearized to obtain and The electromagnetic torque of the motor The calculation formula is as follows:
[0086] (8)
[0087] In formula (8), is the pole pair number, is the permanent magnet flux, For inductance.
[0088] electromagnetic torque The size and 、 Related, increase , As it increases, the angular acceleration of the motor also increases, and if When it is a negative value, it can generate positive electromagnetic torque; the larger its absolute value is, the The larger it is, the greater the angular acceleration of the motor.
[0089] The rest of this implementation plan is the same as the specific implementation plan five.
[0090] Specific implementation plan seven: Establish a vision-motor closed-loop control, feed back the posture information detected in step S100 to the current loop control module in real time, and dynamically adjust the expected value of the q-axis current .
[0091]
[0092] In the above formula, is the position error, 、 is a dynamic adjustment parameter, and t is time.
[0093] The rest of this implementation plan is the same as the specific implementation plan six.
[0094] Specific implementation scheme eight: In step S200, the dynamic distortion compensation mechanism is introduced and the motion speed is controlled by using the inter-frame difference method. Specifically, when the robot motion speed is greater than the speed threshold, When , the distortion coefficient is updated in real time using the inter-frame difference method;
[0095]
[0096] in, 、 is the distortion coefficient before updating, 、 is the updated distortion coefficient, , 、 is an adaptive parameter.
[0097] The rest of this implementation plan is the same as the specific implementation plan seven.
[0098] like Figure 4 As shown in the figure, the microgravity ground demonstration system control interface is constructed using Qt user interface application development software. Through this control interface, it is possible to select and connect a camera device, enable AprilTag code detection and dynamically display recognition results, and manually control the microgravity demonstration platform.
[0099] Figure 4 CAM0 and CAM1 correspond to the two cameras in the microgravity platform. The drop-down box behind them allows you to select a camera device. The ReFresh button refreshes the camera devices currently connected to the computer. The "OPEN CAM0" and "OPEN CAM1" buttons open the CAM0 and CAM1 camera devices, respectively. The "START CAM0 DETECT" and "START CAM1 DETECT" buttons start AprilTag detection and dynamically display the recognition results in the left and right windows, respectively. The 3D coordinates displayed in the image are the robot's real-world coordinates (in meters) in the camera coordinate system.
[0100] The "INIT BaseVAL" button initializes the balance zero position, which is the state where the robot is suspended and free. This initialization value is indicated by the "Horizontal (x-axis) Base Position" and "Longitudinal (y-axis) Base Position" at the bottom of the interface.
[0101] The "Enable Crossbar Servo Motor" and "Enable Cargo Servo Motor" checkboxes control the activation of the two motor drivers of the microgravity demonstration platform, effectively energizing the motors. The "Emergency Stop" button quickly disables the two motor drivers in an emergency, effectively braking the motors. Under normal circumstances, clicking a checkbox to change its state enables or disables the motor drivers.
[0102] The serial port connection function is located in the upper right corner of the software interface. Click the "Refresh" button and select the serial port number of the underlying driver board from the drop-down box. "Open serial" opens the selected serial port. Once the serial port is open, the red indicator turns green. The forward, backward, left, and right buttons at the bottom of the interface are used for manual control of the microgravity demonstration platform while debugging software performance.
[0103] This implementation plan features a control interface for the microgravity ground test system; this interface integrates real-time motion status display and command input. This interface allows users to conveniently control the demonstration platform while also intuitively observing the robot's recognition results, motion trajectory, and compensation status in real time. This graphical, interactive control mode avoids the tedious process of entering complex code commands required by traditional methods, significantly reducing the operational complexity of the test system and improving the efficiency of human-machine collaboration during high-frequency dynamic tasks.
[0104] The control method (algorithm) of a microgravity ground test system proposed in the present invention is the underlying technical core of the present invention, and various products can be derived based on the algorithm.
[0105] Based on the method proposed in the present invention, a control system for a microgravity ground test system is developed using a programming language. The system has program modules corresponding to the steps of the above technical solution, and executes the steps in the above control method for the microgravity ground test system during operation.
[0106] The developed system (software) computer program is stored on a computer-readable storage medium. The computer program is configured to implement the steps of the control method for the microgravity ground test system described above when called by a processor. This materializes the present invention on a carrier, becoming a computer program product.
[0107] Various implementations of the systems and techniques described herein can be realized in digital electronic circuitry, integrated circuitry, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system comprising at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0108] The computer programs (also referred to as programs, software, software applications, or code) herein comprise machine instructions for a programmable processor and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., a magnetic disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0109] Although the present invention is disclosed as above, the scope of protection disclosed by the present invention is not limited thereto. Those skilled in the art of the present invention may make various changes and modifications without departing from the spirit and scope of the present invention, and these changes and modifications will fall within the scope of protection of the present invention.
Claims
1. A control method for a microgravity ground test system, characterized in that: The steps include: S100, acquiring image information through a binocular camera, correcting radial distortion and tangential distortion of the image acquired by the binocular camera, and detecting target motion posture and position information using the AprilTag visual reference library; S200. Based on the motion posture and position information obtained by detection, the horizontal motion of the robot is closed-loop controlled through the current loop, speed loop, and position loop. A dynamic distortion compensation mechanism is introduced to reduce the influence of the robot's own motion or external disturbances, and the inter-frame difference method is used to control the motion speed.
2. The control method of the microgravity ground test system according to claim 1, characterized in that: The radial distortion and tangential distortion of the image acquired by the binocular camera are corrected in step S100, specifically: The radial distortion is corrected by using a polynomial function of quadratic or higher related to the center distance. The radial distortion is expressed as: ; In the above formula, is the radial distortion coefficient, is the radial distance; The tangential distortion is expressed as follows: ; In the above formula, is the tangential distortion coefficient, is the tangential distance; The corrected coordinates are: ; Project the corrected coordinates to the pixel plane and transform the camera's intrinsic parameter matrix: ; In the above formula, is the coordinate of the pixel plane after correction, For the camera x 、 y The focal length of the direction, c x and c y is the coordinate of the camera light point in the pixel coordinate system; The pixel coordinates are: 。 3. The control method of the microgravity ground test system according to claim 2, characterized in that: The detection of target motion posture and position information using the AprilTag visual reference library in step S100 includes the following steps: S110, processing the three-dimensional object image acquired by the binocular camera to obtain two-dimensional image information; S120, detecting the edge of the target in the image according to the gradient; S130, finding the required quadrilateral pattern in the edge image and screening it, eliminating non-straight edges, searching for adjacent edges on straight edges, and finally detecting a quadrilateral if a closed loop is formed; S140, performing QR code encoding and decoding: using multiple black-bordered color block lengths for encoding, generating a point array within the detected quadrilateral for calculating the value of each color block for decoding, classifying the color blocks within the quadrilateral, obtaining the QR code and the encoded ID, and determining the rotation of the flying robot by comparing the changes before and after encoding. S150: Calculate the motion posture and position information of the flying robot.
4. The control method of the microgravity ground test system according to claim 3, characterized in that: Step S110 includes the following steps: Assume that the optical center of the left camera is , the coordinate system is , the optical center of the right camera is , the coordinate system is , and The physical distance is the baseline of the binocular camera ; midpoint in space The images on the imaging planes of the left camera and the right camera are ; In the pixel coordinate system, the difference in the u-axis value is recorded as ; The focal lengths of the left and right cameras are ,but: ; but: ; In the above formula, is parallax, The theoretical maximum depth measured by the binocular camera; The corresponding three-dimensional point In the left camera coordinate system The coordinates below are: 。 5. The control method of the microgravity ground test system according to claim 4, characterized in that: Step S150 includes the following process: By comparing the four vertex coordinates detected in the QR code image with the four standard vertex coordinates of its original template, and utilizing the correspondence between the four sets of point pairs, a direct linear transformation algorithm is used to solve the single linear transformation matrix of the QR code; decomposing the matrix solves the rotation transformation vector Rvec and the translation transformation vector Tvec, and based on the obtained rotation vector, the correct posture of the QR code is solved, and finally the motion posture and position information of the flying robot are obtained.
6. The control method of the microgravity ground test system according to claim 5, characterized in that: The closed-loop control of the robot's horizontal motion by the three-loop control of current loop, speed loop, and position loop described in step S200 includes the following process: For current loop control, the three-phase current output by the actual motor is first sampled. Then, through Clark and Park transforms, the current is converted to the current corresponding to the rotor's orthogonal axis. The converted current is then compared with the expected current value to calculate the error. The voltage signal required to correct the error is calculated based on the error. The voltage signal is converted into a switching signal for the control circuit to achieve current adjustment. For the speed loop and position loop, an encoder is added to the current loop control to obtain the actual output speed and position. The speed and position errors are converted into current errors. The current loop is then used to control the current, thereby achieving speed and position control.
7. The control method of the microgravity ground test system according to claim 6, characterized in that: In step S200, the current loop control also includes dynamically adjusting the current expected value. : ; In the above formula, is the position error, 、 is a dynamic adjustment parameter, and t is time.
8. The control method of the microgravity ground test system according to claim 7, characterized in that: In step S200, the motion speed is controlled by using the inter-frame difference method, specifically: when the robot motion speed is greater than the speed threshold When , the inter-frame difference method is used to update the distortion coefficient in real time: ; in, 、 is the distortion coefficient before updating, 、 is the updated distortion coefficient, , 、 is an adaptive parameter.
9. A control system for a microgravity ground test system, characterized in that: The system has a program module corresponding to the steps of the method described in any one of claims 1 to 8, and executes the steps of the control method of the microgravity ground test system when running.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the computer program is configured to implement the steps of the control method of the microgravity ground test system according to any one of claims 1 to 8 when called by a processor.
Citation Information
Patent Citations
Vision measurement, path planning and GNC integrated simulation system for space robot
CN101726296A
Suspension type microgravity simulation device and control method
CN109720609A
Method for improving AprilTag recognition and positioning precision of unmanned aerial vehicle camera and positioning method and system
CN112184812A
Insect-like vision integrated navigation method based on polarized light, optical flow vector and binocular vision sensors
CN112444245A
Convergent binocular vision guided robot positioning method in high dynamic range
CN113360964A