Risk perception based dual-strategy robot safety motion control method and device
By adopting a risk perception-based dual-strategy robot safety motion control method, which uses a risk perception model to predict collision risks and switch strategies, the safety and environmental perception problems of robots in complex terrain and narrow spaces are solved, and high-precision obstacle avoidance and stable movement are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TSINGHUA UNIVERSITY
- Filing Date
- 2026-04-02
- Publication Date
- 2026-07-10
AI Technical Summary
Existing robot motion control technologies suffer from insufficient safety and low environmental perception accuracy in complex terrains and confined spaces. A single strategy is insufficient to balance the explosive power of a robot's extreme actions with the smoothness of obstacle avoidance actions, and there is a lack of a millisecond-level switching mechanism for real-time risk values.
A risk-aware dual-strategy robot safety motion control method is adopted. By acquiring robot body perception vectors and environmental point cloud data, a risk perception model is constructed to predict future collision risks. Based on the risk value and safety threshold, an agile strategy or a safety recovery strategy is switched to achieve advanced prediction and intelligent switching of collision risks.
It improves the robot's movement safety and obstacle avoidance rationality in complex environments, ensures mobility, and enhances the accuracy of environmental perception and the stability of control.
Smart Images

Figure CN122362986A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of robot motion control technology, specifically relating to a dual-strategy robot safety motion control method and device based on risk perception. Background Technology
[0002] With the rapid development of robotics technology, legged robots, represented by quadrupeds and bipeds, have become key technological carriers for performing tasks such as emergency search and rescue, special operations, and last-mile logistics due to their excellent maneuverability and environmental adaptability in unstructured terrain (such as disaster ruins, industrial facilities, and rugged mountain roads). Developing intelligent motion control algorithms with high mobility and active safety assurance capabilities has become a research hotspot and focus in the field of robotics.
[0003] At the motion control level, reinforcement learning-based control frameworks are widely used in the autonomous movement control of robots. However, these frameworks still have significant technical shortcomings in practical application scenarios such as complex terrain and confined spaces, including insufficient safety and low environmental perception accuracy. Existing technologies often employ a single agile motion strategy, capable only of making reflexive obstacle avoidance responses based on current environmental perception data. They lack the ability to predict the risks of movement trajectories over a future period, often triggering obstacle avoidance only after the robot actually enters a dangerous area. This can easily lead to sudden increases in joint acceleration, mechanical oscillations, or even collisions. Furthermore, the switching of strategies can easily cause abrupt changes in control signals, further reducing the stability and safety of robot movement.
[0004] Furthermore, in highly challenging multi-terrain environments, it is extremely challenging to require a single neural network to simultaneously balance the explosive power of extreme actions with the stability of obstacle avoidance actions. Because the weight allocation of the reward function during the learning process is difficult to dynamically adapt to all working conditions, a single strategy often sacrifices safety margin when pursuing agile actions, while it leads to motion lag when pursuing absolute safety. There is a lack of a dual-strategy or multi-strategy collaborative architecture that can switch between real-time risk values at the millisecond level. Summary of the Invention
[0005] This application provides a dual-strategy robot safety motion control method and device based on risk perception, which can accurately perceive the robot's operating environment and body state, realize the advance prediction of collision risks, and improve the safety and obstacle avoidance rationality of the robot during movement while ensuring mobility.
[0006] This application provides a risk-aware dual-strategy robot safety motion control method, including: The current body perception vector and current environmental point cloud data of the target robot are obtained. The current body perception vector indicates the current dynamic state of the target robot, and the current environmental point cloud data indicates the current environmental state of the target robot. A first state sequence is obtained based on the current ontology perception vector and the current environmental point cloud data; The first state sequence is input into the risk perception model to obtain the scalar risk value output by the risk perception model. The risk perception model is used to predict whether the target robot will collide within a preset time window based on the first state sequence. The scalar risk value is compared with a preset safety threshold to obtain the comparison result; The current execution strategy of the target robot is determined based on the comparison results. The current execution strategy includes an agile strategy or a safe recovery strategy. The agile strategy instructs the target robot to autonomously plan a movement path, and the safe recovery strategy instructs the target robot to move based on avoidance instructions.
[0007] According to the risk-aware dual-strategy robot safety motion control method provided in this application, the step of obtaining a first state sequence based on the current body perception vector and the current environmental point cloud data includes: obtaining a high-dimensional state feature sequence based on the body perception vector and the environmental point cloud data; obtaining a robot convex polyhedron set based on the body perception vector; obtaining an environmental convex polyhedron set based on the environmental point cloud data; obtaining the target shortest distance and gradient information based on the robot convex polyhedron set and the environmental convex polyhedron set; and obtaining the first state sequence based on the high-dimensional state feature sequence, the target shortest distance, and the gradient information.
[0008] According to the risk-aware dual-strategy robot safety motion control method provided in this application, the step of obtaining a high-dimensional state feature sequence based on the body perception vector and the environmental point cloud data includes: obtaining a body pose matrix based on the body perception vector; converting the environmental point cloud data to the body center coordinates of the target robot based on the body pose matrix to obtain reference point cloud data; performing time alignment processing on the body perception vector and the reference point cloud data; mapping the aligned reference point cloud data into low-dimensional ray distance features; obtaining the task target position of the target robot; and concatenating the ray distance features with the body perception vector and the task target position to obtain a high-dimensional state feature sequence.
[0009] According to the risk-aware dual-strategy robot safety motion control method provided in this application, the step of obtaining an environmental convex polyhedron set based on the environmental point cloud data includes: performing obstacle modeling based on the environmental point cloud data to obtain a subset of environmental point cloud data; clustering the environmental point cloud data subset to obtain multiple point sets, each point set indicating an independent obstacle entity; calculating the minimum circumscribed convex hull of each point set; obtaining an environmental convex polyhedron model based on the minimum circumscribed convex hull of each point set; and obtaining an environmental convex polyhedron set based on the environmental convex polyhedron model.
[0010] According to the risk-aware dual-strategy robot safety motion control method provided in this application, the step of obtaining the environmental convex polyhedron set based on the environmental convex polyhedron model includes: obtaining the normal vector of each face in the environmental convex polyhedron model to obtain a normal vector matrix; obtaining the displacement vector corresponding to each face in the environmental convex polyhedron model, wherein the displacement vector indicates the constraint threshold of the corresponding face; and performing a mathematical description of the environmental convex polyhedron model based on the normal vector matrix and the displacement vector to obtain the convex polyhedron set.
[0011] According to the risk-aware dual-strategy robot safety motion control method provided in this application, the step of obtaining the target shortest distance and gradient information based on the robot convex polyhedron set and the environment convex polyhedron set includes: defining the shortest collision distance based on the robot convex polyhedron set and the environment convex polyhedron set to obtain a first distance formula; performing a Lagrange dual transformation on the first distance formula to obtain a first objective function of maximizing quadratic programming with respect to dual variables; determining dual constraints based on the normal vector matrices of each face of the environment convex polyhedron set and the normal vector matrices of each face of the robot convex polyhedron set; and solving the first objective function based on the dual constraints to obtain the target shortest distance and gradient information.
[0012] According to the risk-aware dual-strategy robot safety motion control method provided in this application, the step of solving the first function based on the dual constraint conditions to obtain the target shortest distance and gradient information includes: determining the norm constraint equation based on the normal vector matrix of each face of the environmental convex polyhedron set; and solving the first function by combining the norm constraint equation and the dual constraint conditions to obtain the target shortest distance and gradient information.
[0013] According to the risk perception-based dual-strategy robot safety motion control method provided in this application, the risk perception model is trained through the following steps: obtaining a collision indication function and a goal achievement indication function, wherein the collision indication function is used to characterize the safety boundary of the target robot, and the goal achievement indication function is used to characterize the goal achievement status of the target robot; determining a discount factor; generating an reachability-avoidance value function based on the agility strategy, combining the collision indication function, the goal achievement indication function, and the discount factor; obtaining training samples, wherein the training samples include sample state sequences at multiple time points; and training the risk perception model based on the multiple sample state sequences and the reachability-avoidance value function.
[0014] According to the risk-aware dual-strategy robot safety motion control method provided in this application, the step of training the risk-aware model based on the multiple sample state sequences and the reachability-avoidance value function includes: obtaining the current network and the target network corresponding to the current network, wherein the target network has the same network structure and initial parameters as the current network, and the parameters of the target network are in a frozen state; inputting the sample state sequence at the next time step into the target network to obtain a first risk value output by the target network; solving the reachability-avoidance value function based on the first risk value to obtain a risk target value; inputting the sample state sequence at the current time step into the current network to obtain a second risk value output by the current network; calculating a loss function based on the risk target value and the second risk value; updating the parameters of the current network based on the loss function; iteratively training until convergence, and then using the current network as the trained risk-aware model.
[0015] According to the risk-aware dual-strategy robot safety motion control method provided in this application, the discount factor is positively correlated with the preset time window.
[0016] According to the risk-aware dual-strategy robot safety motion control method provided in this application, an reachable-avoidance value function is generated based on the agility strategy, the collision indication function, the target achievement indication function, and the discount factor. The method includes: determining multiple reward functions, each reward function corresponding to a training target; determining the weight of each reward function; and generating the reachable-avoidance value function based on the reward function, the weight of each reward function, the agility strategy, the collision indication function, the target achievement indication function, and the discount factor.
[0017] According to the risk-aware dual-strategy robot safety motion control method provided in this application, the step of determining the current execution strategy of the target robot based on the comparison result includes: determining the current execution strategy as the agile strategy when the comparison result indicates that the scalar risk value is less than the preset safety threshold; and determining the current execution strategy as the safety recovery strategy when the comparison result indicates that the scalar risk value is greater than or equal to the preset safety threshold.
[0018] According to the risk-aware dual-strategy robot safety motion control method provided in this application, when the current execution strategy is the safety recovery strategy, the method further includes: acquiring the current position and the target position of the target robot; determining a second objective function based on the current position and the target position, with the objective of minimizing Euclidean distance and satisfying a safety constraint, wherein the safety constraint indicates that the risk value under the velocity vector output by the risk-aware model is less than a preset safety threshold; iteratively solving the second objective function in the action space using gradient descent to obtain the optimal velocity vector; generating a safety recovery strategy action based on the optimal velocity vector; acquiring the agility strategy action corresponding to the agility strategy; acquiring a smoothing factor; determining an output action based on the smoothing factor, the safety recovery strategy action, and the agility strategy action; and generating the evasion instruction based on the output action.
[0019] This application also provides a risk-aware dual-strategy robot safety motion control device, comprising: The first acquisition unit is used to acquire the current body perception vector and the current environmental point cloud data of the target robot. The current body perception vector indicates the current dynamic state of the target robot, and the current environmental point cloud data indicates the current environmental state of the target robot. The second acquisition unit is used to acquire a first state sequence based on the current ontology perception vector and the current environmental point cloud data; The prediction unit is used to input the first state sequence into the risk perception model to obtain the scalar risk value output by the risk perception model. The risk perception model is used to predict whether the target robot will collide within a preset time window based on the first state sequence. The comparison unit is used to compare the scalar risk value with a preset safety threshold to obtain a comparison result; The determining unit is configured to determine the current execution strategy of the target robot based on the comparison result. The current execution strategy includes an agile strategy or a safety recovery strategy. The agile strategy instructs the target robot to autonomously plan a movement path, and the safety recovery strategy instructs the target robot to move based on avoidance instructions.
[0020] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the risk-aware dual-strategy robot safety motion control method as described above.
[0021] This application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the risk-aware dual-strategy robot safety motion control method as described above.
[0022] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the risk-aware dual-strategy robot safety motion control method as described above.
[0023] The risk-aware dual-strategy robot safety motion control method and device provided in this application perceive the robot's dynamic state and environmental state and generate a first state sequence. It uses a risk perception model to predict the collision risk within a preset time window and outputs a scalar risk value. Then, it switches between an agile strategy and a safety recovery strategy based on the comparison result between the risk value and the safety threshold. This allows for accurate perception of the robot's operating environment and robot state, enabling advanced prediction of collision risks. Furthermore, through intelligent switching between the two strategies, the robot can effectively improve safety and obstacle avoidance during movement while ensuring mobility. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is one of the flowcharts of a dual-strategy robot safety motion control method based on risk perception provided in this application.
[0026] Figure 2 This is the second flowchart of a dual-strategy robot safety motion control method based on risk perception provided in this application.
[0027] Figure 3 This is a block diagram of the functional units of a dual-strategy robot safety motion control device based on risk perception provided in this application.
[0028] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0030] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0031] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0032] Currently, reinforcement learning-based autonomous robot movement control frameworks suffer from insufficient safety and low environmental perception accuracy in complex and narrow terrain applications. Furthermore, a single neural network struggles to simultaneously balance the explosive power of a robot's extreme movements with the smoothness of obstacle avoidance actions. A single strategy cannot dynamically adapt to all working conditions, either sacrificing safety margins or causing motion lag. There is also a lack of multi-strategy collaborative architectures that can switch between strategies in milliseconds based on real-time risk values.
[0033] To address the aforementioned issues, this application provides a risk-aware dual-strategy robot safety motion control method and apparatus, which will be explained in detail below with reference to the accompanying drawings.
[0034] Please see Figure 1 , Figure 1 This is one of the flowcharts illustrating a risk-aware dual-strategy robot safety motion control method provided in this application. The risk-aware dual-strategy robot safety motion control method includes the following steps.
[0035] S101, acquire the target robot's current body perception vector and current environmental point cloud data.
[0036] The current body perception vector indicates the current dynamic state of the target robot, and the current environment point cloud data indicates the current environmental state of the target robot. When acquiring the body perception vector, the linear acceleration vector and angular velocity vector of the robot base in three-dimensional space can be obtained through the robot's built-in six-axis inertial measurement unit (IMU). Simultaneously, encoders installed at each drive joint of the robot can be used to collect the rotation angle and instantaneous angular velocity values of each drive joint in real time. Integrating the robot dynamics-related data collected through different sensing devices forms a body perception vector that can completely characterize the robot's current dynamic state, covering the motion state of the robot base and the action state of each joint.
[0037] When acquiring environmental point cloud data, a stereo depth camera mounted on the robot's head can be used to scan and collect data about the environment in front of the robot, directly obtaining raw point cloud data of the environment. This raw point cloud data can contain spatial geometric information such as the position and outline of obstacles in the robot's surrounding environment, and can intuitively reflect the current environmental state of the robot.
[0038] S102, obtain the first state sequence based on the current ontology perception vector and the current environmental point cloud data.
[0039] The first state sequence can integrate the robot's body dynamics characteristics, environmental geometric characteristics, the relative distance between the robot and the environment, and the characteristics related to the task objective.
[0040] S103, input the first state sequence into the risk perception model to obtain the scalar risk value output by the risk perception model.
[0041] The risk perception model is used to predict whether the target robot will collide within a preset time window based on the first state sequence. The risk perception model can be a Risk Assessment Network (RA-Network) built based on reachability analysis theory, which can adopt a nonlinear mapping function form of a Multi-Layer Perceptron (MLP) structure. This network structure can fully learn the strong nonlinear correlation between the robot's motion state, environmental characteristics, and future collision risk, allowing the model to accurately predict future risks based on multi-dimensional information such as the body dynamics characteristics, environmental geometric characteristics, and the relative distance between the robot and obstacles in the first state sequence. During the actual operation of the model, the first state sequence can be input as a whole into the multi-layer perceptron structure. After feature extraction and nonlinear transformation of each layer of the network, a scalar risk value is finally output. This scalar risk value directly indicates the probability of the target robot colliding or failing within the preset time window, and its magnitude can intuitively reflect the risk level of the robot's current motion state.
[0042] S104, compare the scalar risk value with the preset safety threshold to obtain the comparison result.
[0043] The preset safety threshold can be flexibly configured based on the robot's actual application scenario, motion characteristics, and safety protection requirements.
[0044] S105, determine the current execution strategy of the target robot based on the comparison result.
[0045] The current execution strategy includes an agile strategy or a safe recovery strategy. The agile strategy instructs the target robot to autonomously plan its movement path, while the safe recovery strategy instructs the target robot to move based on avoidance instructions.
[0046] As can be seen, this solution perceives the robot's dynamic state and environmental state and generates a first state sequence. It then uses a risk perception model to predict the collision risk within a preset time window and outputs a scalar risk value. Based on the comparison between the risk value and the safety threshold, it switches between an agile strategy and a safety recovery strategy. This allows for accurate perception of the robot's operating environment and its own state, enabling proactive prediction of collision risks. Furthermore, through intelligent switching between the two strategies, the robot can effectively improve its safety and obstacle avoidance during movement while maintaining its mobility.
[0047] In one possible embodiment, obtaining the first state sequence based on the current ontology perception vector and the current environmental point cloud data includes: obtaining a high-dimensional state feature sequence based on the ontology perception vector and the environmental point cloud data; obtaining a set of robot convex polyhedra based on the ontology perception vector; obtaining a set of environmental convex polyhedra based on the environmental point cloud data; obtaining the target shortest distance and gradient information based on the robot convex polyhedron set and the environmental convex polyhedron set; and obtaining the first state sequence based on the high-dimensional state feature sequence, the target shortest distance, and the gradient information.
[0048] In obtaining the shortest distance and gradient information of the target, the robot's convex polyhedron set and the environment's convex polyhedron set can be used as the geometric solution basis. Duality theory is applied to transform the problem of finding the minimum distance between the robot and the obstacle into a continuously differentiable quadratic programming (QP) problem. Solving this QP problem allows for the real-time calculation of the target's shortest distance and gradient information. The target's shortest distance indicates the precise collision distance between the robot and the obstacle, accurately reflecting the actual spatial geometric gap between them. The gradient information indicates the continuous gradient change characteristics of this precise collision distance with respect to the robot's current state, reflecting the trend of the robot's state changes affecting the collision distance.
[0049] As can be seen, this scheme first constructs a high-dimensional state feature sequence by fusing ontology and environmental perception data, then models the robot and the environment separately using convex polyhedral sets, and combines duality theory to solve for the shortest target distance and gradient information between the two, and then fuses it with the high-dimensional state feature sequence to generate the first state sequence. This can integrate robot ontology dynamics, environmental geometric features, and precise geometric distance and gradient change information between the two, making the feature dimensions of the first state sequence more complete and the information accuracy higher. It can provide high-quality feature input for subsequent risk prediction and effectively improve the accuracy of robot motion risk perception.
[0050] In one possible embodiment, obtaining a high-dimensional state feature sequence based on the body perception vector and the environmental point cloud data includes: obtaining a body pose matrix based on the body perception vector; converting the environmental point cloud data to the body center coordinates of the target robot based on the body pose matrix to obtain reference point cloud data; performing time alignment processing on the body perception vector and the reference point cloud data; mapping the aligned reference point cloud data into low-dimensional ray distance features; obtaining the task target position of the target robot; and concatenating the ray distance features with the body perception vector and the task target position to obtain a high-dimensional state feature sequence.
[0051] In acquiring the robot's pose matrix, real-time pose estimation can be performed using the body perception data collected by the robot's built-in IMU, and the corresponding body pose matrix can be directly generated based on the estimation results. After obtaining the body pose matrix, the environmental point cloud data can be transformed from the camera coordinate system to the target robot's body center coordinate system using rigid body transformation formulas to obtain reference point cloud data, thereby eliminating the interference of body sway on environmental perception. After completing the coordinate transformation, the body perception vector and reference point cloud data can be time-aligned. This process ensures the synchronization of multi-source perception data in the time dimension, avoiding feature deviations caused by the time difference of acquisition from different sensing devices. When mapping the aligned reference point cloud data into low-dimensional ray distance features, a ray projection algorithm can be used for feature dimensionality reduction, simplifying the high-dimensional environmental point cloud data into a set of low-dimensional ray distance features. In practical applications, this can be mapped to an 11-dimensional horizontal ray vector. This algorithm can accurately extract the core geometric distance information from the point cloud data, significantly reducing data dimensionality and subsequent computational load while retaining key features of environmental perception.
[0052] As can be seen, this scheme obtains the robot pose matrix from the body perception vector and completes the coordinate system transformation of the environmental point cloud data. Then, it performs time alignment on the multi-source data, maps the point cloud into low-dimensional ray distance features through a projection algorithm, and finally fuses the ray distance features, body perception vectors, and task target positions to obtain a high-dimensional state feature sequence. This can achieve the dual unification of coordinates and time of the body and environmental perception data, effectively eliminate noise redundancy in the original data and retain core features, making the generated high-dimensional state feature sequence information more accurate and dimensionally more suitable. It can fully reflect the comprehensive information of the robot's body state, environmental features, and task requirements, and improve the efficiency and accuracy of subsequent data processing.
[0053] In one possible embodiment, obtaining the set of environmental convex polyhedra based on the environmental point cloud data includes: performing obstacle modeling based on the environmental point cloud data to obtain a subset of environmental point cloud data; clustering the subset of environmental point cloud data to obtain multiple point sets, each point set indicating an independent obstacle entity; calculating the minimum bounding convex hull of each point set; obtaining an environmental convex polyhedron model based on the minimum bounding convex hull of each point set; and obtaining the set of environmental convex polyhedra based on the environmental convex polyhedron model.
[0054] When obtaining the set of environmental convex polyhedra from environmental point cloud data, obstacle geometry modeling can be performed on the environmental point cloud data after coordinate transformation and time alignment. Point cloud data related to obstacles can be filtered from the complete environmental point cloud data to obtain a subset of environmental point cloud data. This subset can remove invalid background information from the environmental point cloud data, retaining only the spatial geometric point cloud information of the obstacles, making subsequent modeling more targeted. When clustering the environmental point cloud data subset, the Euclidean clustering algorithm can be used. This algorithm can accurately identify multiple independent obstacle entities from the point cloud data subset. Each independent obstacle entity corresponds to a clustered point set, and each point set can completely represent the spatial point cloud distribution of the corresponding obstacle. When calculating the minimum bounding convex hull of each point set, the Quickhull algorithm can be used to quickly calculate the corresponding minimum bounding convex hull for each clustered obstacle point set. Through this convex hull, the irregular obstacle point set contour can be simplified into a regular convex polyhedron contour. Then, based on the minimum bounding convex hull of each point set, the environmental convex polyhedron model corresponding to each independent obstacle can be constructed. Finally, by integrating the environmental convex polyhedron models of all obstacles, an environmental convex polyhedron set that can completely represent the spatial geometric features of all obstacles around the robot can be obtained.
[0055] In practical implementation, the robot's convex polyhedron set can be obtained based on the ontology perception vector. Specifically, this involves first dynamically updating the spatial geometric position and contour of each linkage mechanism in the robot body based on real-time joint states such as rotation angles and instantaneous angular velocities of each drive joint contained in the ontology perception vector. Then, according to the robot's linkage structure characteristics, each updated linkage mechanism is modeled as a corresponding convex polyhedron. Finally, all the convex polyhedra of the linkage mechanisms are integrated to obtain a robot convex polyhedron set that matches the robot's current motion state. Furthermore, the entire update process of the robot convex polyhedron set can be performed synchronously with the construction process of the environment convex polyhedron set, ensuring the temporal consistency of their geometric modeling.
[0056] As can be seen, this solution first performs obstacle modeling on the environmental point cloud data to filter out the effective point cloud subset, then identifies independent obstacle entities through clustering, and simplifies the outlines of each obstacle into convex polyhedron models by combining the minimum circumscribed convex hull, and integrates them into a set of environmental convex polyhedra. This can eliminate invalid background information in the environmental point cloud, accurately restore the actual spatial geometric features of the obstacles, and simplify complex obstacle outlines into regular convex polyhedron forms, reducing non-functional space occupation, improving the accuracy and simplicity of environmental geometric modeling, and providing a reliable modeling foundation for subsequently solving the precise geometric distance between the robot and obstacles.
[0057] In one possible embodiment, obtaining the set of convex polyhedra based on the environmental convex polyhedron model includes: obtaining the normal vector of each face in the environmental convex polyhedron model to obtain a normal vector matrix; obtaining the displacement vector corresponding to each face in the environmental convex polyhedron model, wherein the displacement vector indicates the constraint threshold of the corresponding face; and performing a mathematical description of the environmental convex polyhedron model based on the normal vector matrix and the displacement vector to obtain the set of convex polyhedra.
[0058] First, for each individual obstacle's environmental convex polyhedron model, the normal vectors of each geometric face can be extracted one by one. Arranging and combining all normal vectors according to a unified rule yields a normal vector matrix that characterizes the directional features of all faces of the convex polyhedron model. This matrix is the core parameter describing the spatial geometry of the convex polyhedron, and its dimensions match the number of faces of the polyhedron. Simultaneously, the displacement vectors corresponding to each face in the environmental convex polyhedron model can be obtained. These displacement vectors indicate the spatial constraint thresholds of the corresponding geometric face, accurately defining the specific position of each geometric face in three-dimensional space. Combined with the normal vector matrix, the spatial range of the convex polyhedron can be completely defined. After obtaining the normal vector matrix and displacement vectors, the environmental convex polyhedron model can be mathematically described using H-representation, expressing it as the intersection of a set of linear inequalities, as shown below: in It is a spatial coordinate vector. This represents the normal vector matrix of each face of the environmental polyhedron. This is the corresponding displacement vector.
[0059] At the same time, the robot's main linkage mechanism also updates its corresponding set of robot convex polyhedra based on the real-time joint states: in It is a spatial coordinate vector. For a moment The robot's state Let represent the normal vector matrix of each face of the robot polyhedron. This is the corresponding displacement vector.
[0060] As can be seen, this scheme extracts the normal vectors of each face of the convex polyhedron model of the environment to construct a normal vector matrix, obtains the displacement vectors corresponding to each face, and combines the two to mathematically describe the convex polyhedron model to obtain the set of convex polyhedra of the environment. This can transform the intuitive geometric convex polyhedron model into a standardized and computable mathematical form, accurately define the spatial range and geometric constraints of the obstacle convex polyhedron, provide standardized and accurate calculation parameters for the subsequent mathematical solution of the geometric distance between the robot and the obstacle, and improve the feasibility and accuracy of the geometric solution process.
[0061] In one possible embodiment, obtaining the target shortest distance and gradient information based on the robot convex polyhedron set and the environment convex polyhedron set includes: defining a shortest collision distance based on the robot convex polyhedron set and the environment convex polyhedron set to obtain a first distance formula; performing a Lagrange dual transformation on the first distance formula to obtain a first objective function of maximizing quadratic programming with respect to dual variables; determining dual constraints based on the normal vector matrices of each face of the environment convex polyhedron set and the normal vector matrices of each face of the robot convex polyhedron set; and solving the first objective function based on the dual constraints to obtain the target shortest distance and gradient information.
[0062] In order to achieve centimeter-level perception accuracy in a narrow space and ensure the differentiability of obstacle avoidance constraints, the geometric separation problem between the robot and the obstacle can be transformed using Lagrange duality.
[0063] The original distance calculation problem is a non-smooth problem of minimizing the distance between point pairs, denoted as: in, and These are points within the robot and obstacle polyhedra, respectively, constrained by... and .
[0064] By constructing a dual problem, it is transformed into a problem concerning the dual variables. and The maximization quadratic programming problem has an objective function that can be expressed as: The optimization process must satisfy dual constraints. and variable nonnegation constraints .
[0065] In the above transformation process, the optimal dual variable is obtained by solving. These variables are extracted and used as input to the core geometric features. These dual variables not only implicitly contain the positional information of the nearest point between the obstacle and the robot, but also overcome the mathematical limitations of traditional collision detection, such as non-discontinuity and non-differentiability, making the distance function... Regarding the robot's status It has a continuous gradient.
[0066] In one possible embodiment, the step of solving the first function according to the dual constraint condition to obtain the target shortest distance and gradient information includes: determining the norm constraint equation based on the normal vector matrix of each face of the environmental convex polyhedron set; and solving the first function by combining the norm constraint equation and the dual constraint condition to obtain the target shortest distance and gradient information.
[0067] To handle the penetration case where the robot enters the interior of an obstacle, a signed distance transformation is introduced in the dual solution, by limiting the norm constraint to an equality. This ensures that the system can return accurate negative distance features even in overlapping states.
[0068] Through the dual transformation described above, the obstacle avoidance constraint is transformed into a smooth function of the robot's state. To verify the perception accuracy of this embodiment under extremely narrow gap conditions, the researchers conducted data tests in various typical industrial scenarios, and the statistical results are shown in Table 1: Table 1 Understandably, these precise dual variable features and obstacle avoidance gradient information are integrated into a high-dimensional feature vector, which is then input into the backend risk assessment network to provide high-quality data support for predicting the collision probability of robots in dynamic environments.
[0069] In one possible embodiment, the risk perception model is trained through the following steps: obtaining a collision indication function and a goal achievement indication function, wherein the collision indication function is used to characterize the safety boundary of the target robot, and the goal achievement indication function is used to characterize the goal achievement status of the target robot; determining a discount factor; generating an reachability-avoidance value function based on the agile strategy, combining the collision indication function, the goal achievement indication function, and the discount factor; obtaining training samples, wherein the training samples include sample state sequences at multiple time points; and training the risk perception model based on the multiple sample state sequences and the reachability-avoidance value function.
[0070] Among them, the avoidance function and objective function Based on robot state Two key Lipschitz-continuous functions are defined to characterize the safety boundary and goal achievement. When When, it indicates that the robot is in a collision or unstable state; when When [the robot is in a safe area], it indicates that the robot is in a safe zone. When the robot successfully reaches the target area, it indicates that the robot has reached the target area; when When the time is up, it indicates that the task has not been accomplished. In the specific implementation, the objective function can be... Defined as a function related to the target distance: in, Let Euclidean distance be the current distance between the robot and the target. This is the preset threshold value.
[0071] Given an agile strategy Under the premise of defining the reachability-avoidance value function The value of this function represents the state. Let's set off, following the strategy. In this context, the trajectory represents a trade-off between the "maximum value of violating safety constraints" and the "minimum value required to achieve the goal" during its future evolution.
[0072] According to fixed-point theory, this value function satisfies the following reach-avoid Bellman equation: in, Indicates the state Execution strategy After the output action, the system transitions to the next state.
[0073] To enable the above equations to possess the contraction mapping property, thereby supporting end-to-end data-driven training of neural networks (RA-Network), this method introduces a discount factor. (Values close to 1, such as 0.999999), construct the discounted reachability-avoidance value function. : In one possible embodiment, the discount factor is positively correlated with the preset time window.
[0074] Among them, the preset time window This is related to the number of training steps of the risk assessment network. Specifically, this time window defines the "horizon" within which the robot assesses the impact of its current actions on future safety. Preferably, this time window... The value range is set between 0.5 seconds and 3.0 seconds. If the time window is too short, the robot may have already entered the "inevitable conflict zone" when it detects the collision risk, where it cannot avoid it by physical braking or steering. If the time window is too long, the prediction results will be excessively affected by the uncertainty of the dynamic environment, resulting in an overly conservative control strategy and loss of maneuverability.
[0075] Furthermore, this time window and discount factor There is a positive correlation, which can be adjusted The size of the device allows for dynamic adjustment of safety forecasting capabilities at different movement speeds.
[0076] In one possible embodiment, training the risk perception model based on the plurality of sample state sequences and the reachability-avoidance value function includes: obtaining a current network and a target network corresponding to the current network, wherein the target network has the same network structure and initial parameters as the current network, and the parameters of the target network are frozen; inputting the sample state sequence at the next time step into the target network to obtain a first risk value output by the target network; solving the reachability-avoidance value function based on the first risk value to obtain a risk target value; inputting the sample state sequence at the current time step into the current network to obtain a second risk value output by the current network; calculating a loss function based on the risk target value and the second risk value; updating the parameters of the current network based on the loss function; iteratively training until convergence, and then using the current network as the trained risk perception model.
[0077] Among them, through pre-trained agile strategies The simulation is run through numerous rounds in an environment containing various random obstacles, recording the state sequence at each time step to obtain a sample state sequence. The input vector during the simulation is... Defined as: in, The base linear velocity, The base angular velocity, The relative position coordinates of the target point This is the obstacle avoidance ray distance feature after processing by the external sensing network. This vector... Includes factors affecting robot safety ( ) and task completion Its core features.
[0078] During training, this scheme employs a self-guided mechanism, updating the current time-to-time estimate using the target network's prediction of the next time-step state. Based on the aforementioned discounted reachability-avoidance Bellman equation, the risk target value at each time step is calculated. : in, This represents the risk assessment value of the state at the next time step, calculated from the parameters (or target network) of the previous iteration. This is the collision indication function (1 for a collision, -1 for safety). To achieve the target indicator function, This is the discount factor in the self-guided process.
[0079] The risk perception model RA-Network is defined as a nonlinear mapping function of a multilayer perceptron (MLP) structure. ,in These are the network parameters to be learned. The parameters are updated by minimizing the mean squared error (MSE) between the current network output value and the self-guided target value: Through the gradient descent algorithm, the network can learn the strong nonlinear relationship between the complex geometric distribution of obstacles in the environment, the robot's dynamic characteristics, and the risk of future collisions.
[0080] In one possible embodiment, generating an reachability-avoidance value function based on the agile strategy, in combination with the collision indication function, the goal achievement indication function, and the discount factor, includes: determining a plurality of reward functions, each reward function corresponding to a training goal; determining the weight of each reward function; and generating the reachability-avoidance value function based on the reward function, the weight of each reward function, the agile strategy, in combination with the collision indication function, the goal achievement indication function, and the discount factor.
[0081] The training of the agile policy network and risk assessment network can be based on a multi-objective reward function. By weighted combining reward items of different dimensions, the robot is guided to learn the limits of maneuverability and safety boundaries. The specific reward function design and weight allocation are shown in Table 2. Table 2 After training, RA-Network can combine real-time, noisy proprioceptive data with ambient ray data. Mapped to a scalar risk value This mapping process not only considers the current geometric distance, but also implicitly includes the robot's current velocity vector, rotational inertia, and the motion trend of the agile strategy in response to the current environment, thereby enabling an advance prediction of "potential future collisions".
[0082] In one possible embodiment, determining the current execution strategy of the target robot based on the comparison result includes: determining the current execution strategy as the agile strategy when the comparison result indicates that the scalar risk value is less than the preset safety threshold; and determining the current execution strategy as the safety recovery strategy when the comparison result indicates that the scalar risk value is greater than or equal to the preset safety threshold.
[0083] Within each control cycle, the scalar risk value output by the RA-Network can be obtained. and with the preset security threshold (The range of values is within) The comparison is made between (preferably -0.05) to determine the value. High-agility cruise: when When the system determines that there is no risk of collision with the current trajectory within the next 2 seconds, it fully activates the "Agile Strategy Network" and allows it to autonomously plan the crossing path.
[0084] Active obstacle avoidance recovery: When If the system determines that the current agile action sequence is unsustainable, it immediately cuts off control of the agile strategy and activates the "safe recovery strategy network".
[0085] In one possible embodiment, when the current execution strategy is the safety recovery strategy, the method further includes: obtaining the current position and the target position of the target robot; determining a second objective function based on the current position and the target position, with the objective of minimizing Euclidean distance and satisfying a safety constraint, wherein the safety constraint indicates that the risk value under the velocity vector output by the risk perception model is less than a preset safety threshold; iteratively solving the second objective function in the action space using gradient descent to obtain an optimal velocity vector; generating a safety recovery strategy action based on the optimal velocity vector; obtaining the agile strategy action corresponding to the agile strategy; obtaining a smoothing factor; determining an output action based on the smoothing factor, the safety recovery strategy action, and the agile strategy action; and generating the evasion instruction based on the output action.
[0086] In order to enable the recovery strategy to not only avoid obstacles but also get as close to the target as possible, this scheme can search for an optimal velocity vector in the action space. (Including linear velocity) and angular velocity And ensure that the vector is within the complete time window. The second objective function of the search process is defined as: At the same time, it is limited by security constraints .
[0087] in, This is the robot's current position. For the target location, For a risk assessment network to evaluate a given velocity vector The risk prediction value is determined. The instantaneous velocity command that reduces the risk below the threshold and most closely approaches the target is obtained within 5 iterations using the gradient descent method and then executed by the recovery strategy network.
[0088] To prevent control signal jumps during strategy switching (especially when switching from high-speed agile mode to forced deceleration mode), which could lead to excessive motor output torque or mechanical oscillation, a weight-based dynamic fusion algorithm can be used. 1. The system maintains a smoothing factor. Its value range is .
[0089] 2. The final output action is generated within a 50ms buffer period after the switch is triggered. The calculation formula is: in, For agile strategy actions, Actions to ensure safe recovery strategy.
[0090] 3. Dynamically adjust using the Sigmoid function The value of allows control to be transferred nonlinearly and continuously in a very short time, ensuring the stability of the robot base posture during policy changes.
[0091] The final generated joint position, velocity, and torque feedback commands are sent to each drive unit of the robot at a frequency of 200Hz. At the same time, the system monitors the physical effects after execution in real time and feeds them back to the perception layer to update the pose and environmental distance.
[0092] To further demonstrate the defensive response characteristics of this invention to dynamic and unknown risks, a comparative experiment was conducted with its performance under the same sudden risk conditions using a single agile strategy network. The results are shown in Table 3. Table 3 Please see Figure 2 The overall execution process of this application includes: The robot safety motion control process of this scheme first collects the body data of the robot joints and IMU to form joint / IMU state vectors; then, based on this body data, it constructs a set of convex polyhedra of the robot, and simultaneously extracts the convex hulls of environmental obstacles and establishes corresponding environmental convex polyhedral models; based on the convex polyhedral sets of the robot and the environment, it solves for the minimum collision distance d between them. ∗ The robot's gradient information is then integrated with the robot's body state, the target position, and the minimum collision distance. A scalar risk value R is then derived through reachability analysis. This risk value is compared with a preset safety threshold. Based on the determination result, a smooth transition strategy is implemented, and the smooth output of control commands is achieved through torque or position interpolation compensation. Finally, the processed control commands are sent to the actuators of each joint of the robot to complete the entire safe motion control process.
[0093] The following describes a risk-aware dual-strategy robot safety motion control device provided in this application. The risk-aware dual-strategy robot safety motion control device described below corresponds to the risk-aware dual-strategy robot safety motion control method described above.
[0094] Please see Figure 3 A risk-aware dual-strategy robot safety motion control device 300 includes: a first acquisition unit 301, used to acquire the current body perception vector and current environmental point cloud data of the target robot, wherein the current body perception vector indicates the current dynamic state of the target robot and the current environmental point cloud data indicates the current environmental state of the target robot; a second acquisition unit 302, used to acquire a first state sequence based on the current body perception vector and the current environmental point cloud data; a prediction unit 303, used to input the first state sequence into a risk perception model to obtain a scalar risk value output by the risk perception model, wherein the risk perception model is used to predict whether the target robot will collide within a preset time window based on the first state sequence; a comparison unit 304, used to compare the scalar risk value with a preset safety threshold to obtain a comparison result; and a determination unit 305, used to determine the current execution strategy of the target robot based on the comparison result, wherein the current execution strategy includes an agile strategy or a safety recovery strategy, wherein the agile strategy instructs the target robot to autonomously plan a movement path and the safety recovery strategy instructs the target robot to move based on avoidance instructions.
[0095] In one possible embodiment, in terms of obtaining the first state sequence based on the current ontology perception vector and the current environmental point cloud data, the second acquisition unit 302 is specifically configured to: obtain a high-dimensional state feature sequence based on the ontology perception vector and the environmental point cloud data; obtain a set of robot convex polyhedra based on the ontology perception vector; obtain a set of environmental convex polyhedra based on the environmental point cloud data; obtain the target shortest distance and gradient information based on the robot convex polyhedron set and the environmental convex polyhedron set; and obtain the first state sequence based on the high-dimensional state feature sequence, the target shortest distance, and the gradient information.
[0096] In one possible embodiment, in the step of obtaining a high-dimensional state feature sequence based on the body perception vector and the environmental point cloud data, the second acquisition unit 302 is specifically configured to: obtain a body pose matrix based on the body perception vector; convert the environmental point cloud data to the body center coordinates of the target robot based on the body pose matrix to obtain reference point cloud data; perform time alignment processing on the body perception vector and the reference point cloud data; map the aligned reference point cloud data into low-dimensional ray distance features; obtain the task target position of the target robot; and concatenate the ray distance features with the body perception vector and the task target position to obtain a high-dimensional state feature sequence.
[0097] In one possible embodiment, in the process of obtaining the set of environmental convex polyhedra based on the environmental point cloud data, the second acquisition unit 302 is specifically configured to: perform obstacle modeling based on the environmental point cloud data to obtain a subset of environmental point cloud data; cluster the subset of environmental point cloud data to obtain multiple point sets, each point set indicating an independent obstacle entity; calculate the minimum bounding convex hull of each point set; obtain an environmental convex polyhedron model based on the minimum bounding convex hull of each point set; and obtain the set of environmental convex polyhedra based on the environmental convex polyhedron model.
[0098] In one possible embodiment, in obtaining the set of environmental convex polyhedra based on the environmental convex polyhedron model, the second obtaining unit 302 is specifically used to: obtain the normal vector of each face in the environmental convex polyhedron model to obtain a normal vector matrix; obtain the displacement vector corresponding to each face in the environmental convex polyhedron model, wherein the displacement vector indicates the constraint threshold of the corresponding face; and perform a mathematical description of the environmental convex polyhedron model based on the normal vector matrix and the displacement vector to obtain the set of convex polyhedra.
[0099] In one possible embodiment, regarding the acquisition of the target shortest distance and gradient information based on the robot convex polyhedron set and the environment convex polyhedron set, the second acquisition unit 302 is specifically configured to: define a shortest collision distance based on the robot convex polyhedron set and the environment convex polyhedron set to obtain a first distance formula; perform a Lagrange dual transformation on the first distance formula to obtain a first objective function of maximizing quadratic programming with respect to dual variables; determine dual constraints based on the normal vector matrices of each face of the environment convex polyhedron set and the normal vector matrices of each face of the robot convex polyhedron set; and solve the first objective function based on the dual constraints to obtain the target shortest distance and gradient information.
[0100] In one possible embodiment, in terms of solving the first function according to the dual constraint conditions to obtain the target shortest distance and gradient information, the second acquisition unit 302 is specifically used to: determine the norm constraint equation according to the normal vector matrix of each face of the environmental convex polyhedron set; and solve the first function by combining the norm constraint equation and the dual constraint conditions to obtain the target shortest distance and gradient information.
[0101] In one possible embodiment, the risk-aware dual-strategy robot safety motion control device 300 further includes a training unit, which is specifically used for: acquiring a collision indication function and a goal achievement indication function, wherein the collision indication function is used to characterize the safety boundary of the target robot and the goal achievement indication function is used to characterize the goal achievement status of the target robot; determining a discount factor; generating an reachability-avoidance value function based on the agility strategy, combining the collision indication function, the goal achievement indication function, and the discount factor; acquiring training samples, wherein the training samples include sample state sequences at multiple time points; and training the risk-awareness model based on the multiple sample state sequences and the reachability-avoidance value function.
[0102] In one possible embodiment, in training the risk perception model based on the plurality of sample state sequences and the reachability-avoidance value function, the training unit is specifically configured to: obtain the current network and the target network corresponding to the current network, wherein the target network has the same network structure and initial parameters as the current network, and the parameters of the target network are in a frozen state; input the sample state sequence at the next time step into the target network to obtain a first risk value output by the target network; solve the reachability-avoidance value function based on the first risk value to obtain a risk target value; input the sample state sequence at the current time step into the current network to obtain a second risk value output by the current network; calculate a loss function based on the risk target value and the second risk value; update the parameters of the current network based on the loss function; iterate the training until convergence, and then use the current network as the trained risk perception model.
[0103] In one possible embodiment, the discount factor is positively correlated with the preset time window.
[0104] In one possible embodiment, in generating an reachability-avoidance value function based on the agile strategy, in combination with the collision indication function, the goal achievement indication function, and the discount factor, the training unit is specifically configured to: determine a plurality of reward functions, each reward function corresponding to a training objective; determine the weight of each reward function; and generate an reachability-avoidance value function based on the reward functions, the weight of each reward function, the agile strategy, in combination with the collision indication function, the goal achievement indication function, and the discount factor.
[0105] In one possible embodiment, in determining the current execution strategy of the target robot based on the comparison result, the determining unit 305 is specifically configured to: determine the current execution strategy as the agile strategy when the comparison result indicates that the scalar risk value is less than the preset safety threshold; and determine the current execution strategy as the safety recovery strategy when the comparison result indicates that the scalar risk value is greater than or equal to the preset safety threshold.
[0106] In one possible embodiment, when the current execution strategy is the safety recovery strategy, the determining unit 305 is further configured to: acquire the current position and the target position of the target robot; determine a second objective function based on the current position and the target position, with the objective of minimizing Euclidean distance and satisfying a safety constraint, wherein the safety constraint indicates that the risk value under the velocity vector output by the risk perception model is less than a preset safety threshold; iteratively solve the second objective function in the action space using gradient descent to obtain the optimal velocity vector; generate a safety recovery strategy action based on the optimal velocity vector; acquire the agile strategy action corresponding to the agile strategy; acquire a smoothing factor; determine an output action based on the smoothing factor, the safety recovery strategy action, and the agile strategy action; and generate the evasion instruction based on the output action.
[0107] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application. For example... Figure 4As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430, and a communications bus 440, wherein the processor 410, the communications interface 420, and the memory 430 communicate with each other through the communications bus 440. The processor 410 can call logic instructions in the memory 430 to execute a risk-aware dual-strategy robot safety motion control method. This method includes: acquiring the current body perception vector and current environmental point cloud data of the target robot, wherein the current body perception vector indicates the current dynamic state of the target robot, and the current environmental point cloud data indicates the current environmental state of the target robot; acquiring a first state sequence based on the current body perception vector and the current environmental point cloud data; inputting the first state sequence into a risk perception model to obtain a scalar risk value output by the risk perception model, wherein the risk perception model is used to predict whether the target robot will collide within a preset time window based on the first state sequence; comparing the scalar risk value with a preset safety threshold to obtain a comparison result; and determining the current execution strategy of the target robot based on the comparison result, wherein the current execution strategy includes an agile strategy or a safety recovery strategy, wherein the agile strategy instructs the target robot to autonomously plan a movement path, and the safety recovery strategy instructs the target robot to move based on avoidance instructions.
[0108] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0109] On the other hand, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program is implemented to perform the risk-aware dual-strategy robot safety motion control method provided by the above methods. The method includes: acquiring the current body perception vector and current environmental point cloud data of a target robot, wherein the current body perception vector indicates the current dynamic state of the target robot and the current environmental point cloud data indicates the current environmental state of the target robot; acquiring a first state sequence based on the current body perception vector and the current environmental point cloud data; inputting the first state sequence into a risk perception model to obtain a scalar risk value output by the risk perception model, wherein the risk perception model is used to predict whether the target robot will collide within a preset time window based on the first state sequence; comparing the scalar risk value with a preset safety threshold to obtain a comparison result; and determining the current execution strategy of the target robot based on the comparison result, wherein the current execution strategy includes an agile strategy or a safety recovery strategy, wherein the agile strategy instructs the target robot to autonomously plan a movement path and the safety recovery strategy instructs the target robot to move based on avoidance instructions.
[0110] In another aspect, this application also provides a computer program product, including a computer program that, when executed by a processor, implements any of the above-described risk-aware dual-strategy robot safety motion control methods. The method includes: acquiring a current body perception vector and current environmental point cloud data of a target robot, wherein the current body perception vector indicates the current dynamic state of the target robot, and the current environmental point cloud data indicates the current environmental state of the target robot; acquiring a first state sequence based on the current body perception vector and the current environmental point cloud data; inputting the first state sequence into a risk perception model to obtain a scalar risk value output by the risk perception model, wherein the risk perception model is used to predict whether the target robot will collide within a preset time window based on the first state sequence; comparing the scalar risk value with a preset safety threshold to obtain a comparison result; and determining the current execution strategy of the target robot based on the comparison result, wherein the current execution strategy includes an agile strategy or a safety recovery strategy, wherein the agile strategy instructs the target robot to autonomously plan a movement path, and the safety recovery strategy instructs the target robot to move based on avoidance instructions.
[0111] The device embodiments described above are merely illustrative. 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 modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0112] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention 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; and these 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 the present invention.
Claims
1. A dual-strategy robot safety motion control method based on risk perception, characterized in that, include: The current body perception vector and current environmental point cloud data of the target robot are obtained. The current body perception vector indicates the current dynamic state of the target robot, and the current environmental point cloud data indicates the current environmental state of the target robot. A first state sequence is obtained based on the current ontology perception vector and the current environmental point cloud data; The first state sequence is input into the risk perception model to obtain the scalar risk value output by the risk perception model. The risk perception model is used to predict whether the target robot will collide within a preset time window based on the first state sequence. The scalar risk value is compared with a preset safety threshold to obtain the comparison result; The current execution strategy of the target robot is determined based on the comparison results. The current execution strategy includes an agile strategy or a safe recovery strategy. The agile strategy instructs the target robot to autonomously plan a movement path, and the safe recovery strategy instructs the target robot to move based on avoidance instructions.
2. The method according to claim 1, characterized in that, The step of obtaining the first state sequence based on the current ontology perception vector and the current environmental point cloud data includes: A high-dimensional state feature sequence is obtained based on the ontology perception vector and the environmental point cloud data; The robot convex polyhedron set is obtained based on the ontology perception vector; Obtain the set of environmental convex polyhedra based on the environmental point cloud data; Obtain the target's shortest distance and gradient information based on the robot's convex polyhedron set and the environment's convex polyhedron set; The first state sequence is obtained based on the high-dimensional state feature sequence, the shortest distance to the target, and the gradient information.
3. The method according to claim 2, characterized in that, The step of obtaining a high-dimensional state feature sequence based on the ontology perception vector and the environmental point cloud data includes: The body pose matrix is obtained based on the body perception vector; Based on the body pose matrix, the environmental point cloud data is converted to the body center coordinates of the target robot to obtain reference point cloud data; The ontology perception vector and the reference point cloud data are time-aligned. The aligned reference point cloud data is mapped to low-dimensional ray distance features; Obtain the target position of the target robot; The ray distance feature is concatenated with the ontology perception vector and the target position to obtain a high-dimensional state feature sequence.
4. The method according to claim 2, characterized in that, The step of obtaining the set of environmental convex polyhedra based on the environmental point cloud data includes: Obstacle modeling is performed based on the environmental point cloud data to obtain a subset of environmental point cloud data; Clustering is performed on the subset of the environmental point cloud data to obtain multiple point sets, each point set indicating an independent obstacle entity; Calculate the minimum outer convex hull for each set of points; The convex polyhedron model of the environment is obtained based on the minimum circumscribed convex hull of each point set; Obtain the set of environmental convex polyhedra based on the environmental convex polyhedron model.
5. The method according to claim 4, characterized in that, The step of obtaining the set of convex polyhedra of the environment based on the environmental convex polyhedron model includes: Obtain the normal vector of each face in the convex polyhedron model of the environment to obtain the normal vector matrix; Obtain the displacement vector corresponding to each face in the convex polyhedron model of the environment, wherein the displacement vector indicates the constraint threshold of the corresponding face; The convex polyhedron model of the environment is mathematically described based on the normal vector matrix and the displacement vector to obtain a set of convex polyhedra.
6. The method according to claim 2, characterized in that, The step of obtaining the target shortest distance and gradient information based on the robot's convex polyhedron set and the environment's convex polyhedron set includes: Based on the robot convex polyhedron set and the environment convex polyhedron set, the shortest collision distance is defined, and the first distance formula is obtained; By performing a Lagrange dual transformation on the first distance formula, we obtain the first objective function of a quadratic programming problem that maximizes the dual variables. The dual constraint conditions are determined based on the normal vector matrices of each face of the environmental convex polyhedron set and the normal vector matrices of each face of the robot convex polyhedron set. Solve the first objective function based on the dual constraints to obtain the shortest distance and gradient information of the target.
7. The method according to claim 6, characterized in that, The step of solving the first function according to the dual constraints to obtain the target shortest distance and gradient information includes: The norm constraint equation is determined based on the normal vector matrix of each face of the convex polyhedron set of the environment; The first function is solved by combining the norm constraint equation and the dual constraint condition to obtain the shortest distance and gradient information of the target.
8. The method according to claim 1, characterized in that, The risk perception model is trained through the following steps: Obtain a collision indication function and a target achievement indication function, wherein the collision indication function is used to characterize the safety boundary of the target robot, and the target achievement indication function is used to characterize the target robot's target achievement status; Determine the discount factor; Based on the agile strategy, an reachability-avoidance value function is generated by combining the collision indication function, the goal achievement indication function, and the discount factor; Obtain training samples, which include a sequence of sample states at multiple time points; The risk perception model is trained based on the multiple sample state sequences and the reachability-avoidance value function.
9. The method according to claim 8, characterized in that, The step of training the risk perception model based on the multiple sample state sequences and the reachability-avoidance value function includes: Obtain the current network and the target network corresponding to the current network. The target network has the same network structure and initial parameters as the current network, and the parameters of the target network are in a frozen state. The sample state sequence at the next time step is input into the target network to obtain the first risk value output by the target network; Based on the first risk value, the reachability-avoidance value function is solved to obtain the risk target value; Input the current sample state sequence into the current network to obtain the second risk value output by the current network; Calculate the loss function based on the risk target value and the second risk value; The parameters of the current network are updated according to the loss function. After iterative training until convergence, the current network is used as the trained risk perception model.
10. The method according to claim 8, characterized in that, The discount factor is positively correlated with the preset time window.
11. The method according to claim 8, characterized in that, Based on the agile strategy, an reachability-avoidance value function is generated by combining the collision indication function, the goal achievement indication function, and the discount factor, including: Define multiple reward functions, each corresponding to a training objective; Determine the weight of each reward function; Based on the reward function, the weight of each reward function, the agile strategy, and in combination with the collision indication function, the goal achievement indication function, and the discount factor, an reachability-avoidance value function is generated.
12. The method according to claim 1, characterized in that, Determining the current execution strategy of the target robot based on the comparison result includes: If the comparison result indicates that the scalar risk value is less than the preset security threshold, the current execution strategy is determined to be the agile strategy; If the comparison result indicates that the scalar risk value is greater than or equal to the preset security threshold, the current execution strategy is determined to be the security recovery strategy.
13. The method according to claim 12, characterized in that, When the current execution policy is the security recovery policy, the method further includes: Obtain the current position of the target robot and the position of the task target; Based on the current position and the target position, a second objective function is determined with the goal of minimizing the Euclidean distance and satisfying a safety constraint, wherein the safety constraint indicates that the risk value under the velocity vector output by the risk perception model is less than a preset safety threshold. The second objective function is iteratively solved using the gradient descent method within the action space to obtain the optimal velocity vector; Generate a safe recovery strategy action based on the optimal velocity vector; Obtain the agile strategy action corresponding to the agile strategy; Obtain the smoothing factor; The output action is determined based on the smoothing factor, the safe recovery strategy action, and the agile strategy action; The evasion instruction is generated based on the output action.
14. A dual-strategy robot safety motion control device based on risk perception, characterized in that, include: The first acquisition unit is used to acquire the current body perception vector and the current environmental point cloud data of the target robot. The current body perception vector indicates the current dynamic state of the target robot, and the current environmental point cloud data indicates the current environmental state of the target robot. The second acquisition unit is used to acquire a first state sequence based on the current ontology perception vector and the current environmental point cloud data; The prediction unit is used to input the first state sequence into the risk perception model to obtain the scalar risk value output by the risk perception model. The risk perception model is used to predict whether the target robot will collide within a preset time window based on the first state sequence. The comparison unit is used to compare the scalar risk value with a preset safety threshold to obtain a comparison result; A determining unit is configured to determine the current execution strategy of the target robot based on the comparison result. The current execution strategy includes an agile strategy or a safety recovery strategy. The agile strategy instructs the target robot to autonomously plan a movement path, and the safety recovery strategy instructs the target robot to move based on avoidance instructions.