Trajectory planning method, device, electronic device and storage medium
By using topographic height maps and motion instructions in the robot to predict the expected motion trajectory, the problem of robots avoiding obstacles and planning motion trajectory in complex scenarios is solved, and the traffic capacity and motion efficiency are improved.
Patent Information
- Application Number
- CN202211105313.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-09
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2042-09-09
AI Technical Summary
In complex scenarios, when a robot evades an obstacle based on visual perception, it may lead to inability to reach the destination and it is difficult to plan a motion trajectory on the obstacle.
By obtaining the robot's motion instructions and topographic height map, the desired footing position of the robot in the previous and next motion cycles is determined, and the robot's expected motion trajectory is predicted in the next motion cycle.
The frequency of avoiding obstacles in the planned motion trajectory is reduced, the motion trajectory is planned on the obstacles, and the robot's passability and motion efficiency in complex terrain is improved.
Smart Images

Figure CN117001656B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of trajectory planning technology in the field of robotics, and more specifically, to a trajectory planning method, device, electronic device, and storage medium. Background Art
[0002] Robot is the common name for automatic control machines (Robot), which include all machines that simulate human behavior or thoughts and simulate other organisms. Robots have important uses in various fields such as industry, medicine, agriculture, and construction. For example, quadruped robots have made great progress in their movement capabilities thanks to the rapid development of hardware design and motion controllers in recent years. Many quadruped robots have been commercialized, and many quadruped robots have shown extraordinary movement capabilities on uneven terrain.
[0003] So far, the research on planning the robot's motion trajectory can be roughly divided into two planning schemes: without visual perception and with visual perception. The planning scheme without visual perception is called "blind walking". This scheme can occasionally achieve walking in complex environments, but its robustness, reliability and performance are very limited; in the planning scheme with visual perception, the robot avoids obstacles based on the results of visual perception to improve the robot's ability to pass.
[0004] However, for complex scenes with many obstacles, when the robot avoids obstacles based on visual perception, it is very likely that the robot will continue to avoid obstacles, which will result in the robot being unable to reach the destination. In addition, for some complex scenes, it is also necessary to consider how to plan the robot's movement trajectory on obstacles. Summary of the invention
[0005] The embodiments of the present application provide a trajectory planning method, device, electronic device and storage medium, which can not only be used to plan the motion trajectory of a robot, but also reduce the frequency of avoiding obstacles during the motion trajectory planning process and realize the planning of the robot's motion trajectory on obstacles, thereby improving the motion efficiency and the robot's ability to pass in complex terrain.
[0006] In a first aspect, an embodiment of the present application provides a trajectory planning method, including:
[0007] Get the robot's motion instructions;
[0008] Determine a previous motion cycle of the robot and a next motion cycle of the robot based on a parameter in the motion instruction used to characterize a motion cycle of the robot;
[0009] Determine the expected landing point position of the robot on the preset plane in the next motion cycle;
[0010] Get the terrain height map of the area where the robot is located;
[0011] Determine the expected foothold position of the robot on the terrain height map in the next movement cycle based on the expected foothold position of the robot on the terrain height map in the previous movement cycle and the expected foothold position of the robot on the preset plane in the next movement cycle;
[0012] Based on the expected landing point position of the robot on the terrain height map in the previous motion cycle and the expected landing point position of the robot on the terrain height map in the next motion cycle, the expected motion trajectory of the robot in the next motion cycle is predicted.
[0013] In a second aspect, an embodiment of the present application provides a trajectory planning device, including:
[0014] A first acquisition unit, used for acquiring a motion instruction of the robot;
[0015] A first determining unit, configured to determine a previous motion cycle of the robot and a next motion cycle of the robot based on a parameter in the motion instruction used to characterize the motion cycle of the robot;
[0016] A second determining unit is used to determine the expected landing point position of the robot on the preset plane in the next movement cycle;
[0017] A second acquisition unit is used to acquire a terrain height map of the area where the robot is located;
[0018] A third determining unit is used to determine the expected landing point position of the robot on the terrain height map in the next movement cycle based on the expected landing point position of the robot on the terrain height map in the previous movement cycle and the expected landing point position of the robot on the preset plane in the next movement cycle;
[0019] A prediction unit is used to predict the expected movement trajectory of the robot in the next movement cycle based on the expected landing point position of the robot on the terrain height map in the previous movement cycle and the expected landing point position of the robot on the terrain height map in the next movement cycle.
[0020] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0021] a processor adapted to implement computer instructions; and,
[0022] A computer-readable storage medium stores computer instructions, wherein the computer instructions are suitable for being loaded by a processor and executing the method of the first aspect mentioned above.
[0023] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are read and executed by a processor of a computer device, the computer device executes the method of the first aspect involved above.
[0024] In a fifth aspect, an embodiment of the present application provides a computer program product or a computer program, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method of the first aspect mentioned above.
[0025] In an embodiment of the present application, by introducing a terrain height map of the area where the robot is located, the expected landing point position of the robot in the previous motion cycle and the expected landing point position of the robot in the next motion cycle can be quantified in three-dimensional space, and then the expected motion trajectory of the robot in the next motion cycle can be predicted based on the expected landing point position of the robot in the previous motion cycle and the expected landing point position of the robot in the next motion cycle. Therefore, it can not only be used to plan the motion trajectory of the robot, but also reduce the frequency of avoiding obstacles in the process of planning the motion trajectory and realize the planning of the robot's motion trajectory on obstacles, thereby improving the motion efficiency and the robot's ability to pass in complex terrain.
[0026] In particular, the trajectory planning method provided in the embodiments of the present application enables the robot to move in complex environments with many obstacles such as stairs, plum blossom piles, and slopes. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a schematic diagram of the control framework provided in the embodiment of the present application.
[0028] Figure 2 It is a schematic flow chart of the trajectory planning method provided in an embodiment of the present application.
[0029] Figure 3 It is a schematic flow chart of the trajectory planning device provided in an embodiment of the present application.
[0030] Figure 4 It is a schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] The solution provided in this application may relate to the field of artificial intelligence (AI) technology.
[0032] Among them, AI is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0033] It should be understood that artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, and mechatronics. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0034] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, drones, robots, smart medical care, smart customer service, etc. I believe that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0035] The embodiments of the present application may relate to robotics technology in artificial intelligence technology.
[0036] The robot involved in the present application may be a legged robot, a wheeled robot, or a foot-wheel composite multi-legged robot, etc. The legged robot is equipped with multiple feet, and the lifting or falling of the feet is controlled by the joints configured on the multiple feet, so that the legged robot can move, thereby realizing the legged robot simulating the walking of animals or people. For example, the legged robot is a bipedal robot, a quadrupedal robot or a hexapodal robot, etc. The foot-wheel composite multi-legged robot may be a foot-wheel composite quadrupedal robot, etc. The foot-wheel composite quadrupedal robot refers to a quadrupedal robot with two front legs and two hind legs, and the feet of the quadrupedal robot are equipped with wheels, so that the quadrupedal robot can perform both quadrupedal walking and wheeled movement. The above-mentioned wheels can be installed only on the hind legs of the quadrupedal robot, or only on the front legs of the quadrupedal robot, or corresponding wheels can be installed on both the front legs and the hind legs of the quadrupedal robot.
[0037] The embodiments of the present application may involve computer vision (CV) technology in artificial intelligence technology. Computer vision is a science that studies how to make machines "see". To put it more concretely, it refers to machine vision such as using cameras and computers to replace human eyes to identify and measure targets, and further perform graphic processing to make computer processing into images that are more suitable for human eye observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multidimensional data. Computer vision technology generally includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous positioning and map construction, and other technologies, as well as common biometric recognition technologies such as face recognition and fingerprint recognition.
[0038] The embodiments of the present application may also involve machine learning (ML) in artificial intelligence technology. ML is a multi-disciplinary cross-discipline involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity and other disciplines. It specializes in how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all fields of artificial intelligence. Machine learning and deep learning generally include technologies such as artificial neural networks, belief networks, reinforcement learning, transfer learning, and inductive learning.
[0039] The solution provided in this application may involve cloud technology.
[0040] Cloud computing refers to the delivery and use model of IT infrastructure, which means obtaining required resources through the network in an on-demand and easily scalable manner; in a broad sense, cloud computing can refer to the delivery and use model of services, which means obtaining required services through the network in an on-demand and easily scalable manner. This service can be related to IT and software, the Internet, or other services. Cloud computing is the product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing.
[0041] With the development of the Internet, real-time data streams, and the diversification of connected devices, as well as the demand for search services, social networks, mobile commerce, and open collaboration, cloud computing has developed rapidly. Different from the previous parallel distributed computing, the emergence of cloud computing will promote revolutionary changes in the entire Internet model and enterprise management model from a conceptual perspective.
[0042] Big data refers to a collection of data that cannot be captured, managed, and processed by conventional software tools within a certain time frame. It is a massive, high-growth, and diversified information asset that requires new processing models to have stronger decision-making power, insight discovery, and process optimization capabilities. With the rapid development of "cloud", big data has also attracted more and more attention. Big data requires special technologies to effectively process large amounts of data within a tolerable time frame. Technologies suitable for big data include large-scale parallel processing databases, data mining, distributed file systems, distributed databases, cloud computing platforms, the Internet, and extended storage systems.
[0043] For ease of understanding, relevant terms involved in this field are explained below.
[0044] 1. World coordinate system:
[0045] The world coordinate system is the absolute coordinate system of the system. Before the user coordinate system is established, the coordinates of each point on the screen are determined by the origin of the coordinate system. In other words, since the camera can be placed anywhere in the environment, a reference coordinate system is selected in the environment to describe the position of the camera, and it is used to describe the position of any object in the environment. This coordinate system is called the world coordinate system.
[0046] 2. Base coordinate system:
[0047] The origin of the base coordinate system is the base point of the robot base. For example, the body coordinate system may refer to a three-dimensional orthogonal rectangular coordinate system fixed on the robot and following the right-hand rule, with its origin located at the center of mass of the robot.
[0048] 3. Camera coordinate system.
[0049] The camera coordinate system can also be called the camera coordinate system. The origin of the camera coordinate system is the optical center of the camera. The x-axis and y-axis are parallel to the X and Y axes of the image. The z-axis is the camera optical axis, which is perpendicular to the image plane. The spatial rectangular coordinate system formed by this is called the camera coordinate system. The camera coordinate system can be a three-dimensional coordinate system.
[0050] 4. Depth camera: Depth camera is also called 3D camera. Compared with traditional cameras, depth camera has added a depth measurement function, so it is more convenient and accurate to perceive the surrounding environment and changes. Depth camera is a camera that can obtain the physical distance between objects in the scene and the camera. Depth camera is usually composed of multiple lenses and optical sensors. According to different measurement principles, mainstream depth cameras are generally divided into the following methods: time of flight method, structured light method, binocular stereo vision method.
[0051] 5. Model predictive control (MPC): It is a special type of control. Its current control action is obtained by solving a finite time domain open-loop optimal control problem at each sampling moment. The current state of the process is used as the initial state of the optimal control problem, and the solved optimal control sequence only implements the first control action. This is the biggest difference between it and those algorithms that use pre-calculated control laws. In essence, model predictive control solves an open-loop optimal control problem. Its idea has nothing to do with the specific model, but its implementation is related to the model.
[0052] 6. Proportional plus Differential (PD) control: It includes proportional control and differential control.
[0053] In proportional control, the output of the controller is proportional to the input error signal. When only proportional control is used, the system output has a steady-state error. The role of proportional control is to respond to the deviation of the system in proportion. Once the system has a deviation, the proportional adjustment immediately takes effect to reduce the deviation. A large proportional effect can speed up the adjustment and reduce the error, but a too large proportion will reduce the stability of the system and even cause system instability.
[0054] In differential control, the output of the controller is proportional to the differential of the input error signal (i.e., the rate of change of the error). The automatic control system may oscillate or even become unstable during the adjustment process to overcome the error. The reason is that there are large inertia components (links) or lag components, which have the effect of suppressing the error, and their changes always lag behind the changes in the error. The solution is to make the change of the effect of suppressing the error "ahead", that is, when the error is close to zero, the effect of suppressing the error should be zero. That is to say, it is often not enough to introduce only "proportional" in the controller. The role of the proportional term is only to amplify the amplitude of the error, and what needs to be added at present is the "differential term", which can predict the trend of error change. In this way, the controller with proportional + differential can make the control effect of suppressing the error equal to zero or even negative in advance, thereby avoiding serious overshoot of the controlled quantity. Therefore, for controlled objects with large inertia or lag, the proportional + differential (PD) controller can improve the dynamic characteristics of the system during the adjustment process. Differential regulation: The differential action reflects the rate of change of the system deviation signal, and is predictive. It can predict the trend of deviation change, so it can produce advanced control. Before the deviation is formed, it has been eliminated by the differential regulation. Therefore, the dynamic performance of the system can be improved. When the differential time is selected appropriately, overshoot can be reduced and the adjustment time can be reduced. The differential action has an amplifying effect on noise interference, so excessive differential regulation is not conducive to the system's anti-interference. In addition, the differential reflects the rate of change, and when the input does not change, the differential action output is zero. The differential action cannot be used alone, and needs to be combined with the other two regulation laws to form a PD or PID controller.
[0055] 7. Movement cycle: refers to the time it takes for a robot to complete a set of movements. For example, taking a legged robot as an example, the movement cycle can refer to the time it takes for each leg of the robot to complete a lifting action and a lowering action.
[0056] 8. Control cycle: refers to the cycle of the robot receiving control instructions. For example, the receiving cycle of the joint torque of the robot.
[0057] 9. Collection cycle: refers to the cycle of the robot collecting environmental data. For example, the cycle of the robot's camera collecting images. Another example is the cycle of the robot's encoder collecting data. Another example is the cycle of the robot's inertial measurement unit collecting data.
[0058] So far, the research on planning the robot's motion trajectory can be roughly divided into two planning schemes: without visual perception and with visual perception. The planning scheme without visual perception is called "blind walking". This scheme can occasionally achieve walking in complex environments, but its robustness, reliability and performance are very limited; in the planning scheme with visual perception, the robot avoids obstacles based on the results of visual perception to improve the robot's ability to pass.
[0059] However, for complex scenes with many obstacles, when the robot avoids obstacles based on visual perception, it is very likely that the robot will continue to avoid obstacles, which will result in the robot being unable to reach the destination. In addition, for some complex scenes, it is also necessary to consider how to plan the robot's movement trajectory on obstacles.
[0060] In view of this, the embodiments of the present application provide a trajectory planning method, device, electronic device and storage medium, which can not only be used to plan the motion trajectory of the robot, but also reduce the frequency of avoiding obstacles in the process of planning the motion trajectory and realize the planning of the robot's motion trajectory on obstacles, thereby improving the motion efficiency and the robot's ability to pass in complex terrain.
[0061] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with specific embodiments.
[0062] Figure 1 It is a schematic diagram of the system framework provided in the embodiment of the present application.
[0063] like Figure 1 As shown, the system framework may include a robot's encoder, IMU, camera, visual positioning module, visual recognition module, high-frequency state estimator, height map generation module, gait planner, trajectory planner, and motion controller.
[0064] The functions of each part are described below.
[0065] 1. Gait Planner:
[0066] On the one hand, the gait planner is used to receive motion instructions, and then determine the robot's previous motion cycle and the robot's next motion cycle based on the parameters in the received motion instructions that are used to characterize the robot's motion cycle, and then based on the parameters in the motion instructions that are used to characterize the robot's motion cycle; for example, the expected landing point position of the robot on the preset plane in the next motion cycle can be determined based on the parameters in the motion instructions that are used to characterize the robot's speed in a preset direction on the preset plane and the parameters in the motion instructions that are used to characterize the robot's angular velocity in the yaw angle direction.
[0067] On the other hand, the gait planner is used to receive the terrain height map sent by the height map generation module, and determine the expected landing point position of the robot on the preset plane in the next motion cycle; and the terrain height map output by the height map generation module, and based on the expected landing point position of the robot on the terrain height map in the previous motion cycle and the expected landing point position of the robot on the preset plane in the next motion cycle, determine the expected landing point position of the robot on the terrain height map in the next motion cycle.
[0068] Exemplarily, the motion instruction refers to an instruction issued by a user to the robot through remote control or the like.
[0069] Exemplarily, the movement instruction includes but is not limited to the following parameters:
[0070] v x,y : The speed on a preset plane, such as the speed on the plane formed by the x-axis and the y-axis.
[0071] The rotation speed in the yaw direction.
[0072] T: The robot's motion cycle. For example, the time it takes for a robot to walk is the number of steps of the robot.
[0073] G: The gait type of the robot, including but not limited to walk, trot, gallop, pace, etc.
[0074] Exemplarily, the parameters used to characterize the expected landing point position of the robot on the terrain height map in the next motion cycle include but are not limited to:
[0075] The coordinates of the robot's desired foothold position in the next motion cycle.
[0076] The outer normal of the robot's expected foothold position in the next motion cycle. For the normal perpendicular to the tangent in the plane, the outer normal is the normal pointing away from the tangent, and for the normal perpendicular to the tangent plane in space, the outer normal is the normal pointing away from the plane. For example, for a circle on a plane, the normal from the center of the circle along the radius to the outside of the circle is the outer normal, and the corresponding vector is the outer normal vector; while the inner normal is the normal along the radius pointing to the center of the circle, and the corresponding normal vector is the inner normal vector.
[0077] Exemplarily, the gait planner may forward the T and G in the motion instructions to the trajectory planner.
[0078] In combination with specific parameters, the gait planner can be based on the vx,y and Estimate the expected landing point position of the robot on the preset plane in the next motion cycle, and obtain the expected landing point position of the robot on the terrain height map in the next motion cycle in combination with the terrain height map as well as So that the trajectory planner can combine G and T in the motion command to obtain the expected motion trajectory for the next motion cycle.
[0079] 2. Trajectory Planner:
[0080] The trajectory planner is used to receive the output of the gait planner. T and G, and based on the received parameters, determine the expected motion trajectory of the robot in the next motion cycle.
[0081] Exemplarily, the parameters used to characterize the expected motion trajectory of the robot in the next motion cycle include but are not limited to:
[0082] The position of the robot's body center in the world coordinate system during the next motion cycle.
[0083] The velocity of the robot's body center in the world coordinate system during the next motion cycle.
[0084] The posture of the robot's body center in the world coordinate system during the next motion cycle.
[0085] The angular velocity of the robot's body center in the world coordinate system during the next motion cycle.
[0086] Exemplarily, the trajectory planner may also determine parameters for characterizing the expected joint trajectory of the robot in the next motion cycle based on the parameters for characterizing the expected motion trajectory of the robot in the next motion cycle.
[0087] Exemplarily, the parameters used to characterize the desired joint trajectory of the robot in the next motion cycle include but are not limited to:
[0088] q des : The angles of the robot's joints in the next motion cycle.
[0089] The angular velocity of the robot's joints during the next motion cycle.
[0090] Combined with specific parameters, the trajectory planner can calculate the coordinates and external normal of the robot's foothold position on the terrain height map in the previous motion cycle, and the expected foothold position of the robot on the terrain height map in the next motion cycle. as well as As the constraint condition of the quadratic optimization problem; the quadratic objective function of the quadratic optimization problem is constructed by parameterizing the desired motion trajectory of the robot in multiple directions; based on this, the quadratic objective function can be solved by the cost function of the motion trajectory to obtain the parameters that satisfy G and are used to characterize the desired motion trajectory Optionally, the parameters considered in the cost function of the motion trajectory include but are not limited to smoothness, safety performance or path length of the motion trajectory, which can be used to characterize the cost of the motion trajectory. Optionally, the multiple directions include but are not limited to: x direction, y direction, z direction, roll angle (roll) direction, pitch angle (pitch) and yaw angle (yaw) direction, etc. Further, the trajectory planner can also be based on Determine the parameter q used to characterize the robot's desired joint trajectory in the next motion cycle des as well as
[0091] 3. Motion controller:
[0092] On the one hand, the motion controller can determine the joint torque used to control the robot's motion based on the parameters used to characterize the robot's expected motion trajectory in the next motion cycle and the state estimation result of the robot in the current control cycle sent by the high-frequency state estimator. Specifically, the motion controller can construct an MPC problem based on the parameters used to characterize the robot's expected motion trajectory in the next motion cycle and the state estimation result of the robot in the current control cycle sent by the high-frequency state estimator, and solve the optimal reaction force from the ground that the robot bears when it contacts the ground in the current control cycle, and determine the joint torque used to control the robot's motion based on the optimal reaction force. For example, the motion controller can directly determine the optimal reaction force as the joint torque used to control the robot's motion.
[0093] Exemplarily, the state estimation result of the robot in the current control cycle sent by the high-frequency state estimator includes but is not limited to the following parameters:
[0094] The position of the robot's body center in the world coordinate system during the current control cycle.
[0095] The velocity of the robot's body center in the world coordinate system during the current control cycle.
[0096] The posture of the robot's body center in the world coordinate system during the current control cycle.
[0097] The angular velocity of the robot's body center in the world coordinate system during the current control cycle.
[0098] Exemplarily, the parameters output by the motion controller include but are not limited to:
[0099] τ feedward : Joint torque of the robot in the current control cycle.
[0100] On the other hand, the motion controller can correct the optimal reaction force based on the parameters used to characterize the desired joint trajectory of the robot in the next motion cycle to obtain the joint torque used to control the robot's motion. Specifically, the motion controller can correct the optimal reaction force using the PD controller based on the parameters used to characterize the desired joint trajectory of the robot in the next motion cycle to obtain the joint torque used to control the robot's motion, thereby ensuring the robot's motion stability.
[0101] In combination with specific parameters, the motion controller can be based on the parameters sent by the trajectory planner that meet G and are used to characterize the desired motion trajectory and the true parameters estimated by the high-frequency state estimator Predict the robot's joint torque τ in the current control cycle feedward Furthermore, the motion controller can also be based on the parameter q sent by the trajectory planner to characterize the desired joint trajectory of the robot. des as well as For τ feedward Correction is performed to obtain the final joint torque τ des Optional, Among them, k p is the proportional constant of the PD controller, k d is the differential constant of the PD controller, and δ is the error between the expected value and the actual value.
[0102] 4. High-frequency state estimator:
[0103] The high-frequency state estimator can estimate the state of the robot based on the data measured by the robot's encoder disk and the data measured by the robot's inertial measurement unit (IMU), and obtain the high-frequency state estimation result of the robot in the current control cycle.
[0104] Among them, the encoding disk can refer to a digital encoder used to measure angular displacement. It has the advantages of strong resolution, high measurement accuracy and reliable operation. It is the most commonly used displacement sensor for measuring the angular position of the shaft. The encoding disk is divided into two types: absolute encoder and incremental encoder. The former can directly give a digital code corresponding to the angular position; the latter uses a computing system to add or subtract the pulse increment generated by the rotating encoder against a certain reference number. IMU is mainly used to detect and measure acceleration and rotational motion sensors.
[0105] Exemplarily, the estimation algorithm can be a Kalman filter algorithm, whose basic idea is: taking the minimum mean square error as the best estimation criterion, adopting the state space model of signal and noise, using the estimation value of the previous moment and the observation value of the current moment to calculate the estimation value of the current moment, and its specific algorithm makes an estimation of the signal to be processed that satisfies the minimum mean square error according to the established system equation and observation equation. Because it is easy to implement computer programming and can update and process the data collected on site in real time, Kalman filtering is currently the most widely used filtering method, and has been well applied in many fields such as communication, navigation, guidance and control.
[0106] Exemplarily, the high-frequency state estimator can use the high-frequency state estimation result of the robot in the previous control cycle as the estimated value of the previous moment, and the data measured by the code disk of the robot and the data measured by the IMU in the current control cycle as the measurement value, as the observation value at the current moment, and then use the estimated value at the previous moment and the observation value at the current moment to calculate the estimated value at the current moment, that is, to obtain the high-frequency state estimation result of the robot in the current control cycle.
[0107] Exemplarily, the data measured by the robot's code disc include but are not limited to:
[0108] q: The angles of the robot's joints measured by the robot's encoder.
[0109] The robot's encoder measures the angular velocity of the robot's joints.
[0110] Exemplarily, the data measured by the IMU of the robot includes but is not limited to:
[0111] a imu : The acceleration of the robot measured by the robot’s inertial measurement unit.
[0112] R imu : The robot's posture measured by the robot's inertial measurement unit.
[0113] ω imu : The angular velocity of the robot measured by the robot’s inertial measurement unit.
[0114] 5. Visual positioning module:
[0115] The visual positioning module can estimate the state of the robot based on the data measured by the robot's inertial measurement unit (IMU) and the image captured by the robot's camera using the estimation algorithm to obtain the estimated result of the robot's state in the current image acquisition cycle. The estimated result of the robot's state in the current image acquisition cycle can also be called the robot's low-frequency state estimation information. The visual positioning module can send the low-frequency state estimation information to the high-frequency state estimator at a preset frequency. For example, the preset frequency can be 25 hertz (Hz) or other values.
[0116] Exemplarily, the high-frequency state estimator may utilize the low-frequency state estimation result sent by the visual positioning module to correct the high-frequency state estimation result to obtain a final state estimation result, so as to reduce the state drift of the high-frequency state estimation information.
[0117] Exemplarily, the estimation result of the robot state in the current image acquisition cycle may be an error of the robot state estimation result in the current control cycle.
[0118] In a specific implementation, the high-frequency state estimator can use the error of the high-frequency state estimation result of the robot in the previous control cycle as the estimated value of the previous moment, and use the data measured by the code disk of the robot and the data measured by the IMU in the current control cycle as the measurement value, as the observation value at the current moment, and then use the estimated value at the previous moment and the observation value at the current moment to calculate the estimated value at the current moment, that is, to obtain the error of the high-frequency state estimation result of the robot in the current control cycle, and then based on the error of the high-frequency state estimation result of the robot in the current control cycle, the high-frequency state estimation result of the robot in the current control cycle can be corrected to obtain the final high-frequency state estimation result of the robot in the current control cycle.
[0119] For example, the error of the high-frequency state estimation result includes the posterior state mean and posterior state covariance obtained by the first-level Kalman filter; the error of the high-frequency state estimation result after preprocessing is used as the estimated value at the previous moment, the visual processing result and the camera noise covariance are used as the observed values at the current moment, and finally the obtained state increment is used as the output to update the high-frequency state estimation result and obtain a more accurate estimation of the entity state.
[0120] It is worth noting that the posterior is relative to the prior. The prior is an estimate based on the system process principle or experience, while the posterior is a result that is theoretically closest to the true value by combining the previous prior estimates and weighted measurements. Therefore, the posterior estimate is more accurate than the prior estimate.
[0121] Exemplarily, the robot's camera includes but is not limited to a red, green, blue (RGB) camera and a depth camera. The images captured by the robot's camera include but are not limited to the following images:
[0122] M: Scene image captured by the robot’s camera, such as an image with depth information or a point cloud.
[0123] Exemplarily, the estimated results of the robot state in the current image acquisition cycle include but are not limited to the following parameters:
[0124] The position of the robot's body center in the world coordinate system during the image acquisition cycle.
[0125] The velocity of the robot's body center in the world coordinate system during the image acquisition cycle.
[0126] The posture of the robot's body center in the world coordinate system during the image acquisition cycle.
[0127] The angular velocity of the robot's body center in the world coordinate system during the image acquisition period.
[0128] 6. High-resolution map generation module:
[0129] The height map generation module is used to receive the height map of the robot's area in the base coordinate system sent by the visual recognition module and the state estimation result of the robot sent by the high-frequency state estimator, and based on the parameters in the state estimation result used to characterize the position and posture of the robot in the world coordinate system, convert the height map of the area in the base coordinate system into the height map of the area in the world coordinate system. The height map of the area in the world coordinate system can be sent to the gait planner as the terrain height map of the area.
[0130] Exemplarily, the terrain height map can be represented as an array, and each element of the array specifies the height value of a vertex. For example, the terrain height map can be used to obtain the height and external normal of any point in the environment, where the height and external normal of any point in the environment can be represented as:
[0131]
[0132] 7. Visual recognition module:
[0133] The visual recognition module can recognize a height map of the area where the robot is located in the base coordinate system based on the image collected by the robot, and send the height map of the area where the robot is located in the base coordinate system to the height map generation module.
[0134] First, the visual recognition module acquires multiple images by extracting them frame by frame; then, the visual recognition module fuses the images to be fused in the multiple images based on multiple low-frequency state estimation information to obtain a fused image; for example, the multiple low-frequency state estimation information is the state estimation information obtained by the visual positioning module based on the multiple images, and the multiple low-frequency state information includes current estimation information obtained based on images acquired in a current acquisition cycle. At this time, the visual recognition module can use the image whose difference between the low-frequency state estimation information and the current estimation information in the multiple images is less than a preset threshold or within a preset range as the image to be fused, and fuse the images to be fused to obtain a fused image; wherein the fused image can more accurately characterize the area where the robot is located; finally, the fused image can be converted into a height map in a camera coordinate system based on the depth data, so the visual recognition module can convert the height map in the camera coordinate system into a height map in a base coordinate system, and send it to a height map generation module.
[0135] Exemplarily, the visual recognition module can also be used to determine the landing point position of the robot in the height map under the base coordinate system.
[0136] Exemplarily, the parameters used to characterize the foothold position of the robot in the height map in the base coordinate system include but are not limited to:
[0137] The coordinates of the robot's foothold position in the base coordinate system during the image acquisition cycle.
[0138] The external normal of the robot's foothold position in the base coordinate system during the image acquisition period.
[0139] In the embodiment of the present application, the area where the robot in the environment is located is identified and quantified using a visual recognition module, and a terrain height map of the area is formed in combination with the state estimation result of the robot itself and the recognition result of the visual recognition module. Based on this, the gait planner can determine the foothold position of the robot on the terrain height map in the previous motion cycle and the next motion cycle according to the motion instructions (speed, gait, etc.) of the robot and the terrain height map, and the trajectory planner can determine the expected motion trajectory of the robot in the next motion cycle based on the foothold position of the robot on the terrain height map in the previous motion cycle and the next motion cycle. Further, the motion controller can determine the joint torque of the robot in the current control cycle based on the expected motion trajectory by the MPC algorithm, for example, the joint torque based on the MPC algorithm can also be corrected in combination with the joint trajectory to obtain the final joint torque. The trajectory planning method provided in the embodiment of the present application can not only be used to plan the motion trajectory of the robot, but also can reduce the frequency of avoiding obstacles in the process of planning the motion trajectory and realize planning the motion trajectory of the robot on the obstacle, thereby improving the motion efficiency and the traffic capacity of the robot under complex terrain.
[0140] Figure 2 A schematic flow chart of a trajectory planning method 100 according to an embodiment of the present application is shown, and the method 100 can be performed by any electronic device with data processing capabilities. For example, the method 100 can be performed by a robot, that is, when the robot moves, it determines the expected motion trajectory of the robot in the next motion cycle and moves based on the expected motion trajectory. Optionally, the robot can be a multi-legged robot (such as a biped, a quadruped, a hexapod, etc.). For another example, the method 100 can be performed by a control device, that is, the control device determines the expected motion trajectory of the robot in the next motion cycle and controls the robot to move based on the expected motion trajectory. Optionally, the control device can be implemented as a server, which is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and basic cloud computing services such as big data and artificial intelligence platforms. Optionally, the control device can be implemented as a simulator, a desktop computer, a laptop, a personal computer (Personal Computer, PC) and other intelligent devices. For another example, the method 100 may be Figure 1 For the sake of convenience, the method 100 may be executed by a robot as an example to illustrate the solution provided by the present application.
[0141] like Figure 2 As shown, the method 100 may include:
[0142] S110, the robot obtains a motion instruction of the robot.
[0143] Exemplarily, the motion instruction refers to an instruction issued by a user to the robot through remote control or the like.
[0144] Exemplarily, the movement instruction includes but is not limited to the following parameters:
[0145] v x,y : The speed on a preset plane, such as the speed on the plane formed by the x-axis and the y-axis.
[0146] The rotation speed in the yaw direction.
[0147] T: The robot's motion cycle. For example, the time it takes for a robot to walk is the number of steps of the robot.
[0148] G: The gait type of the robot, including but not limited to walk, trot, gallop, pace, etc.
[0149] S120, the robot determines a previous motion cycle of the robot and a next motion cycle of the robot based on the parameters in the motion instruction used to characterize the motion cycle of the robot.
[0150] Exemplarily, the robot determines a time period of a previous motion cycle of the robot and a time period of a next motion cycle of the robot based on the parameters in the motion instruction used to characterize the motion cycle of the robot and the current time.
[0151] S130, the robot determines an expected landing point position of the robot on a preset plane in the next motion cycle.
[0152] Exemplarily, the preset plane may be a default plane, such as a plane formed by the x-axis and the y-axis.
[0153] Exemplarily, the robot can determine the expected landing point position of the robot on the preset plane in the next motion cycle based on the current position of the robot on the preset plane, the speed of the robot in the speed direction, and the angular velocity in the angular velocity direction. Optionally, the speed direction includes but is not limited to the direction on the preset plane, the x direction, the y direction, and the z direction. Optionally, the angular velocity direction includes but is not limited to the roll angle (roll) direction, the pitch angle (pitch) and the yaw angle (yaw) direction, etc.
[0154] S140, the robot obtains a terrain height map of the area where the robot is located.
[0155] Exemplarily, the terrain height map can be represented as an array, and each element of the array specifies the height value of a vertex. For example, the terrain height map can be used to obtain the height and external normal of any point in the environment, where the height and external normal of any point in the environment can be represented as:
[0156]
[0157] S150, the robot determines the expected landing point position of the robot on the terrain height map in the next movement cycle based on the expected landing point position of the robot on the terrain height map in the previous movement cycle and the expected landing point position of the robot on the preset plane in the next movement cycle.
[0158] Exemplarily, the expected landing point position of the robot on the terrain height map in the last movement cycle may be the expected landing point position determined when the robot predicts the expected motion trajectory in the last movement cycle.
[0159] Exemplarily, the parameters used to characterize the expected landing point position of the robot on the terrain height map in the next motion cycle include but are not limited to:
[0160] The coordinates of the robot's desired foothold position in the next motion cycle.
[0161] The outer normal of the robot's expected foothold position in the next motion cycle. For the normal perpendicular to the tangent in the plane, the outer normal is the normal pointing away from the tangent, and for the normal perpendicular to the tangent plane in space, the outer normal is the normal pointing away from the plane. For example, for a circle on a plane, the normal from the center of the circle along the radius to the outside of the circle is the outer normal, and the corresponding vector is the outer normal vector; while the inner normal is the normal along the radius pointing to the center of the circle, and the corresponding normal vector is the inner normal vector.
[0162] S160, the robot predicts the expected movement trajectory of the robot in the next movement cycle based on the expected landing point position of the robot on the terrain height map in the previous movement cycle and the expected landing point position of the robot on the height map in the next movement cycle.
[0163] Exemplarily, the robot uses a trajectory prediction algorithm to predict the expected motion trajectory of the robot in the next motion cycle based on the expected landing point position of the robot on the terrain height map in the previous motion cycle and the expected landing point position of the robot on the height map in the next motion cycle.
[0164] Exemplarily, the trajectory prediction algorithm may be an algorithm for solving a quadratic optimization problem.
[0165] The quadratic optimization problem may refer to a problem of solving a quadratic objective function to achieve the optimal solution under constraints. Accordingly, the algorithm for solving the quadratic optimization problem may be a solver in a mathematical library, or a neural network-based solution algorithm or other machine learning-based solution algorithm.
[0166] When constructing a quadratic optimization problem, the expected foothold position of the robot on the terrain height map in the previous motion cycle and the expected foothold position of the robot on the height map in the next motion cycle can be used as constraints of the quadratic optimization problem; the quadratic objective function of the quadratic optimization problem is constructed by parameterizing the expected motion trajectory of the robot in multiple directions; based on this, the quadratic objective function can be solved by the cost function of the motion trajectory to obtain parameters that meet the constraints and can be used to characterize the expected motion trajectory of the robot in the next motion cycle. Optionally, the parameters considered in the cost function of the motion trajectory include but are not limited to parameters that can be used to characterize the cost of the motion trajectory, such as the smoothness, safety performance or path length of the motion trajectory. Optionally, the multiple directions include but are not limited to: x direction, y direction, z direction, roll angle (roll) direction, pitch angle (pitch) and yaw angle (yaw) direction, etc.
[0167] In an embodiment of the present application, by introducing a terrain height map of the area where the robot is located, the expected landing point position of the robot in the previous motion cycle and the expected landing point position of the robot in the next motion cycle can be quantified in three-dimensional space, and then the expected motion trajectory of the robot in the next motion cycle can be predicted based on the expected landing point position of the robot in the previous motion cycle and the expected landing point position of the robot in the next motion cycle. Therefore, it can not only be used to plan the motion trajectory of the robot, but also reduce the frequency of avoiding obstacles in the process of planning the motion trajectory and realize the planning of the robot's motion trajectory on obstacles, thereby improving the motion efficiency and the robot's ability to pass in complex terrain.
[0168] In particular, the trajectory planning method provided in the embodiments of the present application enables the robot to move in complex environments with many obstacles such as stairs, plum blossom piles, and slopes.
[0169] It is worth noting that the term "expectation" in the embodiments of the present application is relative to the plan, or is a parameter or trajectory of the plan. For example, the expected foothold position can be understood as the position where the robot is expected to land. For another example, the expected motion trajectory can be understood as the motion trajectory adopted when the robot is expected to move.
[0170] In some embodiments, the S140 may include:
[0171] Based on the scene image with depth information collected by the robot, a height map of the area in the camera coordinate system is obtained; based on the conversion relationship between the camera coordinate system and the base coordinate system of the robot, the height map of the area in the camera coordinate system is converted into a height map of the area in the base coordinate system; the state estimation result of the robot is obtained; based on the parameters in the state estimation result used to characterize the position and posture of the robot in the world coordinate system, the height map of the area in the base coordinate system is converted into a height map of the area in the world coordinate system; the height map of the area in the world coordinate system is determined as the terrain height map.
[0172] Exemplarily, the robot may convert the scene image into a height map in a camera coordinate system based on the depth data of the scene image.
[0173] In this embodiment, a terrain height map with height information is formed in combination with the state estimation result of the robot itself, which can reduce the difficulty of obtaining the terrain height map.
[0174] In some embodiments, the camera of the robot is used to capture multiple images in the time domain; based on the data measured by the inertial measurement unit of the robot and the multiple images, the state of the robot is estimated using the estimation algorithm to obtain multiple estimation results corresponding to the multiple images; based on the multiple estimation results, multiple images to be fused are selected from the multiple images, and the multiple images to be fused are fused to obtain a fused image; the fused image is determined as a height map of the area in the camera coordinate system.
[0175] Exemplarily, assuming that the robot is a quadruped robot, an RGB camera for collecting posture information and position information is arranged above the top of the quadruped robot body, and a depth camera for collecting depth information and posture information is arranged at the front leg position of the quadruped robot body. The RGB camera and the depth camera constitute the robot's visual sensor for perceiving the external environment.
[0176] First, the robot acquires multiple images by extracting them frame by frame; then, the robot fuses the images to be fused among the multiple images based on multiple low-frequency state estimation information to obtain a fused image; for example, the multiple low-frequency state estimation information is state estimation information obtained based on the multiple images, and the multiple low-frequency state estimation information includes current estimation information obtained based on images acquired in a current acquisition cycle. At this time, the robot can use images whose difference between the low-frequency state estimation information and the current estimation information among the multiple images is less than a preset threshold or within a preset range as images to be fused, and fuse the images to be fused to obtain a fused image; wherein the fused image can more accurately characterize the area where the robot is located; finally, the fused image can be converted into a height map in a camera coordinate system based on the depth data.
[0177] In some embodiments, based on the data measured by the robot's code disk and the data measured by the robot's inertial measurement unit, the state of the robot is estimated using an estimation algorithm to obtain an estimated result of the robot's state in the current control cycle; based on the data measured by the inertial measurement unit and the image captured by the robot's camera, the state of the robot is estimated using the estimation algorithm to obtain an estimated result of the robot's state in the current image acquisition cycle; the estimated result of the robot's state in the current control cycle is corrected using the estimated result of the robot's state in the current image acquisition cycle to obtain the state estimation result; wherein, the estimated result of the robot's state in the current image acquisition cycle and the estimated result of the robot's state in the current control cycle both include: the position of the robot's body center in the world coordinate system, the velocity of the body center in the world coordinate system, the robot's posture, and the robot's angular velocity.
[0178] Exemplarily, the current control period is smaller than the image acquisition period.
[0179] Exemplarily, the robot can estimate the estimated result of the robot state according to a first frequency; estimate the estimated result of the robot state according to a second frequency; wherein the first frequency is a frequency determined according to a control cycle, the second frequency is a frequency determined according to an image acquisition cycle, and the first frequency is greater than the second frequency.
[0180] Among them, the encoding disk can refer to a digital encoder used to measure angular displacement. It has the advantages of strong resolution, high measurement accuracy and reliable operation. It is the most commonly used displacement sensor for measuring the angular position of the shaft. The encoding disk is divided into two types: absolute encoder and incremental encoder. The former can directly give a digital code corresponding to the angular position; the latter uses a computing system to add or subtract the pulse increment generated by the rotating encoder against a certain reference number. IMU is mainly used to detect and measure acceleration and rotational motion sensors.
[0181] Exemplarily, the estimation algorithm can be a Kalman filter algorithm, whose basic idea is: taking the minimum mean square error as the best estimation criterion, adopting the state space model of signal and noise, using the estimation value of the previous moment and the observation value of the current moment to calculate the estimation value of the current moment, and its specific algorithm makes an estimation of the signal to be processed that satisfies the minimum mean square error according to the established system equation and observation equation. Because it is easy to implement computer programming and can update and process the data collected on site in real time, Kalman filtering is currently the most widely used filtering method, and has been well applied in many fields such as communication, navigation, guidance and control.
[0182] Exemplarily, the state estimation result of the robot in the previous control cycle can be used as the estimated value of the previous moment, and the data measured by the code disk of the robot and the data measured by the IMU in the current control cycle can be used as the measurement value and the observation value at the current moment. Then, the estimated value at the previous moment and the observation value at the current moment are used to calculate the estimated value at the current moment, so as to obtain the state estimation result of the robot in the current control cycle.
[0183] Exemplarily, the estimation result of the robot state in the current image acquisition cycle may be an error of the robot state estimation result in the current control cycle.
[0184] In a specific implementation method, the error of the state estimation result of the robot in the previous control cycle can be used as the estimated value of the previous moment, and the data measured by the code disk of the robot and the data measured by the IMU in the current control cycle can be used as the measurement value, as the observation value at the current moment, and then the estimated value at the previous moment and the observation value at the current moment are used to calculate the estimated value at the current moment, that is, the error of the state estimation result of the robot in the current control cycle is obtained, and then based on the error of the state estimation result of the robot in the current control cycle, the state estimation result of the robot in the current control cycle can be corrected to obtain the final state estimation result of the robot in the current control cycle.
[0185] For example, the error of the state estimation result of the robot in the current control cycle includes the posterior state mean and posterior state covariance of the state estimation result of the robot in the previous control cycle; the error of the state estimation result of the robot in the previous control cycle after preprocessing is used as the estimated value at the previous moment, the visual processing result and the camera noise covariance are used as the observed values at the current moment, and finally the obtained state increment is used as the output to update the state estimation result of the robot in the current control cycle and obtain a more accurate body state estimation.
[0186] It is worth noting that the posterior is relative to the prior. The prior is an estimate based on the system process principle or experience, while the posterior is a result that is theoretically closest to the true value by combining the previous prior estimates and weighted measurements. Therefore, the posterior estimate is more accurate than the prior estimate.
[0187] Exemplarily, the data measured by the robot's code disc include but are not limited to:
[0188] q: The angles of the robot's joints measured by the robot's encoder.
[0189] The robot's encoder measures the angular velocity of the robot's joints.
[0190] Exemplarily, the data measured by the IMU of the robot includes but is not limited to:
[0191] a imu : The acceleration of the robot measured by the robot’s inertial measurement unit.
[0192] R imu : The robot's posture measured by the robot's inertial measurement unit.
[0193] ω imu : The angular velocity of the robot measured by the robot’s inertial measurement unit.
[0194] Exemplarily, the robot's camera includes but is not limited to a red, green, blue (RGB) camera and a depth camera. The images captured by the robot's camera include but are not limited to the following images:
[0195] M: Scene image captured by the robot’s camera, such as an image with depth information or a point cloud.
[0196] Exemplarily, the estimated results of the robot state in the current image acquisition cycle include but are not limited to the following parameters:
[0197] The position of the robot's body center in the world coordinate system during the image acquisition cycle.
[0198] The velocity of the robot's body center in the world coordinate system during the image acquisition cycle.
[0199] The posture of the robot's body center in the world coordinate system during the image acquisition cycle.
[0200] The angular velocity of the robot's body center in the world coordinate system during the image acquisition period.
[0201] Exemplarily, the estimated results of the robot state in the current control cycle include but are not limited to the following parameters:
[0202] The position of the robot's body center in the world coordinate system during the current control cycle.
[0203] The velocity of the robot's body center in the world coordinate system during the current control cycle.
[0204] The posture of the robot's body center in the world coordinate system during the current control cycle.
[0205] The angular velocity of the robot's body center in the world coordinate system during the current control cycle.
[0206] In some embodiments, the S160 may include:
[0207] Based on the following input information, predict the parameters used to characterize the expected motion trajectory: the coordinates of the robot's foothold position on the terrain height map in the previous motion cycle, the external normal of the robot's foothold position on the terrain height map in the previous motion cycle, the coordinates of the robot's foothold position on the terrain height map in the next motion cycle, and the external normal of the robot's foothold position on the terrain height map in the next motion cycle; wherein the parameters used to characterize the expected motion trajectory include: the position of the robot's body center in the world coordinate system, the speed of the body center in the world coordinate system, the robot's posture, and the robot's angular velocity.
[0208] Exemplarily, the robot can predict parameters for characterizing the expected motion trajectory based on a trajectory prediction algorithm. When the trajectory prediction algorithm is an algorithm for solving a quadratic optimization problem, the coordinates and external normal of the robot's foothold position on the terrain height map in the previous motion cycle and the expected foothold position of the robot on the terrain height map in the next motion cycle can be used as the parameters for characterizing the expected motion trajectory. as well as As the constraint condition of the quadratic optimization problem; construct the quadratic objective function of the quadratic optimization problem by parameterizing the expected motion trajectory of the robot in multiple directions; based on this, the quadratic objective function can be solved by the cost function of the motion trajectory to obtain parameters that meet the constraint conditions and can be used to characterize the expected motion trajectory of the robot in the next motion cycle.
[0209] Exemplarily, the parameters used to characterize the expected motion trajectory of the robot in the next motion cycle include but are not limited to:
[0210] The position of the robot's body center in the world coordinate system during the next motion cycle.
[0211] The velocity of the robot's body center in the world coordinate system during the next motion cycle.
[0212] The posture of the robot's body center in the world coordinate system during the next motion cycle.
[0213] The angular velocity of the robot's body center in the world coordinate system during the next motion cycle.
[0214] In some embodiments, if the motion instruction indicates a gait type, the robot predicts parameters that are used to characterize the expected motion trajectory and the expected motion trajectory satisfies the gait type.
[0215] Exemplarily, if the motion instruction indicates a gait type, the robot uses a trajectory prediction algorithm to predict parameters used to characterize the expected motion trajectory and the expected motion trajectory satisfies the gait type. Wherein, when the trajectory prediction algorithm is an algorithm for solving a quadratic optimization problem, the expected foothold position of the robot on the terrain height map in the previous motion cycle, the expected foothold position of the robot on the height map in the next motion cycle, and the gait type indicated by the motion instruction can be used as constraints of the quadratic optimization problem; the quadratic objective function of the quadratic optimization problem is constructed by parameterizing the expected motion trajectory of the robot in multiple directions; based on this, the quadratic objective function can be solved by the cost function of the motion trajectory to obtain parameters that meet the constraints and can be used to characterize the expected motion trajectory of the robot in the next motion cycle.
[0216] In this embodiment, in the process of predicting the expected motion trajectory, the control accuracy of the robot can be improved by considering the gait type indicated by the motion instruction.
[0217] In some embodiments, S130 may include:
[0218] Based on the parameters in the motion instruction used to characterize the speed of the robot in the preset direction on the preset plane and the parameters in the motion instruction used to characterize the angular velocity of the robot in the yaw angle direction, the expected landing point position of the robot on the preset plane in the next motion cycle is determined.
[0219] Exemplarily, the robot can determine the expected landing point position of the robot on the preset plane in the next motion cycle based on the current position of the robot on the preset plane, the parameter used in the motion instruction to characterize the speed of the robot in the preset direction on the preset plane, and the parameter used in the motion instruction to characterize the angular velocity of the robot in the yaw angle direction. Of course, in other alternative embodiments, the motion instruction may also include parameters in other speed directions or other angular velocity directions, which is not specifically limited in this application.
[0220] In some embodiments, the method 100 may further include:
[0221] Based on the expected motion trajectory of the robot in the next motion cycle, the expected contact between the robot and the ground in the next motion cycle, the estimated result of the robot's state in the current control cycle, and the actual contact between the robot and the ground in the current control cycle, the first joint torque is determined; based on the first joint torque, the robot is controlled to move in the current control cycle.
[0222] Exemplarily, the desired contact situation may be desired contact or desired no contact.
[0223] Exemplarily, the actual contact situation may be contact or no contact.
[0224] In an embodiment of the present application, when determining the first joint torque, the expected motion trajectory and the expected contact condition in the next motion cycle, as well as the actual state and the actual contact condition of the robot in the current control cycle are taken into consideration simultaneously, which can improve the accuracy of the first joint torque and thus improve the control accuracy of the robot.
[0225] In some embodiments, based on the expected motion trajectory of the robot in the next motion cycle, the expected contact between the robot and the ground in the next motion cycle, the estimated result of the state of the robot in the current control cycle, and the actual contact between the robot and the ground in the current control cycle, a model predictive control algorithm is used to calculate the optimal reaction force from the ground when the robot contacts the ground in the current control cycle; based on the optimal reaction force, the first joint torque is determined.
[0226] Exemplarily, the robot can construct an MPC problem based on the expected motion trajectory of the robot in the next motion cycle, the expected contact between the robot and the ground in the next motion cycle, the estimated result of the state of the robot in the current control cycle, and the actual contact between the robot and the ground in the current control cycle, and solve the optimal reaction force from the ground when the robot contacts the ground in the current control cycle, and determine the joint torque used to control the movement of the robot based on the optimal reaction force. For example, the robot can directly determine the optimal reaction force as the joint torque used to control the movement of the robot.
[0227] In some embodiments, based on the expected motion trajectory of the robot in the next motion cycle and the expected contact between the robot and the ground in the next motion cycle, the parameters used to characterize the expected joint trajectory of the robot in the next motion cycle are determined; based on the parameters used to characterize the expected joint trajectory of the robot in the next motion cycle, the optimal reaction force is corrected to obtain the first joint torque.
[0228] Exemplarily, the robot can correct the optimal reaction force based on the parameters used to characterize the desired joint trajectory of the robot in the next motion cycle to obtain the joint torque used to control the robot's motion. Specifically, the robot can correct the optimal reaction force based on the parameters used to characterize the desired joint trajectory of the robot in the next motion cycle using the PD controller to obtain the joint torque used to control the robot's motion, thereby ensuring the robot's motion stability.
[0229] In some embodiments, the parameters used to characterize the expected joint trajectory of the robot in the next motion cycle include: the expected angle of the robot's joints and the expected angular velocity of the robot's joints; in this case, the proportional constant of the proportional differential controller, the expected angle of the robot's joints, and the error of the expected angle of the robot's joints are multiplied to obtain a first value; the differential constant of the proportional differential controller, the expected angular velocity of the robot's joints, and the error of the expected angular velocity of the robot's joints are multiplied to obtain a second value; the sum of the optimal reaction force, the first value and the second value is determined as the first joint torque.
[0230] Exemplarily, the parameters used to characterize the desired joint trajectory of the robot in the next motion cycle include but are not limited to:
[0231] q des : The angles of the robot's joints in the next motion cycle.
[0232] The angular velocity of the robot's joints during the next motion cycle.
[0233] Exemplarily, the optimal reaction force may be corrected based on the parameters used to characterize the desired joint trajectory of the robot in the next motion cycle to obtain the first joint torque according to the following formula:
[0234]
[0235] Among them, τ des Identify the first joint torque, τ feedward represents the optimal reaction force, k p is the proportional constant of the PD controller, k d is the differential constant of the PD controller, δ is the error between the expected value and the actual value, for example, it can be calculated based on q des The difference with q and and The difference is determined.
[0236] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the embodiments mentioned above. Within the technical concept of the present application, the technical solution of the present application can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the present application. For example, the various specific technical features described in the specific embodiments mentioned above can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present application will not further explain various possible combinations. For another example, the various different embodiments of the present application can also be arbitrarily combined, as long as they do not violate the ideas of the present application, they should also be regarded as the contents disclosed in the present application.
[0237] It should also be understood that in the various method embodiments of the present application, the size of the serial numbers of the processes involved above does not mean 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 the present application.
[0238] The method provided in the embodiment of the present application is described above, and the device provided in the embodiment of the present application is described below.
[0239] Figure 3 It is a schematic block diagram of a trajectory planning device 200 provided in an embodiment of the present application.
[0240] like Figure 3 As shown, the trajectory planning device 200 may include:
[0241] A first acquisition unit 210 is used to acquire a motion instruction of the robot;
[0242] A first determining unit 220, configured to determine a previous motion cycle of the robot and a next motion cycle of the robot based on a parameter in the motion instruction used to characterize the motion cycle of the robot;
[0243] The second determining unit 230 is used to determine the expected landing point position of the robot on the preset plane in the next movement cycle;
[0244] A second acquisition unit 240 is used to acquire a terrain height map of the area where the robot is located;
[0245] A third determining unit 250 is used to determine the expected landing point position of the robot on the terrain height map in the next movement cycle based on the expected landing point position of the robot on the terrain height map in the previous movement cycle and the expected landing point position of the robot on the preset plane in the next movement cycle;
[0246] The prediction unit 260 is used to predict the expected movement trajectory of the robot in the next movement cycle based on the expected landing point position of the robot on the terrain height map in the previous movement cycle and the expected landing point position of the robot on the height map in the next movement cycle.
[0247] In some embodiments, the second acquiring unit 240 is specifically used for:
[0248] Based on the scene image with depth information collected by the robot, a height map of the area in the camera coordinate system is obtained;
[0249] Based on the conversion relationship between the camera coordinate system and the base coordinate system of the robot, converting the height map of the area in the camera coordinate system into the height map of the area in the base coordinate system;
[0250] Obtain the state estimation result of the robot;
[0251] Based on the parameters in the state estimation result used to characterize the position and posture of the robot in the world coordinate system, converting the height map of the area in the base coordinate system into the height map of the area in the world coordinate system;
[0252] The height map of the area in the world coordinate system is determined as the terrain height map.
[0253] In some embodiments, the second acquiring unit 240 is specifically used for:
[0254] Using the robot's camera to collect multiple images in the time domain;
[0255] Based on the data measured by the inertial measurement unit of the robot and the multiple images, the state of the robot is estimated using the estimation algorithm to obtain multiple estimation results corresponding to the multiple images;
[0256] Selecting a plurality of images to be fused from the plurality of images based on the plurality of estimation results, and fusing the plurality of images to be fused to obtain a fused image;
[0257] The fused image is determined as a height map of the area in the camera coordinate system.
[0258] In some embodiments, the second acquiring unit 240 is specifically used for:
[0259] Based on the data measured by the encoder of the robot and the data measured by the inertial measurement unit of the robot, the state of the robot is estimated by using an estimation algorithm to obtain an estimation result of the state of the robot in the current control cycle;
[0260] Based on the data measured by the inertial measurement unit and the image captured by the camera of the robot, the state of the robot is estimated by using the estimation algorithm to obtain an estimation result of the state of the robot in the current image acquisition cycle;
[0261] Using the estimated result of the robot state in the current image acquisition cycle, the estimated result of the robot state in the current control cycle is corrected to obtain the state estimation result;
[0262] The estimated result of the robot state in the current image acquisition cycle and the estimated result of the robot state in the current control cycle both include:
[0263] The position of the robot's body center in the world coordinate system, the speed of the robot's body center in the world coordinate system, the robot's posture, and the robot's angular velocity.
[0264] In some embodiments, the prediction unit 260 is specifically used to:
[0265] Predict the parameters that characterize the desired motion trajectory based on the following input information:
[0266] The coordinates of the robot's foothold position on the terrain height map in the previous movement cycle, the outer normal of the robot's foothold position on the terrain height map in the previous movement cycle, the coordinates of the robot's foothold position on the terrain height map in the next movement cycle, and the outer normal of the robot's foothold position on the terrain height map in the next movement cycle;
[0267] The parameters used to characterize the expected motion trajectory include:
[0268] The position of the robot's body center in the world coordinate system, the speed of the robot's body center in the world coordinate system, the robot's posture, and the robot's angular velocity.
[0269] In some embodiments, the prediction unit 260 is specifically used to:
[0270] If the motion instruction indicates a gait type, then parameters for characterizing the expected motion trajectory and satisfying the gait type are predicted.
[0271] In some embodiments, the second determining unit 230 is specifically configured to:
[0272] Based on the parameters in the motion instruction used to characterize the speed of the robot in the preset direction on the preset plane and the parameters in the motion instruction used to characterize the angular velocity of the robot in the yaw angle direction, the expected landing point position of the robot on the preset plane in the next motion cycle is determined.
[0273] In some embodiments, the prediction unit 260 is further configured to:
[0274] Determine a first joint torque based on an expected motion trajectory of the robot in the next motion cycle, an expected contact situation between the robot and the ground in the next motion cycle, an estimated result of the state of the robot in the current control cycle, and an actual contact situation between the robot and the ground in the current control cycle;
[0275] Based on the first joint torque, the robot is controlled to move within the current control cycle.
[0276] In some embodiments, the prediction unit 260 is specifically used to:
[0277] Based on the expected motion trajectory of the robot in the next motion cycle, the expected contact situation between the robot and the ground in the next motion cycle, the estimated result of the state of the robot in the current control cycle, and the actual contact situation between the robot and the ground in the current control cycle, the model predictive control algorithm is used to calculate the optimal reaction force from the ground when the robot contacts the ground in the current control cycle;
[0278] Based on the optimal reaction force, the first joint torque is determined.
[0279] In some embodiments, the prediction unit 260 is specifically used to:
[0280] Determining parameters for characterizing an expected joint trajectory of the robot in the next motion cycle based on an expected motion trajectory of the robot in the next motion cycle and an expected contact condition between the robot and the ground in the next motion cycle;
[0281] Based on the parameters used to characterize the expected joint trajectory of the robot in the next motion cycle, the optimal reaction force is corrected to obtain the first joint torque.
[0282] In some embodiments, the parameters used to characterize the expected joint trajectory of the robot in the next motion cycle include: expected angles of the joints of the robot and expected angular velocities of the joints of the robot;
[0283] The prediction unit 260 is specifically used for:
[0284] Multiplying a proportional constant of a proportional-differential controller, a desired angle of a joint of the robot, and an error of the desired angle of a joint of the robot to obtain a first value;
[0285] Multiplying a differential constant of a proportional differential controller, an angular velocity desired for a joint of the robot, and an error of the angular velocity desired for a joint of the robot to obtain a second value;
[0286] The sum of the optimal reaction force, the first value and the second value is determined as the first joint torque.
[0287] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, it will not be repeated here. Specifically, the trajectory planning device 200 may correspond to the corresponding subject in the method 100 for executing the embodiment of the present application, and the various units in the trajectory planning device 200 are respectively for implementing the corresponding processes in the method 100, and for the sake of brevity, it will not be repeated here.
[0288] It should also be understood that the various units in the trajectory planning device 200 involved in the embodiment of the present application can be respectively or all merged into one or several other units to constitute, or some (some) units thereof can also be split into multiple smaller units in function to constitute, which can achieve the same operation without affecting the realization of the technical effect of the embodiment of the present application. The units involved in the above are divided based on logical functions. In practical applications, the function of a unit can also be realized by multiple units, or the function of multiple units is realized by one unit. In other embodiments of the present application, the trajectory planning device 200 may also include other units. In practical applications, these functions can also be implemented by other units to assist in implementation, and can be implemented by multiple units in collaboration. According to another embodiment of the present application, the trajectory planning device 200 involved in the embodiment of the present application can be constructed by running a computer program (including program code) capable of executing each step involved in the corresponding method on a general computing device including a general-purpose computer such as a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM) and a storage element, and the method provided by the embodiment of the present application is realized. The computer program can be recorded on, for example, a computer-readable storage medium, and loaded into an electronic device through the computer-readable storage medium and run therein to implement the corresponding method of the embodiment of the present application.
[0289] In other words, the units mentioned above can be implemented in hardware form, can be implemented in software form, or can be implemented in the form of a combination of software and hardware. Specifically, the steps of the method embodiments in the embodiments of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software combination in the decoding processor can be performed. Optionally, the software can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the method embodiments mentioned above in combination with its hardware.
[0290] Figure 4 It is a schematic structural diagram of an electronic device 300 provided in an embodiment of the present application.
[0291] like Figure 4As shown, the electronic device 300 at least includes a processor 310 and a computer-readable storage medium 320. The processor 310 and the computer-readable storage medium 320 may be connected via a bus or other means. The computer-readable storage medium 320 is used to store a computer program 321, which includes computer instructions, and the processor 310 is used to execute the computer instructions stored in the computer-readable storage medium 320. The processor 310 is the computing core and control core of the electronic device 300, which is suitable for implementing one or more computer instructions, and is specifically suitable for loading and executing one or more computer instructions to implement the corresponding method flow or corresponding function.
[0292] As an example, the processor 310 may also be referred to as a central processing unit (CPU). The processor 310 may include, but is not limited to, a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete component gates or transistor logic devices, discrete hardware components, and the like.
[0293] As an example, the computer-readable storage medium 320 may be a high-speed RAM memory, or a non-volatile memory (Non-VolatileMemory), such as at least one disk memory; optionally, it may also be at least one computer-readable storage medium located away from the aforementioned processor 310. Specifically, the computer-readable storage medium 320 includes, but is not limited to: a volatile memory and / or a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0294] like Figure 4 As shown, the electronic device 300 may further include a transceiver 330 .
[0295] The processor 310 may control the transceiver 330 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 330 may include a transmitter and a receiver. The transceiver 330 may further include an antenna, and the number of antennas may be one or more.
[0296] It should be understood that the various components in the communication device 300 are connected via a bus system, wherein the bus system includes a power bus, a control bus, and a status signal bus in addition to a data bus. It is worth noting that the electronic device 300 can be any electronic device with data processing capabilities; the computer-readable storage medium 320 stores a first computer instruction; the processor 310 loads and executes the first computer instruction stored in the computer-readable storage medium 320 to implement Figure 2 The corresponding steps in the method embodiment shown; in the specific implementation, the first computer instruction in the computer-readable storage medium 320 is loaded by the processor 310 and executes the corresponding steps. To avoid repetition, they are not repeated here.
[0297] According to another aspect of the present application, the present application also provides a computer-readable storage medium (Memory), which is a memory device in the electronic device 300 for storing programs and data. For example, a computer-readable storage medium 320. It can be understood that the computer-readable storage medium 320 here can include both the built-in storage medium in the electronic device 300 and the extended storage medium supported by the electronic device 300. The computer-readable storage medium provides a storage space, which stores the operating system of the electronic device 300. In addition, one or more computer instructions suitable for being loaded and executed by the processor 310 are also stored in the storage space, and these computer instructions can be one or more computer programs 321 (including program codes).
[0298] According to another aspect of the present application, the present application also provides a computer program product or computer program, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. For example, computer program 321. At this time, the data processing device 300 can be a computer, and the processor 310 reads the computer instructions from the computer-readable storage medium 320, and the processor 310 executes the computer instructions so that the computer executes the various methods provided in the various optional modes mentioned above. In other words, when implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process of the embodiment of the present application is run in whole or in part or the function of the embodiment of the present application is implemented. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0299] Those of ordinary skill in the art will appreciate that the units and process steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0300] Finally, it should be noted that the above content is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A trajectory planning method, characterized in that: include: Get the robot's motion instructions; Determine a previous motion cycle of the robot and a next motion cycle of the robot based on a parameter in the motion instruction used to characterize a motion cycle of the robot; Determining the expected landing point position of the robot on the preset plane in the next motion cycle; Obtaining a terrain height map of the area where the robot is located; Determine the expected foothold position of the robot on the terrain height map in the next movement cycle based on the expected foothold position of the robot on the terrain height map in the previous movement cycle and the expected foothold position of the robot on the preset plane in the next movement cycle; Based on the expected landing point position of the robot on the terrain height map in the previous movement cycle and the expected landing point position of the robot on the height map in the next movement cycle, the expected movement trajectory of the robot in the next movement cycle is predicted.
2. The method according to claim 1, characterized in that The obtaining of a terrain height map of the area where the robot is located comprises: Based on the scene image with depth information collected by the robot, obtaining a height map of the area in the camera coordinate system; Based on the conversion relationship between the camera coordinate system and the base coordinate system of the robot, converting the height map of the area in the camera coordinate system into the height map of the area in the base coordinate system; Obtaining a state estimation result of the robot; Based on the parameters in the state estimation result used to characterize the position and posture of the robot in the world coordinate system, converting the height map of the area in the base coordinate system into the height map of the area in the world coordinate system; The height map of the area in the world coordinate system is determined as the terrain height map.
3. The method according to claim 2, characterized in that The step of obtaining a height map of the area in a camera coordinate system based on the scene image with depth information collected by the robot includes: Using a camera of the robot to collect multiple images in the time domain; Based on the data measured by the inertial measurement unit of the robot and the multiple images, the state of the robot is estimated using the estimation algorithm to obtain multiple estimation results corresponding to the multiple images; Selecting a plurality of images to be fused from the plurality of images based on the plurality of estimation results, and fusing the plurality of images to be fused to obtain a fused image; The fused image is determined as a height map of the area in the camera coordinate system.
4. The method according to claim 2, characterized in that: The obtaining of the state estimation result of the robot comprises: Based on the data measured by the encoder of the robot and the data measured by the inertial measurement unit of the robot, an estimation algorithm is used to estimate the state of the robot to obtain an estimation result of the state of the robot in the current control cycle; Based on the data measured by the inertial measurement unit and the images captured by the camera of the robot, the state of the robot is estimated by using the estimation algorithm to obtain an estimation result of the state of the robot in the current image acquisition cycle; Using the estimated result of the robot state in the current image acquisition cycle, the estimated result of the robot state in the current control cycle is corrected to obtain the state estimation result; Wherein, the estimation result of the robot state in the current image acquisition cycle and the estimation result of the robot state in the current control cycle both include: The position of the robot's body center in the world coordinate system, the speed of the robot's body center in the world coordinate system, the robot's posture, and the robot's angular velocity.
5. The method according to claim 1, characterized in that The predicting the expected motion trajectory of the robot in the next motion cycle includes: Based on the following input information, predict the parameters used to characterize the desired motion trajectory: The coordinates of the foothold position of the robot on the terrain height map in the previous movement cycle, the outer normal of the foothold position of the robot on the terrain height map in the previous movement cycle, the coordinates of the foothold position of the robot on the terrain height map in the next movement cycle, and the outer normal of the foothold position of the robot on the terrain height map in the next movement cycle; The parameters used to characterize the expected motion trajectory include: The position of the robot's body center in the world coordinate system, the speed of the robot's body center in the world coordinate system, the robot's posture, and the robot's angular velocity.
6. The method according to claim 5, characterized in that The predicted parameters used to characterize the desired motion trajectory include: If the motion instruction indicates a gait type, parameters are predicted for characterizing the expected motion trajectory and the expected motion trajectory satisfies the gait type.
7. The method according to claim 1, characterized in that The step of determining the expected landing point position of the robot on the preset plane in the next motion cycle includes: Based on the parameters in the motion instruction used to characterize the speed of the robot in the preset direction on the preset plane and the parameters in the motion instruction used to characterize the angular velocity of the robot in the yaw angle direction, the expected landing point position of the robot on the preset plane in the next motion cycle is determined.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: Determine a first joint torque based on an expected motion trajectory of the robot in the next motion cycle, an expected contact situation between the robot and the ground in the next motion cycle, an estimated result of the state of the robot in the current control cycle, and an actual contact situation between the robot and the ground in the current control cycle; Based on the first joint torque, the robot is controlled to move within the current control cycle.
9. The method according to claim 8, characterized in that The determining of the first joint torque comprises: Based on the expected motion trajectory of the robot in the next motion cycle, the expected contact situation between the robot and the ground in the next motion cycle, the estimated result of the state of the robot in the current control cycle, and the actual contact situation between the robot and the ground in the current control cycle, the model predictive control algorithm is used to calculate the optimal reaction force from the ground when the robot contacts the ground in the current control cycle; Based on the optimal reaction force, the first joint torque is determined.
10. The method according to claim 9, characterized in that The determining the first joint torque based on the optimal reaction force comprises: Determining parameters for characterizing an expected joint trajectory of the robot in the next motion cycle based on an expected motion trajectory of the robot in the next motion cycle and an expected contact condition between the robot and the ground in the next motion cycle; Based on the parameters used to characterize the expected joint trajectory of the robot in the next motion cycle, the optimal reaction force is corrected to obtain the first joint torque.
11. The method according to claim 10, characterized in that The parameters used to characterize the expected joint trajectory of the robot in the next motion cycle include: expected angles of the joints of the robot and expected angular velocities of the joints of the robot; The step of correcting the optimal reaction force based on the parameters used to characterize the expected joint trajectory of the robot in the next motion cycle to obtain the first joint torque includes: multiplying a proportional constant of a proportional-differential controller, a desired angle of a joint of the robot, and an error of the desired angle of a joint of the robot to obtain a first value; Multiplying a differential constant of a proportional differential controller, an angular velocity desired for a joint of the robot, and an error of the angular velocity desired for a joint of the robot to obtain a second value; The sum of the optimal reaction force, the first value, and the second value is determined as the first joint torque.
12. A trajectory planning device, characterized in that: include: A first acquisition unit, used for acquiring a motion instruction of the robot; A first determining unit, configured to determine a previous motion cycle of the robot and a next motion cycle of the robot based on a parameter in the motion instruction used to characterize the motion cycle of the robot; A second determining unit, used to determine the expected landing point position of the robot on the preset plane in the next movement cycle; A second acquisition unit, used to acquire a terrain height map of the area where the robot is located; A third determining unit is used to determine the expected landing point position of the robot on the terrain height map in the next movement cycle based on the expected landing point position of the robot on the terrain height map in the previous movement cycle and the expected landing point position of the robot on the preset plane in the next movement cycle; A prediction unit is used to predict the expected movement trajectory of the robot in the next movement cycle based on the expected landing point position of the robot on the terrain height map in the previous movement cycle and the expected landing point position of the robot on the height map in the next movement cycle.
13. An electronic device, characterized in that: include: a processor adapted to execute a computer program; A computer-readable storage medium having a computer program stored therein, wherein the computer program, when executed by the processor, implements the method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: Used to store a computer program, the computer program causing a computer to execute the method according to any one of claims 1 to 11.
15. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the method according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Robot motion control method and device, robot and storage medium
CN112123340A
Four-foot running gait planning method and device and robot control equipment
CN114115280A