[ summary of the invention ]
The invention aims to provide a path selection method and a path selection device for a mobile robot, and solves the technical problems of inaccurate path selection and low search efficiency in path selection in the related technology.
In one aspect of the embodiments of the present invention, there is provided a path selection method for a mobile robot, the method including:
determining a starting point and a target point of a mobile robot, wherein the starting point is a central point of the mobile robot;
judging whether the mobile robot can reach the target point from the starting point straight line or not;
and if not, carrying out path selection on the mobile robot based on the body of the mobile robot.
Optionally, the determining whether the mobile robot can reach the target point from the starting point straight line includes:
determining a first straight line passing through a center point of the mobile robot and the target point;
determining a region to be moved according to the first straight line and the body of the mobile robot;
judging whether an obstacle exists in the area to be moved;
if so, the mobile robot cannot reach the target point from the starting point straight line;
and if not, the mobile robot can linearly reach the target point from the starting point.
Optionally, the routing the mobile robot based on the body of the mobile robot includes:
a. dividing an area where the mobile robot performs path selection into a plurality of grids, and determining grids where a body of the mobile robot, the starting point, the target point and the obstacle point are located;
b. acquiring a grid corresponding to a first path node to be selected according to the grid where the mobile robot body is located, wherein the first path node to be selected is the outermost circle of the body when the mobile robot is located at the starting point;
c. adding the grid corresponding to the starting point into a preset closing list, and adding the grid corresponding to the first path node to be selected into a preset opening list, wherein the closing list is used for recording grids which are not considered for selecting paths, and the opening list is used for recording grids which are considered for selecting paths;
d. f, G, H corresponding to the first path node to be selected is calculated according to the grid where the starting point is located, the grid where the target point is located and the grid corresponding to the first path node to be selected, wherein F is G + H, G refers to the moving cost of moving from the starting point to the first path node to be selected, and H refers to the estimated cost of moving from the first path node to be selected to the target point;
e. determining a grid where a first path node to be selected with the minimum F is located;
f. judging whether the first path node to be selected corresponding to the minimum F is the target point or not according to the grid where the first path node to be selected with the minimum F is located and the grid where the target point is located;
g. if the first path node to be selected corresponding to the minimum F is not the target point, judging whether the first path node to be selected corresponding to the minimum F is a path node;
h. if the first path node to be selected corresponding to the minimum F is a path node, acquiring a grid corresponding to a second path node to be selected, and skipping to execute the step c based on the second path node to be selected so as to continuously search the path node of the mobile robot, wherein the second path node to be selected refers to a point which takes the first path node to be selected corresponding to the minimum F as a center and is the outermost circle of a range of the robot body around the center;
i. and if the first path node to be selected corresponding to the minimum F is not the path node, adding the first path node to be selected corresponding to the minimum F into the closed list, skipping to execute the step e, and re-determining the path node based on the first path node to be selected in the open list.
Optionally, the determining whether the first path node to be selected corresponding to the minimum F is a path node includes:
taking the first path node to be selected corresponding to the minimum F as a center, and acquiring the outermost circle of points of an airframe range around the center;
judging whether an obstacle exists in the range of the machine body of each outermost circle of points;
if no obstacle exists, judging whether the point of the outermost circle exists in the opening list;
if yes, judging whether the father node of the point of the outermost circle needs to be modified;
if so, the first path node to be selected corresponding to the minimum F is a path node;
and if not, the first path node to be selected corresponding to the minimum F is not the path node.
Optionally, the determining whether the parent node of the point of the outermost circle needs to be modified includes:
acquiring a first movement cost required from the starting point to the first path node to be selected corresponding to the minimum F and from the first path node to be selected corresponding to the minimum F to the point of the outermost circle;
acquiring a second movement cost required from the starting point to the point of the outermost circle;
when the first mobile cost is larger than the second mobile cost, modifying the father node of the point of the outermost circle;
when the first moving cost is smaller than the second moving cost, modifying the parent node of the point of the outermost circle.
In another aspect of the embodiments of the present invention, there is provided a path selecting apparatus for a mobile robot, the apparatus including:
the path point determining module is used for determining a starting point and a target point of the mobile robot, wherein the starting point is a central point of the mobile robot;
the path judging module is used for judging whether the mobile robot can reach the target point from the starting point straight line or not;
and the path selection module is used for carrying out path selection on the mobile robot based on the body of the mobile robot if the mobile robot does not have the main body of the mobile robot.
Optionally, the path determining module includes:
a first determination unit for determining a first straight line passing through a center point of the mobile robot and the target point;
the second determining unit is used for determining a region to be moved according to the first straight line and the body of the mobile robot;
and the first judging unit is used for judging whether an obstacle exists in the area to be moved, if so, the mobile robot cannot reach the target point from the starting point straight line, and if not, the mobile robot can reach the target point from the starting point straight line.
Optionally, the path selection module includes:
the first processing unit is used for dividing a region for path selection of the mobile robot into a plurality of grids, and determining grids where a fuselage of the mobile robot, the starting point, the target point and an obstacle point are located;
the first obtaining unit is used for obtaining a grid corresponding to a first path node to be selected according to the grid where the mobile robot body is located, wherein the first path node to be selected is a point of the outermost circle of the body when the mobile robot is located at the starting point;
a second processing unit, configured to add a grid corresponding to the starting point into a preset closing list, and add a grid corresponding to the first route node to be selected into a preset opening list, where the closing list is used to record grids that are not considered for selecting a route, and the opening list is used to record grids that are considered for selecting a route;
a first calculating unit, configured to calculate F, G, H corresponding to the first path node to be selected according to the grid where the starting point is located, the grid where the target point is located, and the grid corresponding to the first path node to be selected, where F is G + H, where G is a movement cost for moving from the starting point to the first path node to be selected, and H is an estimated cost for moving from the first path node to be selected to the target point;
a third determining unit, configured to determine a grid in which a first path node to be selected with a smallest F is located;
a second judging unit, configured to judge whether the first path node to be selected corresponding to the minimum F is a target point according to the grid where the first path node to be selected having the minimum F is located and the grid where the target point is located;
a third processing unit, configured to determine whether the first path node to be selected corresponding to the minimum F is a path node if the first path node to be selected corresponding to the minimum F is not a target point;
a fourth processing unit, configured to, if the first path node to be selected corresponding to the minimum F is a path node, obtain a grid corresponding to a second path node to be selected, execute the second processing unit based on the second path node to be selected jumping to continue searching for the path node of the mobile robot, where the second path node to be selected refers to a point of an outermost circle of a fuselage range around a center that is the first path node to be selected corresponding to the minimum F;
and a fifth processing unit, configured to, if the first path node to be selected corresponding to the minimum F is not a path node, add the first path node to be selected corresponding to the minimum F to the closed list, and perform the third determination unit by skipping, and re-determine a path node based on the first path node to be selected in the open list.
Optionally, the third processing unit is specifically configured to:
taking the first path node to be selected corresponding to the minimum F as a center, and acquiring the outermost circle of points of an airframe range around the center;
judging whether an obstacle exists in the range of the machine body of each outermost circle of points;
if no obstacle exists, judging whether the point of the outermost circle exists in the opening list;
if yes, judging whether the father node of the point of the outermost circle needs to be modified;
if so, the first path node to be selected corresponding to the minimum F is a path node;
and if not, the first path node to be selected corresponding to the minimum F is not the path node.
Optionally, the determining whether the parent node of the point of the outermost circle needs to be modified includes:
acquiring a first movement cost required from the starting point to the first path node to be selected corresponding to the minimum F and from the first path node to be selected corresponding to the minimum F to the point of the outermost circle;
acquiring a second movement cost required from the starting point to the point of the outermost circle;
when the first mobile cost is larger than the second mobile cost, modifying the father node of the point of the outermost circle;
when the first moving cost is smaller than the second moving cost, modifying the parent node of the point of the outermost circle.
In the embodiment of the invention, the starting point and the target point of the mobile robot are determined, whether the mobile robot can reach the target point from the starting point in a straight line is judged, and if the mobile robot cannot reach the target point, the path of the mobile robot is selected based on the body of the mobile robot. In the process of path selection, the space occupied by the mobile robot can be considered as the space which can be reached by the mobile robot, path selection is carried out based on the body of the mobile robot, the path selection is expanded by the grids occupied by the body, and therefore the selected path is more suitable for the walking of the mobile robot, and the accuracy of the path selection is improved. In addition, the movement cost is considered based on the grids occupied by the body of the mobile robot, the number of the searched grids is reduced, and the searching efficiency is improved.
[ detailed description ] embodiments
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It should be noted that, if not conflicted, the various features of the embodiments of the invention may be combined with each other within the scope of protection of the invention. Additionally, while functional block divisions are performed in the device diagrams, with logical sequences shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than the block divisions in the device diagrams, or the flowcharts.
The path selection method and device of the mobile robot provided by the embodiment of the invention can be applied to various different types of mobile robots, such as a sweeping robot, an inspection robot, an unmanned sampling robot, an unmanned forklift and the like. The area where the mobile robot walks is divided into a plurality of grids, and corresponding grid data is generated, wherein the grids are preferably divided into square grids, and for convenience of explanation, the grids described in the embodiments of the present invention below are all described as square grids. It should be noted that, in the embodiment of the present invention, the grid of the walkable area of the mobile robot may also be another polygon, such as a triangle, a quadrangle, a pentagon, and the like, and is not limited in the embodiment of the present invention. In addition, the position and the size of the mobile robot provided by the embodiment of the invention default to occupy a plurality of grids.
The method and the device for selecting the path of the mobile robot provided by the embodiment of the invention have the core points that all grids occupied by the center position of the mobile robot and extending outwards to the edge of the body of the mobile robot are obtained, then the path node of the mobile robot for initial movement is determined according to all grids at the edge of the body of the mobile robot, the movement cost of the mobile robot is calculated, and the process is repeated to continue to select the path node for the mobile robot. Each determined path node is expanded according to the grids occupied by the body of the mobile robot, so that the found path is more suitable for the walking of the mobile robot, and in addition, the moving cost is considered based on the grids where the center position of the mobile robot and the edge position of the mobile robot are located, so that the number of searched grids is reduced, and the searching efficiency is improved. For ease of understanding, the following description is made in conjunction with specific examples.
Referring to fig. 1, fig. 1 is a flowchart of a path selection method for a mobile robot according to an embodiment of the present invention, where the method includes:
step 11, determining a starting point and a target point of the mobile robot, wherein the starting point is a central point of the mobile robot; the starting point and the target point of the mobile robot may be automatically determined by the system according to the data map corresponding to the current application scene, or may be manually input, and the specific manner for manually inputting the starting point and the target point may be voice input, bluetooth connection input, handwriting keyboard input, and the like, which is not limited herein. Wherein the starting point defaults to a center point of the mobile robot, in particular to a grid occupied by the center point.
Step 12, judging whether the mobile robot can reach the target point from the starting point straight line or not;
and judging whether the mobile robot can reach the target point from the starting point in a straight line, namely judging whether an obstacle exists between the straight line distance between the starting point of the mobile robot and the target point, if not, the mobile robot can reach the target point in a straight line, otherwise, the mobile robot cannot reach the target point in a straight line. And when the target point can be reached in a straight line, ending the path search, and if the target point cannot be reached in a straight line, performing the path search based on the improved A star algorithm.
In this embodiment, the determining whether the mobile robot can reach the target point from the starting point straight line includes: determining a first straight line passing through a center point of the mobile robot and the target point; determining a region to be moved according to the first straight line and the body of the mobile robot; judging whether an obstacle exists in the area to be moved; if so, the mobile robot cannot reach the target point from the starting point straight line; and if not, the mobile robot can linearly reach the target point from the starting point.
Wherein the first line is used to determine a moving direction of the mobile robot.
The determining of the region to be moved according to the first straight line and the body of the mobile robot specifically includes determining a moving direction according to the first straight line, and then determining the region to be moved according to the largest body of the mobile robot moving in the moving direction. The maximum body moving in the moving direction is determined according to the specific shape of the mobile robot, for example, when the mobile robot is rectangular and two sides corresponding to the width are parallel to the first straight line, the maximum body is two sides corresponding to the length. It should be noted that, in the embodiment of the present invention, the shape of the body of the robot is not particularly limited, and may be any shape.
The following is a specific example. For example, when the body of the mobile robot is circular, referring to fig. 2, the determining whether the mobile robot can reach the target point from the starting point straight line includes:
step 121, determining a first straight line passing through the central point of the mobile robot and the target point;
when the machine body is circular, the center point of the mobile robot is the circle center. The first straight line is a straight line passing through the circle center and the target point, and the first straight line is used for determining the moving direction of the mobile robot.
Step 122, acquiring two intersection points of the diameter of the body of the mobile robot and the body of the mobile robot;
step 123, determining two tangent lines respectively passing through the two intersection points, wherein the two tangent lines are parallel to the first straight line;
wherein the two intersection points are points on the circumference of the body edge, and a tangent line passing through the two points is parallel to the first line, thereby ensuring that the moving direction of the mobile robot is moved toward the target point.
Step 124, judging whether an obstacle exists in an area surrounded by the two tangent lines;
and judging whether an obstacle exists in the area surrounded by the two tangent lines, specifically judging whether an obstacle exists in an area which is in the direction of the target point in the area surrounded by the two tangent lines. The mobile robot can acquire images in a current scene according to a camera of the mobile robot body, and the images are processed through a system or a background system of the mobile robot body, so that whether obstacles exist in the area or not is determined. Whether obstacles exist in the area can also be judged by other modes, such as a technology based on infrared sensing detection and the like.
Step 125, if yes, the mobile robot cannot reach the target point from the starting point straight line;
and step 126, if not, the mobile robot can reach the target point from the starting point straight line.
When the body of the mobile robot is not circular, but is in other shapes such as square, rectangle, pentagon, etc., it may be determined whether the mobile robot can reach the target point from the starting point straight line based on the principle of the above process.
And step 13, if not, carrying out path selection on the mobile robot based on the body of the mobile robot.
In this embodiment, referring to fig. 3, the routing the mobile robot based on the body of the mobile robot includes:
step 131, dividing a region where the mobile robot performs path selection into a plurality of grids, and determining grids where a body of the mobile robot, the starting point, the target point and an obstacle point are located;
the specific process of grid division of the region may refer to the related art, and the grid may be a square grid or a grid with other shapes. The body of the mobile robot occupies a plurality of grids, the grid where the starting point and the target point are located is defaulted to be one grid, and the grid where the obstacle point is located can be one or more, and is specifically determined according to the size of the obstacle.
Step 132, obtaining a grid corresponding to a first path node to be selected according to the grid where the body of the mobile robot is located, where the first path node to be selected is a point of an outermost circle of the body when the mobile robot is located at the starting point;
the point of the outermost circle of the fuselage is the grid as the minimum unit, and one grid corresponds to one point, for example, as shown in fig. 4, the first path node to be selected specifically includes several nodes ABCDEFGHIJKL. The first path node to be selected is a node initially considered when the mobile robot performs path selection, and the mobile robot moves from a current starting point to one of the first path nodes to be selected so as to move to the target point.
Step 133, adding the grid corresponding to the starting point into a preset closing list, and adding the grid corresponding to the first path node to be selected into a preset opening list, where the closing list is used to record grids that are not considered for selecting a path, and the opening list is used to record grids that are considered for selecting a path; the closing list and the opening list can be pre-established, and the space size of the data stored in the closing list and the opening list can be determined according to the number of grids established in the current scene.
Step 134, according to the grid where the starting point is located, the grid where the target point is located, and the grid corresponding to the first path node to be selected, F, G, H corresponding to the first path node to be selected is calculated, where F is G + H, where G is a moving cost of moving from the starting point to the first path node to be selected, and H is an estimated cost of moving from the first path node to be selected to the target point;
wherein G and H corresponding to the first path node to be selected can be calculated based on a conventional a-star algorithm.
Step 135, determining a grid where the first path node to be selected with the minimum F is located;
step 136, judging whether the first path node to be selected corresponding to the minimum F is the target point according to the grid where the first path node to be selected with the minimum F is located and the grid where the target point is located; if the first path node to be selected corresponding to the minimum F is the target point, the search is ended, and the path of the mobile robot, that is, the path from the starting point to the first path node to be selected corresponding to the minimum F can be saved.
Step 137, if the first path node to be selected corresponding to the minimum F is not the target point, determining whether the first path node to be selected corresponding to the minimum F is a path node;
in this step, when the first path node to be selected corresponding to the minimum F is not the target point, it is described that the path selection is to be continued, and at this time, it is required to determine whether the first path node to be selected is a path node to which the mobile robot moves next, where the path node refers to a node on the path when the path selection is performed.
Wherein the determining whether the first path node to be selected corresponding to the minimum F is a path node includes:
A. taking the first path node to be selected corresponding to the minimum F as a center, and acquiring the outermost circle of points of an airframe range around the center;
B. judging whether an obstacle exists in the range of the machine body of each outermost circle of points;
C. if no obstacle exists, judging whether the point of the outermost circle exists in the opening list;
D. if yes, judging whether the father node of the point of the outermost circle needs to be modified;
wherein the determining whether the parent node of the point of the outermost circle needs to be modified includes: acquiring a first movement cost required from the starting point to the first path node to be selected corresponding to the minimum F and from the first path node to be selected corresponding to the minimum F to the point of the outermost circle; acquiring a second movement cost required from the starting point to the point of the outermost circle; when the first mobile cost is larger than the second mobile cost, modifying the father node of the point of the outermost circle; when the first moving cost is smaller than the second moving cost, modifying the parent node of the point of the outermost circle.
E. If so, the first path node to be selected corresponding to the minimum F is a path node;
F. and if not, the first path node to be selected corresponding to the minimum F is not the path node.
138, if the first path node to be selected corresponding to the minimum F is a path node, acquiring a grid corresponding to a second path node to be selected, and executing step 133 based on the second path node to be selected skipping to continue searching for the path node of the mobile robot, wherein the second path node to be selected refers to a point which is centered on the first path node to be selected corresponding to the minimum F and is the outermost circle of a range of the robot body around the center;
and the second path node to be selected refers to a point of an outermost circle within a range of the fuselage around the center by taking the determined path node as the center after moving from the starting point to the first determined path node. And determining the next path node based on the second path node to be selected, repeating the process until the determined path node corresponding to the minimum F is the target point, and ending the search so as to finish the selection of the path.
And 139, if the first path node to be selected corresponding to the minimum F is not a path node, adding the first path node to be selected corresponding to the minimum F into the closed list, and performing a jump to step 135, and re-determining a path node based on the first path node to be selected in the open list.
When the first path node to be selected corresponding to the minimum F is not a path node, it is described that the first path node moving from the starting point needs to be considered again, and at this time, the path node is determined based on the remaining other first path nodes to be selected in the open list, which may specifically refer to the above process.
The embodiment of the invention provides a path selection method of a mobile robot, which judges whether the mobile robot can linearly reach a target point from a starting point or not by determining the starting point and the target point of the mobile robot, and if not, the path selection is carried out on the mobile robot based on the body of the mobile robot. In the process of path selection, the space occupied by the mobile robot can be considered as the space which can be reached by the mobile robot, path selection is carried out based on the body of the mobile robot, the path selection is expanded by the grids occupied by the body, and therefore the selected path is more suitable for the walking of the mobile robot, and the accuracy of the path selection is improved. In addition, the movement cost is considered based on the grids occupied by the body of the mobile robot, the number of the searched grids is reduced, and the searching efficiency is improved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a path selection device of a mobile robot according to an embodiment of the present invention, where the device 20 includes: a path point determining module 21, a path judging module 22 and a path selecting module 23.
The path point determining module 21 is configured to determine a starting point and a target point of the mobile robot, where the starting point is a central point of the mobile robot; a path determining module 22, configured to determine whether the mobile robot can reach the target point from the starting point straight line; and the path selection module 23 is configured to, if not, perform path selection on the mobile robot based on the body of the mobile robot.
The path point determining module 21 sends the determined starting point and target point of the mobile robot to the path judging module 22, the path judging module 22 judges whether the mobile robot can reach the target point from the starting point straight line according to the starting point and the target point, and sends a judgment result to the path selecting module 23, and the path selecting module 23 performs path selection based on the body of the mobile robot according to the judgment result.
Wherein, when the body of the mobile robot is circular, the path determining module 22 includes: a first determination unit 221, a second determination unit 222, and a first judgment unit 223. A first determination unit 221 for determining a first straight line passing through a center point of the mobile robot and the target point; a second determination unit 222 for determining a region to be moved according to the first straight line and the body of the mobile robot; a first determining unit 223, configured to determine whether there is an obstacle in the area to be moved, if yes, the mobile robot cannot reach the target point from the starting point straight line, and if not, the mobile robot can reach the target point from the starting point straight line.
Wherein, the path selecting module 23 includes: a first processing unit 231, a first obtaining unit 232, a second processing unit 233, a first calculating unit 234, a third determining unit 235, a second judging unit 236, a third processing unit 237, a fourth processing unit 238, and a fifth processing unit 239. A first processing unit 231, configured to divide an area where the mobile robot performs path selection into a plurality of grids, and determine a grid where a body of the mobile robot, the starting point, the target point, and an obstacle point are located; a first obtaining unit 232, configured to obtain, according to a grid where a body of the mobile robot is located, a grid corresponding to a first path node to be selected, where the first path node to be selected is a point of an outermost circle of the body when the mobile robot is located at the starting point; a second processing unit 233, configured to add a grid corresponding to the starting point into a preset closing list, and add a grid corresponding to the first route node to be selected into a preset opening list, where the closing list is used to record grids that are not considered for selecting a route, and the opening list is used to record grids that are considered for selecting a route; a first calculating unit 234, configured to calculate F, G, H corresponding to the first path node to be selected according to the grid where the starting point is located, the grid where the target point is located, and the grid corresponding to the first path node to be selected, where F is G + H, where G refers to a moving cost of moving from the starting point to the first path node to be selected, and H refers to an estimated cost of moving from the first path node to be selected to the target point; a third determining unit 235, configured to determine a grid where the first path node to be selected with the smallest F is located; a second determining unit 236, configured to determine whether the first path node to be selected corresponding to the minimum F is a target point according to the grid where the first path node to be selected with the minimum F is located and the grid where the target point is located; a third processing unit 237, configured to determine whether the first path node to be selected corresponding to the minimum F is a path node if the first path node to be selected corresponding to the minimum F is not the target point; a fourth processing unit 238, configured to, if the first path node to be selected corresponding to the minimum F is a path node, obtain a grid corresponding to a second path node to be selected, execute the second processing unit 233 based on the second path node to be selected jump, so as to continue searching for the path node of the mobile robot, where the second path node to be selected refers to a point of an outermost circle of a fuselage range around a center that is the first path node to be selected corresponding to the minimum F; a fifth processing unit 239, configured to, if the first path node to be selected corresponding to the minimum F is not a path node, add the first path node to be selected corresponding to the minimum F into the closed list, and jump to execute the third determining unit 235, and re-determine a path node based on the first path node to be selected in the open list.
The third processing unit 237 is specifically configured to: taking the first path node to be selected corresponding to the minimum F as a center, and acquiring the outermost circle of points of an airframe range around the center; judging whether an obstacle exists in the range of the machine body of each outermost circle of points; if no obstacle exists, judging whether the point of the outermost circle exists in the opening list; if yes, judging whether the father node of the point of the outermost circle needs to be modified; if so, the first path node to be selected corresponding to the minimum F is a path node; and if not, the first path node to be selected corresponding to the minimum F is not the path node.
Wherein the determining whether the parent node of the point of the outermost circle needs to be modified includes: acquiring a first movement cost required from the starting point to the first path node to be selected corresponding to the minimum F and from the first path node to be selected corresponding to the minimum F to the point of the outermost circle; acquiring a second movement cost required from the starting point to the point of the outermost circle; when the first mobile cost is larger than the second mobile cost, modifying the father node of the point of the outermost circle; when the first moving cost is smaller than the second moving cost, modifying the parent node of the point of the outermost circle.
It should be noted that, for the information interaction, execution process and other contents between the modules and units in the apparatus, the specific contents may refer to the description in the method embodiment of the present invention because the same concept is used as the method embodiment of the present invention, and are not described herein again.
The embodiment of the invention provides a path selection device of a mobile robot, which judges whether the mobile robot can linearly reach a target point from a starting point or not by determining the starting point and the target point of the mobile robot, and if not, the path selection device selects a path of the mobile robot based on the body of the mobile robot. In the process of path selection, the space occupied by the mobile robot can be considered as the space which can be reached by the mobile robot, path selection is carried out based on the body of the mobile robot, the path selection is expanded by the grids occupied by the body, and therefore the selected path is more suitable for the walking of the mobile robot, and the accuracy of the path selection is improved. In addition, the movement cost is considered based on the grids occupied by the body of the mobile robot, the number of the searched grids is reduced, and the searching efficiency is improved.
Referring to fig. 6, fig. 6 is a schematic diagram of a hardware structure for executing a path selection method of a mobile robot according to an embodiment of the present invention, and as shown in fig. 6, the electronic device 30 includes:
one or more processors 31 and a memory 32, with one processor 31 being an example in fig. 6.
The processor 31 and the memory 32 may be connected by a bus or other means, as exemplified by the bus connection in fig. 6.
The memory 32 is a non-volatile computer-readable storage medium, and can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the path selection method of the mobile robot in the embodiment of the present invention (for example, the path point determining module 21, the path judging module 22, and the path selecting module 23 shown in fig. 5). The processor 31 executes various functional applications of the server and data processing by running the nonvolatile software programs, instructions, and modules stored in the memory 32, that is, implements the path selection method of the mobile robot of the above-described method embodiment.
The memory 32 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the path selection device of the mobile robot, and the like. Further, the memory 32 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 32 may optionally include memory located remotely from the processor 31, and these remote memories may be connected to the routing device of the mobile robot through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 32, and when executed by the one or more processors 31, perform the path selection method of the mobile robot in any of the above-described method embodiments, for example, perform the above-described method steps 11 to 13 in fig. 1, the method steps 121 to 126 in fig. 2, and the method steps 131 to 139 in fig. 3, and implement the functions of the modules 21 to 23, the units 221 and 223, the units 231 and 239 in fig. 5.
The product can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
The electronic device of the embodiment of the invention exists in various forms, including but not limited to a mobile robot, and other electronic devices with data interaction functions.
An embodiment of the present invention provides a non-volatile computer-readable storage medium, where the non-volatile computer-readable storage medium stores computer-executable instructions, which are executed by an electronic device to perform the method for selecting a path of a mobile robot in any method embodiment described above, for example, the method steps 11 to 13 in fig. 1, the method steps 121 to 126 in fig. 2, and the method steps 131 to 139 in fig. 3 described above are executed to implement the functions of the modules 21 to 23, the units 221 and 223, and the units 231 and 239 in fig. 5.
Embodiments of the present invention provide a computer program product comprising a computer program stored on a non-volatile computer-readable storage medium, where the computer program comprises program instructions that, when executed by a computer, cause the computer to perform the method for routing a mobile robot in any of the above-described method embodiments, for example, perform the above-described method steps 11 to 13 in fig. 1, method steps 121 to 126 in fig. 2, and method steps 131 to 139 in fig. 3, and implement the functions of the modules 21 to 23, the units 221 and 223, and the units 231 and 239 in fig. 5.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.