Robots and their control methods, devices, equipment, media and program products
By acquiring real-time motion information and game rules status, the robot is controlled to perform hitting and posture adjustment actions, solving the problems of robot posture imbalance and rule incompatibility. This achieves high-precision human-machine interaction control for multiple ball types, improving robustness and sustainability.
Patent Information
- Application Number
- CN202611232101.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-11-17
AI Technical Summary
The existing control logic for human-machine ball games lacks systematic timing management, which causes the robot to lose its posture after running continuously for multiple rounds, making it unable to meet the needs of high-intensity continuous play and difficult to adapt to different ball types and competition rules.
By acquiring real-time motion information for each rally, the system determines the conditions for triggering the shot and controls the robot to perform actions such as swinging the racket, adjusting the center of gravity, and maintaining the posture, based on the game rules and status. The system uses proprioceptive information to iteratively correct the relocation path, ensuring that the robot returns to the ready-to-shot posture in each rally.
It achieves high-precision ball control in various ball types, improves the robustness and sustainability of human-machine interaction, and is suitable for professional sports training, competitive events, and public interactive entertainment.
Smart Images

Figure CN123113451A_ABST
Abstract
Description
Technical Field
[0001] This disclosure pertains to the field of robotics technology, and more specifically, relates to a robot and its control method, apparatus, equipment, medium, and program products. Background Technology
[0002] In human-machine interaction scenarios involving high-dynamic ball sports such as table tennis, badminton, and tennis, robots need to complete the entire process of perception, decision-making, and execution within milliseconds. However, existing interaction control logic mostly revolves around a single shot, lacking systematic timing management for continuous interaction.
[0003] Furthermore, due to the lack of a closed-loop control cycle for each round, the robot often experiences center of gravity drift due to the inertial impact at the moment of hitting the ball after multiple rounds of continuous operation. Moreover, the lack of targeted recovery methods leads to an imbalance in the robot's subsequent hitting posture. In addition, the imbalance in posture during long-term operation can easily cause interruptions in the rallies, making it unable to meet the demand for high-intensity continuous rallies. Summary of the Invention
[0004] The purpose of this disclosure is to provide a robot and its control method, device, equipment, medium and program product, which can achieve high-precision ball hitting control in various ball types, greatly improve the robustness and sustainability of human-machine combat, and solve the technical problem that robots in the prior art cannot meet the requirements of high-intensity continuous combat.
[0005] To achieve the above objectives, in a first aspect, embodiments of this disclosure provide a robot control method, the method comprising: For each round of play, real-time motion information of the flying ball is acquired. The round of play is used to characterize the continuous control process from when the robot enters the first ball-striking preparation state to the second ball-striking preparation state. The second ball-striking preparation state is the next ball-striking preparation state after the first ball-striking preparation state. Based on the real-time motion information, the ball-hitting trigger condition is determined, wherein the ball-hitting trigger condition is used to characterize the ball-hitting timing when the robot is the server or the ball-hitting timing when the robot is the receiver. Based on the ball-hitting triggering conditions and the current game rule status, the robot is controlled to perform a target action. The game rule status is used to characterize the service right, the cumulative score, and the current stage of the rally. The target action includes at least one of the following: swinging the racket to hit the ball, adjusting the center of gravity, and maintaining the body posture. After the robot performs the target action, based on the acquired body perception information of the robot, the robot is controlled to perform a center of gravity repositioning operation, so that the robot returns from the post-hitting state to the ready-to-hit posture; wherein, the body perception information includes the robot's upper limb movement posture and lower limb position coordinates.
[0006] Secondly, embodiments of this disclosure provide a robot, which includes a visual perception unit, a body perception unit, a controller, and an actuator: The visual perception unit is used to collect real-time motion information of the flying ball; The body perception unit is used to collect the body perception information of the robot; The controller is connected to the visual perception unit and the body perception unit, and the controller is configured to perform the method described in any one of the first aspects; An actuator, connected to the controller, is used to receive control commands from the controller and execute target actions and center of gravity repositioning actions accordingly.
[0007] Thirdly, embodiments of this disclosure provide a robot control method apparatus, the apparatus comprising: The acquisition unit is used to acquire real-time motion information of the flying ball for each round of play, wherein the round of play is used to characterize the continuous control process from when the robot enters the first ball-striking preparation state to the second ball-striking preparation state, and the second ball-striking preparation state is the next ball-striking preparation state after the first ball-striking preparation state. The determining unit is used to determine the ball-hitting trigger condition based on the real-time motion information, wherein the ball-hitting trigger condition is used to characterize the ball-hitting timing when the robot is the server or the ball-hitting timing when the robot is the receiver. The control unit is used to control the robot to perform a target action based on the ball-hitting triggering condition and the current game rule state; and after the robot performs the target action, based on the acquired body perception information of the robot, control the robot to perform a center of gravity repositioning operation, so that the robot returns from the post-hitting state to the ready-to-hit posture; wherein, the game rule state is used to represent the service right, the cumulative score and the current stage of the rally; the target action includes at least one of the following: swinging the racket to hit the ball, center of gravity adjustment, and limb posture maintenance; the body perception information includes the robot's upper limb posture and lower limb position coordinates.
[0008] Fourthly, embodiments of this disclosure provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device performs the method as described in any of the first aspects.
[0009] Fifthly, embodiments of this disclosure provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method as described in any of the first aspects.
[0010] In a sixth aspect, embodiments of this disclosure provide a computer program product that, when run on an electronic device, causes the electronic device to perform the method described in any one of the first aspects.
[0011] The beneficial effects of the embodiments disclosed herein compared to the prior art are as follows: This disclosure provides a robot control method that acquires real-time motion information of a flying ball for each round of play. This round of play represents the continuous control process from when the robot enters the first ball-striking preparation state to the second ball-striking preparation state, where the second ball-striking preparation state is the next ball-striking preparation state after the first ball-striking preparation state. By limiting the control method to each round of play, a unified timing reference is provided for scheduling the robot's perception, decision-making, and execution, avoiding instruction conflicts and response delays when connecting actions across rounds, and eliminating the need for manual intervention to adjust the control logic. Based on real-time motion information, the hitting trigger condition is determined. This condition characterizes the timing of the robot's serve or receive. According to the hitting trigger condition, the current game rules (characterized by the attribution of serve, cumulative score, and the current stage of the rally), the robot is controlled to execute a target action. Since the target action includes at least one of a swing, a weight adjustment, and a posture maintenance, it can balance the needs of hitting and posture maintenance, reducing ineffective energy consumption and avoiding weight shift caused by large limb swings. After the robot executes the target action, the relocation path is iteratively corrected based on the acquired robot proprioception information, allowing the robot to return from the post-hit state to the ready-to-hit posture.
[0012] In summary, this control method can achieve high-precision ball control in various ball types and scenarios, effectively solving problems such as robot posture instability, rule incompatibility, and process discontinuity during multi-round continuous rallies. It significantly improves the robustness and sustainability of human-machine rallies and can be widely adapted to various application scenarios such as professional sports training, competitive event assistance, and mass interactive entertainment. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 This is a flowchart illustrating a robot control method provided in an embodiment of this disclosure; Figure 2a This is a schematic diagram of a human-computer interaction scenario in a table tennis game, provided by an embodiment of this disclosure. Figure 2b This is a schematic diagram of a human-computer interaction scenario in badminton, provided by an embodiment of this disclosure; Figure 2c This is a schematic diagram of a human-computer interaction scenario in tennis, provided by an embodiment of this disclosure; Figure 3 This is a flowchart illustrating a robot control method provided in an embodiment of this disclosure; Figure 4 This is a flowchart illustrating a robot control method provided in an embodiment of this disclosure; Figure 5 This is a flowchart illustrating a robot control method provided in an embodiment of this disclosure; Figure 6 This is a schematic diagram of the structure of a robot control method apparatus provided in an embodiment of this disclosure; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0015] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, so as to provide a thorough understanding of the embodiments of this disclosure. However, those skilled in the art will understand that this disclosure may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this disclosure with unnecessary detail.
[0016] It should be understood that, when used in this disclosure and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0017] It should also be understood that, in the description of this disclosure, unless otherwise stated, the " / " used in this specification and the appended claims indicates that the related objects are in an "or" relationship. For example, A / B can mean A or B. The "and / or" in this disclosure is merely a description of the relationship between the related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. Furthermore, in the description of this disclosure, unless otherwise stated, "multiple" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0018] Furthermore, to facilitate a clear description of the technical solutions of the embodiments of this disclosure, the terms "first" and "second" are used in the embodiments of this disclosure to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, but are only used for distinguishing descriptions, and the terms "first" and "second" are not necessarily different, nor should they be construed as indicating or implying relative importance.
[0019] As used in this disclosure and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."
[0020] References to "one embodiment" or "some embodiments" as described in this disclosure mean that one or more embodiments of this disclosure include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless otherwise specifically emphasized.
[0021] First, it should be noted that this disclosure may display a prompt interface, pop-up window, or output voice prompt information before and during the collection of relevant user data (such as the process of facial image acquisition, human body image acquisition, etc.). The prompt interface, pop-up window, or voice prompt information is used to inform the user that their relevant data is currently being collected. This disclosure will only begin to execute the relevant steps of acquiring user data after obtaining confirmation from the user regarding the prompt interface or pop-up window. Otherwise (i.e., if no confirmation from the user regarding the prompt interface or pop-up window is obtained), the relevant steps of acquiring user data will end, that is, the relevant user data will not be acquired.
[0022] In other words, all user data collected in this disclosure is collected with the user's consent and authorization, and the collection, use and processing of relevant user data must comply with the relevant laws, regulations and standards of the relevant regions.
[0023] With the iteration of artificial intelligence and robotics technology, human-machine ball games have gradually expanded from laboratory demonstrations to diverse fields such as professional sports training, mass interactive entertainment, and amateur competitive events, which has placed higher demands on the stability of continuous ball games, the precision of ball control, and the adaptability to competition rules.
[0024] Current control logic for ball-playing robots primarily uses the generation of a single shot as the core scheduling unit. The phase division and execution logic of the play process are relatively fragmented, and the control connections across rounds lack a unified timing benchmark. This leads to command conflicts or response delays at key points such as serve-to-receive and transition from one round to the next. The logic for determining the timing of a shot focuses on the real-time motion parameters of the ball in flight, lacking game-level rule status information (such as serve ownership, cumulative score, and current round stage), making it difficult to adapt to the rules of formal competition scenarios. Furthermore, the parameter settings for the robot's posture recovery process are mostly based on fixed values calibrated offline. The robot's real-time body state feedback does not participate in the dynamic adjustment of the recovery process. The inertial impact at the moment of shot can easily cause center of gravity drift, and repeated accumulation can lead to posture instability or even tipping over, limiting the sustainable duration of continuous play.
[0025] In addition, existing control schemes are mostly developed for specific rallies involving a single ball. When faced with the different flight characteristics of different ball types such as table tennis, badminton, and tennis, or when facing rallies with different intensities such as recreational slow play and competitive fast play, the accuracy of hitting the ball and the stability of the posture are prone to fluctuations, making it difficult to meet the robustness requirements in multiple scenarios.
[0026] This disclosure provides an example of a robot control method; please refer to... Figure 1 As shown, Figure 1A schematic flowchart of a robot control method provided in this disclosure is shown. This is by way of example and not limitation; the method can be applied to or operated in electronic devices. The method includes: S101. For each round of play, obtain real-time motion information of the flying ball.
[0027] The "round of rallies" is used to characterize the continuous control process from when the robot enters the first ready state to the second ready state, where the second ready state is the next ready state after the first ready state.
[0028] S102. Determine the ball-hitting trigger conditions based on real-time motion information.
[0029] Among them, the ball-hitting trigger condition is used to characterize the timing of the ball-hitting when the robot is the server or the timing of the ball-hitting when the robot is the receiver.
[0030] S103. Based on the ball-hitting trigger conditions and the current game rules, control the robot to execute the target action.
[0031] Among them, the game rule status is used to represent the ownership of the serve, the cumulative score and the current stage of the rally. The target action includes at least one of the following: swinging the racket to hit the ball, adjusting the center of gravity and maintaining the body posture.
[0032] S104. After the robot performs the target action, based on the acquired body perception information of the robot, control the robot to perform a center of gravity repositioning operation, so that the robot returns from the post-hitting state to the ready-to-hit posture.
[0033] Among them, the proprioceptive information includes the robot's upper limb movement posture and lower limb positioning coordinates.
[0034] This disclosed solution can be adapted to various ball-based human-computer interaction scenarios. For example, the flying ball can be a table tennis ball, badminton ball, or tennis ball. The following uses different flying ball interaction scenarios as examples to illustrate the implementation process and effects of the technical solution.
[0035] For example, in a serving scenario, the first ready state can be the state where the robotic arm holding the ball has completed ball gripping, the robotic arm holding the racket has adjusted to the initial swing posture, and the lower limb stance coordinates are locked. The second ready state can be the state where the robot returns to the ready stance after the center of gravity repositioning is completed in the current rally (specifically, it can be a steady state). In a receiving scenario, the first ready state can be the state where the robot adjusts its lower limb stance and predicts the upper limb swing direction based on the landing point of the previous rally. The second ready state can also be the state where the robot returns to the ready stance after the center of gravity repositioning is completed in the current rally. The duration of each rally cycle can be adapted to the movement characteristics of different ball types, for example, but not limited to, such as... Figure 2a In the table tennis scenario shown, the time interval can be from 0.5s to 1.2s, such as... Figure 2b In the badminton scenario shown, the timeout can be from 1.0s to 2.5s, such as... Figure 2c The time interval shown in the tennis scene can be from 1.5s to 3.0s.
[0036] For example, the real-time motion information of the flying ball can be a set of parameters collected by the visual perception unit that reflects the aerial motion state of the flying ball, including at least the three-dimensional spatial coordinates, velocity vector and rotation vector of the flying ball at continuous moments, which can provide input basis for determining the hitting trigger conditions, predicting the trajectory of the flying ball and dynamically adjusting the hitting control parameters.
[0037] As an example, and not a limitation, continuous image frames of the flying ball can be acquired by two high-speed industrial cameras with sampling frequencies of 200Hz to 500Hz, either deployed on the robot or around the site. The pixel coordinates can be converted into three-dimensional position information in the world coordinate system using a stereo matching algorithm. The velocity vector can be calculated by combining the frame interval time, and the rotation vector can be calculated by analyzing the displacement characteristics of the marked points on the surface of the ball. When the flying ball is occluded, the trajectory can be predicted using a Kalman filter algorithm based on the motion parameters of the previous moment, until the real-time position of the flying ball is recaptured.
[0038] The ball-hitting trigger condition is a parameter used to characterize the timing of the robot's serve or receive. Specifically, it can include the predicted landing point coordinates and the predicted contact time, serving as the signal to initiate the swing and hit the ball. This prevents the hitting action from being executed too early or too late, ensuring alignment between the predicted landing point coordinates and the predicted contact time, thus improving the accuracy and stability of the hit. For example, in a serve scenario, the ball-hitting trigger condition could be the predicted landing point coordinates of the ball after it is released by the robotic arm, falling to a distance of 150mm to 250mm from the table surface. In a receive scenario, the ball-hitting trigger condition could be the predicted contact time based on the ball's trajectory, which can be aligned with the execution window of the swing action, with an error controlled within ±5ms. The trigger conditions for hitting the ball can be adjusted to suit the flight characteristics of different ball types. In badminton, the predicted contact time can be 8ms to 12ms in advance as the trigger condition to allow for a buffer time for the start of the swing. In tennis, the predicted contact time can be 12ms to 15ms in advance as the trigger condition to suit the characteristics of tennis balls, which have high flight speed and high rebound height.
[0039] For example, the current game rule status can be a set of parameters reflecting the current playing process, including at least the serve priority, cumulative score, and the current stage of the rally. This can serve as the decision-making basis for switching control logic modes and selecting action types, ensuring that the robot's actions comply with the preset ball game competition rules. For example, the current game rule status can be updated in real time by the built-in rule maintenance module. After each rally, the serve priority and cumulative score are updated based on the scoring results. The current stage of the rally can be divided into the serve preparation stage, serve and hit stage, receive stage, and repositioning stage. The serve priority can be adapted to the rotation rules of different game formats. For example, in the 11-point table tennis scenario, when the score reaches 10-10, the serve rotation rule can be adjusted from rotating between two consecutive rallies to rotating every single rally. In the 21-point badminton scenario, a rally-based scoring system can be used, with the serve priority updated in real time according to the scoring results. In the tennis scenario, a tie-break system can be used; when the score reaches 6-6, a tie-break is entered, and the serve rotation rule is adjusted to rotating every single rally.
[0040] In this embodiment, the target action is an action performed by the robot during a rally to achieve hitting the ball or maintaining posture, including at least one or more of the following: swinging the racket to hit the ball, adjusting the center of gravity, and maintaining limb posture. For example, the swinging action can be achieved through the multi-joint coordinated movement of the racket-holding robotic arm; the center of gravity adjustment can be achieved through fine-tuning the angle of the lower limb joints; and the limb posture maintenance action can be achieved by limiting unnecessary swinging of the upper limb joints. The lower limb support stiffness can be dynamically adjusted according to the hitting force, with an adjustment range of 100 N·m / rad to 800 N·m / rad to adapt to the impact requirements of different ball types; the limb posture maintenance action can limit the swing amplitude of the upper limb joints to within ±3° to ±5°, reducing energy consumption and improving response speed during non-hitting phases.
[0041] In this embodiment, the body perception information is a set of parameters reflecting the robot's posture and position state collected by the robot's onboard sensors. It includes at least the robot's upper limb movement posture and lower limb positioning coordinates, which can serve as feedback for center of gravity repositioning, posture compensation, and motion accuracy verification, enabling closed-loop adjustment of the control process. For example, the upper limb movement posture can be obtained by collecting angle information from each joint encoder, and the lower limb positioning coordinates can be obtained by fusing leg joint angle information with chassis odometer data. The sampling frequency of the body perception information can be set to 1kHz to 2kHz to meet real-time control requirements. The body perception information can also be fused with trunk angular velocity and linear acceleration collected by the inertial measurement unit to compensate for posture deviations during dynamic processes. When the upper limb movement posture exceeds a preset safety range, an emergency stop protection mechanism can be triggered to prevent damage to the robot's mechanical structure.
[0042] After executing the target action, the robot's return from the post-hit imbalance state to the ready-to-hit posture is a control process known as center of gravity repositioning. This ensures the feasibility of continuous multi-round rallies, quickly restores the robot's stable posture, reduces response delay in the next round, and avoids falls or decreased hitting accuracy due to center of gravity shift. For example, the center of gravity repositioning operation can first calculate the positional deviation between the robot's current center of gravity projection point and the center of a preset preparation area. This preset preparation area can adapt to the court requirements of different ball games. For instance, in a table tennis scenario, it could be a circular area with a radius of 80mm centered 300mm directly behind the center of the table; in a badminton scenario, it could be a circular area with a radius of 120mm centered at the center of the court; and in a tennis scenario, it could be a designated location within the service area. Subsequently, the repositioning control command for the current control cycle can be solved under the constraints of kinematic constraints, dynamic constraints, and safety constraints. Kinematic constraints may include joint angle limits and velocity limits, while dynamic constraints may include joint torque limits and power limits. After driving the lower limb joints to perform the corresponding adjustments, the proprioceptive information can be updated in real time and the repositioning path can be iteratively solved and corrected until the position deviation is less than a preset deviation threshold. This preset deviation threshold can be set to 50mm to 100mm to ensure the accuracy and efficiency of posture recovery.
[0043] By using each round of play as the basic timing unit for continuous control, and taking the current game rules as the decision-making basis, the system accurately determines the hitting trigger conditions based on the real-time motion information of the ball. Combined with the robot's proprioceptive feedback, the system controls the robot to execute target actions and center of gravity repositioning operations, achieving high-precision hitting control in various ball-playing scenarios. This solution can keep the response delay of a single round within 25ms, ensure no errors in multiple consecutive rounds of play, and achieve a hitting point error of less than 50mm. The center of gravity recovery time after a large-scale movement is less than 0.8s, with no posture instability. The torso posture fluctuation during the swing is less than ±2°, and the omnidirectional moving chassis (i.e., the omnidirectional moving base) of the robot moves smoothly without impact, effectively improving the robustness and sustainability of human-robot play, and adapting to the control requirements of various ball-playing scenarios such as table tennis, badminton, and tennis.
[0044] In summary, this control method can achieve high-precision ball control in various ball types and scenarios, effectively solving problems such as robot posture instability, rule incompatibility, and process discontinuity during multi-round continuous rallies. It significantly improves the robustness and sustainability of human-machine rallies and can be widely adapted to various application scenarios such as professional sports training, competitive event assistance, and mass interactive entertainment.
[0045] As one implementation method, the robot includes a ball-holding robotic arm and a racket-holding robotic arm; please refer to... Figure 3 As shown, Figure 3A schematic flowchart of a robot control method provided in this disclosure is shown, which controls the robot to perform a target action based on the ball-hitting trigger condition and the current game rules state, including: S301. When the current game rule status indicates that the robot is the serving side in the current rally, control the ball-holding robotic arm to send the grasped flying ball to the preset release point, control the racket-holding robotic arm to adjust to the preset initial swing posture, and lock the robot's lower limb stance coordinates.
[0046] Among them, the initial swing posture is used to characterize the initial joint angle of the racket-holding robotic arm and the spatial posture of the racket before swinging to hit the ball.
[0047] S302. Based on the ball-serving timing corresponding to the ball-hitting trigger condition, control the ball-holding robotic arm to release the flying ball at the preset release point.
[0048] S303. Based on the real-time motion information of the flying ball, continuously track the free fall trajectory of the flying ball, and recursively calculate the estimated hitting point of the flying ball based on the tracked falling trajectory, wherein the estimated hitting point is located within the preset hitting window.
[0049] S304. Control the racket-holding robotic arm to complete the hitting action at the estimated hitting point, so that the flying ball hits the racket and falls into the first preset target area and the second preset target area in sequence.
[0050] In this embodiment, the ball-holding robotic arm and the racket-holding robotic arm are two independent actuators configured on the robot. They respectively undertake the functions of grasping and conveying the flying ball and swinging the racket to hit the ball, providing an execution carrier for stable ball delivery and accurate ball hitting in the serving scenario. They can also cooperate with the lower limb stance locking action to ensure the stability of posture throughout the serving process, adapting to the action requirements of the serving phase in a rally matched match.
[0051] For example, the end of the ball-holding robotic arm can be equipped with a flexible gripping component, and the gripping force can be controlled between 0.5N and 2N to avoid deformation of the ball during the gripping process; the end of the racket-holding robotic arm is equipped with a racket adapted to the type of ball in flight, and the flatness error of the racket can be controlled within ±0.5mm to ensure uniform force during the hitting process.
[0052] The preset release point is a fixed spatial coordinate point after the robotic arm moves the ball and before the release action is executed. It is used to ensure that the initial trajectory of the ball after release is predictable, providing a benchmark for subsequent trajectory tracking and hitting point calculation. The initial swing posture is the starting joint angle of the robotic arm and the spatial posture of the racket before the swing to hit the ball. It allows the robotic arm to enter the hitting preparation state in advance, shortens the response delay of the hitting action, and ensures the consistency of the swing trajectory.
[0053] As an example, not a limitation, the preset hitting window is the spatial height range suitable for the robotic arm to strike the ball during its descent. It defines the effective range of the estimated hitting point, preventing the shot from being too high or too low, which could lead to a failed shot or a misplaced landing point. For example, in a table tennis scenario, the preset release point can be set 200mm to 300mm above the table surface, the initial swing posture can have the racket plane at an angle of 45° to 60° to the table surface, the racket head height can be set between 250mm and 350mm above the table surface, and the preset hitting window can be set between 150mm and 250mm above the table surface. In a badminton scenario, the preset release point can be set 1.2m to 1.5m above the court surface, the initial swing posture can have the racket head height set between 1.5m and 1.8m, and the preset hitting window can be set between 0.8m and 1.2m above the ground.
[0054] As an example, not a limitation, the first preset target area is the spatial region where the ball first lands after touching the racket, and the second preset target area is the spatial region where the ball bounces and lands after its first landing. Both are used together to constrain the compliance of the serve's landing point, ensuring that the serve conforms to the preset competition rules, and also providing a landing point benchmark for implementing serve tactics. If the current game rule status indicates that the robot is the server in the current rally, it can control the ball-holding robotic arm to move the grasped ball to the preset release point, simultaneously control the racket-holding robotic arm to adjust to the preset initial swing posture, and lock the robot's lower limb stance coordinates.
[0055] For example, lower limb stance coordinate locking can be achieved by switching the drive motor of the omnidirectional moving chassis into braking mode. The locked stance coordinate deviation can be controlled within ±10mm, preventing lower limb movement during the serve from causing deviations in the hitting posture. Subsequently, based on the serve timing corresponding to the hitting trigger condition, the ball-holding robotic arm can be controlled to release the ball at a preset release point. For example, the serve timing can be set to 10ms to 30ms after the robotic arm completes its initial swing posture adjustment, ensuring synchronization between the release and swing actions. The release action of the ball-holding robotic arm can be achieved by rapidly opening pneumatic fingertips, with a release response time controlled within 5ms, reducing interference with the initial motion state of the ball during the release process.
[0056] In some embodiments, after the ball is released, its freefall trajectory can be continuously tracked based on its real-time motion information. The estimated impact point of the ball is then recursively calculated based on the tracked trajectory, and this estimated impact point must fall within a preset impact window. For example, the trajectory tracking frequency can be set to 500Hz to 1000Hz, updating the ball's three-dimensional coordinates, velocity vector, and rotation vector each frame. The recursive calculation can employ a kinematic model considering gravitational acceleration and air resistance during the fall, with a prediction step size of 2ms to 5ms to improve the accuracy of the estimated impact point calculation. If the calculated estimated impact point exceeds the preset impact window, the end position of the robotic arm can be fine-tuned for compensation, with the compensation range controlled within ±50mm to ensure the effectiveness of the impact point.
[0057] After calculating the estimated hitting point, the racket-holding robotic arm can be controlled to perform the hitting action at that estimated point, causing the ball to fall sequentially into the first and second preset target areas after contacting the racket. For example, in a table tennis scenario, the first preset target area can be set as the effective table area 130cm to 170cm from the net, and the second preset target area can be set as the area 50cm to 100cm from the net on the opponent's side of the table, meeting the compliance requirements for the serve landing point. The hitting action can be a forward-facing strike, with the angle between the racket face normal and the velocity vector at the estimated hitting point controlled between 30° and 60°, and the hitting force controlled between 5N and 15N to ensure the accuracy of the ball's landing point. Alternatively, the tangential direction of the racket face can be adjusted during the strike to apply spin within ±200rpm to the ball, achieving tactical versatility in the serve.
[0058] By standardizing the preset release point and initial swing posture, the consistency of the serving action can be improved and execution errors reduced. By tracking the trajectory of the ball in real time and dynamically calculating the estimated hitting point, the initial position and speed deviation of the ball during release can be compensated, thus improving the hitting accuracy. By constraining the first and second preset target intervals, it is possible to ensure that the serve complies with the competition rules and achieve precise control of the landing point, which facilitates the connection of subsequent rallies. At the same time, locking the lower limb stance during the serve can also reduce the posture deviation after the hit and shorten the time spent on center of gravity repositioning.
[0059] As one implementation method, controlling the racket-holding robotic arm to complete the hitting action at the estimated hitting point includes: Based on the real-time tracking of the ball's free fall trajectory, the system continuously updates the estimated spatial coordinates of the hitting point and the hitting time, and dynamically adjusts the swing trajectory, hitting posture, and swing speed of the racket-holding robotic arm accordingly to generate the final hitting control parameters. According to the final shot control parameters, drive the racket-holding robotic arm to execute the shot action.
[0060] In this embodiment, the final ball-hitting control parameters include at least the spatial coordinate sequence of the swing trajectory, the joint angle configuration of the hitting posture, and the dynamic change curve of the swing speed. This can transform the theoretical calculation results of the estimated hitting point into specific executable action commands, providing parameter benchmarks for compensating for the uncertainty of the ball's motion after release and improving the hitting accuracy.
[0061] For example, the update frequency of the final shot control parameters can be set to 500Hz to 1000Hz, keeping in sync with the acquisition frequency of the real-time motion information of the ball, ensuring that the parameters can reflect the latest motion state of the ball; the parameter generation process can use a model predictive control algorithm, with the goal of minimizing the positional deviation of the estimated shot point, and solve for the optimal solution within the kinematic constraints of the racket-holding robotic arm.
[0062] Based on the real-time tracking of the ball's free fall trajectory, the spatial coordinates of the estimated hitting point and the hitting time can be continuously updated, and the swing trajectory, hitting posture, and swing speed of the racket-holding robotic arm can be dynamically adjusted accordingly. For example, when the trajectory of the falling ball is detected to deviate due to air disturbance, the estimated three-dimensional coordinates of the hitting point can be updated every 2ms to 5ms, and the corresponding hitting time can be updated synchronously. The update error of the hitting time can be controlled within ±1ms. The adjustment of the swing trajectory can be achieved by online trajectory planning, which superimposes a compensation amount calculated based on the coordinate deviation on the original preset trajectory. The maximum value of the compensation amount can be limited to ±80mm to avoid sudden changes in trajectory. The adjustment of the hitting posture can be achieved by fine-tuning the angles of the shoulder, elbow, and wrist joints of the racket-holding robotic arm. The angle adjustment range of each joint can be controlled within ±5° to ensure the stability of the racket plane at the moment of hitting. The adjustment of the swing speed can be dynamically matched according to the falling speed of the falling ball. The speed adjustment range can be from 0.5m / s to 3m / s. When the falling speed of the falling ball is faster, the swing speed is increased, and vice versa, to ensure that the relative speed at the moment of hitting is adapted to the preset hitting force.
[0063] Furthermore, in this embodiment, the adjustment strategy can be adapted and optimized according to the characteristics of different ball types. For example, in the table tennis scenario, the focus can be on fine adjustment of the hitting posture to improve the accuracy of the landing point; in the badminton scenario, the focus can be on smooth adjustment of the swing trajectory to adapt to a larger hitting space; and in the tennis scenario, the focus can be on large adjustment of the swing speed to match the higher hitting power requirements.
[0064] Finally, according to the final shot control parameters, the racket-holding robotic arm can be driven to perform the shot. For example, the driving process can adopt a three-level closed-loop control mode of position-velocity-torque. The position loop tracks the spatial coordinate sequence of the swing trajectory, the velocity loop matches the dynamic change curve of the swing speed, and the torque loop ensures that the output force at the moment of impact meets the preset requirements. The start time of the shot can be aligned with the updated shot time, and the start delay can be controlled within ±2ms to ensure that the shot point coincides with the estimated position. During the shot, the output torque of each joint can be monitored in real time. When the torque exceeds a preset safety threshold, a protection mechanism is triggered to prevent damage to the mechanical structure. Simultaneously with the shot, the torso deflection angle can be adjusted to counteract the inertial torque generated by the swing. The adjustment range of the torso deflection angle can be ±3° to ±8°, further improving the posture stability during the shot.
[0065] By continuously updating the estimated spatial coordinates of the hitting point and the hitting time, and dynamically adjusting the swing trajectory, hitting posture, and swing speed accordingly, it can effectively compensate for the initial position error, speed error, and trajectory deviation caused by environmental disturbances after the ball is released, significantly improving the robustness of the hitting action. The robotic arm is driven to perform actions according to the final hitting control parameters to ensure the accuracy and stability of the hitting process, so that the flying ball falls into the first preset target area and the second preset target area in sequence after hitting the racket. The landing point error can be controlled within ±50mm, meeting the needs of high-precision rallies and ensuring the safe operation of the robotic arm during high-frequency hitting.
[0066] As one implementation method, please refer to [the following] while or after the robot performs the target action. Figure 4 As shown, Figure 4 A schematic flowchart of a robot control method provided in this disclosure is shown, the method further comprising: S401. Based on the real-time motion information of the flying ball, monitor the interaction status between the flying ball and the preset field facilities, and identify the end event of the current round.
[0067] Among them, the round termination event is used to characterize the event that leads to the determination of the score of the current round.
[0068] S402. Determine the score attribution for the current rally based on the rally termination event, the serve priority parameter, and the rally count parameter contained in the current game rules state.
[0069] The result of the score attribution determination is used to trigger the end-of-round signal for the current round.
[0070] S403. In response to the end-of-round signal for the current round, update the cumulative score in the current match rules state based on the score attribution of the current round, switch from the current round to the next round, and reset the round count parameter in the updated match rules state.
[0071] The updated match rules state is used to determine the serving side in the next pairing rally.
[0072] In this embodiment, the preset venue facilities are fixed hardware structures for the playing scenario, including at least one or more of the following: table tennis table, net, court boundary markers, and ground bearing surface. These provide a physical reference for monitoring the interactive state of the flying ball and can be used to determine whether the ball's movement conforms to preset competition rules. The round termination event represents an event that determines the score of the current round, interrupting the control execution flow of the current round, triggering score determination and game status updates, and ensuring the closed-loop nature of the playing process.
[0073] For example, in a table tennis scenario, the preset court facilities may include the table tennis table surface, net, table surface edges, and end lines; in a badminton scenario, the preset court facilities may include court boundary lines, net, and ground bearing surface; and in a tennis scenario, the preset court facilities may include doubles court sidelines, center line, service line, and net. Based on the real-time motion information of the flying ball, contact parameters between the flying ball and the preset court facilities can be collected at a frequency of 200Hz to 500Hz, including contact position, contact time, and post-contact motion vector. A spatial coordinate transformation algorithm can then be used to identify the compliance attributes of the collision point.
[0074] The score attribution is the determination of the score outcome of the current rally, used to clarify the score attribution for both sides. It is the direct basis for updating the cumulative score and switching the serve priority, and can be logically linked with the serve priority and cumulative score parameters in the current game rules. The rally end signal is a timing control signal generated in response to the score attribution determination. It can be used to trigger the closing operations of the current rally, including starting the center of gravity repositioning process and pausing the action generation module scheduling. For example, the rally end event can include at least one of the following: out-of-bounds event, net incident event, net touch foul event, and opponent's failure to return the ball legally. When the ball is detected to have crossed the end line without touching the opponent's valid court area, it can be determined as an out-of-bounds event; when the ball is detected to have touched the net but not landed in the opponent's valid court area, it can be determined as a net touch foul event; when the opponent's shot fails to legally clear the net device, it can be determined as an opponent's failure to return the ball legally. Any of the aforementioned events can trigger the score attribution determination process. The determination of score ownership can be performed by combining the serve priority parameter and the round count parameter in the current game rules. For example, if the round ends when the opponent fails to return the ball legally and the current server is this robot, the robot can be determined to win the current round; if the round ends when the ball goes out of bounds and the current server is the opponent, the robot can be determined to win the current round; if the round ends when the ball touches the net and the current server is this robot, the opponent can be determined to win the current round. After the determination is completed, a round end signal with a duration of 10ms to 50ms can be generated to trigger the action scheduling logic to pause the current round.
[0075] The cumulative score is a parameter that records the total historical scores of both sides in a match. It can be used to determine whether the current game has reached match point and whether the service rotation rules need to be adjusted. The rally count parameter records the number of consecutive serves by the current server. It can be used to adapt to the service rotation rules of different ball games and is one of the criteria for triggering a change of service authority. The server for the next rally is the entity that has the right to serve in the next rally, determined under the updated game rules. It can be used to control the action scheduling logic of the next rally to ensure that the serving process conforms to the preset competition rules.
[0076] In response to the end-of-round signal, the cumulative score can be updated based on the score attribution of the current round. The update logic can use an incremental accumulation method; for example, if the robot scores, the score is incremented by 1, and if the opponent scores, the score is incremented by 1. After the update, the player can switch to the next round, marking the current round as ended and the next round as ready. Simultaneously, the round count parameter in the updated game rules is reset, and the current server's consecutive serve count is cleared to zero.
[0077] If the current score triggers a change of serve, for example, in table tennis when the rally count reaches 2, or in tennis after a point in a tiebreaker, the server for the next rally can be updated to the opponent, ensuring that the serve rotation conforms to the preset rules. For instance, in table tennis (11-point system), when the cumulative score reaches 10-10, the serve rotation rule can be automatically changed from a two-point rotation to a one-point rotation, and the built-in scheduling logic parameters can be updated simultaneously. In badminton (21-point system), the serve can be adjusted in real-time based on the cumulative score, and the server information is updated after each point. In tennis doubles tiebreakers, when the score reaches 6-6, the serve rotation rule can be adjusted to a one-point rotation, ensuring the compliance of the game flow.
[0078] By accurately identifying rally termination events through monitoring the interaction between the ball and preset court facilities, delays and errors associated with manual judging can be avoided, improving the accuracy and real-time nature of score determination and adapting to the judging needs of high-speed rallies. Combining serve parameters and rally count parameters to determine score allocation ensures strict compliance with the competition rules of different ball games, guaranteeing the compliance of the game process without human intervention. By triggering status updates and rally switching through rally end signals, the flow of multi-rallies can be automated, reducing interruptions caused by manual intervention and improving the continuity and smoothness of the game. Simultaneously, real-time updates of the accumulated score provide reliable data support for match point determination and serve rule adjustments, adapting to diverse rallies under different competition formats.
[0079] As one implementation method, the robot is equipped with multiple independently operable motion generation modules; please refer to... Figure 5 As shown, Figure 5 A schematic flowchart of a robot control method provided in this disclosure is shown, which controls the robot to perform a target action based on the ball-hitting trigger condition and the current game rules state, including: S501. Determine the robot's current operating mode based on the current stage of the current round as represented by the current game rules. S502. Based on the current operating mode, select the joint control components that match the current operating mode from the initial motion components output by each motion generation module. S503. According to the preset joint mapping table, the selected joint control components are spliced together to form a full-body motion sequence to be executed.
[0080] The preset joint mapping table stores the correspondence between the joint control components output by each motion generation module and the robot's whole-body joint control command index.
[0081] S504. Send the whole-body motion sequence to the actuators of each joint of the robot to drive the robot to perform the target motion.
[0082] It should be understood that the motion generation module is an independently operable functional unit in the robot. Each motion generation module is configured to generate corresponding joint motion parameters according to a specific control objective. Multiple motion generation modules can operate in parallel, which can improve the response efficiency of the controller and the parallelism of task processing.
[0083] For example, the motion generation module can be deployed on the controller or on a separate computing core, and the running cycle can be set to 1ms to 5ms. The modules exchange data through a shared memory area to avoid computing resource conflicts. The types of motion generation modules can include a serve preparation motion generation module, a serve hitting motion generation module, a receive motion generation module, a repositioning motion generation module, etc., which are adapted to the motion requirements of different stages of the rally.
[0084] For example, the current operating mode is determined by the scheduling logic state currently used by the controller, based on the stage of the current rally as represented by the current game rules. This clearly defines the activation priority and output permissions of each action generation module, ensuring that the generation of control commands meets the execution requirements of the current rally and avoiding output conflicts between multiple modules. For example, the current operating mode may include a serve preparation mode, a serve hitting mode, a receive mode, and a repositioning mode. The serve preparation mode corresponds to the preparatory actions at the beginning of the rally, the serve hitting mode corresponds to the actions during the serve execution phase, the receive mode corresponds to the response actions after the opponent hits the ball, and the repositioning mode corresponds to the posture recovery actions after the end of the rally. The mode switching can be triggered by the state machine based on the rally stage parameters in the current game rules state, and the switching delay can be controlled within 10ms to ensure smooth action transitions.
[0085] For example, the initial motion components are the unfiltered set of raw control parameters output by the motion generation module. They at least include control parameters for the joints controlled by the corresponding module, such as angle, velocity, and torque parameters for upper limb joints, or position, stiffness, and damping parameters for lower limb joints, providing candidate data for subsequent component selection. Joint control components are the effective control parameters from the initial motion components that match the current operating mode and ultimately participate in motion synthesis. They are intermediate variables connecting module outputs and global control, filtering out outputs from irrelevant modules and ensuring the relevance of control commands.
[0086] For example, in the serve preparation mode, the upper limb ball holding control and racket preparation control output by the serve preparation action generation module can be selected as joint control components, while the lower limb movement components are shielded to avoid stance swaying; in the receive mode, the upper limb racket trajectory control, trunk deflection control, and lower limb support control output by the receive action generation module can be selected as joint control components to achieve coordinated whole-body movements; in the repositioning mode, the lower limb joint adjustment control output by the repositioning action generation module can be selected, while limiting the swing amplitude of the upper limb joints to accelerate the center of gravity recovery efficiency.
[0087] For example, the preset joint mapping table is a structured data table that stores the correspondence between the joint control components output by each motion generation module and the robot's whole-body joint control command index. This maps the scattered module outputs to unified global control commands, solving the address alignment problem between multiple module outputs and global joint control, and ensuring that control commands are sent to the correct actuators. For example, the joint mapping table can be stored using a hash table structure, with the key being a combination of the motion generation module identifier and the joint control component type, and the value being the corresponding global joint control command index address. The table can predefine component selection rules for different operating modes; for example, only the upper limb joint index channel is enabled in the serve preparation mode, while the whole-body joint index channel is enabled in the receiving mode. The update cycle of the mapping table can be set from 100ms to 500ms to adapt to the dynamic adjustment needs of different rallies.
[0088] For example, a full-body motion sequence is a set of full control commands that can be directly sent to the actuators of each joint, obtained by splicing the selected joint control components according to a preset joint mapping table. This ensures that each joint moves in a coordinated manner according to a predetermined timing and amplitude, achieving complex full-body movements. For example, the length of the full-body motion sequence can be matched with the total number of joints in the robot, with each joint corresponding to a data segment in the sequence. The data segment contains at least the target position, target velocity, and target torque parameters. The generation cycle of the full-body motion sequence can be kept consistent with the running cycle of the motion generation module to ensure real-time control.
[0089] Then, the full-body motion sequence is sent to the actuators of each joint of the robot, which can drive the robot to perform the target action. For example, the sending process can use a bus communication protocol, and the communication rate can be set to 1Mbps to 10Mbps to ensure the real-time and reliable data transmission. After receiving the corresponding command segment, each joint actuator can use a position-velocity-torque closed-loop control mode to track the target value, and the tracking error can be controlled within ±0.5° (angle) or ±0.1N·m (torque). During the sending process, the feedback status of the actuators can be monitored in real time. When overload, overheating, or position deviation occurs, a protective shutdown mechanism is immediately triggered to avoid damage to the mechanical structure. For example, in the serve preparation mode, the sent sequence can drive the ball-holding robotic arm and the racket-holding robotic arm to complete the preset action, while keeping the lower limb stance locked; in the receiving mode, the sent sequence can drive the coordinated movement of all joints to complete the swing and hit the ball; in the repositioning mode, the sent sequence can drive the lower limb joints to adjust and achieve center of gravity return.
[0090] By configuring multiple independently operable motion generation modules, the controller's parallel processing capability can be improved to meet the needs of multi-task concurrency in combat scenarios. By selecting matching joint control components based on the current operating mode, output conflicts can be avoided, ensuring the relevance and effectiveness of control commands. By splicing whole-body motion sequences through a preset joint mapping table, the organic combination of distributed module outputs and global unified control can be achieved, reducing system coupling and improving the scalability of the architecture. By distributing the sequence to each joint actuator, abstract control parameters can be transformed into specific physical actions, realizing precise motion control of the robot and providing stable and reliable execution guarantees for multi-round continuous combat.
[0091] As one implementation method, the current operating mode includes at least a serve preparation mode, a serve hitting mode, a receive mode, and a repositioning mode; based on the current operating mode, each joint control component matching the current operating mode is selected from the initial motion components output by each motion generation module, including at least one of the following: In response to the current operating mode being the serve preparation mode, the motion components output by the serve preparation motion generation module are selected, and the lower limb movement motion components are masked; the motion components output by the serve preparation motion generation module include upper limb ball holding control and racket swing preparation control. In response to the current operating mode being serve and hit mode, the motion components output by the serve and hit motion generation module are selected, while the lower limb movement motion components are masked; among them, the motion components output by the serve and hit motion generation module include the upper limb swing execution control quantity; In response to the current operating mode being the ball receiving mode, the motion components output by the ball receiving motion generation module are selected; among them, the motion components output by the ball receiving motion generation module include upper limb swing trajectory control, trunk deflection control, lower limb support control, and lower limb stance adjustment control. In response to the current operating mode being repositioning mode, the motion components output by the repositioning motion generation module are selected, and the range of upper limb joint swing amplitude is limited; wherein, the motion components output by the repositioning motion generation module include lower limb joint adjustment control amount and upper limb posture correction control amount.
[0092] In some embodiments, the serve preparation mode is the scheduling state corresponding to the start of the rally preparation phase in the current operating mode. It is used to centrally control resources to complete the posture construction before serving. By shielding the motion output of unnecessary joints, the posture stability during the serve preparation process is ensured, and the movement of the lower limbs is prevented from interfering with the fine adjustment of the upper limbs. For example, the serve preparation motion generation module can run on an independent computing core, and the output frequency can be set to 500Hz to 1000Hz. Its output upper limb ball holding control quantity can include the finger gripping force of the ball holding robot arm, the wrist joint posture, and the spatial coordinates of the upper arm. The gripping force can be controlled between 0.5N and 2N to avoid ball deformation. The racket swing preparation control quantity can include the shoulder joint angle, elbow joint angle, and wrist joint stiffness of the racket holding robot arm. The wrist joint stiffness can be preset to 200N·m / rad to 400N·m / rad to ensure the rigidity of the racket's initial posture. The lower limb movement components can include speed commands for the omnidirectional moving chassis and large-range displacement commands for the leg joints. By shielding these components in the serve preparation mode, the chassis drive motor can be switched to a zero-speed closed-loop mode, locking the target position of the leg joint at the current encoder feedback value. The locking accuracy can be controlled within ±0.1°, thereby ensuring the robot's stable positioning.
[0093] In some embodiments, the serve-hit mode is a scheduling state corresponding to the serve execution phase in the current operating mode. It is used to output high-precision racket swing actions within a very short hitting window. By continuously shielding lower limb movement components, it maintains the rigidity of the stance and consistency of posture at the moment of hitting. For example, the serve-hit action generation module can dynamically generate upper limb racket swing execution control quantities based on the real-time tracked ball trajectory. These control quantities can include the desired motion trajectory, instantaneous speed, and output torque of the racket-holding robotic arm end effector. Within 5ms to 10ms before hitting the ball, the system can increase the control bandwidth of each joint of the racket-holding robotic arm, increasing the position loop gain by 20% to 50% to quickly respond to trajectory changes. At the same time, the lower limb joints remain locked. Only when a shift of more than 50mm in the center of gravity is detected is the ankle joint torque output slightly adjusted for compensation, and the compensation range is limited to within 5% of the rated torque, ensuring the accuracy and repeatability of the hitting action so that the ball can accurately land in the preset target area after contacting the racket.
[0094] In some embodiments, the receiving mode is the response and scheduling state in the current operating mode after the opponent hits the ball. It requires the coordinated movement of all joints in the body to cope with the changing landing point and speed of the flying ball, and its output motion components are the most complex. For example, the upper limb swing trajectory control can be obtained through inverse kinematics, including a continuous sequence of angles of the shoulder, elbow, and wrist joints. The trajectory refresh rate can be set to 1000Hz to ensure a smooth trajectory. The trunk deflection control can include the rotation angle and angular velocity of the spinal joints. The deflection angle range can be set to ±15° to counteract the inertial torque generated by the swing and provide additional hitting power. The lower limb support control can include the stiffness and damping parameters of the hip, knee, and ankle joints. The stiffness can be set to 400 N·m / rad to 600 N·m / rad on hard floors and reduced to 200 N·m / rad to 400 N·m / rad on soft mats to provide a stable support base. The lower limb stance adjustment control can include the velocity vector and acceleration limit of the omnidirectional moving chassis. When the predicted landing point deviates from the current stance by more than 300 mm, the chassis can output a maximum moving speed of 0.5 m / s for dynamic adjustment to shorten the reaction time.
[0095] In some embodiments, the repositioning mode is the scheduling state of the posture recovery phase after the corresponding round in the current operating mode. Its goal is to quickly and smoothly return the robot from the unbalanced state after hitting the ball to a preset ready posture, preparing it for the next round. For example, the repositioning motion generation module can calculate the deviation between the current center of gravity projection point and the preset ready area based on body perception information, and generate lower limb joint adjustment control quantities. These control quantities can include target angle sequences for the hip, knee, and ankle joints. The adjustment process can use S-shaped velocity planning to reduce joint impact. The upper limb posture recovery control quantities can include the zero-return trajectory of the shoulder, elbow, and wrist joints and the reset command of the end effector. To prevent upper limb inertia from affecting center of gravity recovery, it is necessary to limit the swing amplitude range of the upper limb joints, setting this range to within ±3°, and limiting the speed of the recovery action to 30% to 50% of the hitting action. When the center of gravity deviation is greater than 100mm, the system can prioritize ensuring stable support of the lower limbs and temporarily prohibit large-amplitude movements of the upper limbs until the deviation is reduced to within 50mm, thereby achieving efficient and safe posture recovery.
[0096] By finely configuring operating modes for different stages of a rally and precisely selecting or blocking corresponding motion components based on mode characteristics, the robot's motion quality and efficiency during serving, receiving, and repositioning can be significantly improved. The lower limb locking strategy in the serve preparation and serve hitting modes ensures the stability and accuracy of the serve; the full-body coordinated control in the receiving mode enhances its adaptability to complex incoming balls; and the upper limb swing restriction and lower limb priority adjustment strategy in the repositioning mode accelerates the center of gravity recovery speed and reduces energy consumption. This layered and categorized control logic enables the robot to maintain posture stability and rapid response during multi-round continuous rallies, significantly improving robustness and sustainability.
[0097] As one implementation method, based on the current operating mode and the ball-hitting trigger condition, the joint control components that match the current operating mode are selected from the initial motion components output by each motion generation module, including: When the current operating mode is the ball receiving mode, the preset motion primitive library is retrieved, and the corresponding swing motion template is matched according to the predicted landing point coordinates and predicted contact time of the racket included in the ball hitting trigger conditions. The multiple control quantities associated with the swing motion template are time-aligned to generate the initial motion components corresponding to the receiving mode. Among them, the multiple control quantities include upper limb swing trajectory control quantity, trunk deflection control quantity and lower limb support control quantity. The control components corresponding to the target joint set of the receiving pattern are selected from the initial motion components and used as the control components of each joint.
[0098] In this embodiment, the motion primitive library is a collection of standardized basic motion units pre-installed in the robot's storage medium. Each basic motion unit corresponds to a specific swing motion template, which can provide reusable basic components for motion generation in the ball-receiving mode, reduce the amount of computation in online trajectory planning, and improve the system's response speed.
[0099] For example, the motion primitive library can be categorized and stored according to ball type. A nearest neighbor search algorithm can be used to find the template in the motion primitive library that has the closest Euclidean distance to the predicted landing point coordinates. For instance, in a table tennis scenario, the motion primitive library could include templates for close-to-the-table fast attack, mid-table topspin, and long-range slice; in a badminton scenario, it could include templates for high clear, drop shot, smash, and flat drive; and in a tennis scenario, it could include templates for forehand shot, backhand slice, and net volley. Each swing motion template can be associated with one or more sets of control variables, including upper limb swing trajectory control variables, trunk deflection control variables, and lower limb support control variables. These control variables can be stored in time series format, with a sampling interval of 1ms to 5ms to ensure the precision of the motion.
[0100] In some embodiments, the predicted landing point coordinates and predicted contact time included in the ball-hitting trigger conditions serve as the basis for matching the swing motion template. The predicted landing point coordinates reflect the expected landing position of the ball, and the predicted contact time reflects the expected execution time of the hitting motion. Combining these two factors allows the robot to determine the type, force, and rhythm of the swing it needs to execute. For example, the predicted landing point coordinates can be obtained by acquiring continuous image frames of the ball using a visual perception unit and recursively calculating them using a Kalman filter algorithm, with the coordinate error controlled within ±20mm. The predicted contact time can be calculated based on the ball's current velocity vector, acceleration vector, and relative position to the table or ground, with the time error controlled within ±3ms. After retrieving the preset motion element library, the corresponding swing motion template can be matched according to the relative position of the predicted landing point coordinates and the preset court facilities. For example, when the predicted landing point is located in the area of the table close to the net, a close-to-the-table fast attack or drop shot template can be matched; when the predicted landing point is located in the area of the table far from the net, a mid-table topspin or high clear template can be matched; when the predicted landing point is located in the area of the edge of the court, a template for hitting the ball with a wide range of movement can be matched.
[0101] The swing motion template is associated with multiple control variables, including upper limb swing trajectory control variables, trunk deflection control variables, and lower limb support control variables. These control variables may be offset on the time axis and need to be time-aligned to generate a coordinated full-body movement. For example, the upper limb swing trajectory control variables may include the angle, angular velocity, and angular acceleration sequences of the shoulder, elbow, and wrist joints, and the trajectory shape can be adapted to the spatial position of the predicted landing point; the trunk deflection control variables may include the rotation angle, angular velocity, and torque sequences of the spinal joints, and the deflection direction can be consistent with the swing direction to counteract the inertial torque generated by the swing; the lower limb support control variables may include the stiffness, damping, and position sequences of the hip, knee, and ankle joints, and the support stiffness can be dynamically adjusted, ranging from 200 N·m / rad to 800 N·m / rad, to adapt to different hitting forces. Timing alignment aligns the start time of each control variable to a preset preparation period before the predicted contact moment. For example, the acceleration phase of the upper limb swing trajectory can be aligned to 20ms before contact, the initiation of trunk deflection to 15ms before contact, and the increase in lower limb support stiffness to 30ms before contact. The alignment accuracy can be controlled within ±1ms, ensuring the coordination of joint movements. The aligned control variables can be combined to generate an initial motion component corresponding to the receiving pattern. The duration of this initial motion component can cover the period from the preparation phase to the recovery phase after the shot, with a total duration ranging from 50ms to 200ms, depending on the shot force and swing amplitude.
[0102] The target joint set corresponding to the current operating mode is a predefined subset of joints that need to be controlled in the ball-catching mode. This set is used to filter out valid control components from the initial motion components, eliminating irrelevant or conflicting control commands and ensuring the relevance of the control instructions. For example, the target joint set may include the shoulder, elbow, and wrist joints of the upper limbs, the spinal joints of the trunk, and the hip, knee, and ankle joints of the lower limbs, covering the major joints of the body. In the ball-catching mode, control components of unnecessary joints such as finger and head joints can be masked to reduce computational load. Based on the target joint set, corresponding control components can be filtered from the initial motion components. The filtering process can use a mapping table lookup, indexing the control quantity sequence corresponding to the joint name or ID. The filtered control components can then be used as the control components for each joint, for subsequent splicing and distribution. During the filtering process, the rationality of each control component can also be verified, such as checking whether the joint angle exceeds physical limits or whether the torque exceeds safety thresholds. Control components that fail verification can be replaced with default zero-return commands or safety protection commands to ensure the safety of motion execution.
[0103] By retrieving a pre-set motion primitive library and matching the swing motion template with the predicted landing point coordinates and predicted touch time, the generation efficiency of receiving actions can be significantly improved, online computation latency reduced, and real-time requirements adapted to high-speed rally scenarios can be met. Timing alignment of multiple control variables associated with the swing motion template generates coordinated full-body movements, ensuring the synergy of upper limb swing, torso rotation, and lower limb support, thus improving the stability of the shot and the efficiency of power transfer. Filtering control components based on target joint sets filters out invalid commands, reduces system load, and ensures accurate issuance of control commands. This implementation allows the robot to quickly respond to different ball situations in receiving mode, adapting to varying landing points and speeds, improving the success rate of receiving and the naturalness of the movements.
[0104] As one implementation method, this method also includes: In response to the operation mode switching command, the termination state of each controlled joint corresponding to the first action sequence before the mode switch and the start state of each controlled joint corresponding to the second action sequence after the mode switch are obtained. Calculate the state difference between the termination state and the initial state; When the state difference is greater than the first threshold, a transition interpolation trajectory is generated, and the actuators of each joint of the robot are controlled to switch from executing the first action sequence to executing the second action sequence according to the transition interpolation trajectory; wherein, the transition interpolation trajectory is used to smoothly transition the motion state of each controlled joint during the operation mode switching process; When the state difference is less than or equal to the first threshold, the actuators of each joint of the robot are directly controlled to switch from executing the first action sequence to executing the second action sequence.
[0105] In this embodiment, the operating mode switching instruction is a scheduling signal generated by the state machine based on changes in the current game rules or external environmental triggers. It instructs the robot to switch from the current operating mode to the next operating mode, thus coordinating with the timing definition of the rally and the scheduling logic of the action generation module to ensure the orderly connection of actions at each stage. For example, the operating mode switching instruction can be generated when parameters are updated during the current rally stage, such as transitioning from the serve preparation stage to the serve and hit stage, from the receive stage to the repositioning stage, or from the current rally to the next rally. Specifically, the operating mode switching instruction may include a source mode identifier, a target mode identifier, and a trigger timestamp.
[0106] For example, the first action sequence is a full-body action sequence generated in the operating mode before the switch and about to stop execution. It includes the target position, target velocity, and target torque parameters of each controlled joint at the time of the switch. The termination state of each controlled joint is the actual physical state of the joint at the time the first action sequence stops execution, reflecting the robot's ending posture when performing the previous mode action. The second action sequence is a full-body action sequence generated in the operating mode after the switch and about to start execution. It includes the new target position, new target velocity, and new target torque parameters of each controlled joint at the time of the switch. The initial state of each controlled joint is the expected physical state of the joint at the time the second action sequence starts, reflecting the robot's starting posture when performing the next mode action, and can serve as a target reference for the switching process.
[0107] For example, the termination state of each controlled joint can be obtained by reading the position feedback value, speed feedback value and torque feedback value of each joint encoder. For example, the sampling frequency can be set to 1kHz to 2kHz to ensure the real-time and accuracy of the state data. The starting state of each controlled joint can be extracted from the first frame data of the second action sequence. For example, the extraction process can be completed within 5ms after the switching command is generated to ensure the timeliness of the switching.
[0108] By calculating the multi-dimensional differences between the termination and initial states, a state difference degree is obtained, which reflects the discontinuity of joint motion during mode switching. This determines whether to enable transition interpolation trajectories and can form a multi-layered safety protection logic with subsequent preliminary kinematic verification and dynamic safety verification. For example, the state difference degree can include position difference components, velocity difference components, and torque difference components. The position difference component can calculate the Euclidean distance (in radians or millimeters) between the termination and initial positions; the velocity difference component can calculate the vector difference (in radians / second or meters / second) between the termination and initial velocities; and the torque difference component can calculate the algebraic difference (in Newton-meters) between the termination and initial torques.
[0109] For example, the overall state difference can be calculated using a weighted average method. The weighting coefficients can be dynamically adjusted according to the importance of different joints. For instance, the weight for positional difference in upper limb joints can be set to 0.6, velocity difference to 0.3, and torque difference to 0.1; the weight for positional difference in lower limb joints can be set to 0.5, velocity difference to 0.2, and torque difference to 0.3. The calculation time for state difference can be controlled within 2ms, meeting the requirements of real-time control.
[0110] The first threshold is a preset state difference threshold used to determine whether a smooth transition is needed for the joint state differences before and after the switch. The specific threshold can be set according to the robot's mechanical characteristics and control precision requirements. For example, the first threshold can be set as the comprehensive difference value corresponding to a joint angle deviation of 15° to 30°, a speed deviation of 30° / s to 60° / s, and a torque deviation of 5 N·m to 10 N·m. For high-speed table tennis rallies, the first threshold can be set to a smaller value, for example, corresponding to an angle deviation of 15° and a speed deviation of 30° / s, to improve the smoothness of the switch. For large-scale badminton movements, the first threshold can be set to a larger value, for example, corresponding to an angle deviation of 30° and a speed deviation of 60° / s, to reduce unnecessary interpolation calculations.
[0111] The transition interpolation trajectory is a temporary action sequence generated between the first action sequence before the switch and the second action sequence after the switch. It serves to smoothly transition joint motion states, bridging the state gap between the two sequences through an interpolation algorithm and preventing abrupt changes in joint motion states. For example, the generation of the transition interpolation trajectory can last from 10ms to 50ms. During this period, the transition coefficient is incremented from 0 to 1 according to the time step. The transition coefficient represents the interpolation ratio between the current state and the initial state. The interpolation algorithm can use linear interpolation, cubic polynomial interpolation, or quintic polynomial interpolation. Linear interpolation is suitable for scenarios with small differences, requiring less computation but resulting in discontinuous acceleration. Cubic polynomial interpolation ensures continuity of position and velocity, making it suitable for scenarios with moderate differences. Quintic polynomial interpolation ensures continuity of position, velocity, and acceleration, making it suitable for high-speed scenarios with large differences. During the interpolation process, the generated trajectory can be kinematically verified to ensure that the joint position, velocity, and acceleration are within physical limits. If the verification fails, the interpolation parameters can be adjusted or the transition time extended.
[0112] When the state difference exceeds a first threshold, a transition interpolation trajectory can be generated and inserted between the end of the first action sequence and the beginning of the second action sequence. Each joint actuator is then controlled to move along this trajectory, achieving a smooth transition from the first action sequence to the second. For example, the transition period of the transition interpolation trajectory can be dynamically adjusted based on the magnitude of the state difference. When the joint angle deviation corresponding to the state difference is 20°, the transition period can be set to 30ms. When the deviation increases to 30°, the transition period can be extended to 50ms to reduce the rate of change in joint motion state per unit time. When the state difference is less than or equal to the first threshold, each joint actuator can be directly controlled to switch from executing the first action sequence to executing the second action sequence without generating a transition interpolation trajectory. The switching process can be completed within one control cycle after the switching trigger timestamp, for example, the control cycle can be 1ms to 5ms. Before switching, a safety check can be performed on the first frame of the second action sequence to ensure that it does not cause joint over-limits or conflicts. The check includes whether the position is within the limit range, whether the speed is within the maximum allowable value, and whether the torque is within the safety threshold.
[0113] By employing a time-triggered mechanism for mode switching commands, the orderly scheduling of actions at each stage of a combat round is ensured, avoiding action discontinuities caused by command conflicts. By calculating the state difference of joints before and after switching and comparing it with a first threshold, the switching method can be intelligently decided, balancing motion stability and system response speed to adapt to the dynamic requirements of different combat scenarios. Through a smooth transition design using interpolation trajectories, shocks, vibrations, and hardware damage caused by abrupt changes in joint motion states during mode switching are effectively avoided, improving the continuity and anthropomorphism of actions in multi-round continuous combat scenarios. A direct switching strategy with small differences reduces unnecessary computational overhead, improves robot response efficiency, and meets the real-time requirements of high-speed combat scenarios.
[0114] As one implementation method, generating transition interpolation trajectories includes: Determine the transition period between the first action sequence before the handover and the second action sequence after the handover, and increase the transition coefficient from 0 to 1 within the transition period according to the time step; where the transition coefficient of 0 corresponds to the first action sequence before the handover, and the transition coefficient of 1 corresponds to the second action sequence after the handover. Based on the transition coefficient, a weighted mixed interpolation process is performed on the first action sequence and the second action sequence to obtain the interpolated action sequence. If the interpolated motion sequence passes the preliminary kinematic verification and the dynamic safety verification, the verified interpolated motion sequence will be used as the transition interpolated trajectory. The preliminary kinematic verification is used to verify whether the interpolated motion sequence meets the joint maximum velocity limit, maximum acceleration limit and limb collision avoidance constraints.
[0115] In this embodiment, the transition period is a time window connecting the first action sequence before the switch and the second action sequence after the switch. It provides a buffer for changes in joint movement states, avoiding instantaneous jumps during state transitions. Its duration can be dynamically adjusted according to the difference in states before and after the switch to adapt to the smoothness requirements of different scenarios. For example, the transition period can be set to 10ms to 50ms. For instance, in a high-speed table tennis rally scenario, it can be set to 10ms to 30ms to balance response speed and smoothness; in a large-range movement switching scenario in badminton, it can be set to 20ms to 40ms; and in a large-span movement switching scenario in tennis doubles, it can be set to 30ms to 50ms. The duration adjustment step can be set to 1ms to ensure the precision of the adjustment.
[0116] In this embodiment, the transition coefficient is a dimensionless parameter representing the switching progress during the transition period, ranging from 0 to 1. A transition coefficient of 0 corresponds to the joint state of the first action sequence before the switch, and a transition coefficient of 1 corresponds to the joint state of the second action sequence after the switch. By increasing this coefficient, a continuous transition of the control quantity from the old state to the new state can be achieved. For example, the transition coefficient can be increased linearly, by an S-curve, or by a cubic polynomial. Linear increase involves less computation and is suitable for switching scenarios with small state differences. S-curve increase ensures continuous acceleration and reduces joint impact during the switching process, making it suitable for switching scenarios with large differences in high-speed combat. Cubic polynomial increase ensures the continuity of position and velocity simultaneously, adapting to the requirements of high-precision action switching. The increment time step can be set to 0.5ms to 2ms, consistent with the controller's operation cycle, to ensure the smoothness of the transition process.
[0117] It is understandable that weighted hybrid interpolation is a calculation method based on the transition coefficient, which proportionally fuses the control quantities of the first and second action sequences. This generates an interpolated action sequence between the two sequences, bridging the state gap before and after the switch. For example, the interpolation objects can include joint target position, target velocity, target torque, and joint stiffness parameters. The weighting formula is: Current control quantity = (1 - Transition coefficient) × Control quantity before switch + Transition coefficient × Control quantity after switch. For stiffness-sensitive scenarios such as table tennis serves, joint stiffness parameters can also be simultaneously weighted and mixed to ensure a smooth change in racket support stiffness during the switch. The interpolation order can be selected according to requirements. Linear interpolation only processes position parameters and is suitable for low-dynamic scenarios; cubic polynomial interpolation can process both position and velocity parameters simultaneously and is suitable for medium-dynamic scenarios; quintic polynomial interpolation can process position, velocity, and acceleration parameters simultaneously and is suitable for high-dynamic shot switching scenarios.
[0118] It is understandable that the preliminary kinematic verification is a basic compliance check on the interpolated motion sequence. It verifies whether the sequence meets the maximum joint velocity limits, maximum acceleration limits, and limb collision avoidance constraints, proactively identifying frames that exceed physical limits or pose a collision risk. This verification works in conjunction with the state difference judgment stage to jointly ensure the safety of mode switching. For example, the maximum joint velocity limit can be set to ±180° / s for upper limb joints and ±90° / s for lower limb joints; the maximum acceleration limit can be set to ±360° / s² for upper limb joints and ±180° / s² for lower limb joints; and the limb collision avoidance constraint can use an axis-aligned bounding box detection method, setting the minimum distance between the racket and the net to 50mm and the minimum distance between the robotic arm and the torso to 100mm. Verification can be performed at each time step. If a frame is found to exceed the limits, the transition period duration or the target control quantity after switching can be dynamically adjusted, and the interpolated sequence can be regenerated until the verification passes.
[0119] It is also understandable that the dynamic safety verification is a compliance check on the rate of change of joint torque in the interpolation sequence. This ensures that the torque change is within the tolerance range of the joint actuator, preventing impact damage. This verification, together with the preliminary kinematic verification, constitutes a double safety line of defense for the transition trajectory. If the interpolated motion sequence passes both the preliminary kinematic verification and the dynamic safety verification, the verified interpolated motion sequence can be used as a transition interpolation trajectory, inserted between the end of the first motion sequence and the beginning of the second motion sequence, to control the mode switching of each joint actuator.
[0120] By defining the transition period and increasing transition coefficient strategy for the appropriate scenario, a smooth transition between two action sequences can be achieved while ensuring switching response speed, avoiding abrupt changes in joint motion states. The interpolated action sequence generated through weighted hybrid interpolation can accommodate the action requirements before and after the switch, bridging the state gap. Through dual verification of kinematics and dynamics, the safety and feasibility of the transition trajectory can be ensured, reducing joint impact, vibration, and hardware damage during the switching process. This improves the stability and continuity of actions in multi-round continuous combat scenarios, adapting to the combat requirements of different ball sports such as table tennis, badminton, and tennis.
[0121] As one implementation method, this approach also performs dynamic safety checks on the interpolation action sequence in the following manner: For the joint torque sequence arranged by time step in the interpolated motion sequence, calculate the absolute value of the difference between the joint output torque within adjacent time steps; The absolute value of the calculated difference is compared with the second threshold; whereby the second threshold is used to characterize the safe upper limit of the maximum torque difference that the robot's joint actuators can withstand in adjacent control cycles. When the absolute value of the difference between the joint output torques within all adjacent time steps does not exceed the second threshold, the interpolated action sequence is determined to have passed the dynamic safety check.
[0122] In this embodiment, the joint torque sequence is an ordered set of the output torques of each joint arranged sequentially according to the time step in the interpolated action sequence. Each element corresponds to the target torque value required by the joint actuator within a control cycle, which can reflect the force change trend of the joint actuator during mode switching. The second threshold is a preset safety parameter, which represents the maximum safe upper limit of the maximum torque difference that the robot's joint actuator can withstand in adjacent control cycles. It is used to constrain the rate of change of joint torque during mode switching, avoiding mechanical shock, overheating, or service life reduction of the actuator caused by sudden torque changes, and can be adapted to the load characteristics of different ball game scenarios.
[0123] For the joint torque sequence arranged by time step in the interpolated motion sequence, the absolute value of the difference between the joint output torque within adjacent time steps can be calculated. The time step can be consistent with the underlying control cycle, with a value range of 0.5ms to 2ms to ensure the precision of the calculation. For example, the calculation process can be performed only on the active joints involved in mode switching, filtering out invalid data from passive joints or idle joints in the current operating mode to reduce computational overhead; alternatively, a full difference calculation can be performed on all controlled joints to ensure no omissions in the verification. The calculated absolute value of the difference is compared with a second threshold. The value of the second threshold can be flexibly adjusted according to the rated parameters of the joint actuator and the load characteristics of the corresponding ball. For example, in a table tennis match scenario where the joint load is relatively small, the second threshold can be set to 5N·m to 7N·m; in a badminton match scenario where the joint swing amplitude is large, the second threshold can be set to 7N·m to 9N·m; and in a tennis scenario where the torque required for hitting the ball is large, the second threshold can be set to 9N·m to 12N·m.
[0124] When the absolute value of the difference between all adjacent time steps does not exceed the second threshold, the torque change rate of the interpolation action sequence is deemed to meet the safety requirements, and the dynamic safety check is passed. If the absolute value of the difference at a certain time step exceeds the second threshold, the duration of the transition period can be dynamically adjusted. For example, the transition period can be extended by 5ms to 10ms to reduce the torque change rate per unit time, or a higher-order interpolation algorithm such as an S-curve can be switched to smooth the torque change trend. The interpolation action sequence is then regenerated and the check is performed again until all differences meet the safety requirements.
[0125] By verifying the absolute value of the difference in the joint torque sequence frame by frame and using a second threshold as a constraint to limit the rate of torque change, abrupt changes in joint torque during mode switching can be effectively avoided, reducing the risks of actuator impact, mechanical wear, and attitude instability, and improving the smoothness of action switching during multi-round continuous combat. Adapting different second thresholds to different ball sports scenarios balances action response speed and hardware protection requirements, adapting to diverse combat needs such as precise control in table tennis, wide-range swings in badminton, and high-load shots in tennis, ensuring the robustness of the human-machine combat system and the lifespan of the hardware.
[0126] As one implementation method, this method also includes: In response to the current operating mode being ball-receiving mode, the swing inertial torque is calculated based on the real-time motion parameters and inertia parameters of the robot's racket-holding robotic arm. If the swing motion of the robotic arm exceeds a preset threshold, a torso counteracting torque is generated. The direction of the torso counteracting torque is opposite to the direction of the swing inertial torque, and the amplitude of the torso counteracting torque is proportional to the amplitude of the swing inertial torque. The trunk counteracting torque is used as a trunk attitude compensation component and superimposed on the trunk deflection control quantity.
[0127] In this embodiment, the swing inertial torque is the reaction torque on the robot's torso generated by the accelerated movement of each joint and the end-effector load movement when the robot arm performs a swing action in ball-catching mode. It reflects the degree of disturbance of the swing action to the robot's overall posture. The preset amplitude threshold is a pre-set critical parameter used to determine whether the swing action is a large-amplitude movement. It provides a trigger condition for the generation of the torso's counteracting torque, avoiding unnecessary compensation calculations in small-amplitude swing scenarios, thus balancing control accuracy and system overhead.
[0128] It should be noted that the torso counteracting torque is a compensating torque generated based on the swing inertia torque, used to counteract this inertial disturbance. Its direction is opposite to the swing inertia torque, and its amplitude is proportional to the swing inertia torque, used to maintain the stability of the robot's upper body posture. The torso posture compensation component can be used to dynamically correct the torso deflection control output by the ball-catching motion generation module.
[0129] For example, the real-time motion parameters of the racket-holding robotic arm can include the real-time angular velocity and angular acceleration of each joint, and the linear acceleration of the end effector. The inertia parameters can include the mass of each link of the racket-holding robotic arm, the position of the center of mass, the moment of inertia about the center of mass, and the equivalent parameters of the joint transmission inertia. The swing inertial torque can be calculated based on the sum of the products of the angular acceleration of each joint and the corresponding equivalent moment of inertia, or it can be calculated based on the product of the end effector linear acceleration and the equivalent mass of the end effector of the robotic arm. The preset amplitude threshold can be determined comprehensively based on the arc length of the swing trajectory, the change in the angle of each joint, or the end effector velocity. For example, the change in the shoulder joint angle during the swing can exceed 30°, or the end effector velocity can exceed 2m / s as the trigger condition. In the table tennis scenario, the preset amplitude threshold can be set to the corresponding end effector velocity of 1.5m / s, in the badminton scenario it can be set to the corresponding end effector velocity of 3m / s, and in the tennis scenario it can be set to the corresponding end effector velocity of 5m / s. When the swing motion of the robotic arm exceeds a preset threshold, a torso counteracting torque can be generated in real time. The proportional coefficient can be dynamically adjusted according to the stiffness, damping characteristics, and real-time posture error of the torso joints. The adjustment range can be from 0.5 to 1.2 to ensure a good match between the compensation torque and the disturbance torque. The generated torso counteracting torque can be used as a torso posture compensation component and superimposed on the torso deflection control quantity to form a corrected torso control command. This command can be combined with other control components according to a preset joint mapping table to form a whole-body motion sequence and sent to each joint actuator for execution.
[0130] By calculating the swing inertial torque based on the real-time motion and inertia parameters of the robotic arm, the system can proactively identify posture disturbance sources before or during the swing, improving the timeliness of compensation. When the swing amplitude exceeds a preset threshold, a counteracting torque on the torso, with the opposite direction and proportional amplitude to the swing inertial torque, is generated and added to the torso deflection control as a torso posture compensation component. This proactively counteracts the inertial disturbances generated by the swing, effectively suppressing torso deflection and center of gravity drift, and reducing the impact of large upper limb movements on overall stability. This approach improves the stability of the robot's posture and the control accuracy of the shot in receiving mode, reduces the shot point deviation caused by torso swaying, and is suitable for the large-amplitude swing requirements in multi-ball games such as table tennis, badminton, and tennis.
[0131] As one implementation method, this method also includes: During the monitoring of the interaction between the flight ball and the preset court facilities, the collision sequence between the flight ball and the edge of the hitting surface, the net and the table surface is identified, as well as the target events of the flight ball, including at least one of the following: out of bounds event, net event or net touch foul event. Based on the collision sequence, target event, and the serving order and round count parameters included in the current game rules state, the score attribution for the current rally is determined and the cumulative score is updated; among them, the score attribution determination result is used to trigger the round end signal for the current rally.
[0132] Pre-set court facilities in a competitive scenario can include the striking surface, net, and boundary markers, providing a physical benchmark for the motion constraints of the ball and serving as physical references for identifying collision sequences and target events. The striking surface is the specific area the ball must touch in a legal rally; for example, a ping-pong table, badminton court surface, or tennis court surface. Its geometric boundaries define the validity of the ball's landing point. The net is an obstacle separating the two sides; a legal pass over the net is a prerequisite for scoring. The table surface is the concrete representation of the striking surface, especially in table tennis and other table-based competitive sports, where its edges and surface together constitute the landing point determination area. For example, the pre-set court facilities can be pre-loaded into the robot's spatial coordinate system, and by calibrating its three-dimensional coordinate range, a precise geometric model is provided for collision detection.
[0133] In some embodiments, the collision sequence is a time-series record of the contact between the flying ball and the preset venue facilities during its movement. It includes the timestamp of each collision, the coordinates of the contact position, the velocity vector after the collision, and the energy attenuation coefficient, which can reconstruct the trajectory and physical interaction process of the flying ball. For example, the acquisition frequency of the collision sequence can be synchronized with the sampling frequency of the visual perception unit, for example, it can be set to 200Hz to 500Hz to ensure that the instantaneous collisions at the millisecond level are captured; the recognition accuracy of the collision position can be controlled within ±5mm, and the contact point in the image is mapped to the world coordinate system through a stereo vision matching algorithm; the velocity vector after the collision can be calculated by analyzing the displacement changes of the ball in multiple consecutive frames of images before and after the collision, which is used to determine whether the ball loses effective kinetic energy due to the collision.
[0134] A target event is a specific collision result or state of motion that directly determines the score of the current rally and can serve as a signal to end the rally. An out-of-bounds event occurs when the ball, before or after contact with the striking surface, lands outside the boundaries of the designated playing area and is not legally returned by the opponent; this event is usually considered a point lost by the player who last touched the ball. A net incident occurs when the ball touches the net during flight but fails to cross it into the opponent's valid area, or bounces back to the player's playing area after touching the net; this event is usually considered a point lost by the player who struck the ball. A net touch incident occurs when, during a shot, the ball, the player's limbs, or the racket touches the net, causing significant deformation or displacement of the net; according to current ball game rules, this type of incident is usually considered a point lost by the player who touched the net.
[0135] For example, the identification of target events can be combined with the collision sequence and the real-time motion trajectory of the ball for multimodal judgment. For instance, when the collision sequence shows that the ball collides with the edge of the table and the velocity vector after the collision points out of bounds, it can be determined as an out-of-bounds event; when the collision sequence shows that the ball collides with the net and the vertical velocity component after the collision points downwards, it can be determined as a net-hitting event.
[0136] In this embodiment, the serving order is a parameter used in the current game rules to identify which side should have the right to serve, and the round count parameter is a parameter that records the number of consecutive serves by the current server. Based on the collision sequence, target event, serving order, and round count parameter, the score allocation for the current rally can be determined.
[0137] For example, if the target event is an out-of-bounds event where the opponent fails to return the ball legally, and the current serving order indicates that the robot is the server, then the robot scores a point; if the target event is a net violation, and the current serving order indicates that the robot is the server, then the opponent scores a point; if the target event is a net touch violation, and the current serving order indicates that the robot is the server, then the opponent scores a point. The result of the score determination can trigger a round end signal for the current rally. The duration of this signal can be set to 10ms to 50ms, which is used to notify the state machine to update the game rules state, initiate a center of gravity repositioning operation, and prepare to enter the next rally.
[0138] After determining the score's ownership, the cumulative score can be updated based on the determination result. The update logic uses an incremental accumulation method: when the robot scores, its own score is incremented by 1, and when the opponent scores, the opponent's score is incremented by 1. For example, in a table tennis 11-point system scenario, when the cumulative score reaches 10-10, the serve rotation rule can be automatically adjusted from a two-ball rotation to a one-ball rotation, and the mode switching trigger condition in the built-in state machine can be updated simultaneously to ensure the compliance and continuity of the game process.
[0139] By monitoring the interaction between the flying ball and the pre-set court facilities, collision sequences and target events can be captured in real time, providing objective and accurate data support for scoring and avoiding the subjectivity and delays of manual judgment. Determining score allocation by combining the serving order and round count parameters strictly adheres to current ball game competition rules, ensuring consistency and fairness in match judgments. By updating the cumulative score and triggering the round end signal, automated flow of rallies can be achieved, providing clear timing nodes for the robot's state switching and action scheduling, improving the smoothness and intelligence of multi-round continuous rallies, and adapting to the competition needs of various ball games such as table tennis, badminton, and tennis.
[0140] As one implementation method, controlling the robot to perform a center of gravity repositioning operation includes: Based on the upper limb movement posture, lower limb standing coordinates and robot orientation represented by the proprioceptive information, calculate the state deviation between the robot's current center of gravity projection point and the center point of the preset preparation area. The pre-defined optimization objective function, which includes position recovery cost, attitude stabilization cost, and control smoothness cost, is invoked to solve for the repositioning control command for the current control cycle under kinematic constraints, dynamic constraints, and safety constraints. After the repositioning control command passes compliance verification, the robot's lower limb joints are driven to perform corresponding adjustments, the body perception information is updated in real time, and the repositioning path is iteratively solved and corrected until the state deviation is less than the third threshold, so that the robot reaches the ready posture to be switched.
[0141] In this embodiment, the center of gravity projection point is the vertical projection position of the robot's total weight equivalent point of action on the horizontal plane. Specifically, it can be determined by the upper limb posture, lower limb stance coordinates, and the robot's orientation. It serves as a geometric reference characterizing the robot's overall balance state, reflecting the relative positional relationship between the line of gravity and the support surface in the current posture, and providing a quantitative control target for center of gravity repositioning. The preset preparation area center point is a predefined ideal position that the center of gravity projection point should return to when the robot is in a standard ready-to-hit posture. In a table tennis scenario, it can be set 300mm directly behind the center of the table; in a badminton scenario, it can be set at the center of the court; and in a tennis scenario, it can be set to a specified coordinate within the service area. This center point provides a stable reference benchmark for repositioning control, ensuring the robot returns to a uniform ready posture.
[0142] Specifically, state deviation is the two-dimensional planar distance between the current center of gravity projection point and the center point of the preset preparation area. It comprehensively reflects the direction and magnitude of positional offset and serves as a quantitative indicator for triggering repositioning adjustments and evaluating the repositioning effect. For example, state deviation can be obtained by real-time calculation of the lower limb stance coordinates and upper limb movement posture. The calculation frequency can be set to 500Hz to 1000Hz, and the deviation resolution can be controlled within ±1mm. When the deviation exceeds a third threshold (e.g., 50mm to 100mm), the repositioning control process can be triggered. When the deviation is less than the third threshold, it can be determined that the robot has reached the ready posture to be switched.
[0143] The optimization objective function is a pre-defined mathematical model used to guide the planning of the center of gravity repositioning path. By minimizing this function value, a repositioning control command that takes into account multiple control requirements can be obtained. This function includes three core components: position recovery cost, attitude stabilization cost, and control smoothness cost. Specifically, the position recovery cost measures the distance between the current center of gravity projection point and the center point of the pre-defined preparation area, for example, presented as the square of the deviation, with a weighting coefficient set to 0.4 to 0.6 to prioritize the efficiency of center of gravity return. The attitude stabilization cost measures the attitude fluctuations of the trunk and upper limbs during repositioning, presented as the square of the trunk deflection angle and angular velocity, with a weighting coefficient set to 0.2 to 0.4 to prevent secondary imbalances caused by large swings. The control smoothness cost measures the rate of change of control quantities during lower limb joint adjustment, for example, presented as the square of the joint velocity and acceleration, with a weighting coefficient set to 0.1 to 0.3 to reduce actuator impact and energy consumption. For example, the objective function can be constructed using quadratic programming. In the table tennis scenario, the focus can be on the position recovery cost. In the badminton scenario where the ball moves a large area and then returns to its original position, the weight of the posture stability cost can be increased. In the tennis doubles scenario where the ball moves quickly, the control smoothness cost can be strengthened to adapt to the dynamic requirements of different ball games.
[0144] It should be noted that kinematic constraints, dynamic constraints, and safety constraints are physical limitations that must be followed when solving the optimization objective function. These constraints ensure that the generated control commands are within the robot's executable range and prevent hardware damage caused by exceeding mechanical limits. Kinematic constraints may include angular limits for each joint of the lower limbs (e.g., hip joint ±90°, knee joint 0° to 120°, ankle joint ±45°) and velocity limits (e.g., maximum angular velocity of each joint ±90° / s), ensuring that joint movements do not exceed their physical travel. Dynamic constraints may include maximum output torque of the joints (e.g., hip joint ±50 N·m, knee joint ±100 N·m, ankle joint ±30 N·m) and maximum power limits to prevent motor overload. Safety constraints may include anti-slip constraints on the soles of the feet (minimum static friction coefficient threshold 0.3) and trunk tilt angle limits (maximum forward tilt angle ±15°, lateral tilt angle ±10°), preventing slippage or tipping during center of gravity adjustment. For example, these constraints can be constructed as an inequality constraint matrix for the optimization problem, and the feasibility of the control commands can be verified in real time during the solution process. Once the command exceeds the constraint range, a penalty mechanism or replanning of the path can be automatically triggered.
[0145] Repositioning control commands are a set of specific control quantities used to drive lower limb joint adjustments, obtained by solving the objective function under constraints. They include at least the target angles, target velocities, and target torque parameters for the hip, knee, and ankle joints, and are crucial data connecting upper-level decision-making and lower-level execution. Compliance verification involves multiple safety checks on the repositioning control commands, including kinematic verification (whether joint angles and velocities are within limits), dynamic verification (whether joint torques are within safety thresholds), and logical verification (whether the command causes self-collision or singular configurations). Only commands that pass these checks can be issued for execution.
[0146] In some embodiments, driving the lower limb joints to perform corresponding adjustments can adopt a three-level closed-loop control mode of position-velocity-torque. The position loop tracks the target angle, the velocity loop limits the adjustment rate, and the torque loop ensures that the output force meets physical requirements. The adjustment process can monitor the body perception information in real time. When the center of gravity projection point is detected to converge towards a preset area, the repositioning path can be iteratively solved and corrected. For example, the adjustment amplitude of subsequent control commands can be reduced or the joint stiffness parameters can be optimized. The iterative process can continue until the state deviation is less than a third threshold (e.g., 50mm). At this point, it can be determined that the robot has reached the ready posture to be switched and can exit the repositioning process to prepare to receive the control commands of the next round. For example, in the table tennis scenario, the center of gravity return time can be controlled within 200ms; after a large-scale movement of the badminton shuttlecock, the return time can be controlled within 500ms; and in the fast-switching scenario of tennis doubles, the return time can be controlled within 300ms to meet the needs of different playing rhythms.
[0147] By accurately calculating state deviations based on ontological perception information and guided by an optimization objective function incorporating multiple costs, the repositioning control commands are solved under strict physical constraints, enabling efficient and stable return of the robot's center of gravity. The introduction of compliance verification and iterative correction mechanisms further ensures the safety and robustness of the adjustment process, avoiding imbalances or hardware damage caused by improper control. This allows the robot to quickly recover to a standardized ready posture after multiple rounds of continuous play, significantly reducing response latency between rounds and improving the robot's continuous combat capability and adaptability to different ball-playing scenarios.
[0148] As one implementation method, the hitting trigger conditions are determined based on real-time motion information, including: When the game rule state characterizes the robot as the receiver in the current round, the displacement features of the flying ball between consecutive frames are extracted from the real-time motion information to estimate the velocity vector and rotation vector of the flying ball. Input the velocity vector and rotation vector into the preset trajectory prediction model. The trajectory prediction model is used to output the predicted landing point coordinates and the predicted touch time of the flying ball within a preset time period in the future. The predicted moment of impact and the predicted landing point coordinates are used as the conditions for triggering the shot.
[0149] In this embodiment, the receiver is the robot's role in responding to the opponent's shot in the current round. This role is determined by the serve-right assignment parameter in the current game rules and is a prerequisite for triggering the receiving mode and corresponding action generation logic. This clearly defines the robot's tactical positioning and control objectives within the round. The displacement features between consecutive frames are information on the ball's position changes collected by the visual perception unit within a short time window. For example, this could be a difference sequence containing three-dimensional spatial coordinates, reflecting the ball's real-time movement trend in the air.
[0150] The velocity vector is a physical quantity describing the direction and magnitude of the displacement of a flying ball per unit time, including the vector magnitude and spatial orientation, characterizing the speed and direction of the ball's flight. The rotation vector is the angular velocity vector describing the rotation of the flying ball around its own axis, including the spin rate and the direction of the rotation axis, and is a key factor affecting the stability of the ball's flight trajectory, aerodynamic characteristics, and rebound pattern after being hit by the paddle. For example, displacement features can be extracted based on the pixel coordinate difference of the ball in two or more consecutive frames of images, with the sampling window set to 5ms to 10ms to match the dynamic changes in high-speed motion scenarios; the velocity vector can be calculated by dividing the displacement difference by the sampling window duration, with the calculation error controlled within ±0.1m / s; the rotation vector can be obtained by analyzing the motion trajectory of marked points on the ball's surface or by using optical flow methods. In the table tennis scenario, the measurement error of the rotation vector can be controlled within ±50rpm, in the badminton scenario within ±30rpm, and in the tennis scenario within ±20rad / s.
[0151] As an example rather than a limitation, the trajectory prediction model is a mathematical model pre-installed in the robot's storage medium to predict the future movement path of the flying ball. Its inputs are the currently estimated velocity vector and rotation vector, and its outputs are the predicted landing point coordinates and predicted touch time of the flying ball within a preset time period in the future. It can provide a forward-looking decision-making basis for the timing of catching the ball and spatial positioning. For example, the trajectory prediction model can be constructed using physics-based kinematic equations, fully considering the effects of gravitational acceleration, air resistance, and the Magnus effect (lateral force caused by the rotation vector). It can also preset aerodynamic parameters corresponding to different ball types. For instance, a ping-pong ball has a mass of approximately 2.7g and a diameter of 40mm; a badminton shuttlecock has a large feather spread area resulting in a high air resistance coefficient; and a tennis ball's plush surface causes a significant rotational effect. The preset duration can be dynamically adjusted according to the characteristics of the ball and its flight speed. In the ping-pong scenario, it can be set to 0.2s to 0.5s; in the badminton scenario, it can be set to 0.5s to 1.0s; and in the tennis scenario, it can be set to 0.8s to 1.5s, ensuring that the prediction results cover the complete flight process from the current moment to the expected moment of impact.
[0152] As an example, not a limitation, the predicted landing point coordinates are the spatial location where the ball is expected to strike the table, ground, or racket, while the predicted contact time is the point at which the ball is expected to make contact with the racket. The accuracy of both predictions directly determines the success or failure of the shot. For example, the error in the predicted landing point coordinates can be controlled within ±20mm, and the error in the predicted contact time can be controlled within ±3ms to meet the real-time requirements of high-speed rallies.
[0153] Using the predicted touch moment and predicted landing point coordinates as the hitting trigger conditions means that the robot's receiving action will initiate at that moment and near that position, rather than relying on simple threshold judgment or delayed triggering. This prediction-based feedforward control strategy can significantly shorten the system's response latency and improve the initiative of the hitting action. For example, in actual control, the predicted touch moment can be shifted forward by a preset lead amount (e.g., 10ms to 15ms) as the starting signal for the hitting action, allowing time for the robotic arm to accelerate and adjust its posture; simultaneously, the predicted landing point coordinates can be used as the target point for swing trajectory planning, guiding the robotic arm's end effector to move towards that position. By continuously updating the velocity and rotation vectors, the trajectory prediction model can perform rolling optimization, that is, re-estimating the state and updating the prediction results for each new frame of real-time motion information, ensuring that the hitting trigger conditions are always based on the latest ball flight state, effectively responding to changes in the opponent's ball spin and sudden changes in speed.
[0154] By extracting displacement features from real-time motion information to estimate velocity and rotation vectors when the robot is the receiver according to the game rules, and inputting these key state parameters into a pre-defined trajectory prediction model, high-precision forward-looking predictions of the ball's future trajectory can be achieved. The predicted touch time and landing point coordinates are directly used as the striking trigger conditions, enabling the robot's receiving action to shift from a passive response to active prediction, improving the accuracy of striking timing and spatial positioning precision. This model-based predictive control logic effectively overcomes the inherent defects of visual perception delay and mechanical response lag, enhancing the robot's adaptability and competitive level in multi-ball games, ensuring the success rate of receiving actions and the consistency of tactical execution.
[0155] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this disclosure.
[0156] In this embodiment, an example of a robot is provided, which includes a visual perception unit, a body perception unit, a controller, and an actuator: the visual perception unit is used to collect real-time motion information of a flying ball; the body perception unit is used to collect the robot's body perception information; the controller is connected to the visual perception unit and the body perception unit, and the controller is configured to execute any one of the robot's control methods; the actuator is connected to the controller and is used to receive control instructions from the controller and execute target actions and center of gravity repositioning actions accordingly.
[0157] In this embodiment, the visual perception unit is a sensing component for the robot to optically collect information about the external environment. It includes at least one of a high-speed industrial camera, an infrared camera, or a depth camera. The visual perception unit can also be deployed around or above the site and communicate with the robot's processor. It can work with the processor to calculate the three-dimensional spatial coordinates, velocity vector, and rotation vector of the flying ball at continuous moments, providing input basis for determining the ball-hitting trigger conditions, predicting the ball's trajectory, and dynamically adjusting the ball-hitting control parameters.
[0158] For example, in a table tennis match scenario, the visual perception unit may include two high-speed industrial cameras with a sampling frequency of 500Hz, which convert pixel coordinates into three-dimensional position information in the world coordinate system using a stereo vision algorithm; in a badminton match scenario, the visual perception unit may include four high-speed infrared cameras, which combine feather feature recognition algorithms to calculate the motion parameters of the ball; in a tennis doubles match scenario, the visual perception unit may include six high-speed cameras, which combine circular contour recognition algorithms to calculate the motion parameters of the ball. The acquisition frequency of the visual perception unit can be set to 200Hz to 500Hz, the measurement error of the velocity vector can be controlled within ±0.2m / s, and the measurement error of the rotation vector can be controlled within ±50rpm. When the ball is obstructed, the trajectory can be predicted based on the motion parameters of the previous moment using a Kalman filter algorithm until the position information of the ball is recaptured.
[0159] In this embodiment, the body perception unit is a sensing component that collects feedback on the robot's posture and position. It includes at least one of the following: encoders distributed across the joints of the upper limbs, encoders across the joints of the lower limbs, an inertial measurement unit (IMU), and an odometer on the omnidirectional chassis. It can work in conjunction with the processor to perform real-time calculations of the robot's upper limb posture and lower limb position coordinates, providing feedback for center of gravity repositioning, posture compensation, and motion accuracy verification, thus achieving closed-loop control. For example, the body perception unit can collect angle information from the encoders of each joint at a sampling frequency of 1kHz to 2kHz, and obtain the upper limb posture through forward kinematics calculations; it can fuse the angle information of the leg joints with the chassis odometer data to update the lower limb position coordinates in real time; and it can be equipped with an IMU to collect the angular velocity and linear acceleration of the torso to compensate for posture deviations during dynamic processes. When the upper limb posture exceeds a preset safety range, the body perception unit can trigger an emergency stop protection mechanism to prevent damage to the mechanical structure.
[0160] The controller is the central processing core of the robot, connecting the visual perception unit and the body perception unit. It is configured to execute any of the aforementioned control methods, converting perceived data into decision commands and sending them to the execution mechanism. It is the scheduling center of the playing process. For example, the controller can adopt a multi-core processor architecture, where the visual processing core runs the flight ball trajectory calculation and prediction algorithm, the control core is used for running state machine scheduling, motion generation module management, and optimizing objective function solution, and the communication core is used for task switching and data interaction. The controller can have a built-in rule engine to maintain the current game rule state, including the serve right, cumulative score, and the current stage of the rally. The controller can be configured with multiple independently runnable motion generation modules, including at least a serve preparation motion generation module, a serve hitting motion generation module, a receive motion generation module, and a repositioning motion generation module. Each module operates in parallel, and the running cycle can be set to, but is not limited to, 1ms to 5ms. After receiving data from the visual perception unit and the body perception unit, the controller can determine the current operating mode based on the current stage of the current round of combat as represented by the current game rules. Based on the current operating mode, the controller selects the joint control components that match the current operating mode from the initial motion components output by each motion generation module, splices them into a full-body motion sequence to be executed according to the preset joint mapping table, and sends them to the execution mechanism.
[0161] In this embodiment, the actuator is specifically an electromechanical component in the robot that connects to the controller, receives control commands, and performs physical actions. It includes at least a ball-holding robotic arm, a racket-holding robotic arm, and a lower limb motion mechanism, which can respectively perform target actions and center-of-gravity repositioning actions. The ball-holding robotic arm includes at least multiple serial joints, a flexible end-effector gripping component, and corresponding joint actuators, which can be driven by the controller to grasp, transfer, and release the flying ball. For example, the end of the ball-holding robotic arm can be equipped with a flexible gripping component, and the gripping force can be controlled between 0.5N and 2N to avoid deformation of the flying ball during the gripping process.
[0162] For example, the racket-holding robotic arm includes at least multiple serial joints, an end racket gripper, and corresponding joint actuators, which can be driven by a controller to complete the swing and hitting action; for example, the end of the racket-holding robotic arm is equipped with a racket adapted to the type of flying ball, and the flatness error of the racket can be controlled within ±0.5mm. At the moment of hitting the ball, each joint can use a three-level closed-loop control mode of position-velocity-torque to track the final hitting control parameters.
[0163] For example, the lower limb motion mechanism includes at least an omnidirectional moving chassis, leg joints, and corresponding joint actuators, which can be driven by the controller to complete stance locking, stance adjustment, and center of gravity repositioning actions. For example, the lower limb motion mechanism may include an omnidirectional moving chassis and leg joint actuators. The lower limb support stiffness can be dynamically adjusted according to the hitting force, ranging from 100 N·m / rad to 800 N·m / rad. The center of gravity repositioning operation can drive the lower limb joints to perform corresponding adjustments until the deviation between the robot's current center of gravity projection point and the center point of the preset preparation area is less than a third threshold. After receiving the whole-body motion sequence, the actuator can drive the corresponding joint actuators according to the control components of each joint to track the target position, target velocity, and target torque. The tracking error can be controlled within ±0.5° or ±0.1 N·m.
[0164] By accurately collecting real-time motion information of the flying ball through the visual perception unit, providing real-time feedback on the robot's own posture through the body perception unit, executing the aforementioned control methods through the controller, and precisely responding to the target action and center of gravity repositioning action through the actuator, the robot can form a complete closed loop of perception, decision-making, execution, and feedback. This effectively improves the robustness and sustainability of human-robot interaction, adapting to the control requirements of various ball games such as table tennis, badminton, and tennis. For example, in table tennis, the single-round response delay can be controlled within 25ms; in badminton, the center of gravity recovery time after a large-scale movement can be controlled within 0.8s; and in tennis doubles, the torso posture fluctuation during the swing can be controlled within ±2°. The coordinated cooperation of the ball-holding robotic arm, the racket-holding robotic arm, and the lower limb motion mechanism in the actuator can ensure the accuracy of the shot while achieving rapid and stable recovery of the robot's posture, meeting the performance requirements of multi-round continuous interaction.
[0165] Corresponding to the robot control method described in the above embodiments, Figure 6 This is a schematic diagram of the structure of a robot control method device provided in an embodiment of this disclosure. The device can be implemented as part or all of a computer device, which can be software, hardware, or a combination of both. Figure 7 The electronic device shown.
[0166] Reference Figure 6 The robot control method device 600 includes: The acquisition unit 601 is used to acquire real-time motion information of the flying ball for each round of play. The round of play is used to characterize the continuous control process from when the robot enters the first ball-striking preparation state to the second ball-striking preparation state. The second ball-striking preparation state is the next ball-striking preparation state after the first ball-striking preparation state. The determining unit 602 is used to determine the ball-hitting trigger condition based on real-time motion information. The ball-hitting trigger condition is used to characterize the ball-hitting timing when the robot is the server or the ball-hitting timing when the robot is the receiver. The control unit 603 is used to control the robot to perform a target action based on the ball-hitting trigger condition and the current game rule state; and after the robot performs the target action, it controls the robot to perform a center of gravity repositioning operation based on the acquired body perception information of the robot, so that the robot returns from the post-hitting state to the ready-to-hit posture; wherein, the game rule state is used to represent the service right, the cumulative score and the current stage of the rally; the target action includes at least one of the following: swinging the racket to hit the ball, center of gravity adjustment, and limb posture maintenance; the body perception information includes the robot's upper limb posture and lower limb position coordinates.
[0167] It is understood that the robot control method device embodiments and any implementation thereof correspond to the robot control method embodiments and any implementation thereof. The technical effects corresponding to the robot control method device embodiments and any implementation thereof can be found in the above-mentioned technical effects corresponding to the robot control method embodiments and any implementation thereof, and will not be repeated here.
[0168] It should be noted that the robot control method and device provided in the above embodiments are only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0169] The functional units and modules in the above embodiments 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. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of the embodiments of this disclosure.
[0170] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this disclosure. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0171] This disclosure also provides an electronic device, which includes one or more processors and a memory; The memory is coupled to one or more processors. The memory is used to store computer program code, which includes computer instructions. One or more processors invoke the computer instructions to cause the electronic device to execute the robot control method described above.
[0172] Figure 7This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. The electronic device 700 can be a mobile phone, smart screen, tablet computer, wearable electronic device, in-vehicle electronic device, augmented reality (AR) device, virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), projector, or a communication device such as a server, storage device, or base station, or a smart car, etc. This disclosure does not limit the specific type of electronic device.
[0173] The memory 701 can be used to store computer programs 702 and modules. The processor 703 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 701. The memory 701 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device (such as audio data, telephone directory, etc.). In addition, the memory 701 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0174] The processor 703 may include one or more processors such as a central processing unit (CPU), an application processor (AP), and a baseband processor. The processor can serve as the nerve center and command center of the electronic device. The processor 703 can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. The memory 701 can be used to store executable program code, including instructions. The processor 703 executes various functional applications and data processing of the electronic device by running the instructions stored in the memory. The memory 701 may include a program storage area and a data storage area, such as storing data for audio signals to be played. For example, the memory may be Double Data Rate Synchronous Dynamic Random Access Memory (DDR) or Flash memory.
[0175] This disclosure also provides a computer-readable storage medium storing computer instructions; when the computer-readable storage medium is used on an electronic device, it causes the electronic device to execute the robot control method described above.
[0176] The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or can include one or more data storage devices such as servers or data centers that can be integrated with media. The available medium can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media, or semiconductor media (e.g., solid-state disks (SSDs)).
[0177] This disclosure also provides a computer program product containing computer instructions, which, when run on an electronic device, enables the electronic device to execute the robot control method described above.
[0178] The computer storage medium and computer program product provided in the above-described embodiments are used to execute the methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects corresponding to the methods provided above, and will not be repeated here.
[0179] In the above embodiments, implementation can also be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this disclosure are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer, or a data storage device such as a server or data center that integrates one or more available media. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc., and the storage medium can also include combinations of the above types of memory.
[0180] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0181] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments claimed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0182] In the embodiments provided in this disclosure, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely illustrative. For instance, the division of modules or 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 displayed or discussed mutual couplings or direct couplings or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0183] 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.
[0184] The technical features of the various embodiments described above in this disclosure can be combined arbitrarily without conflict. For the sake of brevity, this specification does not describe all possible combinations, but as long as these combinations do not violate the technical spirit of this disclosure, they should all be considered within the scope of this disclosure. Based on the content disclosed in this disclosure, those skilled in the art can reasonably combine, delete, or replace the technical features of the above embodiments according to actual needs, and such modifications and variations all fall within the protection scope of this disclosure.
[0185] The above-described embodiments are only used to illustrate the technical solutions of this disclosure, and are not intended to limit it. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be included within the protection scope of this disclosure.
Claims
1. A method for controlling a robot, characterized in that, The method includes: For each round of play, real-time motion information of the flying ball is acquired. The round of play is used to characterize the continuous control process from when the robot enters the first ball-striking preparation state to the second ball-striking preparation state. The second ball-striking preparation state is the next ball-striking preparation state after the first ball-striking preparation state. Based on the real-time motion information, the ball-hitting trigger condition is determined, wherein the ball-hitting trigger condition is used to characterize the ball-hitting timing when the robot is the server or the ball-hitting timing when the robot is the receiver. Based on the ball-hitting triggering conditions and the current game rule status, the robot is controlled to perform a target action. The game rule status is used to characterize the service right, the cumulative score, and the current stage of the rally. The target action includes at least one of the following: swinging the racket to hit the ball, adjusting the center of gravity, and maintaining the body posture. After the robot performs the target action, based on the acquired body perception information of the robot, the robot is controlled to perform a center of gravity repositioning operation, so that the robot returns from the post-hitting state to the ready-to-hit posture; wherein, the body perception information includes the robot's upper limb movement posture and lower limb position coordinates.
2. The method according to claim 1, characterized in that, The robot includes a ball-holding robotic arm and a racket-holding robotic arm; controlling the robot to perform a target action based on the ball-hitting trigger condition and the current game rules includes: When the current game rule status indicates that the robot is the server in the current rally, the robot is controlled to send the ball it is holding to a preset release point, and the robot is controlled to adjust the racket-holding robot to a preset initial swing posture, and the robot's lower limb position coordinates are locked; wherein, the initial swing posture is used to characterize the starting joint angle of the racket-holding robot before swinging to hit the ball and the racket's spatial posture; According to the serving sequence corresponding to the ball-hitting trigger condition, the ball-holding robotic arm is controlled to release the flying ball at the preset release point; Based on the real-time motion information of the flying ball, the free fall trajectory of the flying ball is continuously tracked, and the estimated hitting point of the flying ball is recursively calculated based on the tracked falling trajectory, wherein the estimated hitting point is located within a preset hitting window; The robotic arm holding the racket is controlled to complete the hitting action at the estimated hitting point, so that the flying ball hits the racket and falls into the first preset target area and the second preset target area in sequence.
3. The control method according to claim 2, characterized in that, The control of the racket-holding robotic arm to complete the hitting action at the estimated hitting point includes: Based on the real-time tracking of the ball's free fall trajectory, the spatial coordinates of the estimated hitting point and the hitting time are continuously updated, and the swing trajectory, hitting posture and swing speed of the racket-holding robotic arm are dynamically adjusted accordingly to generate the final hitting control parameters. According to the final shot control parameters, the racket-holding robotic arm is driven to perform the shot action.
4. The method according to claim 1, characterized in that, The method further includes, either simultaneously with or after the robot performs the target action: Based on the real-time motion information of the flying ball, the interaction status between the flying ball and the preset venue facilities is monitored, and the round termination event of the current round is identified; wherein, the round termination event is used to characterize the event that leads to the determination of the score of the current round. Based on the round termination event, the serve priority parameter and round count parameter included in the current game rules state, the score attribution of the current rally is determined; wherein, the score attribution determination result is used to trigger the round end signal for the current rally. In response to the end-of-round signal for the current rally, the cumulative score in the current match rule state is updated based on the score attribution of the current rally, the rally is switched to the next rally, and the rally count parameter in the updated match rule state is reset; wherein, the updated match rule state is used to determine the serving side in the next rally.
5. The method according to claim 1, characterized in that, The robot is equipped with multiple independently operable motion generation modules; the step of controlling the robot to execute a target action based on the ball-hitting trigger condition and the current game rules includes: Based on the current stage of the current round of combat as represented by the current game rules, the current operating mode of the robot is determined; Based on the current operating mode, select each joint control component that matches the current operating mode from the initial motion components output by each motion generation module. According to the preset joint mapping table, the selected joint control components are spliced into a whole-body motion sequence to be executed; wherein, the preset joint mapping table stores the correspondence between each joint control component output by each motion generation module and the robot's whole-body joint control command index. The full-body motion sequence is sent to the actuators of each joint of the robot to drive the robot to perform the target motion.
6. The method according to claim 5, characterized in that, The current operating mode includes at least a serve preparation mode, a serve hitting mode, a receive mode, and a repositioning mode; the selection of joint control components that match the current operating mode from the initial motion components output by each motion generation module based on the current operating mode includes at least one of the following: In response to the current operating mode being the serve preparation mode, the motion components output by the serve preparation motion generation module are selected, and the lower limb movement motion components are masked; wherein, the motion components output by the serve preparation motion generation module include upper limb ball holding control and racket swing preparation control; In response to the current operating mode being the serve and hit mode, the motion components output by the serve and hit motion generation module are selected, and the lower limb movement motion components are masked; wherein, the motion components output by the serve and hit motion generation module include the upper limb swing execution control quantity; In response to the current operating mode being the ball-receiving mode, the motion components output by the ball-receiving motion generation module are selected; wherein, the motion components output by the ball-receiving motion generation module include upper limb swing trajectory control, trunk deflection control, lower limb support control, and lower limb stance adjustment control. In response to the current operating mode being repositioning mode, the motion components output by the repositioning motion generation module are selected, and the swing amplitude range of the upper limb joints is limited; wherein, the motion components output by the repositioning motion generation module include the lower limb joint adjustment control amount and the upper limb posture correction control amount.
7. The method according to claim 6, characterized in that, The step of selecting joint control components that match the current operating mode from the initial motion components output by each motion generation module based on the current operating mode and the ball-hitting trigger condition includes: When the current operating mode is the ball receiving mode, the preset motion primitive library is retrieved, and the corresponding swing motion template is matched according to the predicted landing point coordinates and predicted contact time of the racket included in the ball hitting trigger condition. The multiple control quantities associated with the swing motion template are time-aligned to generate an initial motion component corresponding to the receiving mode. The multiple control quantities include upper limb swing trajectory control quantity, trunk deflection control quantity, and lower limb support control quantity. The control components corresponding to the target joint set of the ball-receiving pattern are selected from the initial motion components and used as the joint control components.
8. The method according to claim 5, characterized in that, The method further includes: In response to the operation mode switching command, the termination state of each controlled joint corresponding to the first action sequence before the mode switch and the start state of each controlled joint corresponding to the second action sequence after the mode switch are obtained. Calculate the state difference degree between the termination state and the starting state; When the state difference is greater than a first threshold, a transition interpolation trajectory is generated, and the actuators of each joint of the robot are controlled to switch from executing the first action sequence to executing the second action sequence according to the transition interpolation trajectory; wherein, the transition interpolation trajectory is used to smoothly transition the motion state of each controlled joint during the operation mode switching process; When the state difference is less than or equal to the first threshold, the actuators of each joint of the robot are directly controlled to switch from executing the first action sequence to executing the second action sequence.
9. The method according to claim 8, characterized in that, The generation of the transition interpolation trajectory includes: Determine the transition period between the first action sequence before the handover and the second action sequence after the handover, and increase the transition coefficient from 0 to 1 within the transition period according to the time step; wherein, the first action sequence before the handover is when the transition coefficient is 0, and the second action sequence after the handover is when the transition coefficient is 1. Based on the transition coefficient, the first action sequence and the second action sequence are subjected to weighted mixed interpolation to obtain the interpolated action sequence. If the interpolated motion sequence passes the preliminary kinematic verification and the dynamic safety verification, the verified interpolated motion sequence is used as the transition interpolated trajectory; wherein, the preliminary kinematic verification is used to verify whether the interpolated motion sequence meets the joint maximum velocity limit, the maximum acceleration limit and the limb collision avoidance constraint.
10. The method according to claim 9, characterized in that, The method also performs dynamic safety verification on the interpolation sequence in the following manner: For the joint torque sequence arranged by time step in the interpolated action sequence, calculate the absolute value of the difference between the joint output torque within adjacent time steps; The absolute value of the calculated difference is compared with a second threshold; wherein the second threshold is used to characterize the safe upper limit of the maximum torque difference that the robot's joint actuators can withstand in adjacent control cycles; When the absolute value of the difference between the joint output torques within all adjacent time steps does not exceed the second threshold, the interpolation action sequence is determined to have passed the dynamic safety check.
11. The method according to claim 6, characterized in that, The method further includes: In response to the current operating mode being the ball-receiving mode, the swing inertial torque is calculated based on the real-time motion parameters and inertia parameters of the robot's racket-holding robotic arm; If it is determined that the swing amplitude of the robotic arm exceeds a preset amplitude threshold, a torso counteracting torque is generated; wherein, the torque direction of the torso counteracting torque is opposite to the torque direction of the swing inertial torque, and the torque amplitude of the torso counteracting torque is proportional to the torque amplitude of the swing inertial torque. The trunk counteracting torque is used as a trunk posture compensation component and superimposed on the trunk deflection control quantity.
12. The method according to claim 4, characterized in that, The method further includes: During the monitoring of the interaction between the flying ball and the preset court facilities, the collision sequence between the flying ball and the edge of the hitting surface, the net and the table surface is identified, as well as the target event of the flying ball is identified, the target event including at least one of the following: out of bounds event, net incident event or net touch foul event; Based on the collision sequence, the target event, and the serving order and round count parameters included in the current game rules state, the score attribution for the current rally is determined and the cumulative score is updated; wherein, the score attribution determination result is used to trigger the round end signal for the current rally.
13. The method according to any one of claims 1 to 12, characterized in that, The control of the robot to perform a center of gravity repositioning operation includes: Based on the upper limb movement posture, lower limb standing coordinates and robot orientation represented by the proprioceptive information, the state deviation between the robot's current center of gravity projection point and the center point of the preset preparation area is calculated. The pre-defined optimization objective function, which includes position recovery cost, attitude stabilization cost, and control smoothness cost, is invoked to solve for the repositioning control command for the current control cycle under kinematic constraints, dynamic constraints, and safety constraints. After the repositioning control command passes compliance verification, the robot's lower limb joints are driven to perform corresponding adjustments, the body perception information is updated in real time, and the repositioning path is iteratively solved and corrected until the state deviation is less than the third threshold, so that the robot reaches the ready posture to be switched.
14. The method according to any one of claims 1 to 12, characterized in that, The determination of the ball-hitting trigger condition based on the real-time motion information includes: When the game rule state indicates that the robot is the receiver in the current round, the displacement features of the flying ball between consecutive frames are extracted from the real-time motion information, and the velocity vector and rotation vector of the flying ball are estimated. The velocity vector and the rotation vector are input into a preset trajectory prediction model, which is used to output the predicted landing point coordinates and the predicted touch time of the flying ball within a preset time period in the future. The predicted touch time and the predicted landing point coordinates are used as the ball-hitting trigger conditions.
15. A robot, characterized in that, Includes a visual perception unit, a body perception unit, a controller, and an actuator: The visual perception unit is used to collect real-time motion information of the flying ball; The body perception unit is used to collect the body perception information of the robot; The controller is connected to the visual perception unit and the body perception unit respectively, and the controller is configured to perform the method according to any one of claims 1 to 14; An actuator, connected to the controller, is used to receive control commands from the controller and execute target actions and center of gravity repositioning actions accordingly.
16. A control device for a robot, characterized in that, include: The acquisition unit is used to acquire real-time motion information of the flying ball for each round of play, wherein the round of play is used to characterize the continuous control process from when the robot enters the first ball-striking preparation state to the second ball-striking preparation state, and the second ball-striking preparation state is the next ball-striking preparation state after the first ball-striking preparation state. The determining unit is used to determine the ball-hitting trigger condition based on the real-time motion information, wherein the ball-hitting trigger condition is used to characterize the ball-hitting timing when the robot is the server or the ball-hitting timing when the robot is the receiver. The control unit is used to control the robot to perform a target action based on the ball-hitting triggering condition and the current game rule state; and after the robot performs the target action, based on the acquired body perception information of the robot, control the robot to perform a center of gravity repositioning operation, so that the robot returns from the post-hitting state to the ready-to-hit posture; wherein, the game rule state is used to represent the service right, the cumulative score and the current stage of the rally; the target action includes at least one of the following: swinging the racket to hit the ball, center of gravity adjustment, and limb posture maintenance; the body perception information includes the robot's upper limb posture and lower limb position coordinates.
17. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it causes the electronic device to implement the method as described in any one of claims 1 to 14.
18. A computer program product, characterized in that, Includes a computer program, which, when run, causes the method as described in any one of claims 1 to 14 to be performed.
19. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 14.
