Attachment driving method, mobile robot and storage medium
By building a cost map and global path, determining the edge area and planning the path, the problem of inaccurate edge driving of mobile robots is solved, and accuracy and stability are improved, user needs are met and costs are reduced.
Patent Information
- Application Number
- CN202411181386.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-24
AI Technical Summary
In the prior art, mobile robots are difficult to accurately move with edges, which are costly and have problems with sensor accuracy and delays, resulting in unstable motion trajectory.
By obtaining electronic maps, building cost maps, determining the edge area based on the cost map and global paths, and planning the edge path in this area, controlling the mobile robot to drive along the edge path, and adjusting the strategy in a timely manner to cope with the priority of other robots and environmental changes.
It improves the accuracy of mobile robots' edge driving, meets users' driving needs, reduces costs and enhances the stability of the movement trajectory.
Smart Images

Figure CN119178444A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of robot technology, and in particular to a method for driving close to the edge, a mobile robot and a storage medium. Background Art
[0002] With the development of Internet technology and artificial intelligence technology, mobile robots play a key role in many fields of modern society, assisting people in completing various tasks, such as automatic navigation, environmental monitoring, logistics distribution, etc. However, although these robots have made significant progress, they still face some challenges in edge control.
[0003] The robot works in a variety of environments, and customers have different requirements for the robot's driving. For example, in a KTV environment, customers want the robot to drive along the right side of the aisle, the left side, or along the middle of the aisle. The actual environment of the aisle, pedestrians in the aisle, other robots, etc. all have an impact on the robot's driving along the edge. In the prior art, the robot's edge control method mainly relies on multiple sensor data or pre-built map information. However, the use of multiple sensor data fusion to perform rich classification detection of obstacles increases the cost of the robot, and the accuracy and delay issues of the sensor may cause the motion trajectory of the mobile robot to be unstable and unable to move accurately along the edge. Summary of the invention
[0004] In view of this, an object of an embodiment of the present invention is to provide a method for driving close to the edge, a mobile robot and a storage medium, aiming to solve the technical problem in the prior art that it is difficult for a mobile robot to move close to the edge accurately.
[0005] To solve the above technical problems, the embodiments of the present invention provide the following technical solutions:
[0006] In a first aspect, an embodiment of the present invention provides a method for driving close to the edge of a mobile robot, the method comprising:
[0007] Obtaining an electronic map of the current location, and planning a global path based on the electronic map;
[0008] Constructing a cost map of the electronic map, and determining a border area in a traversable area of the electronic map according to the cost value of the cost map and the global path;
[0009] A wedging path is determined in the wedging area, and the mobile robot is controlled to travel based on the wedging path.
[0010] In some embodiments, determining the edge area in the traversable area of the electronic map according to the cost value of the cost map and the global path includes:
[0011] According to any two adjacent nodes in the global path, determine a set of coordinate points of a trajectory that is perpendicular to a line connecting the two adjacent nodes;
[0012] In the coordinate point set, a coordinate point region that meets a preset cost value is determined as the border region.
[0013] In some embodiments, determining, based on any two adjacent nodes in the global path, a set of coordinate points of a trajectory perpendicular to a line connecting the two adjacent nodes includes:
[0014] A plurality of nodes are arranged on the global path to divide the global path into a plurality of path segments;
[0015] For each path segment, connecting the two end nodes of the path segment to form a first straight line, and calculating the slope of the first straight line;
[0016] Calculate the slope of a second straight line perpendicular to the first straight line based on the slope of the first straight line;
[0017] A set of coordinate points of a track perpendicular to the first straight line is determined according to the coordinates of the path segment, the slope of the second straight line and the grid resolution of the electronic map.
[0018] In some embodiments, determining, in the coordinate point set, a coordinate point region that meets a preset cost value as the border region includes:
[0019] According to the size of the mobile robot and the cost value of the cost map, determining a target coordinate point that meets a preset cost value in the coordinate point set;
[0020] The area enclosed by the target coordinate points is determined as the border area.
[0021] In some embodiments, determining a path along the edge in the edge area and controlling the mobile robot to travel based on the path along the edge includes:
[0022] Performing local path planning according to the current position and the forward direction of the mobile robot to obtain multiple candidate paths;
[0023] Among the plurality of candidate paths, an optimal path that satisfies the edge area is used as the edge path, and the mobile robot is controlled to travel based on the edge path.
[0024] In some embodiments, the method further comprises:
[0025] During the process of driving close to the edge, if other mobile robots are detected, the movement type of the other mobile robots is determined;
[0026] The side-hugging driving strategy of the mobile robot is determined according to the movement type of the other mobile robots.
[0027] In some embodiments, determining the edge-following driving strategy of the mobile robot according to the movement type of the other mobile robots includes:
[0028] If the movement type of the other mobile robots is traveling in opposite directions and they are both located on the same roadside as the mobile robot, then determining the movement priority of the mobile robot and the other robots;
[0029] If the priority of the mobile robot is lower than the priority of the other mobile robots, the mobile robot stops moving forward;
[0030] If the priority of the mobile robot is higher than the priority of the other mobile robots, the other mobile robots are notified to stop moving forward, and the cost map is updated according to the point cloud data corresponding to the other mobile robots;
[0031] Driving around the other mobile robots according to the updated cost map.
[0032] In some embodiments, notifying the other mobile robots to stop moving forward includes:
[0033] A stop movement signal is sent to the other robots, wherein after the other robots obtain the stop movement signal, they respond to the stop movement signal and stop moving forward until the mobile robot successfully bypasses.
[0034] In a second aspect, an embodiment of the present invention provides a mobile robot, comprising:
[0035] A processor and a memory communicatively connected to the processor;
[0036] The memory stores computer program instructions executable by the processor, and when the computer program instructions are called by the processor, the processor executes any one of the methods for driving close to the edge proposed in the first aspect.
[0037] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which is stored computer program instructions executable by a processor, and when the computer program instructions are called by the processor, the processor executes any one of the methods for driving close to the edge proposed in the first aspect.
[0038] Beneficial effects of the embodiments of the present invention: Different from the prior art, the method for driving along the edge provided by the embodiments of the present invention is applied to a mobile robot, and the method includes: obtaining an electronic map of the current position, and planning a global path according to the electronic map; constructing a cost map of the electronic map, and determining a driving along the edge area in the passable area of the electronic map according to the cost value of the cost map and the global path; determining a driving along the edge path in the driving along the edge area, and controlling the mobile robot to drive based on the driving along the edge path.
[0039] In the present invention, the method constructs a cost map of the electronic map, uses the cost map and the global path to determine a passable edge area, and determines an edge path in the edge area, so that the mobile robot can accurately drive along the edge path, thereby improving the accuracy of the mobile robot's edge driving and meeting the user's driving needs for the mobile robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for the description of the prior art or the embodiments. Obviously, the drawings described below only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope of protection. For those of ordinary skill in the art, other related drawings can also be obtained based on these drawings without creative work.
[0041] Figure 1 is a schematic diagram of an application scenario in which a mobile robot drives close to the edge of a road in some embodiments of the present invention;
[0042] Figure 2 is a schematic diagram of the structure of a mobile robot provided by some embodiments of the present invention;
[0043] Figure 3 is a schematic flow chart of a method for driving close to the edge provided by some embodiments of the present invention;
[0044] Figure 4 is a schematic diagram of a global path Ln1 planned by a mobile robot in some embodiments of the present invention;
[0045] Figure 5 is a schematic diagram of determining an initial coordinate point of a mobile robot for one of the path segments of the global path Ln1 in some embodiments of the present invention;
[0046] Figure 6 Schematic diagram of application scenario of a mobile robot driving close to the side of a vehicle in other embodiments of the present invention. DETAILED DESCRIPTION
[0047] In order to make the purpose and advantages of the embodiments of the present invention easier to understand, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The detailed description of the embodiments of the present invention in the drawings below does not limit the scope of protection claimed by the present invention, but only represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0048] It should be noted that, if no conflict is constituted, the various technical features involved in the embodiments of the present invention described below can be combined with each other, and are all within the scope of protection of the present invention. In addition, although the functional modules are divided in the device or structural schematic diagram, and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order than the module division in the device, or in a different order than in the flow chart. In addition, the "first", "second", "third" and other similar expressions used herein do not limit the data and execution order, but are only for the purpose of convenience of explanation and to distinguish between the same or similar items with basically the same functions and effects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features.
[0049] Unless otherwise defined, the technical terms and scientific terms used in this specification have the same meanings as those generally understood by those of ordinary skill in the art of the present invention. The terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. It should be understood that the term "and / or" used in this specification includes any and all combinations of one or more of the related listed items.
[0050] See also Figure 1 , Figure 1 A schematic diagram of an application scenario of a mobile robot driving close to the side of a vehicle in some embodiments of the present invention is shown.
[0051] like Figure 1 As shown, in this application scenario, a mobile robot 100 is included, and the mobile robot 100 is traveling along the edge of the road. In the embodiment of the present invention, the mobile robot 100 can be a mobile robot based on the SLAM system, for example, a cleaning robot, a delivery robot, a pet robot, a transport robot, a nursing robot, and a guiding robot. Among them, the cleaning robot includes but is not limited to a sweeping robot, a vacuuming robot, a mopping robot, and a floor washing robot. Among them, Figure 1 The application scenario shown is illustrated by taking the mobile robot 100 as a sweeping robot.
[0052] It is understandable that the mobile robot 100 is equipped with a walking component, a sensor component (e.g., Figure 1 The laser radar 101, drive component and control component in the sweeping robot 100 shown are connected or disconnected in any suitable manner to work in coordination with each other to complete the corresponding tasks. It should be understood that the sensor component can also be any other suitable component, device or equipment, and the walking component, drive component and control component can be any suitable component, device or equipment. For example, the walking component can be a walking wheel, a walking track or a walking chain, the drive component can be a DC motor, a stepper motor or a servo motor, and the control component can be a controller or a single-chip microcomputer.
[0053] The cleaning robot 100 receives the garbage cleaning task, and plans the global path of the garbage cleaning task according to the garbage cleaning task and using the electronic map (e.g., grid map) of the cleaning site corresponding to the garbage cleaning task. In some embodiments, the user hopes that the cleaning robot 100 can drive along the edge of the road when performing the garbage cleaning task to clean up the garbage on the edge of the road. That is, the user hopes that the cleaning robot 100 drives along the edge of the road in a first direction N to clean up the garbage on the edge of the road.
[0054] In some embodiments, the electronic map divides the cleaning site into different types of areas, such as unknown areas, passable areas, and obstacle areas, according to different types of information such as objects, pedestrians, and obstacles in the cleaning site, so that a global path that drives along the edge of the road can be planned according to different types of areas. The cleaning robot 100 can only drive in the passable area.
[0055] After the global path is planned, the sweeping robot 100 drives along the edge of the road according to the global path to clean up the garbage on the edge of the road. The embodiment of the present invention constructs a corresponding cost map based on the electronic map, wherein the cost values in the cost map correspond to different types of areas in the electronic map. It should be understood that those skilled in the art can also set more or fewer cost values corresponding to different types of areas in the electronic map according to actual needs, or set cost values in the cost map that are different from the embodiment of the present invention and correspond to different types of areas in the electronic map.
[0056] In the embodiment of the present invention, the constructed cost map is a likelihood field, wherein the likelihood field has higher accuracy than an electronic map, and when obstacles, pedestrians, and other objects that need to be avoided such as other robots are detected in the global path, the corresponding cost value in the cost map is updated in real time. According to the cost value corresponding to each type of area in the likelihood field and the global path, a side path can be planned more accurately, so that the robot can travel along the side path to clean up the garbage.
[0057] It should be understood that Figure 1 In the application scenario shown, the mobile robot 100 is only schematically illustrated as a sweeping robot, which does not impose any limitation on the number, structure, type, etc. of the mobile robots 100 in other embodiments or application scenarios. For example, in some other embodiments or application scenarios, the mobile robot 100 may also be any other suitable type of robot, unmanned vehicle, or autonomous mobile device. In addition, the mobile robot 100 in some other embodiments or application scenarios may also include Figure 1 The cleaning robot shown may have more or fewer components, or may have the same Figure 1 Different configurations of the sweeping robot are shown.
[0058] In order to facilitate understanding of the edge-to-edge driving method provided by the embodiment of the present invention, the mobile robot provided by the embodiment of the present invention is first introduced in detail.
[0059] See also Figure 2 , Figure 2 The structural diagram of the mobile robot 100 provided in some embodiments of the present invention is schematically shown.
[0060] like Figure 2 As shown, the mobile robot 100 includes at least one processor 110 and a memory 120 that are communicatively connected. Figure 2 The bus system 130 is used to connect a processor as an example. The various components in the mobile robot 100 are coupled together through the bus system 130, and the bus system 130 is used to realize the connection and communication between these components. It is easy to understand that the bus system 130 includes not only a data bus, but also a power bus, a control bus, and a status signal bus. However, for the sake of clarity and brevity, Figure 2 In the figure, various buses are labeled as bus system 130. It can be understood that Figure 2 The structure shown in the embodiment is only for illustration and does not impose any limitation on the structure of the mobile robot 100. For example, the mobile robot 100 may also include Figure 2 More or fewer components as shown, or with Figure 2 Different configurations shown.
[0061] Specifically, the processor 110 is used to provide computing and control capabilities to control the mobile robot 100 to perform corresponding tasks. For example, the mobile robot 100 is controlled to perform any of the edge-to-edge driving methods provided in the embodiments of the present invention, or to perform the steps in any possible implementation of any of the edge-to-edge driving methods provided in the embodiments of the present invention. Those skilled in the art will appreciate that the processor 110 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0062] The memory 120, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs, instructions and modules, for example, programs, instructions and modules corresponding to the side-by-side driving method in the embodiment of the present invention. In some embodiments, the memory 120 may include a program storage area and a data storage area, and the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the processor 110, etc. The processor 110 executes various functional applications and data processing of the mobile robot 100 by running the non-transitory software programs, instructions and modules stored in the memory 120, implements any side-by-side driving method provided in the embodiment of the present invention, or executes any step in any possible implementation of any side-by-side driving method provided in the embodiment of the present invention. Among them, the memory 120 may include a high-speed random access memory, and may also include a non-transitory memory. For example, at least one disk storage device, a flash memory device or other non-transitory solid-state storage device. In some embodiments, the memory 120 may also include a memory remotely arranged relative to the processor 110, and these remotely arranged memories may be connected to the processor 110 through a communication network. It is understandable that examples of the above-mentioned communication network include but are not limited to the Internet, corporate intranet, local area network, mobile communication network and combinations thereof.
[0063] It is easy to understand that the implementation subject of any of the edge-to-edge driving methods provided in the embodiments of the present invention can be any suitable type of mobile robot with certain computing and control capabilities. In some possible implementations, any of the edge-to-edge driving methods provided in the embodiments of the present invention can be implemented by a processor calling computer program instructions stored in a memory.
[0064] It can be understood from the above that the method for driving close to the edge provided by the embodiment of the present invention can be implemented by various suitable types of mobile robots with certain computing and control capabilities, for example, it can be implemented by the above-mentioned mobile robot 100. The method for driving close to the edge provided by the embodiment of the present invention will be described in detail below in conjunction with the exemplary application and implementation of the mobile robot provided by the embodiment of the present invention.
[0065] See also Figure 3 , Figure 3 The flowchart of the method for driving close to the edge provided by some embodiments of the present invention is schematically shown.
[0066] Those skilled in the art will appreciate that the method for driving close to the edge provided in the embodiment of the present invention can be applied to the above mobile robot (eg, the above mobile robot 100). Specifically, the execution subject of the method for driving close to the edge is one or at least two processors of the mobile robot.
[0067] like Figure 3 As shown, the method for driving along the edge includes but is not limited to the following steps S100-S300:
[0068] S100: Obtain an electronic map of the current location, and plan a global path based on the electronic map.
[0069] Specifically, the mobile robot loads and performs work tasks based on the electronic map. After receiving the work task, the mobile robot parses the work task to obtain the target position corresponding to the work task, and obtains the electronic map corresponding to the current position. The electronic map can be used for mobile robot navigation, positioning and path planning. After obtaining the electronic map, the mobile robot uses various sensors equipped with itself (such as odometer, inertial measurement unit IMU, laser radar or camera, etc.) to determine its position in the electronic map, and then plans a global path for instructing the mobile robot to perform the work task based on the position in the electronic map and the target position, combined with the path planning algorithm (such as A* algorithm, Dijkstra algorithm, etc.).
[0070] In some embodiments, the electronic map can be pre-generated by an external system (such as GPS, SLAM system or laser radar, etc.) and stored in the memory of the mobile robot. When the mobile robot performs a task, the electronic map can be directly loaded. In some other embodiments, the mobile robot can also obtain real-time environmental data through various sensors equipped with itself (such as laser radar, camera and depth sensor, etc.), and use SLAM (Simultaneous Localization and Mapping) algorithm to build an electronic map of the environment.
[0071] It should be understood that the electronic map can be a grid map. In the grid map, different types of environmental data are divided into different types of areas, and each type of area corresponds to a different grid score. For example, in some embodiments, the grid map includes three different types of areas, namely unknown areas, passable areas, and obstacle areas, and the grid scores corresponding to the unknown areas, passable areas, and obstacle areas are -1, 0, and 1, respectively. In laser SLAM, the area scanned and penetrated by the laser beam is the passable area of the grid map, the obstacles scanned by the laser beam are the obstacle areas of the grid map, and the areas that cannot be scanned by the laser beam are the unknown areas of the grid map. The mobile robot can only travel in the passable area.
[0072] It is easy to understand that the electronic map can also be any other suitable type of map, such as a vector map. Those skilled in the art can also set other corresponding scores for different types of areas in the electronic map according to actual needs, and the scores corresponding to different types of areas can be the same or different.
[0073] S200: constructing a cost map of the electronic map, and determining a border area in a traversable area of the electronic map according to the cost value of the cost map and the global path.
[0074] Among them, the cost map is a map generated on the basis of the electronic map. It assigns a "cost value" to each location in the electronic map, which is used to indicate the difficulty of the mobile robot to drive to the location or the risk of collision with obstacles. The edge area refers to the area where the mobile robot can drive along the edge. The edge area is close to obstacles or map boundaries and has a relatively high cost value, but it is still passable within a certain range.
[0075] Specifically, according to the obstacle areas marked in the electronic map (e.g., grid map) (i.e., areas with a grid score value of 1), a very high cost value (e.g., the cost value may be 1.0) is assigned to the obstacle areas to indicate inaccessible areas, and the mobile robot cannot drive into these areas.
[0076] In the area around the obstacle, different cost values are assigned according to the distance from the obstacle. For example, the closer the area is to the obstacle, the higher the cost value is, indicating that the risk of collision with the obstacle is greater; the farther the area is from the obstacle, the lower the cost value is, indicating that the robot is safer.
[0077] For example, the likelihood field construction model of the cost map is:
[0078] Cost value cost=exp(-1.0*weight*value), where weight is a weight value that affects the trend of the likelihood field change. Optionally, weight is set to 6.0.
[0079] After the cost map is built, the mobile robot sets distance constraints (such as the distance to obstacles or boundaries) based on the pre-planned global path and the cost value of the cost map, and selects the edge area in the electronic map that is close to obstacles or boundaries and is located in the passable area. The edge area should meet the passable condition, that is, the cost value in the cost map is lower than the inaccessible threshold (for example, if the inaccessible threshold is 0.7, the cost value of the edge area in the cost map should be less than 0.7).
[0080] In some embodiments, according to the cost value and the global path of the cost map, the edge area is determined in the traversable area of the electronic map, specifically including but not limited to the following steps S210-S220:
[0081] S210: According to any two adjacent nodes in the global path, determine a set of coordinate points of a trajectory that is perpendicular to a line connecting the two adjacent nodes.
[0082] Specifically, any two adjacent nodes in the global path are selected, the direction vector of the line connecting the two adjacent nodes is determined according to the coordinates of the two adjacent nodes, and a reference vector perpendicular to the direction vector is calculated according to the direction vector. Then, starting from the midpoint, endpoint (i.e., two adjacent nodes) or other points of the line connecting the two adjacent nodes, multiple coordinate points are determined along the direction of the reference vector (i.e., the vertical direction) to obtain a set of coordinate points of the trajectory that is perpendicular to the line connecting the two adjacent nodes.
[0083] In some embodiments, assuming that the coordinates of two adjacent nodes are A(x1, y1) and B(x2, y2), the coordinate point is determined from the midpoint of the line connecting the two adjacent nodes. The coordinates of the midpoint are The trajectory point set along the vertical direction is represented by parameter t, then any point P in the vertical direction t The coordinates can be expressed as:
[0084]
[0085] Where t is a scalar, indicating the distance moved in the vertical direction. Represents the reference vector. According to specific application requirements, the value range of t can be set from negative to positive values to determine the corresponding trajectory coordinate points. For example, a series of t values are selected, and the range of t can be from -L to L, where L is the preset trajectory length or distance, to determine multiple trajectory coordinate points, thereby obtaining a set of trajectory coordinate points that are perpendicular to the line connecting two adjacent nodes.
[0086] In some embodiments, according to any two adjacent nodes in the global path, a set of coordinate points of a trajectory perpendicular to the line connecting the two adjacent nodes is determined, including but not limited to the following steps S2101-S2104:
[0087] S2101: A plurality of nodes are set on the global path to divide the global path into a plurality of path segments.
[0088] The global path consists of a series of consecutive nodes, and the nodes represent the positions of the mobile robot on the map. Assume that the global path is represented by a node sequence {P1, P2, ..., P n}, where each node P i Represents a coordinate point on the global path, i = 1, 2, ..., n. By setting multiple nodes, the global path is divided into multiple path segments, that is, the continuous nodes in the global path are divided into multiple paragraphs. The path between every two adjacent nodes is called a path segment, and each path segment is a straight line or curve path formed by two adjacent nodes. For the node sequence {P1, P2, ..., P n}, the multiple path segments obtained by division are: path segment 1 (P1→P2), path segment 2 (P2→P3), path segment 3 (P3→P4), ..., path segment n-1 (P n-1 →P n ).
[0089] See also Figure 4 , Figure 4 The global path Ln1 planned by the mobile robot in some embodiments of the present invention is schematically shown. The global path Ln1 includes 10 consecutive nodes P1 to P10, and the path between every two adjacent nodes forms a path segment, that is, the global path Ln1 includes 9 path segments, namely, path segment 1 (P1, P2), path segment 2 (P2, P3), path segment 3 (P3, P4), path segment 4 (P4, P5), path segment 5 (P5, P6), path segment 6 (P6, P7), path segment 7 (P7, P8), path segment 8 (P8, P9) and path segment 9 (P9, P10).
[0090] S2102: For each path segment, connect the two end nodes of the path segment to form a first straight line, and calculate the slope of the first straight line.
[0091] S2103: Calculate the slope of a second straight line perpendicular to the first straight line according to the slope of the first straight line.
[0092] Specifically, for each path segment in the global path, the nodes at both ends of the path segment are connected to obtain the first straight line corresponding to the path segment. i and P i+1 The coordinates of P are i (x i ,y i ) and P i+1 (x i+1 ,y i+1 ), then the slope of the first straight line can be calculated
[0093] Of course, there may be other suitable methods to calculate the slope of the first straight line, and those skilled in the art may adopt any suitable method to calculate the slope of the first straight line.
[0094] Mathematical knowledge shows that the product of the slopes of two perpendicular lines is -1. After calculating the slope of the first line, the slope m2 of the second line perpendicular to the first line can be calculated based on the slope of the first line. That is, the slope m2 of the second line is equal to the ratio of -1 to the slope m1 of the first line, that is, m2 = -1 / m1.
[0095] Of course, there may be other suitable methods to calculate the slope of the second straight line, and those skilled in the art may adopt any suitable method to calculate the slope of the second straight line.
[0096] S2104: Determine a set of coordinate points of a track perpendicular to the first straight line according to the coordinates of the path segment, the slope of the second straight line, and the grid resolution of the electronic map.
[0097] Among them, the grid map is composed of discrete grids, and the length and width of a grid are the grid resolution r.
[0098] Specifically, for each path segment, the coordinates of the two end nodes in the path segment are obtained, and starting from any end node, a number of reference coordinate points located on the path segment are generated along the path segment at a preset interval (for example, grid resolution) until the generated coordinate point is no longer located in the path segment, thereby obtaining a number of reference coordinate points, wherein the coordinates of the several reference coordinate points can be expressed as (a1, b1), (a2, b2), ..., (a n , b n).
[0099] Then, the coordinates of several reference coordinate points are substituted into the following formula to obtain several initial coordinate points of the trajectory perpendicular to the first straight line, where the coordinates of several initial coordinate points can be expressed as (c1, d1), (c2, d2), ..., (c n , d n ), and use several initial coordinate points as the coordinate point set of the trajectory perpendicular to the first straight line. The formula is:
[0100] c i =a i +i*r*cos(arctanm2)
[0101] d i =b i +i*r*sin(arctanm2)
[0102] Among them, c i and d i are the horizontal and vertical coordinates of the i-th initial coordinate point, respectively, i and b i They respectively represent the horizontal coordinate and vertical coordinate of the i-th reference coordinate point, i=1, 2, ..., n, n represents the number of reference coordinate points, r represents the preset interval distance (ie, grid resolution), and m2 represents the slope of the second straight line.
[0103] See also Figure 5 , Figure 5 The schematic diagram schematically shows a mobile robot determining the corresponding initial coordinate points for the path segment 6 (P6, P7) of the global path Ln1 in some embodiments of the present invention. Figure 5 As shown, the reference coordinate points in path segment 6 (P6, P7) are A1 to A9, and the coordinate points of the left part and the right part are the corresponding partial initial coordinate points.
[0104] It is easy to understand that Figure 5 Only some of the initial coordinate points determined for the path segment 6 (P6, P7) of the global path Ln1 are schematically shown. The final determined initial coordinate points may include fewer or more coordinate points. Those skilled in the art may determine an appropriate number of initial coordinate points as needed.
[0105] It should be understood that there may be other suitable methods to determine the set of coordinate points of the trajectory that is perpendicular to the first straight line, and those skilled in the art may adopt any suitable method according to actual needs.
[0106] S220: In the coordinate point set, determine a coordinate point region that meets a preset cost value as a border region.
[0107] After determining a set of coordinate points of a track perpendicular to the line connecting two adjacent nodes, a coordinate point region in the set of coordinate points whose cost value meets a preset cost value is determined as a border region.
[0108] Specifically, the coordinate points in the coordinate point set are mapped to the corresponding grid of the cost map, and the cost value of the coordinate point is found, and the cost value of the coordinate point is compared with the preset cost value. If the cost value of the coordinate point meets the preset cost value, for example, the cost value of the coordinate point is less than or equal to the preset cost value, it means that the road is passable and can be driven along the edge. After comparing and screening the cost values of all coordinate points in the coordinate point set, the coordinate points that meet the preset cost value are retained, and the coordinate points that do not meet the preset cost value are removed, and then the area corresponding to the retained coordinate points is used as the edge area, where the edge area represents the area where the mobile robot can drive along the edge.
[0109] It is easy to understand that those skilled in the art can set and determine the preset cost value according to actual application needs and historical experience data, and the embodiments of the present invention do not impose any limitation on this. For example, the preset cost value can be 0.7, 0.8 or any other suitable cost value.
[0110] In some embodiments, in the coordinate point set, a coordinate point region that meets a preset cost value is determined as a border region, specifically including but not limited to the following steps S2201-S2202:
[0111] S2201: According to the size of the mobile robot and the cost value of the cost map, determine the target coordinate point that meets the preset cost value in the coordinate point set.
[0112] S2202: Determine the area enclosed by the target coordinate points as the border area.
[0113] Specifically, it is known that the mobile robot has a known size W*L, where W is the width and L is the length. Since the mobile robot occupies multiple grids, in order to determine whether a coordinate point is suitable for the mobile robot to pass, it is necessary to consider whether the cost value of the grid in the surrounding area of the coordinate point (the size of the area is determined by the size of the mobile robot) meets the passage requirements, that is, whether it meets the preset cost value.
[0114] For each initial coordinate point in the coordinate point set, the number of grids occupied by the mobile robot on the electronic map is calculated according to the size W*L of the mobile robot and the grid resolution r of the electronic map, so as to determine the surrounding coverage area of the initial coordinate point. Then, the cost values of all grids in the surrounding coverage area are compared with the preset cost value to determine whether the cost values of all grids meet the preset cost value.
[0115] In some embodiments, if the cost values of all grids in the surrounding coverage area are less than or equal to the preset cost value, it means that the cost values of all grids meet the preset cost value, and the initial coordinate point is the target coordinate point that meets the preset cost value. The initial coordinate point is retained and used as the target coordinate point.
[0116] If the cost value of any grid among all the grids in the surrounding coverage area is greater than the preset cost value, it means that the cost value of the grid in the surrounding coverage area does not meet the preset cost value, and the initial coordinate point is not the target coordinate point that meets the preset cost value, and the initial coordinate point is discarded.
[0117] After obtaining several target coordinate points, a convex hull algorithm (eg, Graham Scan algorithm and JarvisMarch algorithm, etc.) is used to calculate the minimum convex area of the several target coordinate points, and a first area enclosed by the several target coordinate points is obtained, and the first area is used as the border area.
[0118] In some embodiments, if the target coordinate points have formed a connected area, a boundary tracking algorithm is used to start from a certain boundary point and track the boundary points in a clockwise or counterclockwise direction until returning to the starting boundary point, connecting all boundary points to form a continuous boundary line, thereby obtaining a closed area, that is, determining the border area.
[0119] S300: Determine a side-contact path in the side-contact area, and control the mobile robot to travel based on the side-contact path.
[0120] Specifically, after determining the edge area, the mobile robot plans a specific edge path in the edge area. In the edge area, the mobile robot uses a local path planning algorithm to generate an initial path along obstacles or map boundaries based on the cost value of the cost map, path length, and distance constraints, and smoothes the initial path to reduce unnecessary sharp turns and complex paths to obtain the final edge path. The mobile robot is controlled and executed according to the generated edge path, and can drive along the predetermined edge path to perform the corresponding work task. For example, when the mobile robot is a sweeping robot, the sweeping robot can drive along the edge path to clean up garbage on the edge of the road.
[0121] In some embodiments, a side-adjacent path is determined in the side-adjacent area, and the mobile robot is controlled to travel based on the side-adjacent path, specifically including but not limited to the following steps S310-S320:
[0122] S310: Perform local path planning based on the current position and forward direction of the mobile robot to obtain multiple candidate paths.
[0123] S320: Among multiple candidate paths, the optimal path that satisfies the edge area is used as the edge path, and the mobile robot is controlled to travel based on the edge path.
[0124] Specifically, the mobile robot obtains the current position and the direction of travel through various sensors equipped on itself, and performs local path planning in the local planning area based on the current position and the direction of travel using a local path planning algorithm (such as the dynamic window method (DWA), the artificial potential field method (APF) and the sampling method, etc.), and obtains multiple different candidate paths. Among them, the local planning area is a fan-shaped area around the current position, which can be determined based on the sensor range and kinematic model of the mobile robot. The central angle of the fan is consistent with the direction of travel of the mobile robot, and the radius of the fan can be determined according to the effective detection range of the sensor. The candidate path is a set of curves or straight line segments, indicating the possible driving direction of the mobile robot.
[0125] After obtaining multiple different candidate paths, for each candidate path, the cost value of each coordinate point passed by each candidate path is calculated to obtain the total cost value of each candidate path, and the total cost value is the sum of the cost values of all coordinate points on the candidate path. Among them, the candidate path with a smaller total cost value has a higher priority. Then, multiple first candidate paths located in the edge area are screened out, and among the multiple first candidate paths, the candidate path with the smallest total cost value is selected as the optimal path, so that the optimal path is used as the edge path. The mobile robot controls and executes according to the edge path, and drives along the edge path to perform the corresponding work task.
[0126] In some embodiments, for multiple different candidate paths, factors such as collision detection, target consistency, and path smoothness can also be evaluated, and the evaluation results can be combined with the total cost value to obtain a comprehensive score, and each candidate path is assigned a comprehensive score. Based on the comprehensive score, the candidate path with the highest score is selected as the optimal path, thereby obtaining an edge-fitting path.
[0127] See also Figure 6 , Figure 6 Schematic diagrams of application scenarios of mobile robots driving along the side of the road in some other embodiments of the present invention are shown. In some embodiments, when the current mobile robot is driving along the side of the road, it may encounter other mobile robots, such as Figure 6 The mobile robot 400 shown in FIG. 4 is a mobile robot 400. At this time, it is necessary to re-determine the edge driving strategy of the current mobile robot according to the moving directions, priorities, etc. of other mobile robots.
[0128] In some embodiments, the method for driving close to the edge further includes but is not limited to the following steps S400-S500:
[0129] S400: During the process of driving close to the edge, if other mobile robots are detected, the movement type of the other mobile robots is determined.
[0130] Specifically, when the mobile robot is driving along the edge of the path, it can detect whether there are other mobile robots in the surrounding environment through various sensors equipped on itself (such as laser radar, camera, ultrasonic sensor, etc.). If other mobile robots are detected in the surrounding environment, the position, speed, movement direction and other movement information of the other mobile robots are obtained through sensor data, and the movement trajectory of the other mobile robots is obtained by analyzing and processing the movement information, so as to determine the movement type of the other mobile robots. It can be understood that the movement type includes the movement direction.
[0131] In some embodiments, if several mobile robots are in the same multi-robot collaborative system, the mobile robots can share location information and status information through a communication network, so that the mobile robots can detect whether there are other mobile robots in the surrounding environment and determine the movement type of other mobile robots.
[0132] S500: Determine the edge-following driving strategy of the mobile robot according to the movement types of other mobile robots.
[0133] Specifically, if the driving path of other mobile robots has a potential intersection with the current mobile robot, the current mobile robot calculates the possible intersection point in advance and adjusts the driving path at an appropriate time to avoid other mobile robots, such as slowing down, turning or stopping briefly to let other mobile robots pass first.
[0134] In some embodiments, if the space of the venue allows the current mobile robot to pass in parallel with other mobile robots at the intersection, the current mobile robot can choose to accelerate through the intersection area while keeping a safe distance from other mobile robots to avoid collision.
[0135] In a possible implementation, the current mobile robot may also notify other mobile robots it encounters to give way when its own work task is urgent, to ensure that it can perform its work task in a timely and accurate manner.
[0136] Through the above method, the current mobile robot dynamically adjusts the edge driving strategy according to the movement type of other mobile robots, which can ensure the safe and efficient execution of tasks and improve the accuracy of task execution.
[0137] In some embodiments, the side-by-side driving strategy of the mobile robot is determined according to the movement type of other mobile robots, including but not limited to the following steps S510-S540:
[0138] S510: If the movement type of the other mobile robots is traveling in the opposite direction and they are located on the same roadside as the mobile robot, then the movement priority of the mobile robot and the other robots is determined.
[0139] Specifically, if it is determined that the movement type of the other mobile robots is traveling in opposite directions (i.e., the movement directions of the other mobile robots and the current mobile robot are traveling in opposite directions), and the other mobile robots and the current mobile robot are located on the same edge (i.e., traveling along the same edge), then the priorities of the current mobile robot and the other mobile robots are obtained and determined, so as to determine the edge-traveling strategy of the current mobile robot according to the priorities between the current mobile robot and the other mobile robots. Obviously, when the current mobile robot and the other mobile robots are traveling along the middle, left edge, or right edge of the road, the other mobile robots and the current mobile robot are located on the same edge.
[0140] For example, Figure 6 As shown, the moving direction of the current mobile robot 100 is the first direction N, and the moving direction of the other mobile robot 400 is the second direction M. Obviously, the first direction N and the second direction M are moving in opposite directions. However, the other mobile robots 400 are driving along the middle of the road, and the current mobile robot 100 is driving along the edge of the road. Therefore, the other mobile robots 400 and the current mobile robot 100 are not driving on the same edge, and there is no possible intersection point, so there is no need to re-determine the edge driving strategy of the current mobile robot.
[0141] S520: If the priority of the mobile robot is lower than the priority of other mobile robots, the mobile robot stops moving forward.
[0142] S530: If the priority of the mobile robot is higher than the priorities of other mobile robots, notify the other mobile robots to stop moving forward, and update the cost map according to the point cloud data corresponding to the other mobile robots.
[0143] Specifically, the priority of the current mobile robot is compared with the priorities of other mobile robots. If the priority of the current mobile robot is lower than the priorities of other mobile robots, the current mobile robot stops moving forward and waits for other mobile robots to pass through the intersection area first, and then the current mobile robot passes.
[0144] If the priority of the current mobile robot is higher than that of other mobile robots, the current mobile robot communicates with other mobile robots through a suitable communication network (such as Wi-Fi, 4G, 5G, etc.) and sends a stop command to other mobile robots, so that other mobile robots stop moving after receiving the stop command.
[0145] Then, the other mobile robots that have stopped moving are regarded as obstacles, and obstacle point cloud data about the other mobile robots that have stopped moving are obtained through sensors, and the obstacle point cloud data are projected onto the electronic map to update the electronic map, so that a new cost map can be constructed based on the updated electronic map.
[0146] In some embodiments, notifying other mobile robots to stop moving forward specifically includes but is not limited to the following steps S5301:
[0147] S5301: Send a stop movement signal to other robots, wherein after receiving the stop movement signal, other robots respond to the stop movement signal and stop moving forward until the mobile robot successfully bypasses.
[0148] Specifically, when the priority of the current mobile robot is higher than the priority of other mobile robots, the current mobile robot establishes a communication connection with the other mobile robots, and the current mobile robot sends a stop moving signal to the other robots through an appropriate communication method, so that after receiving the stop moving signal, the other mobile robots respond to the stop moving signal and stop moving forward until the current mobile robot successfully bypasses, that is, the current mobile robot successfully drives along the side of other mobile robots.
[0149] It should be understood that the stop movement signal may be a signal in any suitable form such as an instruction, a command, a request or a data packet.
[0150] S540: Driving around other mobile robots according to the updated cost map.
[0151] Specifically, after updating the cost map to obtain an updated cost map, the current mobile robot plans a candidate path in the edge area, and selects the optimal candidate path as the edge path according to the cost value of the updated cost map, thereby bypassing other mobile robots along the edge path.
[0152] To summarize, the edge-driving method provided in an embodiment of the present invention is applied to a mobile robot, and the method includes: obtaining an electronic map of the current location, and planning a global path based on the electronic map; constructing a cost map of the electronic map, and determining an edge-driving area in a passable area of the electronic map based on the cost value of the cost map and the global path; determining an edge-driving path in the edge area, and controlling the mobile robot to drive based on the edge path.
[0153] In the present invention, the method constructs a cost map of the electronic map, uses the cost map and the global path to determine a passable edge area, and determines an edge path in the edge area, so that the mobile robot can accurately drive along the edge path, thereby improving the accuracy of the mobile robot's edge driving and meeting the user's driving needs for the mobile robot.
[0154] An embodiment of the present invention provides a computer-readable storage medium, on which computer program instructions executable by a processor are stored. When the computer program instructions are called by the processor, the processor executes any one of the methods for driving close to the edge provided by the embodiment of the present invention, or executes the steps in any one of the possible implementation methods of any one of the methods for driving close to the edge provided by the embodiment of the present invention.
[0155] In some embodiments, the storage medium may be a flash memory, a hard disk, an optical disk, a register, a magnetic surface storage, a removable disk, a CD-ROM, a random access memory (RAM), a read-only memory (ROM), an electrically programmable ROM, and an electrically erasable programmable ROM, or any other form of storage medium known in the technical field, or various devices including one or any combination of the above storage media.
[0156] In some embodiments, computer program 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.
[0157] As an example, computer program instructions may, but do not necessarily, correspond to a file in a file system, may be stored as part of a file that stores 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).
[0158] As an example, the computer program instructions may be deployed to be executed on a computing device (including devices such as smart terminals and servers), or on multiple computing devices located at one location, or on multiple computing devices distributed at multiple locations and interconnected by a communication network. It is easy to understand that all or part of the steps of the method described in the embodiments of the present invention may be directly implemented using electronic hardware or processor executable computer program instructions, or a combination of the two.
[0159] Those skilled in the art will appreciate that the embodiments provided by the present invention are only illustrative, and the order of writing the steps in the method of the embodiment does not mean a strict execution order and does not constitute any limitation on the implementation process. The order can be adjusted, merged and deleted according to actual needs, and the modules or sub-modules, units or sub-units in the device or system of the embodiment can be merged, divided and deleted according to actual needs. For example, the division of units is only a logical function division, and there can be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.
[0160] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course can also be implemented by hardware. Those skilled in the art can understand that all or part of the processes in the above embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0161] It should be noted that the above embodiments are intended to illustrate the technical concept and features of the present invention, and their purpose is to enable people familiar with this technology to understand the content of the present invention and implement it accordingly, and cannot be used to limit the scope of protection of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiments can be implemented according to the technical solutions recorded in the embodiments of the present invention, or some of the technical features can be equivalently replaced. It can be understood that these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and should be regarded as equal changes and modifications based on the embodiments of the present invention, and should all fall within the scope of the claims of the present invention.
Claims
1. A method for driving along the edge of a vehicle, applied to a mobile robot, characterized in that: The method comprises: Obtaining an electronic map of the current location, and planning a global path based on the electronic map; Constructing a cost map of the electronic map, and determining a border area in a traversable area of the electronic map according to the cost value of the cost map and the global path; A wedging path is determined in the wedging area, and the mobile robot is controlled to travel based on the wedging path.
2. The method according to claim 1, characterized in that The step of determining the edge area in the traversable area of the electronic map according to the cost value of the cost map and the global path includes: According to any two adjacent nodes in the global path, determine a set of coordinate points of a trajectory that is perpendicular to a line connecting the two adjacent nodes; In the coordinate point set, a coordinate point region that meets a preset cost value is determined as the border region.
3. The method according to claim 2, characterized in that The step of determining, based on any two adjacent nodes in the global path, a set of coordinate points of a trajectory that is perpendicular to a line connecting the two adjacent nodes, comprises: A plurality of nodes are arranged on the global path to divide the global path into a plurality of path segments; For each path segment, connecting the two end nodes of the path segment to form a first straight line, and calculating the slope of the first straight line; According to the slope of the first straight line, the slope of the second straight line perpendicular to the first straight line is calculated; A set of coordinate points of a track perpendicular to the first straight line is determined according to the coordinates of the path segment, the slope of the second straight line and the grid resolution of the electronic map.
4. The method according to claim 2, characterized in that: The step of determining, in the coordinate point set, a coordinate point region that meets a preset cost value as the border region includes: According to the size of the mobile robot and the cost value of the cost map, determining a target coordinate point that meets a preset cost value in the coordinate point set; The area enclosed by the target coordinate points is determined as the border area.
5. The method according to claim 1, characterized in that The step of determining a path along the edge in the edge area and controlling the mobile robot to travel based on the path along the edge includes: Performing local path planning according to the current position and the forward direction of the mobile robot to obtain multiple candidate paths; Among the plurality of candidate paths, an optimal path satisfying the edge-contact area is used as the edge-contact path, and the mobile robot is controlled to travel based on the edge-contact path.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: During the process of driving close to the edge, if other mobile robots are detected, the movement type of the other mobile robots is determined; The side-hugging driving strategy of the mobile robot is determined according to the movement type of the other mobile robots.
7. The method according to claim 6, characterized in that The step of determining the edge-following driving strategy of the mobile robot according to the movement type of the other mobile robot includes: If the movement type of the other mobile robots is traveling in opposite directions and they are both located on the same roadside as the mobile robot, then determining the movement priority of the mobile robot and the other robots; If the priority of the mobile robot is lower than the priority of the other mobile robots, the mobile robot stops moving forward; If the priority of the mobile robot is higher than the priority of the other mobile robots, the other mobile robots are notified to stop moving forward, and the cost map is updated according to the point cloud data corresponding to the other mobile robots; Driving around the other mobile robots according to the updated cost map.
8. The method according to claim 7, characterized in that The notifying the other mobile robots to stop moving forward includes: A stop movement signal is sent to the other robots, wherein after the other robots obtain the stop movement signal, they respond to the stop movement signal and stop moving forward until the mobile robot successfully bypasses.
9. A mobile robot, characterized in that: include: A processor and a memory communicatively connected to the processor; The memory stores computer program instructions executable by the processor, and when the computer program instructions are called by the processor, the processor executes the method for driving close to the edge as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions executable by a processor, and when the computer program instructions are called by the processor, the processor executes the method for driving close to the edge as described in any one of claims 1 to 8.
