Global path navigation method, device, terminal equipment and storage medium
By generating a cost map and detecting the value of the generation, the problem of insufficient narrow channel passage through mobile robots in the prior art is solved, and precise narrow channel detection and safe passage are achieved.
Patent Information
- Application Number
- CN202210603086.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-30
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-05-30
AI Technical Summary
The prior art is difficult to improve the narrow channel passing capability without reducing the size of the mobile robot, and the existing path planning and control algorithms lack the accuracy when detecting narrow channels.
By generating a cost map, assigning different contingency values to the raster, planning global paths based on the cost map, and detecting contingency values along the path to identify narrow channels, controlling the robot to move along the global path to pass or bypass narrow channels.
It realizes accurate detection and safe passage of narrow channels without reducing the size of the robot, improving the narrow channel passage ability of mobile robots.
Smart Images

Figure CN114995416B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of path planning technology, and in particular relates to a global path navigation method, apparatus, terminal device and storage medium. Background Art
[0002] Certain mobile robot applications often involve numerous narrow passages. A mobile robot's ability to navigate narrow passages directly determines its navigational flexibility. Improving a mobile robot's ability to navigate narrow passages can be achieved by reducing its size, but this compromises its stability. Alternatively, the robot's path planning and control algorithms can be enhanced to accurately control its passage through narrow passages, ensuring its size allows for safe navigation. Before controlling a mobile robot through narrow passages, it must first detect the passages. The accuracy of narrow passage detection directly impacts the robot's ability to navigate narrow passages. Summary of the Invention
[0003] The embodiments of the present application provide a global path navigation method, apparatus, terminal device, and storage medium, which can accurately detect narrow channels on the motion path of a mobile robot.
[0004] A first aspect of an embodiment of the present application provides a global path navigation method, including:
[0005] Based on a cost map of the operating environment, a global path is planned from the mobile robot's current position to the target position. Grids within a preset expansion radius from obstacles in the cost map have a first-generation value, and grids outside the preset expansion radius from obstacles have a second-generation value. The second-generation value is smaller than the first-generation value and is negatively correlated with the distance of the grid from the obstacle.
[0006] controlling the mobile robot to move along the global path in the working environment;
[0007] During the process of the mobile robot moving along the global path in the working environment, traversing a first path point within a first preset distance from the mobile robot along the global path, and detecting a cost value of the first path point;
[0008] If there is a second path point among the first path points whose cost value is greater than a preset cost threshold, determining that the second path point is in a narrow channel;
[0009] Based on the narrow passage, the mobile robot is controlled to move in the working environment.
[0010] A second aspect of an embodiment of the present application provides a global path navigation device, including:
[0011] A path planning unit is configured to plan a global path from the current position of the mobile robot to a target position based on a cost map of the operating environment, wherein cells within a preset expansion radius from obstacles in the cost map have a first-generation value, and cells outside the preset expansion radius from obstacles have a second-generation value, wherein the second-generation value is less than the first-generation value and is negatively correlated with the distance of the cell from the obstacle;
[0012] a first motion control unit, configured to control the mobile robot to move along the global path in the working environment;
[0013] a cost value detection unit, configured to, during the process of the mobile robot moving along the global path in the working environment, traverse a first path point within a first preset distance from the mobile robot along the global path, and detect a cost value of the first path point;
[0014] a narrow channel detection unit, configured to determine that a second path point is in a narrow channel if there is a second path point among the first path points whose cost value is greater than a preset cost threshold;
[0015] The second motion control unit is configured to control the mobile robot to move in the working environment based on the narrow channel.
[0016] A third aspect of an embodiment of the present application provides a robot comprising a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the global path navigation method as described in the first aspect of the embodiment of the present application are implemented.
[0017] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the global path navigation method described in the first aspect of the embodiment of the present application.
[0018] The first aspect of an embodiment of the present application provides a global path navigation method. First, based on a cost map, a global path from the current position of the mobile robot to the target position is planned, and the mobile robot is controlled to move along the global path in the working environment. In the cost map, the grids within a preset expansion radius from the obstacle have a first-generation value, and the grids outside the preset expansion radius from the obstacle have a second-generation value. The second-generation value is smaller than the first-generation value and is negatively correlated with the distance of the grid from the obstacle. Then, the first path point within a first preset distance from the mobile robot is traversed along the global path. If there is a second path point in the first path point whose cost value is greater than a preset cost threshold, it is determined that the second path point is in a narrow channel. Finally, based on the narrow channel, the mobile robot is controlled to move in the working environment. The narrow channel on the movement path of the mobile robot can be accurately detected, thereby improving the narrow channel passing ability of the mobile robot.
[0019] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0021] Figure 1 This is a first flow chart of the global path navigation method provided by an embodiment of the present application;
[0022] Figure 2 This is a second flow chart of the global path navigation method provided in an embodiment of the present application;
[0023] Figure 3 This is a third flow chart of the global path navigation method provided in an embodiment of the present application;
[0024] Figure 4 This is a fourth flow chart of the global path navigation method provided in an embodiment of the present application;
[0025] Figure 5 This is a fifth flow chart of the global path navigation method provided in an embodiment of the present application;
[0026] Figure 6 This is a sixth flow chart of the global path navigation method provided in an embodiment of the present application;
[0027] Figure 7 is a schematic diagram of a detection frame provided in an embodiment of the present application;
[0028] Figure 8 This is a schematic diagram of an image mapped with ranging data points provided in an embodiment of the present application.
[0029] Figure 9 This is a schematic diagram of the structure of the global path navigation device provided by an embodiment of the present application;
[0030] Figure 10 It is a structural diagram of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0032] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0033] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0034] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0035] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0036] An embodiment of the present application provides a global path navigation method, which can be executed by a processor of a terminal device when running a corresponding computer program. By accurately detecting narrow channels on the motion path of a mobile robot and controlling the movement of the mobile robot in an operating environment based on the narrow channels, the narrow channel passing ability of the mobile robot can be improved.
[0037] In applications, the terminal device can be a mobile robot, or it can be a (cloud) server, mobile phone, tablet computer, wearable device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), or other computing device that can communicate with and control the mobile robot. The mobile robot can be any type of robot with operational and mobility capabilities, such as a sweeping robot, a disinfection robot, a plant protection drone, an automated guided vehicle, etc.
[0038] like Figure 1 As shown, the global path navigation method provided in the embodiment of the present application includes the following steps S100 to S105:
[0039] Step S100: Expand the grid map of the working environment to generate a cost map, and then proceed to step S101.
[0040] In applications, the operating environment refers to the environment in which the mobile robot is currently located, and any geographical location where the mobile robot is operating or waiting to operate. Depending on the type of mobile robot, the operating environment also varies. For example, when the mobile robot is a sweeping robot, the operating environment is the home, office, production site, etc. where the sweeping robot is cleaning or waiting to be cleaned; when the mobile robot is a disinfection robot, the operating environment is the home, office, production site, etc. where the disinfection robot is disinfecting or waiting to be disinfected; when the mobile robot is a plant protection robot, the operating environment is the farmland, garden, etc. where the plant protection robot is performing plant protection operations or waiting to perform plant protection operations; when the mobile robot is an automatic guided vehicle, the operating environment is the warehouse, production site, etc. where the automatic guided vehicle is performing or waiting to perform operations.
[0041] In the application, before generating a cost map, the electronic map of the work environment is first rasterized to generate a grid map of the work environment. The grid map is then traversed, and the grids within a preset expansion radius from the grid occupied by the obstacle are assigned first-generation values, and the grids outside the preset expansion radius are assigned second-generation values to generate the cost map. The first-generation value can be set to a fixed value greater than the second cost value. The second-generation value should be less than the first-generation value and negatively correlated with the distance of the grid from the grid occupied by the obstacle. The distance between any two grids can be the straight-line distance between the geometric center points of the two grids.
[0042] In one embodiment, the cost value of a grid in the cost map is calculated as follows:
[0043]
[0044] Among them, m0 represents the cost value, m1 represents the first-generation value, ρ represents the distance between the grid and the obstacle, r represents the preset expansion radius, m2 represents the second-generation value, and k represents the constant coefficient.
[0045] In applications, the cost value of a grid can represent the grid's grayscale value in the electronic map, or the probability that the grid is occupied by an obstacle. When the cost value represents the grid's grayscale value, the grayscale values of grids occupied by obstacles and grids not occupied by obstacles in the cost map are different, making it possible to clearly distinguish between grids occupied by obstacles and grids not occupied by obstacles in the cost map. The first-generation value and the second-generation value can be set by the user through the human-computer interaction device of the terminal device according to actual needs. For example, when the contemporary value represents a grayscale value and the grayscale value has a brightness value from 0% (white) to 100% (black) and a grayscale level from 0 (black) to 255 (white), the first cost value is a grayscale value with brightness A or grayscale level a, and the second cost value is a grayscale value with brightness B or grayscale level b, 0%≤B≤C<A≤100% and B is negatively correlated with the distance of the grid from the grid occupied by the obstacle, 0≤a<c≤b≤255 and B is positively correlated with the distance of the grid from the grid occupied by the obstacle; or, when the contemporary value represents probability, the first cost value is a probability of 100% and the second cost value is a probability of D, 0%≤D<100% and D is negatively correlated with the distance of the grid from the grid occupied by the obstacle.
[0046] In applications, the preset expansion radius can be set to be less than or equal to the radius of the mobile robot. If the mobile robot is non-circular, the radius of the mobile robot can be the radius of the mobile robot's smallest circumscribed circle. To improve the mobile robot's ability to pass through narrow passages, the preset expansion radius can be set slightly lower than the mobile robot's radius. For example, the preset expansion radius can be set within the range of [90% * mobile robot radius, 100% * mobile robot radius].
[0047] In the application, the cost values of all the grids in the cost map after they are assigned can be stored in the memory. For example, a data storage list can be pre-set in the memory, and the cost values of all the grids in the cost map after they are assigned can be stored in the data storage list. A correspondence between the cost map and the corresponding working environment can also be established in the memory, so that when the mobile robot needs to be controlled to operate in the working environment in the future, the corresponding cost map can be quickly found, effectively saving the processor's computing power resources and execution time. The corresponding relationship can be a mapping relationship, which can exist in the form of a corresponding relationship table. The corresponding relationship table can be a display lookup table (Look-Up-Table, LUT), or it can exist in the form of searching and outputting the corresponding search results through other input data.
[0048] In application, for any operating environment, the terminal device only needs to perform step S100 once to generate and store a costmap based on the operating environment's grid map. This costmap is then used to plan the mobile robot's global path from its current location in the operating environment to its target location based on the costmap. If the operating environment changes (for example, the number, location, or size of obstacles in the operating environment changes), the grid map of the operating environment needs to be updated, and a new costmap needs to be regenerated based on the updated grid map to update the costmap.
[0049] Step S101: planning a global path from the current position of the mobile robot to the target position based on the cost map;
[0050] Step S102 , controlling the mobile robot to move along the global path in the working environment, and proceeding to step S103 .
[0051] In the application, after generating the costmap, a global path is planned from the mobile robot's current position in the costmap to the target position based on the actual operational requirements of the work environment. The global path is then scaled and mapped to the real work environment based on the costmap. Based on the mobile robot's current position, the mobile robot is controlled to move along the global path within the work environment, achieving global control of the work environment. Simultaneously, the mobile robot's real-time position is annotated in the costmap. The target position is the mapping of the mobile robot's end point in the work environment to the costmap.
[0052] In applications, path planning methods suitable for mobile robots can include traditional path planning algorithms, sampling-based path planning algorithms, and intelligent bionic algorithms. Traditional path planning algorithms include the A algorithm, Dijkstra algorithm, D algorithm, and artificial potential field method. Sampling-based path planning algorithms include the PRM algorithm and RRT algorithm. Intelligent bionic path planning algorithms include neural network algorithms, ant colony algorithms, and genetic algorithms.
[0053] Step S103 , traverse the first path point within a first preset distance from the mobile robot along the global path, detect the cost value of the first path point, and proceed to step S104 .
[0054] In an application, as the mobile robot moves along the global path in the operating environment, starting from the moment the mobile robot starts moving along the global path in the operating environment, the cost map is traversed along the global path to path points within a first preset distance from the mobile robot (referred to as first path points), and the cost values of all grids containing the traversed first path points are detected. Since each grid has been assigned a first generation value or a second generation value in step S100, the cost value detected for each grid containing the first path point is the first generation value or the second generation value.
[0055] In the application, since the walls or obstructions on both sides of the narrow passage are considered obstacles in both the grid map and the cost map, the narrow passage can be detected by detecting the grid occupied by the obstacle and the grid surrounding the obstacle. Since different cost values have been assigned to the grids occupied by the obstacle and the grid surrounding the obstacle in step S100, the narrow passage can be detected by detecting the cost value of the grid occupied by the obstacle and the cost value of the grid surrounding the obstacle.
[0056] In applications, the first preset distance can be set according to actual needs. The first preset distance should be set to be greater than or equal to the width of one grid so that the terminal device traverses at least one grid each time. In order to improve the detection accuracy of narrow channels and facilitate the subsequent control of the mobile robot to smoothly pass through or avoid narrow channels, the terminal device can be set to detect at most one narrow channel at a time. Based on this setting, the first preset distance can be set to be less than or equal to the distance between the two smallest obstacles in the grid map (or cost map) to avoid the terminal device mistakenly identifying the detection of multiple narrow channels as the detection of a single narrow channel.
[0057] Step S104: If there is a second path point among the first path points whose cost value is greater than the preset cost threshold, it is determined that the second path point is in a narrow channel, and the process proceeds to step S105.
[0058] In applications, a narrow passage typically refers to a passage with a width less than, equal to, or slightly greater than the diameter (twice the radius) of the mobile robot. In step S100, cells within a preset expansion radius from obstacles (including walls or obstructions on both sides of the narrow passage) are assigned a first-generation value, and cells outside the preset expansion radius from obstacles are assigned a second-generation value. Therefore, the cost value of a cell located at a path point in the narrow passage must be equal to the first-generation value or a larger second-generation value. Accordingly, the preset cost threshold can be set to be greater than or equal to the third-generation value, which is equal to the second-generation value of a cell whose distance from the obstacle is greater than a preset distance threshold. The preset distance threshold is equal to the preset expansion radius + E * the radius of the mobile robot, and the value range of E can be set to 0% to 10%.
[0059] Step S105: Based on the narrow passage, control the mobile robot to move in the working environment.
[0060] In the application, when it is determined that the mobile robot is moving along the global path, if there is a narrow channel within the first preset distance of its current position, corresponding measures can be taken according to the position of the narrow channel to control the movement of the mobile robot in the working environment so that the mobile robot can pass through the narrow channel smoothly, or the global path can be replanned to bypass the narrow channel.
[0061] like Figure 2 As shown, in one embodiment, step S105 includes:
[0062] Step S201: Control the mobile robot to reduce its movement speed and pass through the narrow passage.
[0063] In applications, to allow a mobile robot to safely pass through a narrow passage and avoid collisions with obstacles on either side of the passage, the mobile robot's speed can be reduced, allowing the mobile robot to pass through the narrow passage at a low speed. Specifically, the mobile robot's current speed can be obtained. When the mobile robot's current speed is greater than a preset speed threshold, the mobile robot's current speed is reduced to the preset speed threshold. When the mobile robot's current speed is less than or equal to the preset speed threshold, the mobile robot's current speed is maintained unchanged.
[0064] like Figure 3 As shown, in one embodiment, step S105 includes the following steps S301 and S302:
[0065] Step S301: replanning a new global path from the current position of the mobile robot to the target position, wherein a distance between a third path point in the narrow passage and the center point of the narrow passage in the new global path is less than a second preset distance, and then proceeding to step S302;
[0066] Step S302: Control the mobile robot to move along the new global path in the working environment.
[0067] In the application, when it is determined that the mobile robot is moving along the global path, if there is a narrow channel within the first preset distance of its current position, a new global path from the current position of the mobile robot to the target position can also be replanned according to the position of the narrow channel to avoid the mobile robot colliding with obstacles on both sides of the narrow channel when passing through the narrow channel. Specifically, the local path (that is, the path where the second path point is located) passing through the narrow channel in the global path can be adjusted so that the adjusted local path (that is, the path where the third path point is located) passes through or is closer to the center point of the narrow channel, that is, the distance between the third path point and the center point of the narrow channel is less than the second preset distance. The second preset distance can be set according to actual needs to make the third path point closer to the center point of the narrow channel relative to the second path point. For example, the second preset distance is less than or equal to the distance between the second path point and the center point of the narrow channel. After generating a new global path based on the third path point, the mobile robot is controlled to continue moving in the working environment along the new global path to continue working on the working environment.
[0068] like Figure 4 As shown, in one embodiment, step S302 includes the following steps S401 and S402:
[0069] Step S401: Detect a third path point in the narrow passage that is within a third preset distance from the second path point and has the lowest cost, and proceed to step S402;
[0070] Step S402: replan a new global path from the current position of the mobile robot to the target position and passing through the third path point.
[0071] In this application, since step S100 assigns first-generation values to grids within a preset expansion radius from obstacles on either side of the narrow passage, and second-generation values to grids outside the preset expansion radius, and ensures that the second-generation values are less than the first-generation values and negatively correlated with the grid's distance from the obstacle, the cost value of the second pathpoint can be used to determine the distance of the second pathpoint from the obstacles on either side of the narrow passage, and thus the position of the second pathpoint from the center of the narrow passage. When a new global path needs to be replanned based on a third pathpoint closer to the center of the narrow passage, the position of the second pathpoint can be referenced to determine the location of the third pathpoint. Specifically, the costmap can be searched for grids within a third preset distance from the second pathpoint; the grid with the lowest cost value among the grids within the third preset distance from the second pathpoint is selected as the third pathpoint; and finally, the new global path is replanned based on the third pathpoint. The third preset distance can be set to be less than or equal to the maximum distance between the second pathpoint and the obstacles on either side of the narrow passage, as needed.
[0072] like Figure 5 As shown, in one embodiment, the preset expansion radius is smaller than the radius of the mobile robot, and step S105 includes the following steps S501 to S504:
[0073] Step S501: Based on the ranging data of the ranging sensor provided on the mobile robot, the width of the narrow passage is obtained, and the process proceeds to step S502;
[0074] Step S502: If the width of the narrow passage is lower than the preset width threshold, a virtual obstacle is added to the costmap at the location of the narrow passage, a new costmap is generated, and the process proceeds to step S503.
[0075] Step S503: Based on the new cost map, replan a new global path from the current position of the mobile robot to the target position while avoiding the narrow passage, and proceed to step S504;
[0076] Step S504: Control the mobile robot to move along the new global path in the working environment.
[0077] In the application, if the preset expansion radius is set to the same as the radius of the mobile robot, it is easy for some of the detected narrow channels to be determined as channels that the mobile robot cannot pass through in the cost map due to the influence of data noise, so that virtual obstacles are added to the narrow channels that cannot be passed through, so that the narrow channels that cannot be passed through are blocked, resulting in the inability to plan a global path that allows the mobile robot to pass through the narrow channels. Therefore, the preset expansion radius can be set to be slightly lower than the radius of the mobile robot.
[0078] In applications, if the preset expansion radius is set lower than the radius of the mobile robot, the planned global path may pass through a narrow channel whose width is less than or very close to the diameter of the mobile robot. Therefore, it is necessary to use a ranging sensor (e.g., a lidar, an ultrasonic ranging sensor, an infrared ranging sensor, a depth camera (e.g., an RGBD camera), etc.) installed on the mobile robot to measure the actual width of the narrow channel. If the width of the narrow channel is lower than the preset width threshold, a virtual obstacle can be added to the costmap at the location of the narrow channel, thereby forcing the terminal device to replan a new global path that avoids the narrow channel. The preset width threshold can be set to be equal to or slightly larger than the diameter of the mobile robot according to actual needs. For example, the value range of the preset width threshold is set to [100% * mobile robot diameter, 110% * mobile robot diameter).
[0079] like Figure 6 As shown, in one embodiment, step S501 includes the following steps S601 to S607:
[0080] Step S601: Construct a detection frame covering the narrow passage, using the position of the mobile robot in the operating environment as a boundary point and the movement direction of the mobile robot in the operating environment as a central axis. The boundary or tangent of the detection frame passing through the boundary point is perpendicular to the central axis, and then proceed to step S602.
[0081] Step S602: Generate an image of the area where the detection frame is located, and proceed to step S603;
[0082] Step S603: Map the global path to the image based on the current posture of the mobile robot, and proceed to step S604;
[0083] Step S604: Divide the image into a first image area and a second image area using the global path as a dividing line, and proceed to step S605;
[0084] Step S605: Map the ranging data of the mobile robot to the image, and proceed to step S606;
[0085] Step S606: Obtain the distance value between each detection data in the first image area and each detection data in the second image area, and proceed to step S607;
[0086] Step S607: Obtain the minimum distance value among all the distance values as the width of the narrow channel.
[0087] In the application, the terminal device can first build a detection frame of appropriate size that covers the location of the narrow channel based on the location of the narrow channel in the actual working environment;
[0088] Then, based on the ranging data covering the detection frame obtained by the ranging sensor, an image of the area where the detection frame is located is obtained at a preset resolution. When the ranging sensor is a lidar, an ultrasonic ranging sensor, or an infrared ranging sensor, the ranging data is point cloud data, and the image is a point cloud image; when the ranging sensor is a depth camera, the ranging data is depth image data, and the image is a depth image; the preset resolution can be set to be greater than or equal to the resolution of the cost map, so that each grid corresponds to at least one point cloud data point in the point cloud data or at least one pixel in the depth image;
[0089] Then, the current pose of the mobile robot is obtained. The pose includes the position coordinates and posture of the mobile robot in the image coordinate system. The image coordinate system can be a two-dimensional coordinate system or a three-dimensional coordinate system. Correspondingly, the position coordinates can include two-dimensional coordinates or three-dimensional coordinates. Based on the current pose of the mobile robot, a mapping relationship between the cost map coordinate system and the image coordinate system is established, and the global map is mapped to the image based on the mapping relationship.
[0090] Then, the image is divided into two image regions, namely, a first image region and a second image region, using the global path mapped into the image as a dividing line, and the ranging data is mapped into the divided image regions. Alternatively, the ranging data may be first mapped into the image, and then the image may be divided into two image regions using the global path mapped into the image as a dividing line, that is, the execution order of steps S604 and S605 may be reversed.
[0091] Next, the distance values between the first ranging data point in the first image area and each ranging data point in the second image area are obtained respectively, and then the distance values between the second ranging data point in the first image area and each ranging data point in the second image area are obtained respectively, and so on; similarly, the distance values between the first ranging data point in the second image area and each ranging data point in the first image area are obtained respectively, and then the distance values between the second ranging data point in the second image area and each ranging data point in the first image area are obtained respectively, and so on, and finally the distance values between each ranging data point in the first image area and each ranging data point in the second image area are obtained; when the ranging sensor is a lidar, an ultrasonic ranging sensor or an infrared ranging sensor, the ranging data points are data points in the point cloud data; when the ranging sensor is a depth camera, the ranging data points are pixel points in the depth image data;
[0092] Finally, all distance values are compared, and the minimum distance value among all distance values is used as the width of the narrow channel.
[0093] In applications, the detection frame can be set to any regular shape according to actual needs, as long as it can cover the location of the narrow channel, for example, a rectangle, a circle, an ellipse, etc.
[0094] like Figure 7 As shown, a schematic diagram of a detection frame is shown as an example; wherein 11 represents the target position, 12 represents the global path, 13 represents the ranging data point, 14 represents the obstacles on both sides of the narrow channel, 15 represents the detection frame, 16 represents the mobile robot, X represents the movement direction, and Y represents the tangent or boundary direction.
[0095] like Figure 8 As shown, a schematic diagram of an image mapped with ranging data points is exemplarily shown; wherein 21 represents the image, 22 represents the global path, 23 represents the ranging data points, 24 represents the first image area, 25 represents the second image area, and 26 represents the mobile robot.
[0096] In one embodiment, step S603 includes:
[0097] Establishing a mapping relationship between the costmap coordinate system and the image coordinate system based on the current pose of the mobile robot;
[0098] Based on the mapping relationship, the global path is mapped to the image.
[0099] In one embodiment, after step S103, the method further includes:
[0100] If there is no second path point with a cost greater than the preset cost threshold among the first path points, the process returns to step S102 .
[0101] In the application, if there is no second path point in the first path point whose cost value is greater than the preset cost threshold, it means that there is no narrow channel within the first preset distance from the mobile robot on the global path. At this time, you can return to execute step S102, continue to control the mobile robot to move along the global path, and then continue to execute step S103.
[0102] In one embodiment, the process before step S101 includes:
[0103] If a start job control command is received, the system enters narrow channel mode.
[0104] In the application, the user may input a start operation control instruction through the human-computer interaction device of the terminal device to control the mobile robot to enter the narrow channel mode according to the start operation control instruction, and then execute step S101.
[0105] In one embodiment, step S105 includes:
[0106] If a stop operation control instruction is received, the movement is stopped and the device enters a shutdown mode, a standby mode or a charging mode.
[0107] In the application, a user can input a stop operation control command through the human-computer interaction device of the terminal device to control the mobile robot to stop operating in the operating environment according to the stop operation control command. After stopping operating in the operating environment, the mobile robot can stop moving and enter a shutdown mode, a standby mode, or a charging mode. After stopping operating in the operating environment, the cost map of other operating environments can also be obtained, and then step S101 is executed to operate in the other operating environment based on the global path navigation method.
[0108] In applications, the human-computer interaction components of a terminal device may include at least one of physical buttons, touch sensors, gesture recognition sensors, and voice recognition units, allowing users to input movement control commands through corresponding touch, gesture, or voice control methods. Physical buttons and touch sensors may be located anywhere on the terminal device, such as on a control panel. Touch control for physical buttons may specifically be pressing or toggling. Touch control for touch sensors may specifically be pressing or touching. The gesture recognition sensor may be located anywhere on the exterior of the terminal device's housing. Gestures used to control the terminal device may be customized by the user based on actual needs or adopt the factory default settings. The voice recognition unit may include a microphone and a voice recognition chip, or may include only a microphone and have the voice recognition function implemented by the terminal device's processor. The voice control for controlling the terminal device may be customized by the user based on actual needs or adopt the factory default settings.
[0109] In application, step S201 and steps S301 and S302 can be executed simultaneously, and step S201 and steps S501 and S504 can also be executed simultaneously, that is, before controlling the mobile robot to pass through a narrow channel and during the process of passing through a narrow channel, or before controlling the mobile robot to avoid a narrow channel and during the process of avoiding a narrow channel, the running speed of the mobile robot can be reduced so that the mobile robot can pass through or avoid the narrow channel at a low speed to avoid collision with obstacles on both sides of the narrow channel.
[0110] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0111] The present application also provides a global path navigation device for executing the method steps in the above method embodiment. The device can be a virtual appliance in a terminal device, which is run by a processor of the terminal device, or the terminal device itself.
[0112] like Figure 9 As shown, the global path navigation device 1000 provided in the embodiment of the present application includes:
[0113] The map generation unit 100 is used to expand the grid map of the working environment to generate a cost map, which is fed into the path planning unit 101;
[0114] The path planning unit 101 is used to plan a global path from the current position of the mobile robot to the target position based on the cost map, and enters the first motion control unit 102;
[0115] A first motion control unit 102 is used to control the mobile robot to move along the global path in the working environment and enter the cost value detection unit 103;
[0116] A cost value detection unit 103 is configured to, during the process of the mobile robot moving along the global path in the working environment, traverse a first path point within a first preset distance from the mobile robot along the global path, detect a cost value of the first path point, and enter the narrow channel detection unit 104;
[0117] a narrow channel detection unit 104 configured to determine that a second path point is in a narrow channel if a second path point having a cost greater than a preset cost threshold exists among the first path points, and enter the second motion control unit 105;
[0118] The second motion control unit 105 is configured to control the mobile robot to move in the working environment based on the narrow passage.
[0119] In one embodiment, the global path navigation device further includes:
[0120] A returning unit is configured to return to the first motion control unit if there is no second path point with a cost value greater than a preset cost threshold among the first path points.
[0121] In one embodiment, the global path navigation device further includes:
[0122] The starting unit is configured to enter the narrow channel mode upon receiving a start operation control instruction.
[0123] In one embodiment, the global path navigation device further includes:
[0124] The stopping unit is used to stop the movement and enter the shutdown mode, standby mode or charging mode if a stop operation control instruction is received.
[0125] In application, each unit in the above device may be a software program module, or may be implemented by different logic circuits integrated in a processor or independent physical components connected to a processor, or may be implemented by multiple distributed processors.
[0126] like Figure 10 As shown, the embodiment of the present application further provides a terminal device 2000, including: at least one processor 201 ( Figure 10 Only one processor is shown in the figure), a memory 202, and a computer program 203 stored in the memory 202 and executable on at least one processor 201. When the processor 201 executes the computer program 203, the steps in the above-mentioned various global path navigation method embodiments are implemented.
[0127] In applications, the terminal device may include, but is not limited to, a processor and a memory. Figure 10 These are merely examples of terminal devices and do not constitute a limitation of the terminal device. The terminal device may include more or fewer components than shown, or a combination of certain components, or different components, such as input / output devices, network access devices, etc. When the terminal device is a mobile robot, it may also include mobile components and ranging sensors. The input / output devices may include the aforementioned human-computer interaction devices, and may also include a display screen for displaying the operating parameters of the terminal device. The network access device may include a communication module for the terminal device to communicate with the user terminal. The mobile components may include servos, motors, drivers, and other devices for driving the joints of the mobile robot.
[0128] In applications, the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0129] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / modules are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.
[0130] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The functional modules in the embodiment can be integrated into a processing module, or each module can exist physically alone, or two or more modules can be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. In addition, the specific names of the functional modules are only for the convenience of distinguishing each other and are not used to limit the scope of protection of this application. The specific working process of the modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0131] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0132] An embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device can implement the steps in the above-mentioned various method embodiments.
[0133] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A global path navigation method, characterized in that: include: Based on a cost map of the operating environment, a global path is planned from the mobile robot's current position to the target position. Grids within a preset expansion radius from obstacles in the cost map have a first-generation value, and grids outside the preset expansion radius from obstacles have a second-generation value. The second-generation value is smaller than the first-generation value and is negatively correlated with the distance of the grid from the obstacle. controlling the mobile robot to move along the global path in the working environment; traversing a first path point within a first preset distance from the mobile robot along the global path, and detecting a cost value of the first path point; If there is a second path point among the first path points whose cost value is greater than a preset cost threshold, determining that the second path point is in a narrow channel; Detecting a third path point in the narrow passage that is within a third preset distance from the second path point and has the lowest cost; Replanning a new global path from the current position of the mobile robot to the target position and passing through the third path point, wherein the distance between the third path point in the narrow passage and the center point of the narrow passage in the new global path is less than a second preset distance; The mobile robot is controlled to move along the new global path in the working environment.
2. A global path navigation device, characterized in that: include: The path planning unit is used to plan the global path from the current position of the mobile robot to the target position based on the cost map of the working environment; a first motion control unit, configured to control the mobile robot to move along the global path in the operating environment, wherein a grid within a preset expansion radius from an obstacle in the costmap has a first generation value, and a grid outside the preset expansion radius from the obstacle has a second generation value, wherein the second generation value is less than the first generation value and is negatively correlated with the distance of the grid from the obstacle; a cost value detection unit, configured to, during the process of the mobile robot moving along the global path in the working environment, traverse a first path point within a first preset distance from the mobile robot along the global path, and detect a cost value of the first path point; a narrow channel detection unit, configured to determine that a second path point is in a narrow channel if there is a second path point among the first path points whose cost value is greater than a preset cost threshold; A second motion control unit is used to detect a third path point in the narrow channel that is within a third preset distance from the second path point and has the lowest cost; re-plan a new global path from the current position of the mobile robot to the target position and passing through the third path point, and the distance between the third path point in the narrow channel and the center point of the narrow channel in the new global path is less than the second preset distance; and control the mobile robot to move along the new global path in the working environment.
3. A terminal device, characterized in that: The method comprises a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the global path navigation method according to claim 1 when executing the computer program.
4. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the global path navigation method according to claim 1 are implemented.
Citation Information
Patent Citations
Method and device for determining movement trajectory, mobile robot and storage medium
CN107742304A
Passing area judgment method, route searching method, robot and chip
CN113110499A