Robot control method and device, electronic equipment, storage medium and computer program product
By introducing path point resampling and linear interpolation in the path planning of quadruped robots, the problem of high computational complexity in 3D indoor scenes is solved, and stable and real-time path planning and navigation are achieved.
Patent Information
- Application Number
- CN202410172092.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-06
- Publication Date
- 2025-08-08
AI Technical Summary
The existing RRT or PRM-based path planning methods have high computational complexity in 3D indoor scenarios, which is difficult to meet the real-time requirements of path planning for quadruped robots, and the path quality is unstable, which is easy to cause collisions.
By determining the new pathway points in the target space, and linearly interpolate the mixed sequence composed of the original pathway points and the new pathway points, detecting the robot's motion state in real time, resampling and updating the pathway points, and generating the updated planning trajectory to ensure that the robot does not collide in complex environments.
It realizes the feasible walking trajectory for the four-legged robot in complex 3D indoor scenes, which meets real-time requirements, and has low computational complexity, and can complete navigation tasks stably.
Smart Images

Figure CN120447530A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of robot control, and are related to but not limited to a robot control method, device, electronic device, storage medium and computer program product. Background Art
[0002] Quadruped robots are currently a hot product, and indoor scene navigation is an unavoidable topic for quadruped robots. How to efficiently, stably and flexibly plan paths for quadruped robots in indoor scenes so that they can complete navigation tasks without colliding with the environment is the core problem to be solved in this field.
[0003] In related technologies, sampling-based path planning methods, such as RRT or PRM algorithms, can be used to solve the path planning problem of quadruped robots in 3D indoor scenes. These algorithms can handle high-dimensional spaces and complex obstacles, and can dynamically generate nodes or trees during the search process to adapt to environmental changes.
[0004] However, path planning methods based on RRT or PRM have limitations, such as unstable path quality, high computational complexity, and difficulty ensuring optimality. For 3D indoor scenes, the high computational complexity makes it difficult to meet the real-time requirements of path planning. For example, a quadruped robot needs to plan a path from the kitchen, through the living room, and finally to the bedroom in an indoor scene. This environment may contain millions of grids, and each grid must calculate its connectivity with adjacent grids. This computational complexity is very high, making it impossible to meet real-time requirements. Summary of the Invention
[0005] The embodiments of the present application provide a robot control method, device, electronic device, storage medium and computer program product, which can be applied at least in the field of artificial intelligence or the field of robot control, can achieve stable control of the robot, and the computational complexity of the control process is low, thereby meeting the real-time requirements of robot control.
[0006] The technical solution of the embodiment of the present application is implemented as follows:
[0007] An embodiment of the present application provides a robot control method, comprising: determining at least one new waypoint based on multiple original waypoints of a robot to be controlled in a target space; performing linear interpolation on a waypoint mixed sequence consisting of the original waypoints and the new waypoints to obtain a planned trajectory passing through each waypoint in the waypoint mixed sequence; in the process of controlling the robot to be controlled to move according to the planned trajectory, if it is detected that the current motion state of the robot to be controlled meets a preset resampling condition, performing waypoint resampling on the target waypoint on the planned trajectory to obtain a resampled waypoint; wherein the target waypoint is the waypoint on the planned trajectory that is closest to the current position of the robot to be controlled; updating the target waypoint using the resampled waypoint to obtain an updated planned trajectory; and controlling the robot to be controlled to continue moving according to the updated planned trajectory.
[0008] An embodiment of the present application provides a robot control device, comprising: a determination module for determining at least one new waypoint based on multiple original waypoints of a robot to be controlled in a target space; a linear interpolation module for performing linear interpolation on a mixed sequence of waypoints consisting of the original waypoints and the new waypoints to obtain a planned trajectory passing through each waypoint in the mixed sequence of waypoints; a resampling module for performing waypoint resampling on a target waypoint on the planned trajectory to obtain a resampled waypoint when controlling the robot to be controlled to move according to the planned trajectory and if it is detected that the current motion state of the robot to be controlled meets a preset resampling condition; wherein the target waypoint is the waypoint on the planned trajectory that is closest to the current position of the robot to be controlled; an updating module for updating the target waypoint using the resampled waypoint to obtain an updated planned trajectory; and a control module for controlling the robot to be controlled to continue moving according to the updated planned trajectory.
[0009] In some embodiments, the determination module is also used to: obtain the initial planned path of the robot to be controlled in the target space, the initial planned path includes an original waypoint sequence composed of the multiple original waypoints, the first original waypoint in the original waypoint sequence is the starting point of the initial planned path, and the last original waypoint in the original waypoint sequence is the end point of the initial planned path; for each two adjacent original waypoints in the original waypoint sequence, a path search is performed on the local path between the two original waypoints to obtain at least one new waypoint located on the local path.
[0010] In some embodiments, the determination module is further used to: obtain three-dimensional scene data of the target space, and generate a navigation mesh file for path planning based on the three-dimensional scene data; simulate the robot to be controlled as a simulation object with preset size parameters; use the first of the two original waypoints as the path starting point, and the second of the two original waypoints as the path end point, and determine a local path between the path starting point and the path end point based on the simulation object and the navigation mesh file; and plan at least one new waypoint on the local path.
[0011] In some embodiments, the determination module is also used to: call the simulator to determine the mesh parameters of the triangular mesh used to represent the geometric shape of the object in the target space based on the three-dimensional scene data; draw the triangular mesh used to represent the geometric shape of each object based on the mesh parameters to obtain the navigation mesh file.
[0012] In some embodiments, the apparatus further comprises: a waypoint mixed sequence generation module configured to obtain an identifier of each original waypoint and an identifier of each newly added waypoint before performing linear interpolation on the waypoint mixed sequence formed by the original waypoints and the newly added waypoints; the identifiers of the original waypoints and the identifiers of the newly added waypoints being able to represent the order of the corresponding waypoints in the waypoint mixed sequence; and all the original waypoints and all the newly added waypoints being sorted according to the identifiers of the original waypoints and the identifiers of the newly added waypoints to form the waypoint mixed sequence.
[0013] In some embodiments, the linear interpolation module is further used to: connect each two adjacent way points in sequence according to the order of the way points in the way point mixed sequence to form a broken line graph; the broken line graph includes at least one broken line; perform linear interpolation on each broken line in the broken line graph to obtain the coordinates of multiple trajectory points; based on the coordinates of the multiple trajectory points, connect all trajectory points to obtain a planned trajectory passing through each way point in the way point mixed sequence.
[0014] In some embodiments, the linear interpolation module is also used to: obtain a preset number of trajectory points; determine the total length of all broken lines in the line graph; determine the trajectory point distance between every two adjacent trajectory points based on the total line length and the number of trajectory points; perform linear interpolation on each broken line in the line graph according to the trajectory point distance to obtain the coordinates of the multiple trajectory points.
[0015] In some embodiments, the device also includes: a trajectory following module, which is used to obtain a preset field of view of the robot to be controlled after obtaining a planned trajectory passing through each way point in the mixed sequence of way points; determine the target point to be followed by the robot to be controlled on the planned trajectory and the coordinate value of the target point to be followed at the current moment according to the preset field of view; determine the motion parameters of the robot to be controlled at the current moment based on the coordinate value of the target point to be followed; and control the robot to be controlled to move to the target point to be followed according to the motion parameters.
[0016] In some embodiments, the trajectory following module is also used to: determine the current posture angle of the robot to be controlled based on the coordinate value of the target point to be followed; determine the target angular velocity of the robot to be controlled at the current moment based on the current posture angle and the preset angular velocity extreme value; determine the target linear velocity of the robot to be controlled at the current moment based on the current posture angle and the preset linear velocity extreme value; wherein, the target angular velocity and the target linear velocity constitute the motion parameters of the robot to be controlled.
[0017] In some embodiments, the resampling module is further used to: if it is detected that the current motion state of the robot to be controlled is in a falling state, or if it is detected that the trajectory following time of the robot to be controlled on the current sub-path is greater than a preset time threshold, then the target waypoints on the planned trajectory are resampled to obtain resampled waypoints; wherein, the current sub-path is the path between two adjacent waypoints in the waypoint mixed sequence.
[0018] In some embodiments, the resampling module is further used to: obtain a preset resampling radius; determine a resampling circle based on the resampling radius with the target waypoint as the center; and randomly sample a point on the resampling circle as the resampling waypoint.
[0019] An embodiment of the present application provides an electronic device, comprising: a memory for storing executable instructions; and a processor for implementing the above-mentioned robot control method when executing the executable instructions stored in the memory.
[0020] An embodiment of the present application provides a computer program product, which includes executable instructions, and the executable instructions are stored in a computer-readable storage medium; wherein, when a processor of an electronic device reads the executable instructions from the computer-readable storage medium and executes the executable instructions, the above-mentioned robot control method is implemented.
[0021] An embodiment of the present application provides a computer-readable storage medium storing executable instructions for causing a processor to execute the executable instructions to implement the above-mentioned robot control method.
[0022] The embodiments of the present application have the following beneficial effects:
[0023] During robot control, a mixed sequence of waypoints consisting of the original and newly added waypoints of the robot in the target space is first linearly interpolated to obtain a planned trajectory for the robot. Then, while the robot is being controlled to move along the planned trajectory, if it is detected that the robot's current motion state satisfies a preset resampling condition, the target waypoints on the planned trajectory are resampled to obtain resampled waypoints. The target waypoint is the waypoint on the planned trajectory closest to the robot's current position. The resampled waypoints are then used to update the target waypoints to obtain an updated planned trajectory. Finally, the robot is controlled to continue moving along the updated planned trajectory. In this way, during the real-time control of the robot, i.e., while the robot is moving along the planned trajectory, the target waypoints that require position adjustment are automatically selected and their coordinates are resampled in the navigation grid corresponding to the target space. This allows the robot to plan a feasible, collision-free walking trajectory in a complex target space in real time, enabling it to successfully complete its navigation task. Furthermore, the proposed method can be generalized to other scenarios and trajectories, thereby achieving stable control of the robot. Furthermore, since feasible resampling path points are determined through resampling, the computational complexity of the control process is low, thereby being able to meet the real-time requirements of robot control. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a schematic diagram of a scenario of a path planning method based on RRT or PRM in the related art;
[0025] Figure 2A It is a quadruped robot along Figure 1 When walking on the planned path, a schematic diagram of the scene may appear blocked by a wall;
[0026] Figure 2B It is a quadruped robot along Figure 1 Schematic diagram of possible falls while walking along the planned path;
[0027] Figure 3 This is a schematic diagram of an optional architecture of a robot control system provided in an embodiment of the present application;
[0028] Figure 4 is a structural diagram of an electronic device provided in an embodiment of the present application;
[0029] Figure 5 This is an optional flowchart of the robot control method provided in the embodiment of the present application;
[0030] Figure 6 This is another optional flowchart of the robot control method provided in the embodiment of the present application;
[0031] Figure 7 This is a schematic diagram of the implementation process of determining a new path point provided in an embodiment of the present application;
[0032] Figure 8 This is a schematic diagram of the implementation process of linear interpolation provided in an embodiment of the present application;
[0033] Figure 9 This is a schematic diagram of the implementation process of the server performing trajectory following control on the robot to be controlled provided by an embodiment of the present application;
[0034] Figure 10 It is an overall flow chart of the embodiment of the present application;
[0035] Figure 11 A schematic diagram of a process for implementing a newly added necessary path point in the robot control method according to an embodiment of the present application;
[0036] Figure 12 This is a schematic diagram of the trajectory results obtained in the embodiment of the present application;
[0037] Figure 13 This is a schematic diagram of target point selection for trajectory following provided in an embodiment of the present application;
[0038] Figure 14 Schematic diagram of resampling path points in the robot control method according to an embodiment of the present application. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limiting this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0040] In the following description, reference is made to "some embodiments," which describe a subset of all possible embodiments. However, it will be understood that "some embodiments" may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict. Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by those skilled in the art to which the embodiments of this application pertain. The terms used in the embodiments of this application are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0041] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0042] In the related art, sampling-based path planning methods, such as the RRT or PRM algorithms, can be used to solve the path planning problem of quadruped robots in 3D indoor scenes. The specific steps are as follows: 1) Convert the 3D indoor scene into a grid representation, and also convert the quadruped robot model into a grid representation; 2) Use the RRT or PRM algorithm to sample the grid to generate a set of nodes; 3) For each node, use the kinematic model to calculate the feasible movement direction of the quadruped robot at that location; 4) Use a nearest neighbor search algorithm to connect adjacent nodes and calculate the cost of each edge; 5) Use a graph search algorithm (such as the A* algorithm) to search for the shortest path in the graph and generate the walking trajectory of the quadruped robot.
[0043] It should be noted that the kinematic model of a quadruped robot is relatively complex, and factors such as the movement restrictions of the leg joints and the balance of the center of gravity need to be considered. Therefore, the kinematic model needs to be reasonably modeled and calculated. At the same time, when performing path planning, the kinematic characteristics of the quadruped robot, such as gait and turning radius, need to be taken into account to ensure that the generated path can be walked smoothly by the quadruped robot.
[0044] Path planning methods based on RRT or PRM have certain limitations, such as unstable path quality, high computational complexity, and difficulty in ensuring optimality. For 3D indoor scenes, the high computational complexity makes it difficult to meet the real-time requirements of path planning. Consider the simplest way. Given a starting point, an end point, and a series of waypoints in an indoor scene, you can directly connect adjacent points with straight lines to form a trajectory consisting of multiple broken line segments, such as Figure 1 The black entity in the lower left corner is the quadruped robot 101, the solid point 102 is the waypoint in the trajectory (including the starting point and the end point), and the solid point 103 is the trajectory corresponding to the waypoint.
[0045] Figure 2A and Figure 2B For quadruped robots Figure 1 When walking along the planned path, there may be various problems such as bumping into walls, tripping over door frames, initializing in the grid of the environment, etc. Figure 2A In the example, when the quadruped robot moves in a straight line from the previous waypoint to the next waypoint, it will be blocked by the wall and cannot move forward; Figure 2B In the example, the quadruped robot needs to make a large-angle turn in the middle of the door frame, and will get stuck in the middle of the door frame and fall.
[0046] Based on at least one of the above-mentioned problems existing in the related technology, an embodiment of the present application proposes a general indoor scene quadruped robot path planning method, namely, a robot control method, which automatically selects waypoints whose positions need to be adjusted and resamples their coordinates in the navigation grid, so as to plan a feasible walking trajectory for the quadruped robot in a complex indoor scene that does not collide with the environment, so that it can successfully complete the navigation task, and at the same time can be generalized to other different scenes and different trajectories.
[0047] Specifically, in the robot control method provided in the embodiment of the present application, first, based on multiple original waypoints of the robot to be controlled in the target space, at least one new waypoint is determined; then, linear interpolation is performed on the waypoint mixed sequence composed of the original waypoints and the new waypoints to obtain a planned trajectory passing through each waypoint in the waypoint mixed sequence; then, in the process of controlling the robot to be controlled to move according to the planned trajectory, if it is detected that the current motion state of the robot to be controlled meets the preset resampling condition, the target waypoint on the planned trajectory is resampled to obtain a resampled waypoint; wherein, the target waypoint is the waypoint on the planned trajectory that is closest to the current position of the robot to be controlled; the target waypoint is updated using the resampled waypoint to obtain an updated planned trajectory; finally, the robot to be controlled to continue moving according to the updated planned trajectory. In this way, during the real-time control of the robot under control—that is, as the robot moves along a predetermined planned trajectory—the target waypoints whose positions require adjustment are automatically selected and their coordinates are resampled within the navigation grid corresponding to the target space. This allows the robot to plan a feasible, collision-free trajectory for the robot in the complex target space in real time, enabling it to successfully complete its navigation task. This method can also be generalized to other scenarios and trajectories, thereby achieving stable control of the robot. Furthermore, because the feasible resampled waypoints are determined through resampling, the control process has low computational complexity, thus meeting the real-time requirements of robot control.
[0048] Before explaining the robot control method of the embodiment of the present application, here, first explain the exemplary application of the robot control device of the embodiment of the present application, which is an electronic device for implementing the robot control method. In one implementation, the robot control device (i.e., electronic device) provided by the embodiment of the present application can be implemented as a terminal or as a server. In one implementation, the robot control device provided by the embodiment of the present application can be implemented as any terminal with intelligent control function, such as a laptop, tablet computer, desktop computer, mobile phone, portable music player, personal digital assistant, dedicated messaging device, portable game device, intelligent robot, smart home appliance and smart car-mounted device; in another implementation, the robot control device provided by the embodiment of the present application can also be implemented as a server, wherein the server can be 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, content distribution networks (CDNs), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal and the server can be directly or indirectly connected by wired or wireless communication, which is not limited in the embodiment of the present application. Next, an exemplary application when the robot control device is implemented as a terminal will be described.
[0049] See also Figure 3 , Figure 3 This is a schematic diagram of an optional architecture of a robot control system provided in an embodiment of the present application. To achieve control of the robot to be controlled, a robot control application can be provided. The robot control application provides control functions for the robot to be controlled. The robot control application can be installed on a terminal, which can be a common user terminal or a control terminal dedicated to robot control. If the terminal is a user terminal, the user can install the robot control application on the terminal. If the terminal is a control terminal dedicated to robot control, the control terminal can have the robot control application pre-installed at the factory. The user can match or bind the user terminal or control terminal to the robot to be controlled, thereby achieving control of the robot to be controlled through the user terminal or control terminal.
[0050] The robot control system 10 of the embodiment of the present application includes at least a terminal 100, a network 200, a server 300 and a robot to be controlled 400. A robot control application is installed on the terminal 100, wherein the server 300 may be a background server of the robot control application. The terminal 100 may constitute the robot control device of the embodiment of the present application, that is, the robot control method of the embodiment of the present application is implemented through the terminal 100, or the server 300 may constitute the robot control device of the embodiment of the present application, that is, the robot control method of the embodiment of the present application is implemented through the server 300. The terminal 100 is connected to the server 300 through the network 200, and the robot to be controlled 400 is also connected to the network 200. The network 200 may be a wide area network or a local area network, or a combination of the two. See Figure 3 When running the robot control application on the terminal 100, the user can operate and control the robot to be controlled through the client of the robot control application. For example, the user can input multiple original waypoints of the robot to be controlled within the target space through the client of the robot control application, where the multiple original waypoints include the path starting point and the path ending point, thereby controlling the robot to be controlled to move from the path starting point to the path ending point using the method of the embodiment of the application.
[0051] During the implementation process, the terminal 100 can send a robot control request to the server 300 via the network 200. The robot control request includes multiple original waypoints of the robot to be controlled in the target space. After receiving the robot control request, the server 300 will determine at least one new waypoint based on the multiple original waypoints; then, linear interpolation is performed on the mixed sequence of waypoints consisting of the original waypoints and the new waypoints to obtain a planned trajectory passing through each waypoint in the mixed sequence of waypoints. After obtaining the planned trajectory, the server 300 can encapsulate the planned trajectory into a motion control instruction and send the motion control instruction to the robot to be controlled 400. After receiving the motion control instruction, the robot to be controlled 400 responds to the motion control instruction and moves according to the planned trajectory.
[0052] As the robot 400 moves along the planned trajectory, it reports its current motion state to the server 300 in real time. If the server 300 detects that the robot 400's current motion state meets a preset resampling condition, it resamples the target waypoint on the planned trajectory to obtain a resampled waypoint. The target waypoint is the waypoint on the planned trajectory closest to the robot 400's current position. The resampled waypoint is then used to update the target waypoint to obtain an updated planned trajectory.
[0053] After obtaining the updated planned trajectory, the server 300 can encapsulate the updated planned trajectory into a motion control instruction and send the motion control instruction again to the robot to be controlled 400. After receiving the motion control instruction, the robot to be controlled 400 responds to the motion control instruction and moves according to the updated planned trajectory, thereby controlling the robot to be controlled 400 to continue moving according to the updated planned trajectory.
[0054] The robot control method provided in the embodiments of the present application can also be implemented based on a cloud platform and through cloud technology. For example, the server 300 can be a cloud server. The cloud server can determine at least one new waypoint based on multiple original waypoints, or the cloud server can perform linear interpolation on a mixed sequence of waypoints to obtain a planned trajectory that passes through each waypoint in the mixed sequence of waypoints. Alternatively, the cloud server can perform waypoint resampling on target waypoints on the planned trajectory to obtain resampled waypoints. Alternatively, the cloud server can update the target waypoints using the resampled waypoints to obtain an updated planned trajectory.
[0055] In some embodiments, there may also be a cloud storage, which can store multiple original waypoints, mixed sequences of waypoints, etc. of the robot to be controlled in the target space in the cloud storage. In this way, after the server receives the robot control request, it can directly obtain multiple original waypoints of the robot to be controlled in the target space from the cloud storage, thereby quickly determining at least one new waypoint and further generating a planned trajectory.
[0056] It's important to note that cloud technology refers to a managed technology that unifies hardware, software, and network resources within a wide or local area network (WAN) to enable data computing, storage, processing, and sharing. Cloud technology is a general term for network, information technology, integration technology, management platform technology, and application technology, all based on the cloud computing business model. It can form a resource pool for on-demand, flexible, and convenient use. Cloud computing technology will become a crucial support. Backend services for technical network systems, such as those for video sites, image sites, and more portals, require significant computing and storage resources. With the rapid development and application of the internet industry, every item will likely have its own unique identifier, requiring transmission to backend systems for logical processing. Data of varying levels will be processed separately, and data from various industries will require robust system support, which can be achieved through cloud computing.
[0057] Figure 4 is a structural diagram of an electronic device provided in an embodiment of the present application, Figure 4The electronic device shown may be a robot control device, which includes: at least one processor 310, a memory 350, at least one network interface 320, and a user interface 330. The various components in the robot control device are coupled together via a bus system 340. It is understood that the bus system 340 is used to achieve connection and communication between these components. In addition to including a data bus, the bus system 340 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 340 is not shown in FIG. Figure 4 Various buses are labeled as bus system 340 .
[0058] The processor 310 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0059] The user interface 330 includes one or more output devices 331 that enable presentation of media content, and one or more input devices 332 .
[0060] The memory 350 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, and the like. The memory 350 may optionally include one or more storage devices physically located away from the processor 310. The memory 350 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 350 described in the embodiments of the present application is intended to include any suitable type of memory. In some embodiments, the memory 350 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or subsets or supersets thereof, as exemplified below.
[0061] The operating system 351 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic businesses and process hardware-based tasks; a network communication module 352 is used to reach other computing devices via one or more (wired or wireless) network interfaces 320. Exemplary network interfaces 320 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB); an input processing module 353 is used to detect one or more user inputs or interactions from one of the one or more input devices 332 and translate the detected inputs or interactions.
[0062] In some embodiments, the apparatus provided in the embodiments of the present application may be implemented in software. Figure 4 A robot control device 354 stored in memory 350 is shown. This robot control device 354 can be a robot control device in an electronic device. It can be software in the form of a program or plug-in, and includes the following software modules: a determination module 3541, a linear interpolation module 3542, a resampling module 3543, an update module 3544, and a control module 3545. These modules are logical and can be arbitrarily combined or further separated according to the functions they implement. The functions of each module will be described below.
[0063] In some embodiments, the device provided in the embodiments of the present application can be implemented in hardware. As an example, the device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the robot control method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0064] The robot control method provided in each embodiment of the present application can be executed by an electronic device, wherein the electronic device can be a server or a terminal, that is, the robot control method provided in each embodiment of the present application can be executed by a server, or by a terminal, or by interaction between a server and a terminal.
[0065] Figure 5 This is an optional flow chart of the robot control method provided in the embodiment of the present application. Figure 5 The steps shown are explained as Figure 5 As shown, the robot control method is described by taking the server as an example, and the method includes the following steps S101 to S105:
[0066] Step S101 : determining at least one new waypoint based on a plurality of original waypoints of the robot to be controlled in the target space.
[0067] In an embodiment of the present application, a plurality of original waypoints of the robot to be controlled in the target space may be obtained first, and then at least one new waypoint may be determined based on the plurality of original waypoints.
[0068] Here, the robot to be controlled may be any type of robot, for example, a quadruped robot. The robot to be controlled can move from a starting point to an end point according to a path planned by the server under the control of the server.
[0069] The target space can be any space that supports the movement of the robot to be controlled. For example, in a home interior scenario, the target space can be a three-dimensional space consisting of at least one room, living room, or other area. The target space can be a user-specified space or a pre-planned space in which the robot to be controlled can move. For example, in a home interior scenario, the user can enter at least one room in the home to form the target space. In a hotel management scenario, the target space can be a pre-planned area that the robot to be controlled will serve.
[0070] An original waypoint is a predetermined location that the robot to be controlled must pass through during the current control process. An original waypoint can be a user-selected or input location. Multiple original waypoints include at least a path start point and a path end point. The robot to be controlled must start from the path start point and sequentially pass through each of the multiple original waypoints to reach the path end point.
[0071] In the embodiments of the present application, the multiple original waypoints have a sequential order, and the order of each original waypoint can be predefined when the user inputs or selects multiple original waypoints. For example, the user can select multiple original waypoints in sequence on the client side of the robot control application, and the multiple original waypoints can be sorted according to the selection order to form an original waypoint sequence, with the first original waypoint in the original waypoint sequence being the starting point of the path, and the last original waypoint in the original waypoint sequence being the end point of the path.
[0072] After determining the original waypoint sequence, at least one additional waypoint can be determined in the target space based on the original waypoint sequence. The location of the additional waypoint is different from the location of the original waypoint. In the original waypoint sequence, for each two adjacent original waypoints, the two original waypoints can be connected to form a connecting line, and then at least one additional waypoint can be determined on the connecting line.
[0073] Step S102 : performing linear interpolation on a mixed sequence of waypoints consisting of the original waypoints and the newly added waypoints to obtain a planned trajectory passing through each waypoint in the mixed sequence of waypoints.
[0074] After obtaining the newly added waypoints, if there are multiple newly added waypoints, the multiple newly added waypoints may be sorted according to the order of the newly added waypoints in the original waypoint sequence to form a newly added waypoint sequence.
[0075] After obtaining the original waypoint sequence and the newly added waypoint sequence, the original waypoint sequence and the newly added waypoint sequence can be merged, i.e., all original waypoints and all newly added waypoints can be sorted to form a mixed waypoint sequence. Alternatively, each newly added waypoint in the newly added waypoint sequence can be inserted into the original waypoint sequence according to its order in the original waypoint sequence to form a mixed waypoint sequence. The mixed waypoint sequence includes multiple waypoints, where the multiple waypoints can be both original waypoints and newly added waypoints.
[0076] After obtaining the waypoint mixed sequence, linear interpolation can be performed between each two adjacent waypoints in the waypoint mixed sequence to obtain at least one trajectory point. By sequentially connecting the waypoints and trajectory points, a planned trajectory passing through each waypoint in the waypoint mixed sequence can be obtained.
[0077] Step S103, in the process of controlling the robot to be controlled to move along the planned trajectory, if it is detected that the current motion state of the robot to be controlled meets the preset resampling condition, the target waypoints on the planned trajectory are resampled to obtain resampled waypoints.
[0078] Here, the preset resampling conditions include any one of the following: the current motion state of the robot to be controlled is in a falling state, or the trajectory following time of the robot to be controlled on the current sub-path is greater than the preset time threshold, and the current sub-path is the path between two adjacent way points in the mixed sequence of way points.
[0079] The target waypoint is the waypoint on the planned trajectory that is closest to the current position of the robot to be controlled. In other words, the target waypoint is the end point of the subpath of the robot to be controlled on the current subpath.
[0080] Waypoint resampling involves re-determining a waypoint and replacing the original target waypoint with it, thereby modifying the currently generated planned trajectory and ensuring smooth movement of the robot. For example, if the robot needs to turn around at a doorframe at its current target waypoint, and the doorframe is smaller than the robot's length, the robot cannot complete this trajectory without adjusting the target waypoint. Therefore, a new resampled waypoint can be determined and replaced with the target waypoint. If the target waypoint is adjusted to a new position within the room, the robot can then successfully complete the trajectory by turning around within the room after passing through the doorframe.
[0081] In an embodiment of the present application, the current motion state of the robot to be controlled and the trajectory following time of the robot to be controlled on the current sub-path will be detected in real time, so that the planned trajectory of the robot to be controlled can be adjusted in real time, thereby ensuring that the robot to be controlled can move safely and orderly, and thus move smoothly from the starting point of the path to the end point of the path.
[0082] Step S104 : updating the target waypoints using the resampled waypoints to obtain an updated planned trajectory.
[0083] Here, the target waypoint can be replaced by the resampled waypoint. After the replacement, linear interpolation can be performed between the current position and the resampled waypoint to obtain at least one trajectory point, and the current position, trajectory point and resampled waypoint can be connected in the order of the trajectory points to form an updated planned trajectory.
[0084] In some embodiments, the distance between the resampled waypoint and the current position of the robot to be controlled may be greater than the distance between the target waypoint and the current position of the robot to be controlled, or may be less than or equal to the distance between the target waypoint and the current position of the robot to be controlled.
[0085] If the distance between the resampled waypoint and the current position of the robot to be controlled is greater than the distance between the target waypoint and the current position of the robot to be controlled, the updated planned trajectory can pass through the target waypoint. In this case, the target waypoint can be used as a trajectory point on the updated planned trajectory. Alternatively, the updated planned trajectory can bypass the target waypoint. During implementation, the processing method for the target waypoint can be pre-configured. For example, the user can select whether to bypass or pass through the updated target waypoint in the settings interface of the robot control application.
[0086] Step S105 , controlling the robot to be controlled to continue moving according to the updated planned trajectory.
[0087] In the embodiment of the present application, after determining the updated planned trajectory, the robot to be controlled can be controlled to continue moving according to the updated planned trajectory. Furthermore, during the movement of the robot to be controlled, the robot's current motion state is detected in real time to determine whether it meets the preset resampling conditions. In other words, steps S103 to S105 are continuously executed in a loop until the robot to be controlled reaches the end of the path.
[0088] The robot control method provided in the embodiment of the present application, when controlling the robot, first performs linear interpolation on a mixed sequence of waypoints consisting of the original waypoints and the newly added waypoints of the robot to be controlled in the target space to obtain a planned trajectory of the robot to be controlled; then, in the process of controlling the robot to be controlled to move according to the planned trajectory, if it is detected that the current motion state of the robot to be controlled meets a preset resampling condition, the target waypoints on the planned trajectory are resampled to obtain resampled waypoints; wherein the target waypoint is the waypoint on the planned trajectory that is closest to the current position of the robot to be controlled; and the target waypoints are updated using the resampled waypoints to obtain an updated planned trajectory; finally, the robot to be controlled to continue moving according to the updated planned trajectory. In this way, during the real-time control of the robot under control—that is, as the robot moves along a predetermined planned trajectory—the target waypoints whose positions require adjustment are automatically selected and their coordinates are resampled within the navigation grid corresponding to the target space. This allows the robot to plan a feasible, collision-free trajectory for the robot in the complex target space in real time, enabling it to successfully complete its navigation task. This method can also be generalized to other scenarios and trajectories, thereby achieving stable control of the robot. Furthermore, because the feasible resampled waypoints are determined through resampling, the control process has low computational complexity, thus meeting the real-time requirements of robot control.
[0089] The following examples illustrate the application scenarios of the robot control method provided in the embodiments of the present application. The robot control method in the embodiments of the present application can be applied to at least any of the following scenarios:
[0090] Scenario 1: The robot control system includes at least a terminal, a server and a robot to be controlled, wherein the terminal can be a commonly used user terminal, such as a mobile phone, and a robot control application is installed on the terminal. The user can perform binding operations through the client of the robot control application to bind the terminal to the robot to be controlled (that is, bind the terminal account logged in in the robot control application to the robot to be controlled), so that the motion control of the bound robot to be controlled can be achieved through the terminal. It should be noted that the same terminal can be bound to multiple robots to be controlled, and the same robot to be controlled can also be bound to multiple terminals. The server is the background server of the robot control application, and the server constitutes the robot control device of the embodiment of the present application. The terminal, the robot to be controlled and the server can be connected through the network.
[0091] Scenario 2: The robot control system includes at least a terminal, a server, and a robot to be controlled. The terminal can be a control terminal dedicated to robot control, such as a robot controller or a robot control handle. The terminal has a robot control application or robot control system pre-installed at the factory. The user can perform a binding operation through the client of the robot control application or the robot control system to bind the terminal to the robot to be controlled, so that the motion control of the bound robot to be controlled can be achieved through the terminal. The server is the background server of the robot control application, and the server constitutes the robot control device of the embodiment of the present application. The terminal, the robot to be controlled, and the server can be connected through the network.
[0092] In scenarios 1 and 2, when controlling the robot to be controlled, the user can operate the client of the robot control application running on the terminal to generate a robot control request and send the robot control request to the server. After receiving the robot control request, the server can use the robot control method provided in the embodiments of the present application to realize motion control of the robot to be controlled that is bound to the terminal.
[0093] Scenario 3: The robot control system includes at least a terminal and a robot to be controlled. The terminal can be a common user terminal, such as a mobile phone, with a robot control application installed on it. The user can bind the terminal to the robot to be controlled through the client of the robot control application (that is, bind the terminal account logged in to the robot control application to the robot to be controlled). This allows the terminal to control the motion of the bound robot to be controlled. The terminal and the robot to be controlled can be connected via a proximal connection method, such as Bluetooth, infrared, or radio frequency connection, or the terminal and the robot to be controlled can be connected via the same local area network.
[0094] Scenario 4: A robot control system includes at least a terminal and a robot to be controlled. The terminal can be a control terminal dedicated to robot control, such as a robot controller or robot control handle. The terminal comes pre-installed with a robot control application or robot control system. Users can bind the terminal to the robot to be controlled through the robot control application or robot control system client, thereby enabling motion control of the bound robot to be controlled through the terminal. The terminal and the robot to be controlled can be connected via a proximal connection, or they can be connected via a network connection if they are on the same local area network.
[0095] In scenarios three and four, while controlling the robot to be controlled, the user can operate the client of the robot control application running on the terminal to generate motion control instructions and send the motion control instructions to the robot to be controlled to control the movement of the robot to be controlled. While the terminal is controlling the robot to be controlled, the terminal can use the robot control method provided in the embodiments of the present application to achieve motion control of the robot to be controlled that is bound to the terminal.
[0096] The robot control method of the embodiment of the present application will be described below in combination with the above-mentioned scenario one. Figure 6 This is another optional flow chart of the robot control method provided in the embodiment of the present application, such as Figure 6 As shown, the method includes the following steps S201 to S219:
[0097] Step S201: The terminal receives a robot control operation input by a user.
[0098] Here, the robot control operation may include an operation of selecting a target space, an operation of selecting an original waypoint, an operation of selecting a robot to be controlled, and the like.
[0099] The client of the robot control application may provide a target space selection input area A1. The user can select or input at least one area within the target space in this selection input area A1, thereby performing a target space selection operation. The target space selection operation is used to select the target space in which the controlled robot is to move. For example, in a home interior scene, if the interior includes a kitchen, a bathroom, and three bedrooms (Bedroom 1, Bedroom 2, and Bedroom 3), the user can select the kitchen, Bedroom 1, and Bedroom 3 as the areas in which the controlled robot is to move by inputting a target space selection operation in the selection input area A1 on the client. Accordingly, the selected target space is the space including the kitchen, Bedroom 1, and Bedroom 3.
[0100] The client of the robot control application may also provide an input area A2 for selecting original waypoints. The user can select or enter multiple original waypoints in this area. It should be noted that these multiple original waypoints include at least a path starting point and a path ending point. Regarding the path starting point, the terminal may also collect the current location of the robot to be controlled and set that location as the path starting point by default. Alternatively, a reminder message may be displayed on the current interface, prompting the user to select whether to set the current location of the robot to be controlled as the path starting point. If the user selects yes, the current location of the robot to be controlled is directly set as the path starting point. If the user selects no, the user may be prompted to enter or select a path starting point. When the user enters original waypoints, different names can be assigned to different locations within each area. The user can enter the names of individual locations to generate multiple original waypoints. When the user selects an original waypoint, a three-dimensional map of the entire current space is generated. The user can click on a location in the 3D map to select it as an original waypoint.
[0101] In some embodiments, only the selection operation of the original waypoints may be performed, or the selection operation of the target space and the selection operation of the original waypoints may be performed simultaneously. When only the selection operation of the original waypoints is performed, the target space K1 may be determined based on the area where all the original waypoints are located. When the selection operation of the target space and the selection operation of the original waypoints are performed simultaneously, the target space K1 corresponding to all the original waypoints may be determined based on the area where all the original waypoints are located, and it is determined whether the target space K1 corresponding to all the original waypoints is the same as the target space K2 corresponding to the user's target space selection operation. If different, the target space K1 corresponding to all the original waypoints is used to update the target space K2 corresponding to the target space selection operation, that is, the target space K1 corresponding to all the original waypoints is determined as the final target space.
[0102] The client of the robot control application also provides an input area A3 for selecting a robot to be controlled. The user can select or input one or more robots to be controlled in this area, thereby performing a selection operation for the robot to be controlled. The selection operation for the robot to be controlled is used to select the robot to be controlled. For example, if multiple robots are bound to the terminal, the user can select one or more robots to control. In the process of controlling the robot to be controlled, if there is only one robot to be controlled, the robot to be controlled is controlled according to the target space and original waypoint corresponding to the user's target space selection operation and the original waypoint selection operation; if there are multiple robots to be controlled, the target space selection operation and the original waypoint selection operation can be performed for each robot to be controlled separately, so that each robot to be controlled is motion controlled according to the user's different selection operations; or, if there are multiple robots to be controlled, a unified target space selection operation and original waypoint selection operation can be performed for multiple robots to be controlled, so that multiple robots to be controlled can be motion controlled according to the unified target space and original waypoint, that is, multiple robots to be controlled move along the same path; or, if there are multiple robots to be controlled, a unified target space selection operation and original waypoint selection operation can be performed for multiple robots to be controlled, the only difference being that the path starting points of the multiple robots to be controlled are different. Therefore, the multiple robots to be controlled can generate different planned trajectories based on different path starting points, so that they move according to different planned trajectories.
[0103] In step S202 , the terminal encapsulates a plurality of original waypoints of the robot to be controlled in the target space into a robot control request in response to the robot control operation.
[0104] In some embodiments, after obtaining multiple original waypoints, an initial planned path can be generated based on the multiple original waypoints. The initial planned path is a broken line formed by sequentially connecting the multiple original waypoints. During implementation, the initial planned path can be encapsulated into a robot control request. The robot control request is used to request that the robot to be controlled move from the path starting point to the path ending point according to the initial planned path.
[0105] In the embodiment of the present application, each original waypoint has an original waypoint identifier that can represent the order of the corresponding original waypoint among all original waypoints. For example, for the 10 original waypoints input by the user, these original waypoints can be named sequentially from 1 to 10, and the identifiers can be determined as the corresponding original waypoint identifiers. Alternatively, the coordinate values of each original waypoint in the local coordinate system of the robot to be controlled can be obtained, and then the coordinate values and the sequential identifiers can be concatenated according to a preset naming rule to generate an identifier that uniquely identifies each original waypoint.
[0106] When encapsulating multiple original waypoints into a robot control request, the identifier of each generated original waypoint may be encapsulated into the robot control request. Alternatively, all original waypoints may be sorted based on the corresponding sequence numbers in the original waypoint identifiers to form an original waypoint sequence. Subsequently, an initial planned path may be generated according to the order of the original waypoints in the original waypoint sequence, and the initial planned path may be encapsulated into the robot control request.
[0107] Step S203: The terminal sends a robot control request to the server.
[0108] In step S204 , the server obtains a plurality of original waypoints of the robot to be controlled in the target space in response to the robot control request.
[0109] In an embodiment of the present application, the robot control request can be parsed to obtain an original waypoint sequence, or after parsing the robot control request and obtaining multiple original waypoints, all the original waypoints are sorted according to the identifier of each original waypoint to form an original waypoint sequence.
[0110] In some embodiments, the server can also obtain the initial planned path of the robot to be controlled in the target space in response to the robot control request. The initial planned path includes an original waypoint sequence composed of multiple original waypoints. The first original waypoint in the original waypoint sequence is the starting point of the initial planned path, that is, the path starting point, and the last original waypoint in the original waypoint sequence is the end point of the initial planned path, that is, the path end point.
[0111] In step S205 , the server determines at least one new waypoint based on the multiple original waypoints.
[0112] Here, for every two adjacent original waypoints in the original waypoint sequence, a path search may be performed on the local path between the two original waypoints to obtain at least one newly added waypoint on the local path.
[0113] In some embodiments, see Figure 7The at least one newly added waypoint determined based on the multiple original waypoints in step S205 can be implemented by the following steps S2051 to S2053:
[0114] Step S2051: Acquire three-dimensional scene data of the target space, and generate a navigation mesh file for path planning based on the three-dimensional scene data.
[0115] Here, three-dimensional scene data refers to attribute-related data of objects in the target space. For example, for a home interior scene, the three-dimensional scene data can be data such as the position of the wall, the length of the wall, the shape of the furniture, the size of the furniture, the position of the door frame, the size of the door frame, etc.
[0116] After obtaining the 3D scene data, the grid structure of the target space can be drawn based on the 3D scene data, that is, a grid map of the target space. Here, a grid map refers to a 3D graph composed of multiple grids that can represent the 3D structure of the target space. In other words, it is a 3D structure map formed by representing the surface of an object in the target space using a large number of grids.
[0117] A navigation mesh file is a mesh map, and the navigation mesh file includes the mesh parameters of each mesh in the mesh map. In the embodiment of the present application, the mesh can be a triangular mesh. When generating a navigation mesh file for path planning based on three-dimensional scene data, a simulator can be called to determine the mesh parameters of the triangular mesh used to represent the geometric shape of objects in the target space based on the three-dimensional scene data; then, based on the mesh parameters, a triangular mesh used to represent the geometric shape of each object is drawn to obtain the navigation mesh file.
[0118] Here, the mesh parameters of the triangular mesh may include at least one of the following: in the local coordinate system of the robot to be controlled, the vertex coordinates of the three vertices of the triangular mesh, the normal of the triangular mesh, the texture coordinates of the triangular mesh, and other parameters.
[0119] The simulator can be any physical simulator. For example, in an embodiment of the present application, the Habitat-Sim simulator can be used to determine the mesh parameters of the triangular mesh used to represent the geometric shape of objects in the target space. Then, based on the mesh parameters, a triangular mesh used to represent the geometric shape of each object is drawn to obtain a navigation mesh file.
[0120] Step S2052: Simulate the robot to be controlled as a simulation object with preset size parameters.
[0121] Here, the purpose of simulating the robot to be controlled as a simulation object with preset size parameters is to enable it to move in the target space with uniform preset size parameters when adding way points, thereby realizing way point planning and avoiding way point planning errors caused by the size diversity or irregular shape of the robot to be controlled.
[0122] During implementation, the robot to be controlled can be simulated as a vertically pointing cylinder. By setting the base radius and height of the cylinder, this can be used for subsequent path planning in the simulator. The base radius of the cylinder can be determined based on the dimensional parameters of the robot's projection along a light line perpendicular to the ground. In other words, the robot can be projected along a light line perpendicular to the ground to obtain its projection on the ground, and the base radius of the cylinder can be determined based on this projection. The height of the cylinder can be equal to the height of the robot to be controlled.
[0123] In step S2053, the first of the two original waypoints is used as the path starting point, and the second of the two original waypoints is used as the path ending point. Based on the simulation object and the navigation mesh file, a local path between the path starting point and the path ending point is determined, and at least one new waypoint is planned on the local path.
[0124] Here, for each pair of adjacent original waypoints in the original waypoint sequence, the first of the two original waypoints is used as the path start point, and the second of the two original waypoints is used as the path end point. Based on the size parameters of the simulated object (e.g., the base radius and height of a cylinder) and the navigation mesh file, a local path is determined between the path start point and the path end point. This local path is a path that does not intersect the triangular mesh of any object in the navigation mesh file, that is, the local path cannot pass through objects such as walls and furniture. Then, at least one new waypoint is planned on the local path. For example, uniform sampling can be performed on the local path to obtain the at least one new waypoint.
[0125] Step S206: The server obtains the identifier of each original waypoint and the identifier of each newly added waypoint.
[0126] In the embodiment of the present application, the identifiers of the original waypoints and the identifiers of the newly added waypoints can represent the order of the corresponding waypoints in the mixed sequence of waypoints.
[0127] In step S207 , the server sorts all the original waypoints and all the newly added waypoints according to the identifiers of the original waypoints and the identifiers of the newly added waypoints to form a mixed sequence of waypoints.
[0128] In some embodiments, when forming a mixed waypoint sequence, newly added waypoints may be inserted into the original waypoint sequence. When generating at least one newly added waypoint for each pair of adjacent original waypoints, the at least one newly added waypoint may be inserted between the two original waypoints. Alternatively, after all newly added waypoints are generated, they may be sequentially inserted into the original waypoint sequence.
[0129] In step S208 , the server sequentially connects every two adjacent waypoints according to the order of the waypoints in the mixed sequence of waypoints to form a broken line graph.
[0130] The line graph includes at least one broken line, and the starting point and the end point of each broken line correspond to a waypoint respectively.
[0131] In step S209 , the server performs linear interpolation on each broken line in the broken line graph to obtain coordinates of multiple track points.
[0132] In some embodiments, see Figure 8 In step S209, linear interpolation is performed on each broken line in the broken line graph, which can be achieved by following the steps S2091 to S2094:
[0133] Step S2091, obtaining the preset number of trajectory points.
[0134] In the embodiment of the present application, the number of trajectory points can be configured in the setting interface of the robot control application. The number of trajectory points is the preset total number of trajectory points on the entire planned trajectory.
[0135] Step S2092, determining the total length of all broken lines in the line graph.
[0136] In the embodiment of the present application, the length of the line between each two path points (ie, each broken line) can be determined, and then the lengths of all broken lines are summed to obtain the total length of the line.
[0137] Step S2093: determining the track point distance between every two adjacent track points based on the total length of the line and the number of track points.
[0138] Here, the sum of the number of trajectory points and the number of waypoints can be calculated, and then the quotient between the total length of the line and the sum can be calculated to obtain the trajectory point distance between every two adjacent trajectory points (or an adjacent waypoint and a trajectory point).
[0139] Step S2094: perform linear interpolation on each broken line in the broken line graph according to the distance between the track points to obtain the coordinates of multiple track points.
[0140] After obtaining the trajectory point distance, the point with the trajectory point distance from the previous trajectory point or way point can be determined as a new trajectory point based on the trajectory point distance, and so on, until all the trajectory points are determined.
[0141] In the embodiment of the present application, the coordinates of the trajectory point are the coordinates of the trajectory point in the local coordinate system of the robot to be controlled.
[0142] In step S210 , the server connects all the trajectory points based on the coordinates of the multiple trajectory points to obtain a planned trajectory that passes through each waypoint in the mixed sequence of waypoints.
[0143] Step S211: The server generates motion control instructions based on the planned trajectory.
[0144] In an embodiment of the present application, the planned trajectory can be encapsulated into a motion control instruction.
[0145] In step S212, the server sends the motion control instruction to the robot to be controlled.
[0146] Step S213 : the robot to be controlled moves along the planned trajectory in response to the motion control instruction.
[0147] In some embodiments, when the robot to be controlled moves along the planned trajectory in response to the motion control instruction, that is, when the robot to be controlled performs trajectory following control, the trajectory following control can be performed by the server or by the robot to be controlled itself. Here, the server performing trajectory following control on the robot to be controlled is used as an example for explanation. Figure 9 When the server performs trajectory following control on the robot to be controlled, the following steps are included: S301 to S304:
[0148] Step S301: The server obtains a preset field of view of the robot to be controlled.
[0149] The preset field of view refers to the field of view radius of the robot to be controlled. Each robot to be controlled has a fixed preset field of view.
[0150] In step S302, the server determines the target point to be followed on the planned trajectory of the robot to be controlled at the current moment and the coordinate value of the target point to be followed according to the preset field of view.
[0151] Here, along the forward moving direction of the planned trajectory (ie, the moving direction from the starting point to the end point of the path), a target point on the planned trajectory that is within the above-mentioned field of view radius of the robot to be controlled can be used as the target point to be followed.
[0152] Step S303: The server determines the motion parameters of the robot to be controlled at the current moment based on the coordinate values of the target point to be followed.
[0153] In some embodiments, the server determines the motion parameters of the robot to be controlled at the current moment based on the coordinate value of the target point to be followed, which can be achieved in the following way: first, the current posture angle of the robot to be controlled is determined based on the coordinate value of the target point to be followed; then, the target angular velocity of the robot to be controlled at the current moment is determined based on the current posture angle and the preset angular velocity extreme value; and, the target linear velocity of the robot to be controlled at the current moment is determined based on the current posture angle and the preset linear velocity extreme value; wherein, the target angular velocity and the target linear velocity constitute the motion parameters of the robot to be controlled.
[0154] Step S304: The server controls the robot to be controlled to move to the target point to be followed according to the motion parameters.
[0155] Here, the robot to be controlled is controlled according to the determined target angular velocity and target linear velocity, so that the robot to be controlled moves from its current position to the target point to be followed at the target angular velocity and target linear velocity. When the robot moves to the target point to be followed, steps S302 to S304 may be continued to achieve continuous trajectory following control of the robot to be controlled.
[0156] Step S214: When the robot to be controlled moves according to the planned trajectory, the robot is controlled to report its current motion state to the server in real time.
[0157] Here, the current motion state includes any one of the following: whether the robot to be controlled is currently in a falling state, and the trajectory following time of the robot to be controlled on the current sub-path.
[0158] In step S215 , if the server detects that the current motion state of the robot to be controlled meets the preset resampling condition, the server performs waypoint resampling on the target waypoint on the planned trajectory to obtain a resampled waypoint.
[0159] In an embodiment of the present application, if the current motion state of the robot to be controlled is detected as being in a falling state, or if it is detected that the trajectory following time of the robot to be controlled on the current sub-path is longer than a preset time threshold, it indicates that the current motion state of the robot to be controlled meets the preset resampling conditions, that is, the preset resampling conditions include: the current motion state of the robot to be controlled is in a falling state, or the trajectory following time of the robot to be controlled on the current sub-path is longer than a preset time threshold. Therefore, the target waypoint on the planned trajectory is resampled to obtain a resampled waypoint; wherein the current sub-path is the path between two adjacent waypoints in the mixed sequence of waypoints. The target waypoint is the waypoint on the planned trajectory that is closest to the current position of the robot to be controlled.
[0160] In some embodiments, resampling of a target waypoint on a planned trajectory may be performed in the following manner: first, obtaining a preset resampling radius; then, with the target waypoint as the center, determining a resampling circle based on the resampling radius; and finally, randomly sampling a point on the resampling circle as a resampling waypoint.
[0161] In step S216, the server updates the target waypoints using the resampled waypoints to obtain an updated planned trajectory.
[0162] Step S217: The server generates a new motion control instruction based on the updated planned trajectory.
[0163] In step S218, the server sends the new motion control instruction to the robot to be controlled.
[0164] Step S219: The robot to be controlled responds to the new motion control instruction and continues to move according to the updated planned trajectory.
[0165] In the embodiment of the present application, after determining the updated planned trajectory, the robot to be controlled can be controlled to continue moving according to the updated planned trajectory. Furthermore, during the movement of the robot to be controlled, the current motion state of the robot to be controlled is detected in real time to see if it meets the preset resampling conditions. In other words, steps S214 to S219 are continuously executed in a loop until the robot to be controlled reaches the end of the path.
[0166] In the embodiments of the present application, during the real-time control of a robot to be controlled, that is, during the movement of the robot to be controlled along a predetermined planned trajectory, target waypoints whose positions need to be adjusted are automatically selected, and the coordinates of the target waypoints are resampled in the navigation grid corresponding to the target space. This allows the robot to plan a feasible, environment-free walking trajectory in a complex target space in real time, enabling the robot to successfully complete its navigation task. Furthermore, the method can be generalized to other different scenarios and trajectories, thereby achieving stable control of the robot. Furthermore, because the feasible resampled waypoints are determined through resampling, the computational complexity of the control process can be greatly reduced compared to robot control methods in related technologies, thereby improving the real-time performance of robot control.
[0167] Below, an exemplary application of the embodiment of the present application in a practical application scenario will be described.
[0168] Quadruped robots have been a hot product in recent years, and indoor scene navigation is an unavoidable topic for quadruped robots. How to efficiently, stably and flexibly plan paths for quadruped robots in indoor scenes so that they can complete navigation tasks without colliding with the environment is a core issue to be solved in this field.
[0169] Generally speaking, indoor navigation tasks will give the starting point and end point in a given scene, as well as a series of waypoints that need to be passed. The robot needs to start from the starting point, pass through all the waypoints in sequence and finally reach the end point, and is required not to collide with the environment. However, unlike wheeled robots, for quadruped robots, we need to give additional consideration to their movement characteristics, such as gait, turning radius and other factors, to ensure that the generated path can be smoothly walked by the quadruped robot. At the same time, indoor scenes are relatively complex, and it is necessary to consider the positional relationship of obstacles such as different walls and furniture, as well as their impact on the gait of the quadruped robot, which poses new challenges to the path planning of navigation tasks. Based on this, an embodiment of the present application proposes a path planning method for a quadruped robot in indoor scenes based on waypoint resampling, that is, a robot control method. By automatically selecting waypoints that need to be adjusted in position and resampling them in the navigation grid, a feasible walking trajectory that does not collide with the environment is planned for the quadruped robot in a complex indoor scene, so that it can successfully complete the navigation task.
[0170] The goal of the embodiments of the present application is to perform path planning by dynamically adjusting the positions of the original waypoints and adding necessary new waypoints given a series of original waypoints that need to be passed through, so that the quadruped robot can successfully complete the navigation task in a complex indoor scene. Figure 10 This is the overall flow chart of the embodiment of the present application, such as Figure 10As shown, the main idea of the embodiment of the present application is: first, based on a given series of original waypoint sequences consisting of original waypoints, the required new waypoints are planned, and necessary waypoints (i.e., the above-mentioned new waypoints) are added, and a trajectory (i.e., the above-mentioned planned trajectory) is formed by linear interpolation; then, the quadruped robot follows the trajectory by controlling the real-time linear velocity and angular velocity (i.e., controlling the robot to follow the trajectory); if it encounters an obstacle in the environment and falls or the following time exceeds a threshold, a waypoint closest to the current position is detected; the position of the waypoint is resampled on the navigation grid, and the necessary new waypoints are replanned, and then a trajectory is formed by linear interpolation; the above steps are repeated until the quadruped robot walks from the starting position to the ending position and completes the navigation task.
[0171] For the steps of adding necessary path points in the robot control method of the embodiment of the present application, see Figure 11 As shown in the figure: a sequence of original waypoints P = [W1, W2, ..., W |p| ], where W i is the coordinate value of the original waypoint in three-dimensional space. The quadruped robot needs to pass through all the original waypoints W in sequence. i , starting from the original waypoint W and arriving at the original waypoint W |P| Considering the characteristics of the quadruped robot such as its own body size, turning radius, and movement gait, when the quadruped robot moves in the 3D scene following the trajectory P, it will inevitably collide with the environment grid and fall, or be blocked by the wall or initialized in the environment grid and fall into an infinite loop. Therefore, it is necessary to add several (for example, |P′|) necessary waypoints P'=[W1',W2',...,W' |P′| ].
[0172] In the embodiment of the present application, given two adjacent waypoints [W i ,W i+1 ], it is necessary to plan out several new path points that may need to be added [W i ',W' i+1,...], this process can be implemented in a physical simulator. Here we take the Habitat-Sim simulator as an example: First, by importing the 3D file of the indoor scene (such as house.glb), and using habitat_sim.pathfinder.save_nav_mesh(glb_path) to generate a navigation mesh file (such as house.navmesh) for path planning; secondly, the robot is regarded as a vertical cylinder, and by setting the bottom radius and height of the cylinder (that is, setting the robot's external dimensions), it is used for subsequent path planning in the navigation mesh; then, in Habitat-Sim, initialize the planned path path = habitat_sim.ShortestPath(), and set the starting point (path.requested_start) and end point (path.requested_end) of the path to the corresponding waypoint coordinates [W i ,W i+1 ]; Finally, call habitat_sim.pathfinder.find_path(path) to plan the additional path points needed in the middle [W i ',W' i+1 ,…].
[0173] For the step of forming a planned trajectory through linear interpolation in the robot control method of the embodiment of the present application, it is possible to give a sequence of original waypoints P = [W1, W2, ..., W |p| ] and the newly added waypoint sequence P'=[W1',W2',...,W' |P′| ] (i.e., a mixed sequence of waypoints) can be used to form a trajectory that is uniformly distributed in space along the order of waypoints through linear interpolation. The specific process is as follows: First, define the number of trajectory points to be formed (e.g., 200); then, calculate the trajectory length (i.e., the total length of the line) of all waypoints connected by straight lines, and obtain the distance Δd between each two trajectory points; finally, traverse all waypoints, perform linear interpolation according to the direction and Δd between the current waypoint and the next waypoint, and obtain the coordinates of each trajectory point. The trajectory result is as follows: Figure 12 As shown, solid point 1201 is the original waypoint, solid point 1202 is the newly added waypoint after trajectory planning, and trajectory point 1203 is 200 trajectory points generated by linear interpolation.
[0174] Regarding the steps of trajectory following control in the robot control method of the embodiment of the present application: a trajectory composed of a number of trajectory points can be given, and the trajectory following control can be achieved by setting the linear velocity and angular velocity of the quadruped robot. The specific process is as follows: First, set the robot's field of view (i.e., the preset field of view), and select the target point that the current robot should follow (i.e., the target point to be followed). For example, set the robot's field of view to 0.4m (i.e., the field of view radius), then at each moment, the target point is the target point on the trajectory that is 0.4m ahead of the robot's current position, such as Figure 13 As shown in FIG, it is a schematic diagram of the target point selection of the trajectory following provided by the embodiment of the present application. The trajectory point is transferred from the world coordinate system to the robot local coordinate system. Finally, according to the position of the trajectory point in the local coordinate system, the linear velocity and angular velocity of the robot motion control are set. Specifically, assuming that the position of the target trajectory point in the robot local coordinate system is P loc =(x t ,y t ,z t ), we can get the angle between the target trajectory point and the current posture of the robot Then the target angular velocity v of the robot is controlled ang It is defined as the following formula (1):
[0175]
[0176] Where γ is the scaling factor, are the minimum and maximum values of the target angular velocity (i.e., the extreme values of the angular velocity), and clip(·,·,·) is the clip function.
[0177] Target linear velocity v lin It is defined as the following formula (2):
[0178]
[0179] in, It is the maximum value of the target linear velocity (i.e. the extreme linear velocity).
[0180] Regarding the step of resampling waypoints in the robot control method of the embodiment of the present application: if the robot encounters an obstacle in the environment and falls or the trajectory following time exceeds a threshold, the waypoint closest to the current position (i.e., the target waypoint) is detected and the position of the waypoint is resampled on the navigation grid. This process can be implemented in a physical simulator. Here, taking the Habitat-Sim simulator as an example, given the coordinates P of the waypoint closest to the current robot position, w =(x w ,y w ,z w), by calling the function habitat_sim.pathfinder.get_random_navigable_point_near(circle_center, radius) w The coordinates of a new waypoint (i.e., the resampling waypoint) are sampled within the resampling circle with the center being the circle and the resampling radius being the radius. Figure 14 As shown, the quadruped robot needs to turn around in the door frame at the current waypoint. However, the width of the door frame is smaller than the length of the robot, and this trajectory cannot be completed without adjusting the waypoint. After using the resampled waypoint operation to obtain resampled waypoint 1401, the current waypoint is randomly adjusted to the position of the new resampled waypoint 1401 in the room. After passing through the door frame, the robot can turn around in the room and successfully complete the trajectory, thus verifying the effectiveness of the method of the embodiment of the application.
[0181] The robot control method provided in the embodiment of the present application can be widely used in the early data collection process of the visual language navigation of the intelligent body of the robotics department. It has the advantages of simplicity, efficiency, and easy processing, and has produced considerable effects on improving the success rate of path planning of quadruped robots in 3D indoor scenes.
[0182] It is understandable that in the embodiments of the present application, if the content involves user information, such as the three-dimensional grid of the target space, multiple original waypoints in the target space, and other information, and if it involves data related to user information or corporate information, when the embodiments of the present application are applied to specific products or technologies, it is necessary to obtain user permission or consent, or to blur this information to eliminate the correspondence between this information and the user; and the relevant data collection and processing should be strictly in accordance with the requirements of relevant national laws and regulations when applied in examples, and the informed consent or separate consent of the personal information subject should be obtained, and subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.
[0183] The following continues to describe the exemplary structure of the robot control device 354 provided in the embodiment of the present application implemented as a software module. In some embodiments, such as Figure 4As shown, the robot control device 354 includes: a determination module 3541, which is used to determine at least one new waypoint based on multiple original waypoints of the robot to be controlled in the target space; a linear interpolation module 3542, which is used to perform linear interpolation on a mixed sequence of waypoints composed of the original waypoints and the new waypoints to obtain a planned trajectory passing through each waypoint in the mixed sequence of waypoints; a resampling module 3543, which is used to resample the target waypoints on the planned trajectory to obtain a resampled waypoint if it is detected that the current motion state of the robot to be controlled meets a preset resampling condition during the process of controlling the robot to be controlled to move according to the planned trajectory; wherein the target waypoint is the waypoint on the planned trajectory that is closest to the current position of the robot to be controlled; an updating module 3544, which is used to update the target waypoints using the resampled waypoints to obtain an updated planned trajectory; and a control module 3545, which is used to control the robot to be controlled to continue moving according to the updated planned trajectory.
[0184] In some embodiments, the determination module is also used to: obtain the initial planned path of the robot to be controlled in the target space, the initial planned path includes an original waypoint sequence composed of the multiple original waypoints, the first original waypoint in the original waypoint sequence is the starting point of the initial planned path, and the last original waypoint in the original waypoint sequence is the end point of the initial planned path; for each two adjacent original waypoints in the original waypoint sequence, a path search is performed on the local path between the two original waypoints to obtain at least one new waypoint located on the local path.
[0185] In some embodiments, the determination module is further used to: obtain three-dimensional scene data of the target space, and generate a navigation mesh file for path planning based on the three-dimensional scene data; simulate the robot to be controlled as a simulation object with preset size parameters; use the first of the two original waypoints as the path starting point, and the second of the two original waypoints as the path end point, determine a local path between the path starting point and the path end point based on the simulation object and the navigation mesh file, and plan at least one new waypoint on the local path.
[0186] In some embodiments, the determination module is also used to: call the simulator to determine the mesh parameters of the triangular mesh used to represent the geometric shape of the object in the target space based on the three-dimensional scene data; draw the triangular mesh used to represent the geometric shape of each object based on the mesh parameters to obtain the navigation mesh file.
[0187] In some embodiments, the apparatus further comprises: a waypoint mixed sequence generation module configured to obtain an identifier of each original waypoint and an identifier of each newly added waypoint before performing linear interpolation on the waypoint mixed sequence formed by the original waypoints and the newly added waypoints; the identifiers of the original waypoints and the identifiers of the newly added waypoints being able to represent the order of the corresponding waypoints in the waypoint mixed sequence; and all the original waypoints and all the newly added waypoints being sorted according to the identifiers of the original waypoints and the identifiers of the newly added waypoints to form the waypoint mixed sequence.
[0188] In some embodiments, the linear interpolation module is further used to: connect each two adjacent way points in sequence according to the order of the way points in the way point mixed sequence to form a broken line graph; the broken line graph includes at least one broken line; perform linear interpolation on each broken line in the broken line graph to obtain the coordinates of multiple trajectory points; based on the coordinates of the multiple trajectory points, connect all trajectory points to obtain a planned trajectory passing through each way point in the way point mixed sequence.
[0189] In some embodiments, the linear interpolation module is also used to: obtain a preset number of trajectory points; determine the total length of all broken lines in the line graph; determine the trajectory point distance between every two adjacent trajectory points based on the total line length and the number of trajectory points; perform linear interpolation on each broken line in the line graph according to the trajectory point distance to obtain the coordinates of the multiple trajectory points.
[0190] In some embodiments, the device also includes: a trajectory following module, which is used to obtain a preset field of view of the robot to be controlled after obtaining a planned trajectory passing through each way point in the mixed sequence of way points; determine the target point to be followed by the robot to be controlled on the planned trajectory and the coordinate value of the target point to be followed at the current moment according to the preset field of view; determine the motion parameters of the robot to be controlled at the current moment based on the coordinate value of the target point to be followed; and control the robot to be controlled to move to the target point to be followed according to the motion parameters.
[0191] In some embodiments, the trajectory following module is also used to: determine the current posture angle of the robot to be controlled based on the coordinate value of the target point to be followed; determine the target angular velocity of the robot to be controlled at the current moment based on the current posture angle and the preset angular velocity extreme value; determine the target linear velocity of the robot to be controlled at the current moment based on the current posture angle and the preset linear velocity extreme value; wherein, the target angular velocity and the target linear velocity constitute the motion parameters of the robot to be controlled.
[0192] In some embodiments, the resampling module is further used to: if it is detected that the current motion state of the robot to be controlled is in a falling state, or if it is detected that the trajectory following time of the robot to be controlled on the current sub-path is greater than a preset time threshold, then the target waypoints on the planned trajectory are resampled to obtain resampled waypoints; wherein, the current sub-path is the path between two adjacent waypoints in the waypoint mixed sequence.
[0193] In some embodiments, the resampling module is further used to: obtain a preset resampling radius; determine a resampling circle based on the resampling radius with the target waypoint as the center; and randomly sample a point on the resampling circle as the resampling waypoint.
[0194] It should be noted that the description of the device embodiment of the present application is similar to the description of the method embodiment described above, and has similar beneficial effects as the method embodiment, so it will not be repeated. For technical details not disclosed in the device embodiment, please refer to the description of the method embodiment of the present application for understanding.
[0195] The present invention provides a computer program product comprising executable instructions, which are computer instructions stored in a computer-readable storage medium. When a processor of an electronic device reads the executable instructions from the computer-readable storage medium and executes the executable instructions, the electronic device performs the method described in the present invention.
[0196] The embodiment of the present application provides a storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the method provided by the embodiment of the present application, for example, Figure 5 The method shown.
[0197] In some embodiments, the storage medium can be a computer-readable storage medium, such as a ferroelectric random access memory (FRAM), 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 (EEPR OM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); it can also be various devices including one or any combination of the above memories.
[0198] In some embodiments, executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0199] As an example, the executable instructions may, but need not necessarily, correspond to a file in a file system, may be stored as part of a file storing other programs or data, for example, in one or more scripts in a Hypertext Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions). As an example, the executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located in one location, or on multiple electronic devices distributed in multiple locations and interconnected by a communication network.
[0200] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are included in the scope of protection of the present application.
Claims
1. A robot control method, characterized in that: The method comprises: Determining at least one new waypoint based on a plurality of original waypoints of the robot to be controlled in the target space; performing linear interpolation on a mixed sequence of waypoints consisting of the original waypoints and the newly added waypoints to obtain a planned trajectory passing through each waypoint in the mixed sequence of waypoints; During the process of controlling the robot to be controlled to move along the planned trajectory, if it is detected that the current motion state of the robot to be controlled satisfies a preset resampling condition, then resampling a target waypoint on the planned trajectory to obtain a resampled waypoint; wherein the target waypoint is the waypoint on the planned trajectory that is closest to the current position of the robot to be controlled; Updating the target waypoints using the resampled waypoints to obtain an updated planned trajectory; Control the robot to be controlled to continue moving according to the updated planned trajectory.
2. The method according to claim 1, characterized in that The step of determining at least one newly added waypoint based on a plurality of original waypoints of the robot to be controlled in the target space includes: Acquire an initial planned path of the robot to be controlled within the target space, the initial planned path comprising an original waypoint sequence consisting of the plurality of original waypoints, the first original waypoint in the original waypoint sequence being the starting point of the initial planned path, and the last original waypoint in the original waypoint sequence being the end point of the initial planned path; For every two adjacent original waypoints in the original waypoint sequence, a path search is performed on a local path between the two original waypoints to obtain at least one newly added waypoint located on the local path.
3. The method according to claim 2, characterized in that The performing a path search on the local path between the two original waypoints to obtain at least one newly added waypoint on the local path includes: Acquiring three-dimensional scene data of the target space, and generating a navigation mesh file for path planning based on the three-dimensional scene data; Simulating the robot to be controlled as a simulation object with preset size parameters; Taking a first of the two original waypoints as a path start point and a second of the two original waypoints as a path end point, and determining a local path between the path start point and the path end point based on the simulation object and the navigation mesh file; At least one new waypoint is planned on the local path.
4. The method according to claim 3, characterized in that Generating a navigation mesh file for path planning based on the three-dimensional scene data includes: Invoking a simulator to determine mesh parameters of a triangular mesh for representing a geometric shape of an object in the target space based on the three-dimensional scene data; A triangular mesh for representing the geometric shape of each object is drawn based on the mesh parameters to obtain the navigation mesh file.
5. The method according to claim 1, wherein Before performing linear interpolation on the mixed waypoint sequence consisting of the original waypoints and the newly added waypoints, the method further includes: Obtaining an identifier for each of the original waypoints and an identifier for each of the newly added waypoints; wherein the identifiers for the original waypoints and the identifiers for the newly added waypoints can represent a sequence of the corresponding waypoints in the mixed sequence of waypoints; All original waypoints and all newly added waypoints are sorted according to the identifiers of the original waypoints and the identifiers of the newly added waypoints to form the mixed sequence of waypoints.
6. The method according to claim 1, characterized in that The linear interpolation of the mixed waypoint sequence consisting of the original waypoints and the newly added waypoints to obtain a planned trajectory passing through each waypoint in the mixed waypoint sequence includes: connecting each two adjacent waypoints in sequence according to the order of the waypoints in the mixed sequence of waypoints to form a broken line graph; wherein the broken line graph includes at least one broken line; Performing linear interpolation on each broken line in the broken line graph to obtain coordinates of multiple trajectory points; Based on the coordinates of the plurality of trajectory points, all trajectory points are connected to obtain a planned trajectory passing through each waypoint in the mixed sequence of waypoints.
7. The method according to claim 6, characterized in that The linear interpolation is performed on each broken line in the broken line graph to obtain the coordinates of multiple trajectory points, including: Get the preset number of track points; Determine the total length of all broken lines in the line graph; Determining a track point distance between every two adjacent track points based on the total length of the line and the number of track points; Linear interpolation is performed on each broken line in the broken line graph according to the distance between the track points to obtain the coordinates of the multiple track points.
8. The method according to any one of claims 1 to 7, characterized in that After obtaining a planned trajectory passing through each waypoint in the mixed sequence of waypoints, the method further includes: Obtaining a preset field of view of the robot to be controlled; Determining, according to the preset field of view, a target point to be followed by the robot to be controlled on the planned trajectory at the current moment and a coordinate value of the target point to be followed; Determining motion parameters of the robot to be controlled at the current moment based on the coordinate values of the target point to be followed; The robot to be controlled is controlled to move to the target point to be followed according to the motion parameters.
9. The method according to claim 8, characterized in that The determining of the motion parameters of the robot to be controlled at the current moment based on the coordinate value of the target point to be followed includes: Determining a current posture angle of the robot to be controlled based on the coordinate values of the target point to be followed; Determining a target angular velocity of the robot to be controlled at the current moment based on the current posture angle and a preset angular velocity extreme value; Based on the current posture angle and the preset linear velocity extreme value, the target linear velocity of the robot to be controlled at the current moment is determined; wherein the target angular velocity and the target linear velocity constitute the motion parameters of the robot to be controlled.
10. The method according to any one of claims 1 to 7, characterized in that If it is detected that the current motion state of the robot to be controlled meets a preset resampling condition, resampling the target waypoints on the planned trajectory to obtain resampled waypoints, including: If it is detected that the current motion state of the robot to be controlled is in a falling state, or if it is detected that the trajectory following time of the robot to be controlled on the current sub-path is greater than a preset time threshold, resampling the target waypoint on the planned trajectory to obtain a resampled waypoint; The current sub-path is a path between two adjacent waypoints in the mixed sequence of waypoints.
11. The method according to claim 10, characterized in that Resampling the target waypoints on the planned trajectory to obtain resampled waypoints includes: Get the preset resampling radius; Determining a resampling circle based on the resampling radius and taking the target waypoint as the center of the circle; A point is randomly sampled on the resampling circle as the resampling path point.
12. A robot control device, characterized in that: The device comprises: a determination module, configured to determine at least one newly added waypoint based on a plurality of original waypoints of the robot to be controlled in the target space; a linear interpolation module for performing linear interpolation on a mixed sequence of waypoints consisting of the original waypoints and the newly added waypoints to obtain a planned trajectory passing through each waypoint in the mixed sequence of waypoints; a resampling module configured to, during the process of controlling the robot to be controlled to move along the planned trajectory, resample a target waypoint on the planned trajectory to obtain a resampled waypoint if it is detected that the current motion state of the robot to be controlled satisfies a preset resampling condition; wherein the target waypoint is the waypoint on the planned trajectory that is closest to the current position of the robot to be controlled; An updating module, configured to update the target waypoints using the resampled waypoints to obtain an updated planned trajectory; The control module is used to control the robot to be controlled to continue moving according to the updated planned trajectory.
13. An electronic device, characterized in that: include: a memory for storing executable instructions; The processor is configured to implement the robot control method according to any one of claims 1 to 11 when executing the executable instructions stored in the memory.
14. A computer-readable storage medium, characterized in that Executable instructions are stored, which are used to cause a processor to execute the executable instructions to implement the robot control method according to any one of claims 1 to 11.
15. A computer program product comprising executable instructions stored in a computer-readable storage medium; When the processor of the electronic device reads the executable instructions from the computer-readable storage medium and executes the executable instructions, the robot control method according to any one of claims 1 to 11 is implemented.