A method for robot binocular vision self-motion compensation based on deep learning
By using a deep learning-based binocular vision self-motion compensation method for robots, the problem of target motion instability caused by synchronous changes in visual sensors in robot combat scenarios is solved, enabling accurate acquisition of opponent state information and precise control of offensive and defensive actions.
Patent Information
- Application Number
- CN202611374116.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-07
- Publication Date
- 2026-11-27
AI Technical Summary
In robot combat scenarios, the visual sensors installed on the robot body change synchronously with the robot's movement, resulting in unstable target motion information and reduced trajectory continuity, which affects the robot's accurate judgment of the opponent's posture, attack direction and distance.
A deep learning-based binocular vision self-motion compensation method for robots is adopted. By acquiring continuous binocular images, the self-motion estimation module in the vision self-motion compensation model is used to determine the head pose change. Combined with the motion classification module, the stable scene points and the opponent's motion points are distinguished. Finally, a short-time stable adversarial coordinate system is established through the coordinate transformation module to obtain the opponent's state information that is not affected by head movement.
It improves the accuracy of the robot's visual perception and risk assessment in dynamic confrontation scenarios, reduces the impact of the robot's own posture changes on the target's trajectory, and ensures the accuracy of offensive and defensive actions.
Smart Images

Figure CN123169079A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robot control technology, and in particular to a method for self-motion compensation of robot binocular vision based on deep learning. Background Technology
[0002] With the development of robot motion control and visual perception technologies, robots are increasingly being applied to scenarios requiring offensive and defensive interactions, such as adversarial training and competitive demonstrations. During robot combat, robots typically use visual sensors to collect environmental images and identify and judge the opponent's movement status based on the information in the images, thereby providing a perceptual basis for subsequent action planning and control.
[0003] Existing robot perception solutions typically rely on visual sensors mounted on the robot to acquire continuous images and determine the opponent's position and motion state through target detection and tracking. However, in adversarial scenarios, robots perform dynamic actions such as rapid movement, turning, dodging, or attacking. The visual sensors mounted on the robot change synchronously with the robot's movement, causing the target's position and motion state in the acquired images to be simultaneously affected by the robot's own motion. When the visual sensor's field of view continuously changes, instability in target motion information and reduced continuity of target trajectory can easily occur, making it difficult for the robot to accurately determine the opponent's posture, attack direction, and relative distance, thus affecting the robot's performance during adversarial interactions. Summary of the Invention
[0004] This application provides a deep learning-based method for self-motion compensation of binocular vision in robots, which can improve the accuracy of visual perception and risk judgment of robots in dynamic adversarial scenarios.
[0005] The first aspect of this application provides a method for self-motion compensation of robot binocular vision based on deep learning, including:
[0006] Acquire continuous binocular images captured by the binocular vision device, and determine three-dimensional visual information based on the continuous binocular images and binocular positioning parameters; The three-dimensional visual information is input into a pre-trained visual self-motion compensation model. The self-motion information corresponding to the head is determined based on the self-motion estimation module in the visual self-motion compensation model. The self-motion information is used to represent the pose change of the head during the continuous acquisition of the continuous binocular images. Based on the motion classification module in the visual self-motion compensation model, the predicted motion information of candidate points in the continuous binocular images is determined according to the self-motion information, and the candidate points are classified according to the difference between the predicted motion information and the actual motion information of the candidate points to obtain stable scene points and opponent motion points. Based on the coordinate transformation module in the visual self-motion compensation model, the coordinate transformation relationship is determined according to the self-motion information and the three-dimensional position information of the opponent's movement point, and a short-time stable adversarial coordinate system is established according to the coordinate transformation relationship. The opponent's movement point is transformed into the short-time stable adversarial coordinate system to obtain the opponent's state information under the short-time stable adversarial coordinate system. The movement trajectory of the target part of the opponent and the attack risk information are determined based on the opponent's status information. The attack risk information includes the risk distance and the estimated hit time. The attack risk information is used to control the robot to perform corresponding offensive and defensive actions.
[0007] The second aspect of this application provides a storage medium storing a program that, when executed on a computer, performs the first aspect and any optional method of deep learning-based robot binocular vision self-motion compensation.
[0008] As can be seen from the above technical solutions, this application has the following advantages: By acquiring continuous binocular images and determining 3D visual information based on binocular positioning parameters, visual information including spatial positional relationships is input into a pre-trained visual self-motion compensation model. The self-motion estimation module determines the self-motion information corresponding to the head, thereby obtaining the visual change patterns caused by the robot's own movement. Based on this, a motion classification module determines the predicted motion information of candidate points based on the self-motion information. Combining the difference between the actual and predicted motion information of the candidate points, the candidate points are classified, distinguishing between stable scene points caused by the robot's own movement and opponent movement points caused by the opponent's movement. Furthermore, a coordinate transformation module determines the coordinate transformation relationship based on the self-motion information and the 3D position information of the opponent's movement points, and establishes a short-time stable adversarial coordinate system. This allows the opponent's movement points to be transformed into a stable reference space, thereby obtaining opponent state information unaffected by head movement. Based on the opponent's state information in a short-term stable adversarial coordinate system, the robot can determine the target's motion trajectory and attack risk information, enabling the robot to obtain the target's motion state after self-motion compensation during dynamic adversarial processes with continuous head movement. This reduces the impact of the robot's own posture changes on the determined target's motion trajectory, and determines the corresponding offensive and defensive actions based on the reliable target motion state, thereby improving the accuracy of the robot's visual perception and risk judgment in dynamic adversarial scenarios. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 A schematic diagram of the overall structure of a humanoid robot provided as an example of a robot in this application; Figure 2 A schematic flowchart of an embodiment of the deep learning-based robot binocular vision self-motion compensation method provided in this application; Figure 3 A schematic diagram of the structural composition of the visual self-motion compensation model provided in this application; Figure 4 A schematic flowchart of an embodiment of the training method for the visual self-motion compensation model provided in this application; Figure 5 A schematic flowchart of an embodiment of the method for establishing a short-time stable adversarial coordinate system provided in this application; Figure 6 A schematic flowchart of an embodiment of the method provided in this application for transforming the opponent's motion point to a short-time stable adversarial coordinate system; Figure 7 This is a schematic flowchart of an embodiment of the method provided in this application for determining attack risk information based on adversary status information. Detailed Implementation
[0011] This application provides a deep learning-based method for self-motion compensation of binocular vision in robots, which can improve the accuracy of visual perception and risk judgment of robots in dynamic adversarial scenarios.
[0012] The robot provided in this application includes a robot body, a head, a binocular vision device, at least one processor, and at least one storage medium. The robot body may include a torso and at least one movable limb connected to the torso. The head is connected to the torso, and the binocular vision device is disposed on the head. The binocular vision device can move with the head to change the image acquisition direction and image acquisition range. The movable limb may include a robotic arm, legs, or other motion mechanisms capable of performing defensive operations. The robot may be a humanoid robot, a legged robot, a wheeled robot, or other robots with offensive and defensive capabilities. For ease of description, the following description primarily uses a robot with a humanoid structure as an example. Please refer to... Figure 1 The head 1 is connected to the torso 2, which includes an upper torso 21 and hips 22. The upper torso 21 and hips 22 are rotatably connected via a power module. Two upper limbs 3 are connected to the upper torso 21, and two lower limbs 4 are connected to the hips 22. A binocular vision device is located inside the head 1. It should be noted that in the self-motion compensation process of this embodiment, the binocular vision device is the only external sensing device for the robot to obtain the motion state of the other party, and the sensing information provided by the site camera, external motion capture device, or other external detection device is not considered.
[0013] Please see Figure 2 , Figure 2 An embodiment of the deep learning-based robot binocular vision self-motion compensation method provided in this application includes: 201. Acquire continuous binocular images from a binocular vision device, and determine three-dimensional visual information based on the continuous binocular images and binocular positioning parameters.
[0014] A binocular vision device is mounted on the robot's head and moves synchronously with it. During actions such as moving, turning, dodging, attacking, or defending, the binocular vision device continuously acquires images of the robot's surrounding environment at a preset acquisition frequency, forming a continuous set of binocular images arranged according to the acquisition time. Each acquisition time corresponds to a set of left and right eye images. By continuously acquiring left and right eye images from multiple acquisition times, changes in the visual scene over time during head and opponent movements can be recorded. Binocular calibration parameters describe the imaging parameters of the left and right cameras in the binocular vision device and their spatial relationship. These parameters include, for example, the intrinsic parameters and distortion parameters of each camera, as well as the rotation and translation parameters between them. The camera intrinsic parameters establish the mapping between image coordinates and camera coordinates, while the rotation and translation parameters determine the imaging relationship of the same spatial position in the left and right eye images. The binocular calibration parameters can be pre-calibrated using the binocular vision device and are read and used during robot operation.
[0015] After acquiring consecutive binocular images, the images can be time-aligned according to the timestamps carried in each left and right eye image. Furthermore, distortion correction and binocular correction can be performed on the left and right eye images based on binocular calibration parameters, thereby reducing the impact of lens distortion, camera mounting position differences, and other factors on subsequent 3D position determination. For the time-aligned binocular images, binocular parallax is determined based on the corresponding image positions in the left and right eye images, and the depth of the corresponding image position is determined by combining the focal length, baseline distance, and other binocular calibration parameters of the binocular vision device. Further, based on the image position and its depth, the 2D image position is transformed to the 3D coordinate space corresponding to the binocular vision device to obtain the 3D position information of visual objects in consecutive binocular images. These visual objects may include visual points in the environment, visual points in the hand's body region, and other visual objects required for subsequent processing. The resulting 3D visual information is used to describe the positional state of visual objects in the 3D space corresponding to the binocular vision device at multiple consecutive acquisition times. Three-dimensional visual information can include the three-dimensional coordinates, depth, and corresponding acquisition time of each visual object. It can also retain the two-dimensional image position corresponding to the three-dimensional position, so that subsequent processing can establish the correlation between image changes in continuous binocular images and changes in three-dimensional spatial position.
[0016] 202. Input the three-dimensional visual information into the pre-trained visual self-motion compensation model, and determine the self-motion information corresponding to the head based on the self-motion estimation module in the visual self-motion compensation model. The self-motion information is used to represent the pose change of the head during the continuous acquisition of continuous binocular images.
[0017] In this embodiment, the visual self-motion compensation model is used to estimate the motion of the head itself during continuous data acquisition, and in subsequent processing, the motion estimation result is used to distinguish between visual changes caused by the robot's own motion and visual changes caused by the opponent's motion. This visual self-motion compensation model can be pre-trained using binocular visual data acquired during robot movement, and the trained model parameters are loaded for inference processing when the robot performs adversarial tasks. Please refer to [link / reference] for details. Figure 3 , Figure 3This is a schematic diagram of the architecture of the visual self-motion compensation model provided in this embodiment. The visual self-motion compensation model includes a self-motion estimation module 301, a motion classification module 302, and a coordinate transformation module 303. The self-motion estimation module 301 is used to determine the self-motion information corresponding to the head based on the input 3D visual information; the motion classification module 302 is used to classify the motion of candidate points in continuous binocular images based on the self-motion information; the coordinate transformation module 303 is used to perform coordinate transformation on the subsequently obtained hand motion information based on the self-motion information. The output of the self-motion estimation module 301 serves as the data basis for subsequent processing by the motion classification module 302 and the coordinate transformation module 303. In some embodiments, the visual self-motion compensation model can determine the self-motion information using either a model parameter learning-based implementation or a geometric constraint-based implementation, depending on the specific application requirements. Specifically, the model parameter learning-based implementation can output self-motion information based on visual features using a trained neural network; the geometric constraint-based implementation can establish spatial constraints based on the correspondence of stable scene points in continuous binocular images, and determine or optimize the self-motion information based on these spatial constraints.
[0018] Self-motion information is used to represent the spatial pose changes of the binocular vision device as the head moves, and can include rotational and translational changes between adjacent acquisition times. Since the binocular vision device is fixed to the head, when the robot performs movements such as moving, turning, dodging, or other actions that cause changes in head position and orientation, the visual objects in the continuous binocular images will undergo corresponding positional changes as the head moves. The self-motion estimation module 301 determines the rotational and translational relationships between the head coordinate systems at different acquisition times based on the 3D positional changes of the visual objects in the 3D visual information at consecutive acquisition times, thereby obtaining the head's self-motion information.
[0019] In some implementations, the self-motion estimation module 301 can establish self-motion constraints based on the scene candidate points participating in the self-motion estimation and their corresponding observation results to assist in determining self-motion information. Specifically, the scene candidate points participating in the self-motion estimation and their observation results in continuous images are used as constraint information. Based on the spatial correspondence between the scene candidate points at different acquisition times, the self-motion change of the head between adjacent acquisition times is determined. The scene candidate points provide a stable spatial reference relative to the surrounding environment, and their corresponding information includes the three-dimensional position of the scene candidate points at the reference acquisition time and the actual two-dimensional observation position of the scene candidate points at the current acquisition time. Specifically, for the set of scene candidate points B, based on the rotation parameter R and translation parameter t corresponding to the self-motion information, the three-dimensional position of each scene candidate point at the reference acquisition time is transformed to the current acquisition time and projected onto the current image plane to obtain the corresponding predicted two-dimensional position. By comparing the predicted two-dimensional position with the actual two-dimensional observation position at the current acquisition time, the reprojection error corresponding to the self-motion information can be determined. The reprojection error is used to represent the degree of consistency between the predicted motion change obtained based on the self-motion information and the actual observed change of the scene candidate points. The reprojection error can be expressed as: 2; in, Let R represent the sum of reprojection errors corresponding to each scene candidate point when the rotation parameter R and translation parameter t take the corresponding values; B represents the set of scene candidate points participating in this self-motion estimation, and i represents the i-th scene candidate point in the set of scene candidate points; This indicates the three-dimensional position of candidate point i at the reference acquisition time; This represents the two-dimensional observation position of candidate point i at the current acquisition time; This indicates the three-dimensional position according to the rotation parameter R and the translation parameter t. After spatial transformation, the transformation result is projected onto the current image plane to obtain the predicted two-dimensional position; ||·||2 represents the L2 norm, which is used to calculate the distance between the actual two-dimensional observation position and the predicted two-dimensional position.
[0020] When using a geometrically constrained self-motion determination method, the rotation parameter R and translation parameter t can be optimized based on the reprojection error to reduce the sum of reprojection errors corresponding to the scene candidate point set B, and the corresponding self-motion parameters can be determined. In other words, the rotation and translation parameters that minimize the sum of reprojection errors can be determined. ; Where arg min represents the parameter values that minimize the objective function, i.e., among different rotation parameters R and translation parameters t, determining the values that minimize the reprojection error. The goal is to achieve the minimum parameter combination. Therefore, R and t represent the parameter variables in the optimization process. and This represents the final parameters obtained after optimization. and Together, these constitute the self-motion increment of the head between adjacent acquisition times. This self-motion increment is used to represent the relative rotation and translation amounts generated during the change of the head from the pose corresponding to the reference acquisition time to the pose corresponding to the current acquisition time.
[0021] When employing a neural network-based self-motion determination method, the reprojection error can also be used as a self-motion reprojection loss to constrain the self-motion information output by the visual self-motion compensation model, ensuring that the self-motion information output by the network is consistent with the actual motion changes corresponding to the scene candidate points. As continuous binocular images are acquired, the self-motion increment between adjacent acquisition times can be determined frame by frame, and the cumulative pose change of the head relative to the selected reference time can be determined based on multiple consecutive self-motion increments.
[0022] 203. Based on the motion classification module in the visual self-motion compensation model, the predicted motion information of candidate points in continuous binocular images is determined according to the self-motion information. The candidate points are classified according to the difference between the predicted motion information and the actual motion information of the candidate points to obtain stable scene points and opponent motion points.
[0023] In this embodiment, candidate points refer to image points or corresponding three-dimensional spatial points determined from continuous binocular images for analyzing the motion state of visual objects in the images. Candidate points can originate from feature points, key points, or other visual points in continuous binocular images that can establish a positional correspondence between consecutive acquisition times. Since the binocular vision device moves with the head, the positional change of candidate points in continuous binocular images may originate from the head's own movement or from the movement of the visual object to which the candidate point belongs. Therefore, it is necessary to combine the self-motion information obtained in step 202 to distinguish the motion source of the candidate points.
[0024] The motion classification module 302 determines the positional changes of candidate points caused by head pose changes, assuming the spatial object to which the candidate point belongs remains stable, based on the self-motion information and the spatial position of the candidate point at the current acquisition time, thus obtaining the predicted motion information of the candidate point. This predicted motion information represents the expected motion changes of the candidate point between different acquisition times when only considering head self-motion, and may specifically include the predicted displacement, predicted position, or predicted motion direction of the candidate point. Simultaneously, the actual motion information of the candidate point is determined based on the observed position of the same candidate point at different acquisition times in continuous binocular images. The actual motion information represents the actual positional changes of the candidate point in continuous image frames; for example, it can be determined based on the candidate point's feature trajectory, optical flow information, or continuous three-dimensional positional changes.
[0025] The motion classification module 302 compares the predicted motion information with the actual motion information. When the actual motion change of a candidate point has a high consistency with the predicted motion change determined based on head self-motion, it indicates that the motion of the candidate point in the image mainly originates from the pose change of the binocular vision device itself, and the candidate point can be identified as a stable scene point. Stable scene points can be, for example, from the playing field, walls, ground, or other scene areas that remain relatively stable during the confrontation. When there is a significant difference between the actual motion change and the predicted motion change of a candidate point, it indicates that the head self-motion is insufficient to explain the actual position change of the candidate point in the continuous binocular images, and the visual object corresponding to the candidate point has independent motion relative to the surrounding stable scene. Combining the opponent's position in the continuous binocular images, candidate points related to the opponent's motion can be identified as opponent motion points. Opponent motion points can be distributed in the opponent's torso, upper limbs, lower limbs, or fist, etc., to reflect the opponent's real motion relative to the stable scene. Therefore, the motion classification module 302 can use the self-motion information obtained in step 202 as the basis for motion compensation to distinguish the overall visual changes caused by the robot's own motion from the local visual changes caused by the actual motion of the opponent, and obtain stable scene points and opponent motion points.
[0026] 204. Based on the coordinate transformation module in the visual self-motion compensation model, the coordinate transformation relationship is determined according to the self-motion information and the three-dimensional position information of the opponent's movement point. A short-time stable adversarial coordinate system is established according to the coordinate transformation relationship, and the opponent's movement point is transformed into the short-time stable adversarial coordinate system to obtain the opponent's state information under the short-time stable adversarial coordinate system.
[0027] In this embodiment, the three-dimensional position information of the hand movement points is determined by the correspondence between the hand movement points obtained in step 203 and the three-dimensional visual information obtained in step 201, and is used to represent the spatial position of each hand movement point in the current head coordinate system. Since the binocular vision device moves continuously with the head, the head coordinate system corresponding to different acquisition times also changes. Therefore, even if the same hand part maintains the same actual spatial position, its three-dimensional position in the head coordinate system corresponding to different acquisition times may change. Therefore, the coordinate transformation module 303 uses the self-motion information obtained in step 202 to compensate for this coordinate system change, so that the hand movement points obtained at different acquisition times can be described within a unified reference space.
[0028] Specifically, the coordinate transformation module 303 determines the coordinate transformation relationship between the current head coordinate system and the coordinate system corresponding to the selected reference state based on the rotation and translation changes of the head between consecutive acquisition moments. For multiple consecutive acquisition moments, the cumulative pose change can be determined based on the self-motion information between each acquisition moment, and the coordinate transformation relationship can be updated based on the cumulative pose change, so that the three-dimensional position information obtained at the current acquisition moment can be transformed into a spatial coordinate system that remains short-term stable relative to the reference state. This short-term stable adversarial coordinate system is used to provide a relatively stable adversarial spatial reference within a preset time range. When the robot performs adversarial actions, the head coordinate system may rotate and translate rapidly, and the short-term stable adversarial coordinate system compensates for this part of the coordinate change through the coordinate transformation relationship, so that the position change of the opponent's movement point in the short-term stable adversarial coordinate system mainly reflects the opponent's actual movement. It should be noted that short-term stability here refers to maintaining a unified spatial reference within a continuous adversarial time period, so that the opponent's movement information obtained within this time range can be continuously correlated.
[0029] In one implementation, the cumulative self-motion transformation of the head relative to the reference state can be denoted as: Let X be the opponent's movement point in the current head coordinate system. Then, the opponent's movement point can be transformed to the short-time stable adversarial coordinate system by the inverse transformation of the cumulative self-motion transformation. The transformed three-dimensional position can be represented as: ; in, This represents the cumulative self-motion transformation between the head coordinate system at the reference time and the current head coordinate system. This represents the inverse transformation of the cumulative self-motion transformation; This indicates the three-dimensional position of the opponent's movement point in the current head coordinate system; This represents the three-dimensional position obtained after transforming the opponent's movement point into a short-term stable adversarial coordinate system.
[0030] By performing corresponding coordinate transformations on the opponent's movement points obtained at continuously acquired moments, continuously updated 3D motion information of the opponent can be generated under the same spatial reference. The opponent's state information describes the opponent's spatial state after head self-motion compensation, and can include the 3D position of the opponent's movement points in a short-time stable adversarial coordinate system, positional changes between different acquisition moments, and opponent posture information determined based on multiple opponent movement points. For opponent movement points that can be mapped to specific body parts, a spatial motion sequence for the corresponding body part can also be generated based on the 3D position at continuously acquired moments.
[0031] 205. Determine the motion trajectory of the opponent's target part and the attack risk information based on the opponent's state information in the short-time stable adversarial coordinate system. The attack risk information includes the risk distance and the expected hit time. The attack risk information is used to control the robot to perform corresponding offensive and defensive actions.
[0032] In this embodiment, the opponent state information is used to describe the opponent's spatial state in the short-time stable adversarial coordinate system after head self-motion compensation. Since step 204 has already converted the opponent motion points obtained at different acquisition times to a unified short-time stable adversarial coordinate system, opponent motion points belonging to the same opponent target part can be associated according to the acquisition time, and the motion trajectory of the opponent target part can be determined based on the three-dimensional position changes of the opponent motion points at multiple consecutive acquisition times. The opponent target part can be determined according to the specific adversarial task. For example, in a robot boxing scenario, the opponent target part can include the opponent's fist, hand, forearm, or other body parts that can form an attack action. Taking the fist as the opponent target part as an example, the fist motion trajectory can be formed based on the three-dimensional position of the fist at multiple consecutive acquisition times. The fist motion trajectory can reflect the direction of movement, spatial position changes, and approach trend of the fist relative to the robot. Since the fist position at each time is determined based on the same short-time stable adversarial coordinate system, the formed motion trajectory can reduce the influence of head rotation and translation on the fist trajectory.
[0033] After obtaining the trajectory of the opponent's target part, attack risk information can be determined by combining it with the robot's own spatial position in a short-term stable adversarial coordinate system. Attack risk information describes the risk of the opponent's target part posing an attack on the robot due to its current motion state, and includes at least the risk distance and estimated hit time. The risk distance represents the distance relationship between the opponent's target part and the spatial area where the robot may be attacked. As the opponent's target part moves closer to the robot, the risk distance decreases accordingly; therefore, the spatial proximity between the opponent's target part and the robot can be judged based on the risk distance. The estimated hit time represents the time required for the opponent's target part to reach the robot's attack position if it continues to move according to its current motion state. The estimated hit time can be determined based on the opponent's target part's current position and the speed and direction of its motion reflected by its trajectory. The estimated hit time is shortened when the opponent's target part is rapidly approaching the robot; the effectiveness of this estimated hit time in attack risk assessment can be reduced when the opponent's target part is moving away from the robot or has not formed an effective approach trend.
[0034] The robot can determine its current adversarial state based on the risk distance and estimated hit time, and send the attack risk information to its motion control module. The motion control module can then select offensive and defensive actions appropriate to the current attack state based on this information. For example, when the opponent's target area continues to approach and the attack risk increases, the robot can be controlled to perform arm-raising defense, torso evasion, footwork adjustment, or other defensive actions. Conversely, when corresponding offensive conditions are met, the robot can also be controlled to perform corresponding offensive actions based on the attack risk information. Thus, by continuously determining the trajectory of the opponent's target area in a short-term stable adversarial coordinate system and further generating the risk distance and estimated hit time, the opponent's motion information, after head self-motion compensation, can be converted into state information that the robot's offensive and defensive control can directly utilize. This allows the robot to adjust its offensive and defensive actions in a timely manner based on the actual approach of the opponent's target area.
[0035] In this embodiment, by acquiring continuous binocular images and determining 3D visual information based on binocular positioning parameters, visual information including spatial positional relationships is input into a pre-trained visual self-motion compensation model. The self-motion estimation module determines the self-motion information corresponding to the head, thereby obtaining the visual change pattern caused by the robot's own movement. Based on this, the motion classification module determines the predicted motion information of candidate points based on the self-motion information, and classifies the candidate points by combining the difference between the actual and predicted motion information, distinguishing between stable scene points caused by the robot's own movement and opponent movement points caused by the opponent's movement. Furthermore, the coordinate transformation module determines the coordinate transformation relationship based on the self-motion information and the 3D position information of the opponent movement points, and establishes a short-time stable adversarial coordinate system, enabling the opponent movement points to be transformed into a stable reference space, thereby obtaining opponent state information unaffected by head movement. Based on the opponent's state information in a short-term stable adversarial coordinate system, the robot can determine the target's motion trajectory and attack risk information, enabling the robot to obtain the target's motion state after self-motion compensation during dynamic adversarial processes with continuous head movement. This reduces the impact of the robot's own posture changes on the determined target's motion trajectory, and determines the corresponding offensive and defensive actions based on the reliable target motion state, thereby improving the accuracy of the robot's visual perception and risk judgment in dynamic adversarial scenarios.
[0036] In some embodiments, please refer to Figure 3The motion classification module 302 further includes a motion prediction unit 3021 and a motion discrimination unit 3022. The motion prediction unit is used to determine the predicted motion information of the candidate point in the continuous binocular images based on the self-motion information. The motion discrimination unit is used to obtain the actual motion information of the candidate point in the continuous image frames, and to determine the classification result of the candidate point based on the motion residual between the predicted motion information and the actual motion information, the depth change information of the candidate point, and the spatial position relationship of the candidate point. Specifically, when the motion residual of the candidate point is less than a preset background threshold, the depth change information satisfies the rigid body motion constraint, and the spatial position relationship satisfies the scene point distribution condition, the candidate point is determined as a stable scene point. When the motion residual of the candidate point is greater than a preset motion threshold, the spatial position relationship is located in the opponent detection area, and the candidate point satisfies the target continuous motion condition, the candidate point is determined as an opponent movement point.
[0037] In this embodiment, for candidate point i, the motion prediction unit 3021 determines the predicted motion information induced by the head's self-motion in the image based on the rotational and translational changes of the head between adjacent acquisition times and the three-dimensional position corresponding to the candidate point. The predicted motion information can be the predicted displacement of the candidate point between adjacent image frames, or the predicted position or predicted motion direction obtained from the predicted displacement. The motion discrimination unit 3022 determines the actual motion information based on the corresponding position of the candidate point in consecutive image frames and calculates the motion residual between the actual motion information and the predicted motion information. For example, when the motion information is represented by the two-dimensional displacement of the candidate point, the motion residual of candidate point i can be determined according to the following formula: 2; in, Represents the motion residual of candidate point i; This represents the actual displacement of candidate point i in consecutive image frames; Let ||i|| represent the predicted displacement of candidate point i determined based on head self-motion; ||·||2 represents the L2 norm. The smaller the motion residual, the closer the actual motion of the candidate point is to the motion induced by head self-motion; the larger the motion residual, the more independent motion of the candidate point exists that cannot be explained by head self-motion.
[0038] In addition to motion residuals, the motion discrimination unit 3022 also combines depth change information and spatial positional relationships of candidate points for classification. Depth change information is used to determine whether the 3D positional changes of candidate points at continuous acquisition times match the spatial transformation relationship corresponding to rigid body motion of the head. For example, after transforming the 3D position of a candidate point from the previous acquisition time to the current acquisition time based on self-motion information, if the difference between the transformed depth and the currently acquired depth is within an acceptable range, then the depth change of the candidate point can be considered to satisfy rigid body motion constraints. Spatial positional relationships are used to further determine the image region or 3D spatial region where the candidate point is located. For example, stable scene points are usually distributed on the competition field, ground, walls, or other areas that remain fixed relative to the competition environment; opponent movement points are usually located within the opponent detection area and undergo continuous positional changes with the opponent's body movement. Therefore, the motion discrimination unit 3022 can utilize spatial positional relationships to reduce misclassifications that occur when classifying solely based on motion residuals.
[0039] When the motion residual of a candidate point is less than a preset background threshold, the depth change of the candidate point satisfies rigid body motion constraints, and the spatial positional relationship of the candidate point satisfies the scene point distribution conditions, the actual motion of the candidate point can be considered well explained by head self-motion, and the candidate point is identified as a stable scene point. The preset background threshold is used to limit the allowable deviation between the actual motion and the predicted motion, and its specific value can be determined in advance based on the model training results or validation data. When the motion residual of a candidate point is greater than a preset motion threshold, the candidate point is located in the opponent detection area, and the candidate point satisfies the target continuous motion condition, the candidate point is identified as an opponent motion point. The target continuous motion condition is used to restrict the candidate point to have temporal continuity adapted to the opponent's body motion at multiple consecutive acquisition times. For example, the positional change of the same candidate point or corresponding body part remains continuous in consecutive image frames, and there are no abrupt changes that significantly exceed the normal target motion range. By simultaneously using motion residual, depth change, and spatial positional relationship to judge candidate points, classification errors caused by local matching errors, depth measurement fluctuations, or abnormal motion in a single frame can be reduced, making the division results of stable scene points and opponent motion points more reliable.
[0040] In addition to the stable scene points and opponent movement points mentioned above, the motion discrimination unit 3022 can also determine candidate points as robot limb points or unreliable points. Specifically, when a candidate point is located in the image region corresponding to the robot's own limb, the candidate point is determined as a robot limb point to avoid the robot's own arm, fist, or other limb movements being mistaken for opponent movements or participating in the estimation of head self-motion. When a candidate point does not meet the classification conditions corresponding to stable scene points, nor the classification conditions corresponding to opponent movement points, and is not located in the robot limb region, the candidate point is determined as an unreliable point. For unreliable points, their weight can be reduced or their corresponding motion information can be omitted in subsequent self-motion estimation or opponent motion tracking. In one implementation, it can be determined sequentially whether the candidate point meets the classification conditions corresponding to stable scene points, whether it meets the classification conditions corresponding to opponent movement points, and whether it is located in the robot limb region; if none of these conditions are met, the candidate point is determined as an unreliable point. Thus, the influence of the robot's own limb movements, mismatched points, or other visual points that are difficult to classify reliably on the self-motion estimation and opponent motion determination results can be reduced.
[0041] In one implementation, the motion discrimination unit 3022 can employ a rule-based discrimination method based on motion residuals and preset thresholds. This method determines whether a candidate point belongs to a stable scene point or an opponent's movement point based on the candidate point's motion residuals, depth changes, and spatial positional relationships. In another implementation, the motion discrimination unit 3022 can include a trained classification network. The predicted motion information, actual motion information, depth change information, or spatial positional features corresponding to the candidate point are input into the classification network. The classification network outputs the classification probability of the candidate point belonging to different motion categories, and the classification result of the candidate point is determined based on the classification probability. Alternatively, rule-based discrimination can be combined with the classification network. For example, candidate points that clearly do not satisfy the stable scene motion relationship can be eliminated first based on the motion residuals, and then the classification network can be used to classify the remaining candidate points, thereby reducing the impact of high-speed punch movements or local mismatches on the candidate point classification results.
[0042] In some embodiments, please refer to Figure 4 The visual self-motion compensation model is based on a neural network and is trained in the following way: 401. Obtain binocular training samples containing head movement state and opponent movement state. The binocular training samples include continuous binocular images collected when the robot performs head-down movement, side-to-side movement, backward movement, approach movement, and head-shaking movement.
[0043] In this embodiment, the visual self-motion compensation model is constructed based on a deep neural network. The self-motion estimation module 301 includes a pose regression network, which determines the rotation and translation information of the robot's head based on the input visual motion features to obtain self-motion information. The motion classification module 302 includes a motion classification network, which determines the classification result of candidate points based on the visual features, self-motion information, and motion information of the candidate points to distinguish between stable scene points and opponent movement points. The coordinate transformation module 303 performs coordinate transformation on the three-dimensional position information of the opponent movement points based on the rigid body motion parameters corresponding to the self-motion information to obtain the opponent's state information in a short-term stable adversarial coordinate system. To enable the visual self-motion compensation model to adapt to the visual scene where the robot's head pose continuously changes during dynamic combat, continuous binocular images of the robot performing different actions are collected as binocular training samples during the model training phase. The binocular training samples include both the overall visual changes of the scene caused by the head's own movement and the independent motion changes generated by the opponent performing movement, punching, or other adversarial actions within the same time period, allowing the neural network to learn the difference between the head's self-motion and the opponent's actual movement.
[0044] Specifically, the binocular training samples should cover image sequences of the robot performing actions such as head tilting, side turning, tilting back, approaching, and head shaking. Head tilting, side turning, and tilting back create different directions of head rotation and positional changes; approaching creates a noticeable forward translation; and head shaking covers the frequent changes in head movement states during short periods of combat. By acquiring continuous binocular images of these different head movement states, the training samples cover representative self-motion changes during dynamic robot combat. During acquisition, the opponent can simultaneously perform actions such as standing, moving, torso adjustment, or punching, ensuring that the same training sequence simultaneously contains positional changes in a stable scene due to head movements and positional changes in the opponent's own body parts.
[0045] 402. Determine self-motion annotation information and motion classification annotation information based on binocular training samples. Self-motion annotation information is used to represent the corresponding pose changes during head movement, and motion classification annotation information is used to indicate whether the candidate point belongs to a stable scene point or an opponent movement point.
[0046] After obtaining binocular training samples, the rotation and translation changes of the head between adjacent acquisition times are determined for consecutive image frames in the binocular training samples, and the corresponding pose changes are used as self-motion annotation information. This motion annotation information can be derived from the pre-acquired true pose values in the training scene, or it can be obtained through binocular vision estimation, reprojection consistency verification, or training data review to obtain pseudo-true values of self-motion, which are used to supervise the visual self-motion compensation model in learning the head self-motion patterns in consecutive binocular images. For candidate points in the binocular training samples, the corresponding motion category can be determined by combining the motion residual of the candidate point, its location, and the motion situation in consecutive image frames. For scene candidate points that produce a consistent overall positional change with head movement, they are labeled as stable scene points; for candidate points located in the opponent region and having independent motion characteristics, they are labeled as opponent movement points, thus forming motion classification annotation information. Motion classification annotation information can be generated manually, through rule generation, or by weak labels generated based on self-motion estimation results. Through self-motion annotation information and motion classification annotation information, training constraints can be applied to the self-motion information output by the pose regression network and the candidate point classification results output by the motion classification network, respectively.
[0047] 403. Input the binocular training samples into the visual self-motion compensation model, and determine the joint training loss based on the self-motion information output by the visual self-motion compensation model, the candidate point classification results, and the stable coordinate transformation results. Adjust the network parameters of the visual self-motion compensation model based on the joint training loss. The joint training loss includes the self-motion reprojection loss used to constrain the consistency between the self-motion information and the pose changes corresponding to the binocular training samples, the background consistency loss used to constrain the consistency between the stable scene points and the self-motion information, and the target motion continuity loss used to constrain the temporal continuity of the opponent's motion points.
[0048] Specifically, the binocular training samples obtained in step 401 are input into the visual self-motion compensation model. The self-motion estimation module outputs the corresponding self-motion information, and the motion classification module outputs the candidate point classification results. Based on the self-motion information determined by the model, coordinate transformation is performed on the relevant 3D visual information to obtain the corresponding stable coordinate transformation results. A joint training loss is constructed based on the difference between the above network output and the annotation information obtained in step 402, and the network parameters in the visual self-motion compensation model are updated using the joint training loss, so that the neural network can simultaneously learn the correlation between head self-motion, stable scene points, and hand movement points.
[0049] The self-motion reprojection loss is used to constrain the self-motion information output by the pose regression network. For scene points involved in self-motion estimation, the 3D position of the scene point at the reference acquisition time can be transformed and projected onto the current image plane based on the rotation and translation changes output by the model. The resulting predicted 2D position is then compared with the actual 2D observation position at the current acquisition time. When the self-motion information determined by the model is closer to the actual pose changes of the head, the deviation between the predicted 2D position after transformation by this self-motion information and the actual 2D observation position is reduced accordingly. Therefore, the self-motion reprojection loss can limit the deviation of the self-motion information output by the model from the actual pose changes corresponding to the binocular training samples.
[0050] Background consistency loss is used to further constrain the consistency between the stable scene points determined by the motion classification network and the self-motion information output by the pose regression network. For stable scene points, their position changes in continuous images should be mainly caused by head self-motion. Therefore, the predicted position changes that stable scene points should produce between adjacent acquisition times can be determined based on the self-motion information output by the model, and the background consistency loss can be determined based on the difference between the predicted position changes and the actual position changes of the stable scene point. When the model incorrectly uses candidate points with independent motion as stable scene points in self-motion estimation, the actual motion of the candidate point is usually difficult to keep in line with the head self-motion, resulting in a large background consistency loss. By constraining the model with this loss, the self-motion estimation can be made to rely more on candidate points consistent with the overall rigid body motion of the scene, reducing the impact of local independent motion on the self-motion estimation results.
[0051] The target motion continuity loss is used to constrain the temporal relationship between the opponent's motion points determined by the motion classification network and the actual movement of the opponent at consecutive acquisition times. For opponent motion points belonging to the same opponent's body part, their position changes in consecutive images usually have a continuous motion trend. Therefore, the target motion continuity loss can be determined based on the position changes of the opponent's motion points at multiple consecutive acquisition times. When the candidate point classification results output by the model cause the motion points corresponding to the same opponent's body part to undergo abnormal jumps, erroneous disappearances, or be incorrectly absorbed into stable scene points at adjacent times, the target motion continuity loss increases accordingly, thereby prompting the model to retain temporal information that reflects the opponent's true movement.
[0052] In some implementations, the joint training loss may also include an epipolar consistency loss to constrain the correspondence between the left and right eyes to meet binocular geometric constraints, and a punch smoothing loss to limit abnormal jumps in the punch trajectory at consecutive time points.
[0053] In dynamic combat scenarios such as robot boxing, the opponent's fist may undergo significant positional changes within a short period. If the candidate points for self-motion estimation include many high-speed fist movements, the model may mistakenly attribute some fist movements to head movements, thus affecting the determination of self-motion information. By introducing background consistency loss, the consistency constraint between the actual motion of stable scene points and head self-motion can be enhanced, allowing self-motion estimation to rely more on candidate points that conform to the overall motion patterns of the scene. By introducing target motion continuity loss, opponent movement points with continuous independent motion characteristics can maintain their corresponding motion categories, reducing the possibility of the opponent's actual motion being incorrectly classified into stable scene motion. For high-speed fist candidate points, the weight of their corresponding samples in the self-motion reprojection loss can be reduced during training, minimizing the impact of high-speed fist movements on the pose regression network training process, thereby improving the consistency between the self-motion information output by the pose regression network and the actual head pose changes.
[0054] Based on the aforementioned self-motion reprojection loss, background consistency loss, and target motion continuity loss, a joint training loss is determined. The network parameters in the visual self-motion compensation model are then adjusted based on this joint training loss until the neural network meets the preset training termination condition, resulting in a fully trained visual self-motion compensation model. By jointly constraining the self-motion estimation results, stable scene points, and opponent motion points, the trained model can maintain consistency between the self-motion estimation results and stable scene motion even when head and opponent motions coexist. It also preserves the independent motion of opponent body parts relative to the scene, providing a model foundation for self-motion compensation and opponent motion separation during the deployment phase.
[0055] In some embodiments, before determining self-motion information based on the visual self-motion compensation model, the method further includes: in the initial running phase of the visual self-motion compensation model, determining initial background candidate points based on consecutive binocular images; wherein the initial background candidate points are determined by masking the hand detection region and robot limb region in the consecutive binocular images, and based on the disparity consistency, depth rationality, and consecutive frame motion consistency in the remaining regions; determining initial self-motion information based on the initial background candidate points, and determining predicted motion information of the candidate points based on the initial self-motion information; updating the initial background candidate points based on the difference between the predicted motion information and the actual motion information of the candidate points, and re-determining the self-motion information based on the updated initial background candidate points, so as to iteratively optimize the self-motion information.
[0056] In this embodiment, considering that reliable self-motion information has not yet been obtained when the visual self-motion compensation model first starts running, and that accurate determination of self-motion information requires the use of background points that remain relatively stable relative to the scene, if many hand movement points or visual points corresponding to the robot's own limbs are mixed in with the initial candidate points for self-motion estimation, these local independent movements are easily included in the estimation results of head self-motion. Therefore, in the initial running phase, a set of highly reliable initial background candidate points can be determined from continuous binocular images, and then the initial self-motion information can be obtained using the initial background candidate points. After obtaining the initial self-motion information, the background candidate points are further updated.
[0057] In practice, the opponent detection region in consecutive binocular images is first determined based on the opponent detection results, and the robot limb region is determined based on the image region corresponding to the robot's own limbs. These regions are then masked to reduce the impact of opponent body movement and robot limb movement on the initial background point selection. Subsequently, candidate points that can establish a correspondence between consecutive image frames are extracted from the remaining image regions. These candidate points are then filtered based on binocular disparity, depth, and consecutive frame motion states. Specifically, disparity consistency is used to determine whether the correspondence of the same candidate point in the left and right eye images satisfies binocular imaging constraints. Depth reasonableness is used to exclude candidate points with significantly abnormal depth due to incorrect matching, occlusion, or disparity anomalies. Consecutive frame motion consistency is used to determine whether the motion of candidate points at multiple consecutive acquisition times remains approximately consistent with the overall scene motion. For example, in N consecutive frames, it can be determined whether the trajectory of candidate points satisfies an approximate global rigid body motion relationship, and candidate points that meet these conditions are used as initial background candidate points. In another implementation, a rigid body random sampling consistency screening can be performed on the candidate points in the remaining region, and the set of high interior points that can jointly satisfy the same rigid body transformation relationship can be determined as the initial background candidate points.
[0058] After obtaining the initial background candidate points, the self-motion estimation module 301 determines the initial self-motion information of the head between adjacent acquisition times based on the three-dimensional position of the initial background candidate points and the corresponding image observations, according to the aforementioned self-motion estimation method. The initial self-motion information may include initial rotational changes and initial translational changes, used to form the self-motion estimation results in the early stage of model operation. Further, the motion prediction unit 3021 determines the predicted motion information corresponding to each candidate point when it is only affected by the head self-motion based on the initial self-motion information, and compares the predicted motion information with the actual motion information of the candidate points in consecutive image frames. When the difference between the actual motion information and the predicted motion information of an initial background candidate point is small, it indicates that the motion of the candidate point can be well explained by the current self-motion information, and it can continue to be retained as a background candidate point; when the difference between the two is large, it indicates that the candidate point may have independent motion, mismatch, or other abnormalities, and its credibility as a background candidate point can be reduced or it can be removed from the background candidate point set. At the same time, candidate points that were not previously selected into the initial background candidate point set but whose motion has a high consistency with the current self-motion information can be added to the updated background candidate point set. After obtaining the updated background candidate points, the self-motion estimation module 301 determines new self-motion information based on the updated background candidate points; the motion classification module 302 then redetermines the predicted motion information of the candidate points based on the new self-motion information, and continues to update the background candidate points accordingly. The background candidate point update and self-motion information redetermining are performed alternately in the above manner until a preset number of iterations is reached, the change between two adjacent self-motion information is less than a preset threshold, or the background candidate point set tends to stabilize, thereby obtaining the self-motion information for subsequent processing.
[0059] Through the above initialization and alternating optimization process, a relatively reliable starting point for self-motion estimation can be obtained by first using visual region masking and binocular geometric and continuous motion constraints. Then, the initial self-motion information is used to back-test and update the background candidate points, so that the selection results of the background candidate points and the head self-motion estimation results are gradually mutually corrected, reducing the impact of the initial background point selection error on the self-motion estimation results.
[0060] In some embodiments, please refer to Figure 3 Before determining the self-motion information corresponding to the head by the self-motion estimation module in the visual self-motion compensation model, the method further includes: extracting spatial structure features based on three-dimensional visual information by the feature encoding module 304 in the visual self-motion compensation model, and determining temporal change features based on the three-dimensional visual information corresponding to multiple consecutive time points; performing feature fusion based on spatial structure features and temporal change features to obtain visual motion features; and inputting the visual motion features into the self-motion estimation module 301 so that the self-motion estimation module 301 determines the self-motion information based on the visual motion features.
[0061] In this embodiment, the feature encoding module 304 is positioned before the self-motion estimation module 301 to convert the acquired 3D visual information into visual motion features suitable for self-motion estimation. Since head self-motion causes changes in both the 3D spatial relationships of the scene and the position of visual objects at consecutive moments, the feature encoding module 304 needs to extract information related to head motion from both spatial structure and temporal variation perspectives. Spatial structure features reflect the spatial relationships contained in the 3D visual information at a single acquisition moment and can be determined based on the 3D position, depth, and relative positional relationships between different visual points. For example, for visual points with binocular correspondence, the spatial distribution of the scene in the current head coordinate system can be obtained based on their 3D coordinates and depth, enabling subsequent self-motion estimation to analyze the rotation and translation of the head using the 3D geometry of the scene. Temporal variation features reflect the changes in 3D visual information over multiple consecutive acquisition moments. The feature encoding module 304 can extract information such as the direction of motion, the amount of position change, and the continuous motion trend based on the 3D position changes of corresponding visual points at consecutive moments. Therefore, the spatial position changes of the same visual object due to head movement at consecutive moments can be encoded into temporal change features, providing a basis for judging the overall movement trend of the scene.
[0062] After obtaining spatial structure features and temporal change features, the feature encoding module 304 fuses the two features, so that the resulting visual motion features simultaneously include the three-dimensional spatial structure of the current scene and the changes of that spatial structure over time. Feature fusion can be accomplished through feature concatenation, weighted fusion, or a feature fusion layer in a neural network; the specific implementation method is not limited. Subsequently, the visual motion features are input into the self-motion estimation module 301. The self-motion estimation module 301 determines the rotation and translation changes of the head between adjacent acquisition times based on the spatial relationships and continuous changes of multiple visual points in the visual motion features, thereby obtaining the corresponding self-motion information. In the corresponding implementation, the self-motion estimation module 301 uses a learned pose regression method to determine the self-motion information. The self-motion estimation module 301 may include a trained pose regression network, which inputs the visual motion features output by the feature encoding module 304 into the pose regression network. The pose regression network outputs the rotation and translation change information of the head between adjacent acquisition times based on the spatial structure relationships and continuous temporal changes contained in the visual motion features, and determines the corresponding self-motion information accordingly. The model parameters of this pose regression network can be determined during the training process of the aforementioned visual self-motion compensation model. During model deployment and operation, the pose regression network performs forward computation based on the currently obtained visual motion features to continuously determine the self-motion information corresponding to the head.
[0063] By jointly encoding the spatial structural features and temporal change features of the 3D visual information before self-motion estimation, the self-motion estimation module can simultaneously utilize the 3D geometric relationships and continuous motion changes of the scene. This reduces the possibility of being affected by local position changes when determining head motion based solely on the spatial position at a single moment, and provides more sufficient visual motion information for subsequent determination of head self-motion information.
[0064] In some embodiments, please refer to Figure 5 A short-time stable adversarial coordinate system is established based on self-motion information and the three-dimensional position information of the opponent's movement points, including: 501. Determine the center position of the opponent's torso based on the three-dimensional position information corresponding to the opponent's movement point at the reference time, and set the center position of the opponent's torso as the origin of the short-term stable confrontation coordinate system.
[0065] In this embodiment, the reference time is used to establish a unified spatial reference for a continuous confrontation process. Since the opponent's torso has better spatial stability compared to high-speed moving parts such as the fist, the center position of the opponent's torso can be determined based on the three-dimensional position information of multiple opponent movement points belonging to the opponent's torso region at the reference time, and this center position is used as the origin of the short-term stable confrontation coordinate system. The center position of the opponent's torso can be determined based on the three-dimensional positions of key points on the opponent's torso, for example, based on multiple three-dimensional key points near the shoulder, chest, or hip. By using the center of the opponent's torso as the coordinate origin, the positions of subsequent target parts such as the opponent's fist and upper limbs can be described relative to the opponent's main body. When the reference time cannot obtain an opponent's torso center position that meets the preset information conditions, the most recent opponent's torso center position that meets the preset information conditions before the reference time can be obtained, and the opponent's torso center position corresponding to the reference time can be determined based on the self-motion information between this position and the corresponding time to the reference time.
[0066] 502. Determine the vertical direction of the short-term stable adversarial coordinate system based on the orientation of the field, and determine the forward direction of the short-term stable adversarial coordinate system based on the projection of the opponent's direction toward the robot onto the horizontal plane.
[0067] Specifically, the vertical direction of the short-term stable adversarial coordinate system can be determined based on the horizontal plane of the playing field. For example, the direction perpendicular to the horizontal plane of the playing field can be defined as the vertical direction. The horizontal plane of the playing field can be determined based on the ground area from binocular visual information or on the field information obtained before the robot operates. Using the field direction to determine the vertical direction can reduce the influence of head pitch or tilt on the vertical direction of the coordinate system. Furthermore, the direction of the opponent toward the robot can be determined based on the opponent's torso posture at the reference time. Since this direction may contain upward or downward components, the direction of the opponent toward the robot is projected onto the horizontal plane corresponding to the playing field, and the resulting direction is determined as the forward direction of the short-term stable adversarial coordinate system. Thus, the forward direction mainly reflects the relative orientation between the opponent and the robot in the horizontal plane, reducing the influence of the opponent's tilting or backward posture changes on the determination of the forward direction.
[0068] 503. Determine the lateral direction of the short-time stable countermeasure coordinate system based on the vertical and forward directions to construct the short-time stable countermeasure coordinate system.
[0069] After determining the vertical and forward directions, a direction perpendicular to both directions is determined, and this direction is designated as the lateral direction according to a preset coordinate axis direction rule. For example, the forward direction can be used as the first coordinate axis direction of the short-term stable adversarial coordinate system, the lateral direction as the second coordinate axis direction, and the vertical direction as the third coordinate axis direction, making the three coordinate axis directions mutually perpendicular. Combined with the opponent's torso center position determined in step 501, the short-term stable adversarial coordinate system can be obtained.
[0070] This short-time stable adversarial coordinate system uses the opponent's torso center at the reference moment as the position reference, the playing field to determine the vertical direction, and the relative orientation between the opponent and the robot to determine the front-back direction. Therefore, when the head rotates, pitches, or translates, the self-motion information of the head can be combined to transform the opponent's movement points acquired at different times into the same short-time stable adversarial coordinate system. This allows for comparison of the positional changes of the opponent's target body at consecutive moments under the same spatial reference, thereby reducing the impact of coordinate changes caused by head movement on the determination of the opponent's trajectory.
[0071] In some embodiments, please refer to Figure 6 Transforming the opponent's movement point into a short-term stable adversarial coordinate system, including: 601. Determine the coordinate transformation relationship between the head coordinate system corresponding to the reference time and the current head coordinate system based on the self-motion information.
[0072] In this embodiment, the reference time is used to determine the spatial reference corresponding to the short-term stable adversarial coordinate system. The head may continuously rotate or translate after the reference time. Therefore, with the acquisition of continuous binocular images, the pose changes of the head can be accumulated sequentially based on the self-motion information between adjacent acquisition times, thereby determining the coordinate transformation relationship between the head coordinate system corresponding to the reference time and the current head coordinate system. For example, when the head sequentially experiences multiple acquisition times starting from the reference time, the rotation and translation changes corresponding to each adjacent acquisition time can be accumulated in chronological order to obtain the cumulative pose change of the head from the reference time to the current time. The coordinate transformation relationship describes the position and orientation correspondence between the head coordinate system corresponding to the reference time and the current head coordinate system after this accumulated pose change.
[0073] The reference time can correspond to the reference frame selected when establishing the short-time stable adversarial coordinate system. In one implementation, an image frame with good background point matching, low reprojection error, and the ability to obtain the opponent's torso position can be selected from a sliding window before the current time as the reference frame, and the acquisition time corresponding to this reference frame is determined as the reference time.
[0074] 602. Based on the coordinate transformation relationship, perform an inverse transformation on the opponent's movement point in the current head coordinate system to obtain the opponent's movement point in the short-term stable confrontation coordinate system.
[0075] The coordinate transformation relationship obtained in step 601 describes the coordinate changes caused by the head's movement from the reference time to the current time. The currently obtained opponent's movement point is determined with reference to the current head coordinate system. To enable comparison between the currently obtained opponent's movement point and the opponent's movement point at the reference time in the same spatial reference, the position of the current opponent's movement point needs to be transformed in the opposite direction of the coordinate transformation relationship, i.e., eliminating the coordinate changes caused by the head's own movement during the period from the reference time to the current time. For example, when the head turns to the left after the reference time, even if the opponent's position in actual space remains unchanged, the position of the opponent's movement point in the current head coordinate system will change with the head's rotation. Reverse compensation based on the cumulative rotational changes of the head during this period can reduce the positional changes caused by the head rotation. For cases where the head translates, corresponding reverse compensation can also be performed based on the cumulative translational changes.
[0076] After the aforementioned inverse transformation, the position of the current opponent's movement point relative to the reference time spatial reference can be obtained, and further represented as the opponent's movement point in a short-time stable adversarial coordinate system. Thus, opponent movement points acquired at different acquisition times can all be transformed to the same short-time spatial reference, allowing changes in the opponent's position over consecutive moments to better reflect the opponent's own movement.
[0077] 603. When the cumulative drift corresponding to the short-term stable counter-coordinate system exceeds the preset drift threshold, the reference time is redefined, and the coordinate transformation relationship is updated according to the redefined reference time.
[0078] Since the coordinate transformation relationship between the reference time and the current time is gradually accumulated from the self-motion information corresponding to multiple acquisition times, the errors in each self-motion estimation may also accumulate over time. When the reference time is used continuously for a long time, or when the head undergoes large-amplitude and complex continuous movements, the accumulated coordinate transformation relationship may gradually deviate from the actual spatial relationship, thus producing a cumulative drift. This cumulative drift is used to represent the cumulative deviation of the current short-time stable adversarial coordinate system relative to the actual stable spatial reference. The cumulative drift can be determined by combining information such as the spatial consistency or reprojection error of the stable scene point after coordinate transformation. For example, when the stable scene point is transformed according to the current cumulative coordinate transformation relationship, and the deviation between its position and the expected position continues to increase, it can be considered that the cumulative drift of the short-time stable adversarial coordinate system increases accordingly.
[0079] When the cumulative drift exceeds a preset drift threshold, it indicates that continuing to use the original reference time may cause significant cumulative errors in the coordinate transformation of subsequent opponent movement points. In this case, a new reference frame is selected, and the corresponding time of the newly selected frame is determined as the new reference time. Subsequently, the head's self-motion information is re-accumulated starting from the new reference time to establish a new coordinate transformation relationship for subsequent opponent movement point coordinate transformations. When re-determining the reference time, the most recent image frame with stable background scene point matching, low reprojection error, and reliably determined opponent torso position can be prioritized. After the reference time is switched, the coordinate transformation results before and after the switch can be smoothly connected to reduce abrupt changes in opponent movement point positions caused by reference time updates. Besides the cumulative drift exceeding the preset drift threshold, the reference time can also be re-determined when the number of background scene points or the proportion of interior points used to maintain a short-term stable adversarial coordinate system is lower than preset conditions, or when the reprojection error exceeds a preset error threshold.
[0080] Through the above processing, continuous self-motion information can be used to continuously compensate for the head's own pose changes after the reference time. At the same time, the reference time can be updated in a timely manner when the accumulated error increases, so that the short-term stable adversarial coordinate system can maintain usable spatial consistency during continuous adversarial process, thereby reducing the impact of long-term accumulated self-motion error on the determination of the opponent's movement trajectory.
[0081] In some embodiments, please refer to Figure 7 Based on the opponent's status information, attack risk information is determined, including: 701. Obtain the impact protection area corresponding to the robot. The impact protection area includes the head area of the robot.
[0082] In this embodiment, the strike protection area represents the spatial region that the robot needs to avoid being attacked by the opponent during combat. The strike protection area includes at least the robot's head region and can be established according to the robot's actual structural dimensions in a corresponding three-dimensional spatial envelope. For example, the three-dimensional envelope area covering the head can be determined based on the outer contour dimensions of the head, so that the outer surface of this envelope area corresponds to the actual location on the head that may be attacked. When it is necessary to expand the protection range, the strike protection area can further cover the core area of the robot's neck or upper torso. The position of the strike protection area is updated synchronously with the robot's own movement and transformed to a short-time stable adversarial coordinate system, so that the position of the strike protection area and the opponent's target part can be compared under the same spatial reference.
[0083] 702. Based on the position of the opponent's target part and the positional relationship of the protected area under the short-term stable confrontation coordinate system, determine the shortest spatial distance between the opponent's target part and the protected area, and define the shortest spatial distance as the risk distance.
[0084] Based on the three-dimensional position of the opponent's target in the short-time stable confrontation coordinate system, the position with the shortest distance between the opponent's target and the outer surface of the protected area is determined, and the spatial distance between the two is calculated. The shortest spatial distance obtained is taken as the risk distance, i.e. .in, Indicates risk distance, This indicates the position of the opponent's fist in a short-term stable combat coordinate system. This indicates the robot's protected area against impact. It represents the shortest spatial distance from a point to the surface of the region.
[0085] Taking a robot boxing scenario as an example, the opponent's target area can be their fist. In this case, the risk distance represents the shortest distance between the opponent's fist and the surface of the robot's protected area. When the opponent's fist is in front of the head, the nearest surface can be found from the fist's position to the corresponding three-dimensional envelope surface of the head, and the distance between the fist's position and that surface position is used as the risk distance. Therefore, the risk distance directly reflects how far the opponent's fist is from the robot's actual potential point of impact. It should be noted that the risk distance is different from the distance between the robot and the opponent as a whole. For example, if both parties' torso positions remain basically unchanged, a rapid extension of the opponent's arm to throw a punch will rapidly reduce the distance between the fist and the head, while the change in the distance between the centers of both parties' torsos may be relatively small. Therefore, determining the risk distance by the shortest spatial distance from the opponent's target area to the surface of the protected area can more directly reflect the spatial proximity of the attacking part to pose a contact threat to the robot.
[0086] 703. Determine attack risk information based on the risk distance and the movement trajectory of the opponent's target part.
[0087] Considering that the risk distance at a single moment is insufficient to fully determine whether an effective attack is being launched, after determining the risk distance, the movement trajectory of the target part obtained in step 205 is further combined to determine the movement direction and approach trend of the target part relative to the protected area. Specifically, the change of the risk distance over time can be determined based on the target part's position at multiple consecutive acquisition moments. When the risk distance continuously decreases and the target part's movement direction points towards the protected area, it can be determined that the target part is approaching the robot's hit position; when the risk distance remains stable or gradually increases, it indicates that the target part is not continuously approaching the protected area. Furthermore, attack risk information, including the risk distance and estimated hit time, can be determined based on the movement speed, movement direction, and current risk distance reflected in the target part's movement trajectory. The estimated hit time represents the estimated time required for the target part to reach the protected area if the current movement trend continues. The smaller the risk distance and the faster the target part approaches the protected area, the higher the urgency of the attack. By combining the risk distance with the continuous movement trajectory of the opponent's target part, the spatial distance between the attacking part and the robot's hit position can be considered simultaneously, as well as whether the attacking part is continuously approaching, thus providing a basis for the robot to choose the timing of defense and offensive and defensive actions.
[0088] In some embodiments, determining attack risk information based on risk distance and the movement trajectory of the opponent's target part includes: determining the movement speed of the opponent's target part based on the positional changes of the opponent's target part at multiple consecutive moments; determining the approach direction of the opponent's target part based on the positional relationship between the position of the opponent's target part and the protected area, and determining the effective approach speed based on the velocity component of the target part's movement speed in the approach direction of the target part; and determining the estimated hit time based on the risk distance and the effective approach speed.
[0089] Specifically, the trajectory of the opponent's target body includes the corresponding positions of the opponent's target body at multiple consecutive acquisition moments. Since the opponent's target body at each acquisition moment has been transformed into a short-time stable adversarial coordinate system, the movement speed of the opponent's target body can be determined based on the positional changes and corresponding time intervals between adjacent acquisition moments. For example, the trajectory difference can be performed based on the current moment and the positions of one or more opponent's target bodies before the current moment to obtain the corresponding movement speed. When it is necessary to reduce the impact of single-frame positional errors, filtering can also be performed on the movement trajectories at multiple consecutive moments, or linear fitting or constant acceleration fitting can be performed on the short-time movement trajectory to determine the current movement speed of the opponent's target body. Furthermore, based on the position of the opponent's target body at the current moment and the position of the impact protection area, the position closest to the opponent's target body on the surface of the impact protection area is determined, and this position is determined as the nearest impact point. Taking the opponent's target body as the fist as an example, the nearest impact point is the point with the smallest spatial distance from the current fist position on the surface of the head or other impact protection area.
[0090] Record the current position of the opponent's target area as X. fist Record the location of the most recent hit point as X. hit Then, based on the positional relationship between the two, the relative position vector r from the opponent's target part to the nearest point of impact can be determined, r = X hit X fist The direction of the relative position vector r indicates the approach direction of the opponent's target area from its current position towards the protected area. The length of the relative position vector r represents the spatial distance between the current position of the opponent's target area and the nearest point of impact. When the nearest point of impact is determined according to the aforementioned shortest distance method, this spatial distance is the risk distance determined in step 702, i.e. =||r||, where ||r|| represents the length of the relative position vector r.
[0091] After determining the approach direction, the effective approach speed is determined based on the velocity component of the opponent's target body part in the approach direction. The velocity of the opponent's target body part is denoted as v. fist Then the effective approach velocity v close It can be represented as: ; in, This represents the unit vector corresponding to the direction of approach. ; This represents the velocity component of the opponent's target area in the approach direction. When the velocity component is greater than 0, it indicates that the opponent's target area is approaching the protected area; when the velocity component is less than or equal to 0, the effective approach speed is defined as 0. For example, although the risk distance between the opponent's fist and the head is small, when the fist is retracting, its velocity component in the approach direction is negative, so the effective approach speed is 0; when the fist moves rapidly towards the head, its velocity component in the approach direction is a large positive value, resulting in a larger effective approach speed. Therefore, it is possible to distinguish between a fist that is close but moving away and a fist that is rapidly approaching the protected area.
[0092] Furthermore, the estimated time to hit (TTC) is determined based on the risk distance and effective approach speed. The estimated time to hit (TTC) can be expressed as: ; in, Indicates the risk distance; Indicates the effective approach speed; Indicates the preset lower speed limit; This indicates that the larger value between the effective approach speed and the preset lower speed limit is used. Preset lower speed limit This is primarily used to avoid division by zero or obtaining abnormal calculation results when the effective approach speed is close to 0. When the effective approach speed is high, the estimated hit time is mainly obtained by dividing the current risk distance by the effective approach speed. At the same risk distance, the higher the effective approach speed, the shorter the estimated hit time; at the same effective approach speed, the smaller the risk distance, the shorter the estimated hit time. Therefore, the estimated hit time reflects the remaining time for the opponent's target to reach the protected area as it continues to approach according to its current movement trend.
[0093] In some embodiments, after determining the attack risk information, the method further includes: determining the state confidence of the opponent's state information based on the number of stable scene points, the classification results of the opponent's movement points, and the continuity of the movement trajectory of the opponent's target part; determining whether the state confidence meets the preset confidence conditions; when the state confidence meets the preset confidence conditions, outputting the attack risk information including the risk distance and the expected hit time; when the state confidence does not meet the preset confidence conditions, marking the expected hit time as low confidence, or stopping the output of the expected hit time and outputting low confidence state information.
[0094] In this embodiment, the state confidence level is used to indicate whether the currently obtained opponent state information is sufficient to support the attack risk assessment. Since the estimated hit time depends on the position of the opponent's target part after self-motion compensation and its continuous movement trajectory, when the self-motion estimation is unstable, the opponent's movement point is misclassified, or the target part is occluded, resulting in a discontinuous movement trajectory, even if the estimated hit time can still be calculated, the result may have significant uncertainty. Therefore, after obtaining the risk distance and the estimated hit time, the state confidence level of the current opponent state information can be further determined.
[0095] Specifically, the first confidence information corresponding to the self-motion information can be determined based on the number of stable scene points. Stable scene points provide scene reference for head self-motion estimation. When there are a large number of stable scene points in the current continuous binocular images that can stably participate in self-motion estimation, the head pose change has sufficient visual reference, and the self-motion compensation result usually has high confidence. When the number of stable scene points decreases significantly, for example, due to large-area occlusion, rapid head movement, or image blurring leading to insufficient usable background points, the confidence of the self-motion information and subsequent coordinate transformation results decreases accordingly. The second confidence information is determined based on the classification result of the opponent's motion points. The second confidence information can reflect whether candidate points belonging to the opponent's body region are continuously and stably classified as opponent motion points. For example, when there are a sufficient number of opponent motion points near the opponent's torso, upper limbs, or fist, and the classification results of the corresponding motion points at adjacent acquisition times maintain a high degree of consistency, the classification result of the opponent motion points can be determined to have high confidence. When a large number of candidate points frequently switch between stable scene points and opponent motion points, or when there is a lack of effective opponent motion points near the opponent's target area, the confidence of this part is reduced accordingly. The third confidence information can also be determined based on the continuity of the movement trajectory of the opponent's target body part. Movement trajectory continuity reflects whether the position of the same opponent's target body part can remain stably correlated across multiple consecutive acquisition times. For example, trajectory continuity can be judged based on whether there are abnormal jumps between the target body part positions at adjacent times, whether the target body part is continuously detected, and whether the changes in the direction of the continuous trajectory are within a reasonable range. When the opponent's fist can be stably tracked across multiple consecutive times, and its position changes form a continuous movement trajectory, a high trajectory continuity can be determined; when the fist is obstructed, tracking is lost, or the position changes significantly after re-detection, the corresponding trajectory continuity is reduced.
[0096] Based on the number of stable scene points, the classification results of opponent motion points, and the continuity of the target body's trajectory, the state confidence level can be comprehensively determined. A higher state confidence level indicates a more reliable overall processing result from head self-motion compensation and opponent motion point separation to continuous tracking of the target body. The specific method for determining the state confidence level can be based on combining the confidence results corresponding to the above information, or determining different confidence levels according to preset rules; this embodiment does not specifically limit this. After determining the state confidence level, it is compared with preset confidence conditions. Preset confidence conditions may include a state confidence level greater than or equal to a preset confidence threshold, or the number of stable scene points, the confidence level of opponent motion point classification, and the continuity of the target body's trajectory meeting corresponding conditions.
[0097] When the state confidence level meets the preset confidence level conditions, it indicates that the current opponent's state information is highly reliable, and attack risk information, including risk distance and estimated hit time, can be output normally. The risk distance reflects the current spatial distance between the opponent's target area and the robot's protected area, while the estimated hit time reflects the estimated time required for the opponent's target area to reach the protected area if the robot continues moving according to the current trend. When the state confidence level does not meet the preset confidence level conditions, it indicates that the current visual information is insufficient to reliably predict the movement trend of the opponent's target area. In this case, the estimated hit time can be marked as low confidence, reducing its priority in subsequent attack and defense control, and low-confidence state information can be output simultaneously. If the trajectory continuity is significantly insufficient or the effective approach speed is difficult to reliably determine, the specific estimated hit time value can be temporarily withheld, retaining only the risk distance and low-confidence state information. For example, when the opponent's fist is briefly obstructed, the robot can still obtain the current risk distance based on the spatial position before and after the obstruction, but due to the interruption of the continuous movement trajectory, the movement speed calculated from the trajectory may have a large error. At this point, by reducing the reliability of the output of the estimated hit time, we can prevent the robot from triggering premature or incorrect offensive and defensive actions based on unreliable estimated hit times, while still retaining the risk distance to reflect the current spatial risk status of the opponent's target area.
[0098] By assessing the confidence level of attack risk information based on stable scene points, opponent movement point classification results, and target trajectory continuity, the system can simultaneously provide risk distance and estimated hit time when visual tracking is reliable, and reduce reliance on motion trend prediction results when the visual state is unstable. This reduces the impact of self-motion estimation errors, target classification errors, or short-term occlusion on the robot's attack and defense control results.
[0099] This application also relates to a storage medium on which a program is stored, which, when run on a computer, causes the computer to execute any of the above-mentioned deep learning-based methods for robot binocular vision self-motion compensation.
[0100] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0101] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0102] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0103] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0104] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for self-motion compensation in robot binocular vision based on deep learning, characterized in that, The method is applied to a robot, the robot including a binocular vision device disposed on its head, the method comprising: Acquire continuous binocular images captured by the binocular vision device, and determine three-dimensional visual information based on the continuous binocular images and binocular positioning parameters; The three-dimensional visual information is input into a pre-trained visual self-motion compensation model. The self-motion information corresponding to the head is determined based on the self-motion estimation module in the visual self-motion compensation model. The self-motion information is used to represent the pose change of the head during the continuous acquisition of the continuous binocular images. Based on the motion classification module in the visual self-motion compensation model, the predicted motion information of candidate points in the continuous binocular images is determined according to the self-motion information, and the candidate points are classified according to the difference between the predicted motion information and the actual motion information of the candidate points to obtain stable scene points and opponent motion points. Based on the coordinate transformation module in the visual self-motion compensation model, the coordinate transformation relationship is determined according to the self-motion information and the three-dimensional position information of the opponent's movement point, and a short-time stable adversarial coordinate system is established according to the coordinate transformation relationship. The opponent's movement point is transformed into the short-time stable adversarial coordinate system to obtain the opponent's state information under the short-time stable adversarial coordinate system. The movement trajectory of the target part of the opponent and the attack risk information are determined based on the opponent's status information. The attack risk information includes the risk distance and the estimated hit time. The attack risk information is used to control the robot to perform corresponding offensive and defensive actions.
2. The method according to claim 1, characterized in that, The motion classification module includes a motion prediction unit and a motion discrimination unit; The motion prediction unit is used to determine the predicted motion information of the candidate point in the continuous binocular images based on the self-motion information; The motion discrimination unit is used to obtain the actual motion information of the candidate point in consecutive image frames, and to determine the classification result of the candidate point based on the motion residual between the predicted motion information and the actual motion information, the depth change information of the candidate point, and the spatial position relationship of the candidate point. Specifically, when the motion residual of the candidate point is less than a preset background threshold, the depth change information satisfies rigid body motion constraints, and the spatial position relationship satisfies scene point distribution conditions, the candidate point is determined as the stable scene point; when the motion residual of the candidate point is greater than a preset motion threshold, the spatial position relationship is located in the opponent detection area, and the candidate point satisfies the target continuous motion condition, the candidate point is determined as the opponent movement point.
3. The method according to claim 1, characterized in that, The visual self-motion compensation model is based on a neural network and is trained in the following way: Acquire binocular training samples that include head movement state and hand movement state. The binocular training samples include continuous binocular images collected when the robot performs head-down movement, side-to-side movement, backward movement, approach movement, and head-shaking movement. Based on the binocular training samples, self-motion annotation information and motion classification annotation information are determined. The self-motion annotation information is used to represent the pose changes corresponding to the head movement process, and the motion classification annotation information is used to indicate whether the candidate point belongs to a stable scene point or an opponent movement point. The binocular training samples are input into the visual self-motion compensation model, and the joint training loss is determined based on the self-motion information, candidate point classification results and stable coordinate transformation results output by the visual self-motion compensation model. The network parameters of the visual self-motion compensation model are adjusted based on the joint training loss. The joint training loss includes a self-motion reprojection loss for constraining the consistency between the self-motion information and the pose changes corresponding to the binocular training samples, a background consistency loss for constraining the consistency between the stable scene points and the self-motion information, and a target motion continuity loss for constraining the temporal continuity of the opponent's motion points.
4. The method according to claim 1, characterized in that, Before determining the self-motion information based on the visual self-motion compensation model, the method further includes: In the initial running phase of the visual self-motion compensation model, initial background candidate points are determined based on the continuous binocular images; wherein, the initial background candidate points are determined by masking the hand detection area and the robot limb area in the continuous binocular images, and based on the disparity consistency, depth rationality and continuous frame motion consistency in the remaining areas. Initial self-motion information is determined based on the initial background candidate points, and predicted motion information of the candidate points is determined based on the initial self-motion information; The initial background candidate points are updated based on the difference between the predicted motion information and the actual motion information of the candidate points, and the self-motion information is re-determined based on the updated initial background candidate points to iteratively optimize the self-motion information.
5. The method according to claim 1, characterized in that, Before determining the self-motion information corresponding to the head based on the self-motion estimation module in the visual self-motion compensation model, the method further includes: Based on the feature encoding module in the visual self-motion compensation model, spatial structure features are extracted according to the three-dimensional visual information, and temporal change features are determined according to the three-dimensional visual information corresponding to multiple consecutive time points. Visual motion features are obtained by fusing the spatial structure features and the temporal change features. The visual motion features are input into the self-motion estimation module so that the self-motion estimation module can determine the self-motion information based on the visual motion features.
6. The method according to claim 1, characterized in that, The establishment of a short-time stable adversarial coordinate system based on the self-motion information and the three-dimensional position information of the opponent's movement point includes: The position of the opponent's torso center is determined based on the three-dimensional position information corresponding to the opponent's movement point at the reference time, and the position of the opponent's torso center is determined as the origin of the short-term stable confrontation coordinate system. The vertical direction of the short-time stable adversarial coordinate system is determined based on the orientation of the field, and the forward direction of the short-time stable adversarial coordinate system is determined based on the projection of the direction in which the opponent faces the robot onto the horizontal plane. The lateral direction of the short-time stable adversarial coordinate system is determined based on the vertical direction and the forward direction, so as to construct the short-time stable adversarial coordinate system.
7. The method according to claim 6, characterized in that, The step of transforming the opponent's movement point to the short-time stable adversarial coordinate system includes: Based on the self-motion information, determine the coordinate transformation relationship between the head coordinate system corresponding to the reference time and the current head coordinate system; Based on the coordinate transformation relationship, the opponent's movement point in the current head coordinate system is inversely transformed to obtain the opponent's movement point in the short-term stable adversarial coordinate system; When the cumulative drift corresponding to the short-time stable counter-coordinate system exceeds a preset drift threshold, the reference time is redefined, and the coordinate transformation relationship is updated according to the redefined reference time.
8. The method according to claim 1, characterized in that, The step of determining the attack risk information based on the opponent's status information includes: Obtain the impact protection area corresponding to the robot, wherein the impact protection area includes the head area of the robot; Based on the position of the opponent's target part in the short-time stable confrontation coordinate system and the positional relationship between the hit protection area, the shortest spatial distance between the opponent's target part and the hit protection area is determined, and the shortest spatial distance is determined as the risk distance; The attack risk information is determined based on the risk distance and the movement trajectory of the target part of the opponent.
9. The method according to claim 8, characterized in that, Determining the attack risk information based on the risk distance and the movement trajectory of the opponent's target part includes: The movement speed of the opponent's target part is determined based on the positional changes of the opponent's target part at multiple consecutive moments; The approach direction of the opponent's target part is determined based on the positional relationship between the target part and the protected area, and the effective approach speed is determined based on the velocity component of the target part's movement speed in the approach direction. The estimated hit time is determined based on the risk distance and the effective approach speed.
10. The method according to claim 8, characterized in that, After determining the attack risk information, the method further includes: The state confidence of the opponent's state information is determined based on the number of stable scene points, the classification results of the opponent's movement points, and the continuity of the movement trajectory of the opponent's target part. Determine whether the state confidence level meets the preset confidence conditions; When the state confidence meets the preset confidence condition, attack risk information including the risk distance and the expected hit time is output; When the state confidence does not meet the preset confidence condition, the expected hit time is marked as low confidence, or the output of the expected hit time is stopped and low confidence state information is output.
