WO2023155928A1 - 机器人寻路方法、寻路装置、设备和计算机可读存储介质 - Google Patents

机器人寻路方法、寻路装置、设备和计算机可读存储介质 Download PDF

Info

Publication number
WO2023155928A1
WO2023155928A1 PCT/CN2023/077859 CN2023077859W WO2023155928A1 WO 2023155928 A1 WO2023155928 A1 WO 2023155928A1 CN 2023077859 W CN2023077859 W CN 2023077859W WO 2023155928 A1 WO2023155928 A1 WO 2023155928A1
Authority
WO
WIPO (PCT)
Prior art keywords
robot
path
transfer station
target
candidate
Prior art date
Application number
PCT/CN2023/077859
Other languages
English (en)
French (fr)
Inventor
朱绍明
任雪
Original Assignee
苏州科瓴精密机械科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州科瓴精密机械科技有限公司 filed Critical 苏州科瓴精密机械科技有限公司
Publication of WO2023155928A1 publication Critical patent/WO2023155928A1/zh

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0212Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory
    • G05D1/0225Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory involving docking at a fixed facility, e.g. base station or loading bay
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0276Control of position or course in two dimensions specially adapted to land vehicles using signals provided by a source external to the vehicle
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/60Other road transportation technologies with climate change mitigation effect
    • Y02T10/70Energy storage systems for electromobility, e.g. batteries

Definitions

  • the invention relates to robot control technology, in particular to a robot pathfinding method, a pathfinding device, equipment and a computer-readable storage medium.
  • the A*(A-Star) algorithm is the most effective direct search method for solving the shortest path in a static road network, and it is also an effective algorithm for solving many search problems.
  • the search space of the A* algorithm is relatively small, the pathfinding speed is relatively fast, but when the search space is relatively large, the calculation amount is huge, the algorithm pathfinding speed is relatively slow, and it is easy to cause memory overflow.
  • the principle of random and no proximity is that the robot searches in a certain direction in the search space, and when it encounters an obstacle that cannot be avoided, it searches for a new path in a new direction. This method takes a long time to find the path and has low work efficiency.
  • the technical problem to be solved by the embodiments of the present invention is to provide a pathfinding method, device, equipment and storage medium for a robot, which has the advantages of small calculation amount and fast execution speed.
  • the first aspect of the present invention provides a robot pathfinding method, including: acquiring the robot position of the robot and the charging stand position of the charging stand in the grid map;
  • the target transfer path determines the distance from the robot position to the charging stand position target path.
  • the method before determining the candidate transfer station from the position of the robot to the position of the charging stand in the case that the shortest path passes through an obstacle, the method further includes:
  • the shortest path does not pass through obstacles, determine the shortest path as a target path from the position of the robot to the position of the charging stand.
  • the method before acquiring the robot position of the robot in the grid map and the charging stand position of the charging stand, the method further includes:
  • the charging base is located on the working path
  • the determining a candidate transfer station from the position of the robot to the position of the charging stand includes:
  • the Two second reference points on the same offset side are offset by a second preset step to obtain four third reference points;
  • the third reference point is used as the candidate transfer station.
  • all candidate transit paths include:
  • the straight-line path from the first target transfer station to the second target transfer station and the path from the first target transfer station to the second target transfer station via at least one other candidate transfer station, the other candidate transfer station Refers to candidate transfer stations in the candidate transfer stations other than the first target transfer station and the second target transfer station.
  • the determining the first target transfer station corresponding to the position of the robot and the second target transfer station corresponding to the position of the charging stand from the candidate transfer stations includes:
  • a second moving path from the position of the charging stand to each of the candidate transfer stations is determined, and the candidate transfer station corresponding to the second moving path that has the shortest length and does not pass through obstacles is used as the second target transfer station.
  • the second aspect of the present invention also provides a robot pathfinding device, including: a first acquisition module, configured to acquire the robot position of the robot and the charging base position of the charging base in the grid map;
  • the second obtaining module is used to obtain the shortest path from the position of the robot to the position of the charging stand;
  • the first processing module is configured to determine a candidate transfer station from the robot position to the charging stand position when the shortest path passes through an obstacle; and determine from the candidate transfer stations corresponding to the robot position The first target transfer station and the second target transfer station corresponding to the location of the charging stand; obtain all candidates from the first target transfer station to the second target transfer station Select a transfer path; use the candidate path with the shortest length and no obstacles as the target transfer path; according to the path from the robot position to the first target transfer station, the target transfer path and the second target transfer station to The path at the position of the charging base determines a target path from the position of the robot to the position of the charging base.
  • a judging module configured to judge whether the shortest path passes through an obstacle
  • the second processing module is configured to determine that the shortest path is a target path from the position of the robot to the position of the charging stand when the shortest path does not pass through an obstacle.
  • the third aspect of the present invention also provides a device, including a memory for storing executable instructions
  • the processor is configured to implement the robot pathfinding method described in the first aspect when executing the executable instructions stored in the memory.
  • the fourth aspect of the present invention also provides a computer-readable storage medium, including program code, and when the program product runs on the electronic device, the program code is used to make the electronic device execute the first A step of any of the methods described in the aspect.
  • the robot pathfinding method, pathfinding device, equipment and computer-readable storage medium provided by the present invention obtain the robot's robot position and The position of the charging base of the charging base is used to obtain the shortest path from the position of the robot to the charging base. On the one hand, if the shortest path does not pass through obstacles, the shortest path is determined as the target path from the position of the robot to the position of the charging base. There is no need to search for the entire target path, which can greatly reduce the search for the target path, thereby reducing the amount of data processing on the path, shortening the time spent on path searching, increasing the speed of path finding, and then returning to the charging stand quickly;
  • the candidate transfer station determines the candidate transfer station from the robot position to the charging seat position, and determine the first target corresponding to the robot position from the candidate transfer station
  • the transfer station and the second target transfer station corresponding to the position of the charging stand obtain all candidate transfer paths from the first target transfer station to the second target transfer station; the candidate path with the shortest length and no obstacles is used as the target transfer Path:
  • the target transfer path According to the path from the robot position to the first target transfer station, the target transfer path and the path from the second target transfer station to the charging stand position, determine the target path from the robot position to the charging stand position, avoiding the disconnected area Therefore, on the basis of satisfying the data required for pathfinding, the amount of data calculation for the target path can be reduced, and the amount of data processing during pathfinding can also be reduced to a certain extent, thereby increasing the speed of pathfinding, and then can be quickly Return to the charging stand.
  • Fig. 1 is the structural representation of the pathfinding system that the present invention is used for implementing the robot pathfinding method of the present invention
  • Fig. 2 is a schematic flow chart of an embodiment of the method for pathfinding of a robot in the present invention
  • Fig. 3 is a schematic illustration of an example of the present invention's pathfinding process for a robot
  • Fig. 4 is the structural block diagram of robot pathfinding device of the present invention.
  • Fig. 5 is a schematic diagram of a grid map used in the pathfinding process of a robot according to the present invention.
  • FIG. 6 is a schematic structural diagram of a terminal device provided by the present invention.
  • Fig. 7 is a schematic structural diagram of the server provided by the present invention.
  • FIG. 1 shows a wayfinding system, in which the method provided by the present application can be implemented.
  • the wayfinding system includes: a mobile service robot 110 , a computing device 120 and a charging stand.
  • the computing device 120 is connected with the mobile service robot 110 in a wireless communication manner, and the computing device 120 is used to send control information to the mobile service robot 110 to make the mobile service robot 110 move to the charging stand.
  • the mobile service robot 110 can carry a terminal device, and the terminal device can be a smart phone, a game console, a desktop computer, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III, and a moving picture expert compression standard audio layer 3) At least one of players, MP4 (Moving Picture Experts Group Audio Layer IV, moving picture experts compressed standard audio layer 4) players and laptop computers.
  • the terminal device can be a smart phone, a game console, a desktop computer, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III, and a moving picture expert compression standard audio layer 3) At least one of players, MP4 (Moving Picture Experts Group Audio Layer IV, moving picture experts compressed standard audio layer 4) players and laptop computers.
  • Computing device 120 can be a server, or a server set composed of multiple servers A group, or any one of a cloud computing platform and a virtualization center, which is not limited in this embodiment of the present application.
  • the server can communicate with the terminal device through a wired network or a wireless network.
  • the server may have functions such as data processing, data storage, and data sending and receiving, which are not limited in this embodiment of the present application.
  • the robot pathfinding method in the embodiment of the present application may be executed by a terminal device or a server.
  • FIG. 2 is a schematic flowchart of an embodiment of the method for pathfinding of a robot according to the present invention. It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than here.
  • the robot pathfinding method includes steps S201-S206, wherein:
  • the grid map Before determining the robot position of the robot in the grid map and the charging base position of the charging stand, the grid map can be constructed first.
  • the grid map can be constructed through the working path of the robot, which specifically includes step (1) -(3):
  • the working path refers to the walking path of the robot starting from the charging base, where the charging base is located on the working path.
  • the working path can be expressed as a collection of location points, which can be obtained by periodically collecting the location information of the robot using laser acquisition equipment, depth cameras, sensors, and other equipment.
  • the outline of the grid map may be constructed according to the working path, and then obstacles within the delineated range of the outline are identified, and the obstacles include non-lawn areas and items placed in the lawn area.
  • the shaded part is the grid map
  • B is the position of the robot
  • C is the position of the charging stand.
  • the shortest path can be expressed as a straight line from the position of the robot to the position of the charging stand.
  • step S203 After obtaining the shortest path from the position of the robot to the position of the charging stand, it can be further judged whether the shortest path passes through obstacles; The path is the target path from the position of the robot to the position of the charging stand; if the shortest path passes through obstacles, then step S203 is performed.
  • the candidate transfer station may be determined in the following manner:
  • S2031 Draw a circumscribed rectangle of the grid map, and respectively determine a first reference point from the four sides of the circumscribed rectangle.
  • the circumscribed rectangle can be designed to follow the following principles: Minimize the distance between the circumscribed rectangle and the grid map The area of the region between the contours. Under the guidance of this principle, the long side and short side of the circumscribed rectangle do not necessarily extend along the X axis or the Y axis.
  • S2033 Offset a group of opposite sides of the circumscribed rectangle to the center of the circumscribed rectangle by a first preset step to obtain two offset sides.
  • the center of the circumscribed rectangle refers to the intersection point of two diagonal lines of the circumscribed rectangle.
  • the circumscribed rectangle has two sets of opposite sides, and the two sides of one set of opposite sides are moved toward each other by the first preset step to obtain two offset sides.
  • Each offset edge has two intersection points with the outline (edge) of the grid map, and these intersection points are used as the second reference point.
  • the outline points in the figure form the outline of the grid map, and demarcate the boundary of the walkable lawn area, that is, the area within the outline is the walkable area of the robot.
  • the method selected in this embodiment is to select the points at both ends of the lawn grid as the required contour points in the direction of the y-axis.
  • the x-axis direction can also be selected, and all edge points can also be selected.
  • the two ends of the y-axis direction are used to reduce the amount of data.
  • the smallest circumscribed rectangle is selected because the maximum number of transfer stations is set to be four, which can satisfy the general lawn shape. Therefore, the minimum circumscribed rectangle can be said to be the shape closest to the lawn grid, and the generated rectangle does not necessarily have the x-axis as the horizontal direction.
  • the outline rectangle obtained in this embodiment is represented by four points as shown in FIG. 5 .
  • the obtained rectangular four points do not necessarily fall within the grid area of the lawn, further offsets are required to allow the transfer station to fall within the grid area.
  • the method is not limited to this embodiment. This embodiment has gone through two steps, which can also be combined into one step.
  • the R1R2 edge takes R1R4 as the horizontal direction translation (offset ⁇ Max) unit, and then uses the R1R4 edge to translate to the lawn grid to get F1, and the last lawn grid to get F2; the R3R4 side translates to R1R4 as the horizontal line direction (offset ⁇ Max) unit, and then use the R3R4 side to translate to the lawn grid to get F3, and the last lawn grid to get F4; since the transfer station Fn still has the edge position of the lawn grid at this time, if When the distance between them is greater than offset, the transfer station Nn inside the lawn grid can be further obtained; at this time, Fn moves the positive and negative directions of the Y axis to move the offset unit inward, and N1, N2, N3, and N4 are obtained.
  • the obtained N1, N2, N3, and N4 are candidate transfer stations.
  • the straight-line path from the first target transfer station to the second target transfer station and the path from the first target transfer station to the second target transfer station via at least one other candidate transfer station, other candidate transfer stations refer to the candidate transfer stations except the first target Candidate transfer stations other than the transfer station and the second target transfer station.
  • the present embodiment provides a target path for the robot to return to the charging stand after work
  • the general rules for generating the home path that is, the general rules for the robot to go from the first destination transfer station to the second destination transfer station:
  • the machine can walk clockwise or counterclockwise; the four candidate transfer stations N1, N2, N3, and N4 form a circular path in sequence.
  • Nm-1 is the first target transfer station
  • Nn is the first target transfer station 2.
  • Nm is the first target transfer station
  • Nn is the second target transfer station, and they are sorted in ascending order.
  • the number of transfer stations is n-m+1;
  • the home route is that Nm is the first target transfer station, and Nn is the second target transfer station, and they are sorted in ascending order.
  • the number of transfer stations is 5-m+n;
  • the path generated by walking clockwise is N2 ⁇ N3- ⁇ N4 ⁇ N1
  • the path generated by walking counterclockwise is N2 ⁇ N1; but starting from point B , in reality, the machine is unable to reach the first target transfer station N2, conforming to the rule g, changing the first target transfer station to the next transfer station, a path N3 ⁇ N4 ⁇ N1 will be generated, and the target transfer path will be obtained.
  • the target transfer path and the path from the second target transfer station to the charging stand position determine the target path from the robot position to the charging stand position
  • the target path for the robot to return to the charging stand is robot position ⁇ N3 ⁇ N4 ⁇ N1 ⁇ the charging stand position.
  • the robot pathfinding method, pathfinding device, equipment and computer-readable storage medium provided by the present invention obtain the robot's robot position and The position of the charging stand of the charging stand, obtain the shortest path from the robot position to the charging stand.
  • the shortest path does not pass through obstacles, determine the shortest path as the target path from the robot position to the charging stand position, without targeting the entire target Finding the path can greatly reduce the search for the target path, thereby reducing the path-finding
  • the amount of data processing can shorten the time spent on searching for the road, increase the speed of finding the road, and then return to the charging stand quickly;
  • the candidate transfer station determines the candidate transfer station from the robot position to the charging stand position, and determine the first target transfer station corresponding to the robot position and the first target transfer station corresponding to the charging stand position from the candidate transfer stations.
  • the second target transfer station obtains all candidate transfer paths from the first target transfer station to the second target transfer station; takes the candidate path with the shortest length and does not pass through obstacles as the target transfer path; according to the robot position to the first target transfer station path, target transfer path and the path from the second target transfer station to the location of the charging stand, to determine the target path from the robot position to the location of the charging stand, avoiding invalid data processing in disconnected areas, so that the data required for pathfinding can be satisfied
  • it can also reduce the amount of data processing during pathfinding to a certain extent, thereby increasing the speed of pathfinding, and then can quickly return to the charging stand.
  • Fig. 4 shows a block diagram of a wayfinding device according to an embodiment of the present disclosure.
  • the pathfinding device includes a first obtaining module 401 , a second obtaining module 402 and a first processing module 404 .
  • the first acquisition module 401 is used to acquire the position of the robot in the grid map and the position of the charging base of the charging base;
  • the second acquiring module 402 is configured to acquire the shortest path from the position of the robot to the position of the charging stand;
  • the first processing module 404 is configured to determine a candidate transfer station from the position of the robot to the position of the charging stand when the shortest path passes through an obstacle; determine from the candidate transfer station the location of the robot The corresponding first target transfer station and the second target transfer station corresponding to the position of the charging stand; obtain all candidate transfer paths from the first target transfer station to the second target transfer station; The candidate path passing through the obstacle is used as the target transfer path; according to the path from the position of the robot to the first target transfer station, the target transfer path and the path from the second target transfer station to the position of the charging stand, determine A target path from the robot position to the charging dock position.
  • the pathfinding device may further include a judging module 403 and a second processing module 405 .
  • a judging module 403, configured to judge whether the shortest path passes through obstacles
  • the second processing module 405 is configured to determine that the shortest path is a target path from the position of the robot to the position of the charging stand when the shortest path does not pass through obstacles.
  • first obtaining module 401 the second obtaining module 402 and the first processing module 404 shown in FIG. 4 may be included in the computing device 120 described with reference to FIG. 1 .
  • the modules shown in FIG. 4 may execute steps or actions in the methods or processes referring to the embodiments of the present disclosure.
  • Fig. 6 shows a structural block diagram of a terminal device provided by an exemplary embodiment of the present application.
  • the terminal device 600 can be a portable mobile terminal, such as: smart phone, tablet computer, MP3 (Moving Picture Experts Group Audio Layer III, moving picture expert compression standard audio level 3) player, MP4 (Moving Picture Experts Group Audio Layer IV, moving picture Expert compression standard audio level 4) player, laptop or desktop computer.
  • the terminal device 700 may also be called user equipment, portable terminal, laptop terminal, desktop terminal and other names.
  • the terminal device 600 includes: a processor 601 and a memory 602 .
  • the processor 601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like.
  • Processor 601 can adopt at least one hardware form in DSP (Digital Signal Processing, digital signal processing), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, programmable logic array) accomplish.
  • the processor 601 may also include a main processor and a coprocessor, the main processor is a processor for processing data in a wake-up state, and is also called a CPU (Central Processing Unit, central processing unit); Low-power processor for processing data in standby state.
  • CPU Central Processing Unit, central processing unit
  • Low-power processor for processing data in standby state.
  • the processor 601 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is used to render and draw the content required to be displayed on the display screen. system.
  • the processor 601 may further include an AI (Artificial Intelligence, artificial intelligence) processor, where the AI processor is configured to process computing operations related to machine learning.
  • AI Artificial Intelligence, artificial intelligence
  • Memory 602 may include one or more computer-readable storage media, which may be non-transitory.
  • the memory 602 may also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices and flash memory storage devices.
  • the non-transitory computer-readable storage medium in the memory 602 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 601 to realize the robot search provided by the method embodiments in this application. road method.
  • the terminal device 600 may optionally further include: a peripheral device interface 603 and at least one peripheral device.
  • the processor 601, the memory 602, and the peripheral device interface 603 may be connected through buses or signal lines.
  • Each peripheral device can be connected to the peripheral device interface 603 through a bus, a signal line or a circuit board.
  • the peripheral device includes: at least one of a radio frequency circuit 604 , a display screen 605 , a camera component 606 , an audio circuit 607 , a positioning component 608 and a power supply 609 .
  • the peripheral device interface 603 may be used to connect at least one peripheral device related to I/O (Input/Output, input/output) to the processor 601 and the memory 602 .
  • the processor 601, memory 602 and peripheral device interface 603 are integrated on the same chip or circuit board; in some other embodiments, any one of the processor 601, memory 602 and peripheral device interface 603 or The two can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
  • the radio frequency circuit 604 is configured to receive and transmit RF (Radio Frequency, radio frequency) signals, also called electromagnetic signals.
  • the radio frequency circuit 604 communicates with the communication network and other communication devices through electromagnetic signals.
  • the radio frequency circuit 604 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals.
  • the radio frequency circuit 604 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like.
  • the radio frequency circuit 604 can communicate with other terminals through at least one wireless communication protocol.
  • the wireless communication protocols include but are not limited to: World Wide Web, Urban Local area network, intranet, mobile communication networks of all generations (2G, 3G, 4G and 5G), wireless local area network and/or WiFi (Wireless Fidelity, wireless fidelity) network.
  • the radio frequency circuit 604 may also include circuits related to NFC (Near Field Communication, short-range wireless communication), which is not limited in this application.
  • the display screen 605 is used to display a UI (User Interface, user interface).
  • the UI can include graphics, text, icons, video, and any combination thereof.
  • the display screen 605 also has the ability to collect touch signals on or above the surface of the display screen 605 .
  • the touch signal can be input to the processor 601 as a control signal for processing.
  • the display screen 705 can also be used to provide virtual buttons and/or virtual keyboards, also called soft buttons and/or soft keyboards.
  • the display screen 605 there may be one display screen 605, which is set on the front panel of the terminal device 600; in other embodiments, there may be at least two display screens 605, which are respectively set on different surfaces of the terminal device 600 or in a Design; in some other embodiments, the display screen 605 may be a flexible display screen, which is arranged on the curved surface or the folded surface of the terminal device 600 . Even, the display screen 605 can also be set as a non-rectangular irregular figure, that is, a special-shaped screen.
  • the display screen 605 can be made of LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, organic light-emitting diode) and other materials.
  • the camera assembly 606 is used to capture images or videos.
  • the camera component 606 includes a front camera and a rear camera.
  • the front camera is set on the front panel of the terminal, and the rear camera is set on the back of the terminal.
  • there are at least two rear cameras which are any one of the main camera, depth-of-field camera, wide-angle camera, and telephoto camera, so as to realize the fusion of the main camera and the depth-of-field camera to realize the background blur function.
  • camera assembly 606 may also include a flash.
  • the flash can be a single-color temperature flash or a dual-color temperature flash. Dual color temperature flash refers to the combination of warm light flash and cold light flash, which can be used for light compensation under different color temperatures.
  • Audio circuitry 607 may include a microphone and speakers.
  • the microphone is used to capture the user and the environment sound waves, and convert the sound waves into electrical signals and input them to the processor 601 for processing, or input them to the radio frequency circuit 604 to realize voice communication.
  • the microphone can also be an array microphone or an omnidirectional collection microphone.
  • the speaker is used to convert the electrical signal from the processor 601 or the radio frequency circuit 604 into sound waves.
  • the loudspeaker can be a conventional membrane loudspeaker or a piezoelectric ceramic loudspeaker.
  • the audio circuit 607 may also include a headphone jack.
  • the positioning component 608 is used to locate the current geographic location of the terminal device 600 to implement navigation or LBS (Location Based Service, location-based service).
  • the positioning component 608 may be a positioning component based on the GPS (Global Positioning System, Global Positioning System) of the United States, the Beidou system of China or the Galileo system of Russia.
  • the power supply 609 is used to supply power to various components in the terminal device 600 .
  • Power source 609 may be AC, DC, disposable or rechargeable batteries.
  • the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery.
  • a wired rechargeable battery is a battery charged through a wired line
  • a wireless rechargeable battery is a battery charged through a wireless coil.
  • the rechargeable battery can also be used to support fast charging technology.
  • the terminal device 600 further includes one or more sensors 610 .
  • the one or more sensors 610 include, but are not limited to: an acceleration sensor 611 , a gyro sensor 612 , a pressure sensor 613 , a fingerprint sensor 614 , an optical sensor 615 and a proximity sensor 616 .
  • the acceleration sensor 611 can detect the acceleration on the three coordinate axes of the coordinate system established by the terminal device 600 .
  • the acceleration sensor 611 can be used to detect the components of the acceleration of gravity on the three coordinate axes.
  • the processor 601 may control the display screen 605 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 611 .
  • the acceleration sensor 611 can also be used for collecting game or user's motion data.
  • the gyro sensor 612 can detect the body direction and rotation angle of the terminal device 600, and the gyro The gyroscope sensor 612 may cooperate with the acceleration sensor 611 to collect the 3D motion of the user on the terminal device 600 .
  • the processor 601 can realize the following functions: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control and inertial navigation.
  • the pressure sensor 613 may be disposed on a side frame of the terminal device 600 and/or a lower layer of the display screen 605 .
  • the pressure sensor 613 When the pressure sensor 613 is set on the side frame of the terminal device 600 , it can detect the user's grip signal on the terminal device 600 , and the processor 601 performs left and right hand recognition or shortcut operation according to the grip signal collected by the pressure sensor 613 .
  • the processor 601 controls operable controls on the UI interface according to the user's pressure operation on the display screen 605.
  • the operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
  • the fingerprint sensor 614 is used to collect the user's fingerprint, and the processor 601 recognizes the identity of the user according to the fingerprint collected by the fingerprint sensor 614, or the fingerprint sensor 614 recognizes the user's identity according to the collected fingerprint. When the identity of the user is recognized as a trusted identity, the processor 601 authorizes the user to perform related sensitive operations, such sensitive operations include unlocking the screen, viewing encrypted information, downloading software, making payment, and changing settings.
  • the fingerprint sensor 614 may be disposed on the front, back or side of the terminal device 600 . When the terminal device 600 is provided with a physical button or a manufacturer's logo, the fingerprint sensor 614 may be integrated with the physical button or the manufacturer's Logo.
  • the optical sensor 615 is used to collect ambient light intensity.
  • the processor 601 may control the display brightness of the display screen 605 according to the ambient light intensity collected by the optical sensor 615 . Specifically, when the ambient light intensity is high, the display brightness of the display screen 605 is increased; when the ambient light intensity is low, the display brightness of the display screen 605 is decreased.
  • the processor 601 may also dynamically adjust shooting parameters of the camera assembly 606 according to the ambient light intensity collected by the optical sensor 615 .
  • the proximity sensor 616 also called a distance sensor, is usually arranged on the front panel of the terminal device 600 .
  • the proximity sensor 616 is used to collect the distance between the user and the front of the terminal device 600 .
  • the processor 601 controls the display screen 605 to switch from the bright screen state to the off-screen state; when the proximity sensor 616 detects that the user When the distance from the front of the terminal device 600 gradually increases, the processor 601 controls the display screen 605 to switch from the off-screen state to the on-screen state.
  • FIG. 6 does not constitute a limitation on the terminal device 600, and may include more or less components than shown in the figure, or combine certain components, or adopt different component arrangements.
  • FIG. 7 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • the server 700 may have relatively large differences due to different configurations or performances, and may include one or more processors 701 and one or more memories 702, wherein, At least one program code is stored in the one or more memories 702, and the at least one program code is loaded and executed by the one or more processors 701 to implement the robot pathfinding method provided by the above method embodiments.
  • the processor 701 is a CPU.
  • the server 700 may also have components such as wired or wireless network interfaces, keyboards, and input/output interfaces for input and output, and the server 700 may also include other components for implementing device functions, which will not be repeated here.
  • a computer-readable storage medium is also provided, and at least one program code is stored in the storage medium, and the at least one program code is loaded and executed by a processor, so that the electronic device realizes any one of the above-mentioned Pathfinding methods for robots.
  • the above-mentioned computer-readable storage medium can be a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a read-only optical disc (Compact Disc Read-OnlyMemory, CD-ROM) , tapes, floppy disks and optical data storage devices, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • CD-ROM Compact Disc Read-OnlyMemory
  • tapes tapes
  • floppy disks and optical data storage devices
  • a computer program or a computer program product wherein at least one computer instruction is stored in the computer program or computer program product, and the at least one computer instruction is loaded and executed by a processor, so that the computer implements Any of the above robot pathfinding methods.

Landscapes

  • Engineering & Computer Science (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

本发明公开一种机器人寻路方法、寻路装置、设备和计算机可读存储介质,该方法包括获取栅格地图中机器人的机器人位置和充电座的充电座位置;获取机器人位置到充电座位置的最短路径;在最短路径经过障碍物的情况下,确定从机器人位置到充电座位置的候选中转站;从候选中转站中确定与机器人位置对应的第一目标中转站和与充电座位置对应的第二目标中转站;获取从第一目标中转站到第二目标中转站的所有候选中转路径;将长度最短且不经过障碍物的候选路径作为目标中转路径;根据机器人位置到第一目标中转站的路径、目标中转路径和第二目标中转站到充电座位置的路径,确定从机器人位置到充电座位置的目标路径。采用本发明,具有运算量小,执行速度快的优点。

Description

机器人寻路方法、寻路装置、设备和计算机可读存储介质 技术领域
本发明涉及机器人控制技术,特别是涉及一种机器人寻路方法、寻路装置、设备和计算机可读存储介质。
背景技术
在生活场景中割草机器人的运用已逐渐普遍,帮助人们更好的提高工作效率。
现有技术中,机器人寻路方法有很多方式,较为常见的有A*算法和随机无就近原则。
A*(A-Star)算法是一种静态路网中求解最短路径最有效的直接搜索方法,也是解决许多搜索问题的有效算法。然而,A*算法在搜索空间相对较小时,寻路速度相对较快,但搜索空间相对较大时,计算量庞大,算法寻路速度相对较慢,且易造成内存溢出。
随机无就近原则为机器人在搜索空间里沿某一方向搜索,当遇到障碍物无法躲避时,重新换新的方向搜索路径,此方法寻路时间长,工作效率低。
发明内容
本发明实施例所要解决的技术问题在于,提供一种机器人寻路方法、装置、设备和存储介质,具有运算量小,执行速度快的优点。
为了解决上述技术问题,本发明的第一方面提供了一种机器人寻路方法,包括:获取栅格地图中机器人的机器人位置和充电座的充电座位置;
获取所述机器人位置到所述充电座位置的最短路径;
在所述最短路径经过障碍物的情况下,确定从所述机器人位置到所述充电座位置的候选中转站;
从所述候选中转站中确定与所述机器人位置对应的第一目标中转站和与所述充电座位置对应的第二目标中转站;
获取从所述第一目标中转站到所述第二目标中转站的所有候选中转路径;将长度最短且不经过障碍物的候选路径作为目标中转路径;
根据所述机器人位置到所述第一目标中转站的路径、所述目标中转路径和所述第二目标中转站到所述充电座位置的路径,确定从所述机器人位置到所述充电座位置的目标路径。
在一个可行的实现方式中,所述在所述最短路径经过障碍物的情况下,确定从所述机器人位置到所述充电座位置的候选中转站之前,还包括:
判断所述最短路径是否经过障碍物;
在所述最短路径未经过障碍物的情况下,确定所述最短路径为从所述机器人位置到所述充电座位置的目标路径。
在一个可行的实现方式中,所述获取栅格地图中机器人的机器人位置和充电座的充电座位置之前,还包括:
获取机器人在草坪区域的工作路径,所述充电座位于所述工作路径上;
根据所述工作路径构建栅格地图。
在一个可行的实现方式中,所述确定从所述机器人位置到所述充电座位置的候选中转站包括:
绘制所述栅格地图的外切矩形,从所述外切矩形的四条边上分别确定一个第一基准点;
将所述外切矩形的一组对边向所述外切矩形的中心偏移第一预设步长,得到两条偏移边;
将两条偏移边与所述栅格地图边缘的四个交点作为第二基准点,将处 于同一偏移边的两个第二基准点相向偏移第二预设步长,得到四个第三基准点;
将所述第三基准点作为所述候选中转站。
在一个可行的实现方式中,所有候选中转路径包括:
所述第一目标中转站到所述第二目标中转站的直线路径以及所述第一目标中转站经至少一个其他候选中转站到所述第二目标中转站的路径,所述其他候选中转站是指所述候选中转站中除所述第一目标中转站和所述第二目标中转站以外的候选中转站。
在一个可行的实现方式中,所述从所述候选中转站中确定与所述机器人位置对应的第一目标中转站和与所述充电座位置对应的第二目标中转站,包括:
确定所述机器人位置到各所述候选中转站的第一移动路径,将长度最短且不经过障碍物的第一移动路径所对应的候选中转站作为第一目标中转站;
确定所述充电座位置到各所述候选中转站的第二移动路径,将长度最短且不经过障碍物的第二移动路径所对应的候选中转站作为第二目标中转站。
相应地,本发明的第二方面还提供了一种机器人寻路装置,包括:第一获取模块,用于获取栅格地图中机器人的机器人位置和充电座的充电座位置;
第二获取模块,用于获取所述机器人位置到所述充电座位置的最短路径;
第一处理模块,用于在所述最短路径经过障碍物的情况下,确定从所述机器人位置到所述充电座位置的候选中转站;从所述候选中转站中确定与所述机器人位置对应的第一目标中转站和与所述充电座位置对应的第二目标中转站;获取从所述第一目标中转站到所述第二目标中转站的所有候 选中转路径;将长度最短且不经过障碍物的候选路径作为目标中转路径;根据所述机器人位置到所述第一目标中转站的路径、所述目标中转路径和所述第二目标中转站到所述充电座位置的路径,确定从所述机器人位置到所述充电座位置的目标路径。
在一个可行的实现方式中,还包括:
判断模块,用于判断所述最短路径是否经过障碍物;
第二处理模块,用于在所述最短路径未经过障碍物的情况下,确定所述最短路径为从所述机器人位置到所述充电座位置的目标路径。
相应地,本发明的第三方面还提供了一种设备,包括存储器,用于存储可执行指令;
处理器,用于执行所述存储器中存储的可执行指令时,实现第一方面所述的机器人寻路方法。
相应地,本发明的第四方面还提供了一种计算机可读存储介质,包括程序代码,当所述程序产品在电子设备上运行时,所述程序代码用于使所述电子设备执行第一方面中任一所述方法的步骤。
实施本发明,具有如下有益效果:
本发明提供的机器人寻路方法、寻路装置、设备和计算机可读存储介质,通过获取机器人在草坪区域的工作路径,并将工作路径构建栅格地图,获取栅格地图中机器人的机器人位置和充电座的充电座位置,获取所述机器人位置到所述充电座的最短路径,一方面,在最短路径未经过障碍物的情况下,确定最短路径为从机器人位置到充电座位置为目标路径,无需针对整个目标路径进行寻找,可以极大地降低进行目标路径的搜索,从而降低寻路上的数据处理量,缩短搜路消耗的时间,提高寻路速度,进而可以快速回到充电座;
另一方面在最短路径经过障碍物的情况下,确定从机器人位置到充电座位置的候选中转站,从候选中转站中确定与机器人位置对应的第一目标 中转站和与充电座位置对应的第二目标中转站,获取从第一目标中转站到所述第二目标中转站的所有候选中转路径;将长度最短且不经过障碍物的候选路径作为目标中转路径;根据机器人位置到第一目标中转站的路径、目标中转路径和第二目标中转站到所述充电座位置的路径,确定从机器人位置到充电座位置的目标路径,避免了不连通的区域的无效数据处理,因而可以在满足寻路所需数据的基础上,降低目标路径的数据计算量,也在一定程度上可以降低寻路时的数据处理量,从而提高寻路速度,进而可以快速回到充电座。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理,并不构成对本申请的不当限定。
图1是本发明用于实施本发明的机器人寻路方法的寻路系统的结构示意图;
图2是本发明用于机器人寻路方法的实施例流程示意图;
图3是本发明用于机器人寻路过程的示例说明示意图;
图4是本发明机器人寻路装置的结构框图;
图5是本发明用于机器人寻路过程的栅格地图示意图。
图6是本发明提供的终端设备的结构示意图;
图7是本发明提供的服务器的结构示意图。
具体实施方式
为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附 图对本发明的具体实施方式做详细的说明。在下面的描述中阐述了很多具体细节以便于充分理解本发明。但是本发明能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本发明内涵的情况下做类似改进,因此本发明不受下面公开的具体实施例的限制。
需要说明的是,当元件被称为“固定于”另一个元件,它可以直接在另一个元件上或者也可以存在居中的元件。当一个元件被认为是“连接”另一个元件,它可以是直接连接到另一个元件或者可能同时存在居中元件。本文所使用的术语“垂直的”、“水平的”、“左”、“右”以及类似的表述只是为了说明的目的。
除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中在本发明的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本发明。本文所使用的术语“及/或”包括一个或多个相关的所列项目的任意的和所有的组合。
参考图1,图1示出了一种寻路系统,本申请提供的方法可在所述寻路系统内实施。
图1中,所述寻路系统包括:移动式服务机器人110、计算设备120和充电座。其中,计算设备120与移动式服务机器人110以无线通讯方式连接,计算设备120用于向移动式服务机器人110发送控制信息,以使移动式服务机器人110向充电座移动。
移动式服务机器人110可以搭载终端设备,所述终端设备可以是智能手机、游戏主机、台式计算机、平板电脑、电子书阅读器、MP3(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)播放器、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器和膝上型便携计算机中的至少一种。
计算设备120可以为一台服务器,或者为多台服务器组成的服务器集 群,或者为云计算平台和虚拟化中心中的任意一种,本申请实施例对此不加以限定。服务器可以与终端设备通过有线网络或无线网络进行通信连接。服务器可以具有数据处理、数据存储以及数据收发等功能,在本申请实施例中不加以限定。
本申请实施例中的机器人寻路方法可以由终端设备或者服务器执行。
参照图2,图2是本发明用于机器人寻路方法的实施例流程示意图。需要说明的是,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或者所描述的步骤。在本实施例中,该机器人寻路方法包括步骤S201~S206,其中:
S201、获取栅格地图中机器人的机器人位置和充电座的充电座位置。
在确定栅格地图中机器人的机器人位置和充电座的充电座位置之前,可以先构建栅格地图,本发明实施例中,可以通过机器人的工作路径来构建栅格地图,具体包括步骤(1)-(3):
(1)获取机器人在草坪区域的工作路径,该工作路径是指机器人以充电座为起点的行走路径,其中充电座位于工作路径上。工作路径可以表示为位置点的集合,可以使用激光采集设备、深度相机、传感器等设备周期性采集机器人的位置信息来获得这些位置点。
(2)根据工作路径构建栅格地图。
在一种可能的实现方式中,可以根据工作路径构建栅格地图的轮廓,然后将轮廓圈定范围内的障碍物标识出来,障碍物包括非草坪区域以及放置在草坪区域的物品。
(3)在栅格地图中确定机器人位置和充电座位置。
其中,如图5所示,阴影部分为栅格地图,B为机器人位置,C为充电座位置。
S202、确定机器人位置到充电座位置的最短路径。
最短路径可以表示为从机器人位置与充电座位置之间的直线连线。
在获取到机器人位置到充电座位置的最短路径之后,可以进一步判断最短路径是否经过障碍物;如果最短路径未经过障碍物,表明机器人能够从当前位置以直线行走方式靠近充电座,故可以确定最短路径为从机器人位置到充电座位置的目标路径;如果最短路径经过障碍物,则执行步骤S203。
S203、在最短路径经过障碍物的情况下,确定从机器人到充电座位置的候选中转站。
在一种可能的实现方式中,候选中转站可以通过如下方式确定:
S2031:绘制栅格地图的外切矩形,从外切矩形的四条边上分别确定一个第一基准点。
由于栅格地图更大概率是不规则图形,为了使后续偏移确定的点能够尽可能的落到栅格地图内,可以设计外切矩形遵循如下原则:尽量减小外切矩形与栅格地图轮廓之间的区域面积。在这一原则指导下,外切矩形的长边和短边不一定是沿X轴或者Y轴延伸。
S2033:将外切矩形的一组对边向外切矩形的中心偏移第一预设步长,得到两条偏移边。
其中,外切矩形的中心是指外切矩形的两条对角线的相交点。外切矩形有两组对边,使其中一组对边的两条边相向移动第一预设步长,获得两条偏移边。毎条偏移边与栅格地图的轮廓(边缘)有两个交点,将这些交点作为第二基准点。
S2035:将两条偏移边与栅格地图边缘的四个交点作为第二基准点,将处于同一偏移边的两个第二基准点相向偏移第二预设步长,得到四个第三基准点。
S2037:将第三基准点作为候选中转站。
请参照图5,图中轮廓点组成栅格地图的轮廓,划分出可行走草坪区域的边界,即轮廓以内为机器人可行走区域。
本实施例选择的方式是,以y轴方向,选取草坪栅格的两端的点为所需轮廓点。同理也可以选择x轴方向,亦可选取所有边缘点,本案使用y轴方向两端点是为了减少数据量。
本实施例选择外接最小矩形,是因为设定中转站最多为四个,可以满足一般草坪形状。所以最小外接矩形可以说是最贴近草坪栅格的形状,生成的矩形不一定是以x轴为水平方向。
本实施例得到轮廓矩形如图5用四个点位表示。但是由于获取到的矩形四点并不一定满足落在草坪栅格区域,所以需要进一步进行偏移,让中转站位落在栅格区域。
为了让中转站位落在栅格区域内,不局限于本实施例方法。本实施例经历了两步骤,也可合为一步。
因为定位系统精度在3m左右,本实施例以2倍精度为偏移基准值,如offset=6m,其中Max为整个栅格地图最大的尺寸。
R1R2边以R1R4为水平线方向平移(offset~Max)单位,再以R1R4边平移至到的草坪栅格即得F1,平移到的最后一个草坪栅格即得F2;R3R4边以R1R4为水平线方向平移(offset~Max)单位,再以R3R4边平移至到的草坪栅格即得F3,平移到的最后一个草坪栅格即得F4;由于此时中转站Fn还是存在草坪栅格的边缘位置,如果满足之间间距大于offset时,可以进一步得到草坪栅格内部的中转站Nn;此时Fn移动Y轴正反方向分别向内移动offset单位,获得N1、N2、N3、N4。
获得的N1、N2、N3、N4即为候选中转站。
S204、从候选中转站中确定与机器人位置对应的第一目标中转站和与充电座位置对应的第二目标中转站。
在S203得到的四个候选中转站后:
确定机器人位置到各候选中转站的第一移动路径,将长度最短且不经 过障碍物的第一移动路径所对应的候选中转站作为第一目标中转站;
确定充电座位置到各候选中转站的第二移动路径,将长度最短且不经过障碍物的第二移动路径所对应的候选中转站作为第二目标中转站。
S205、获取从第一目标中转站到第二目标中转站的所有候选中转路径;将长度最短且不经过障碍物的候选路径座位目标中转路径。
第一目标中转站到第二目标中转站的直线路径以及第一目标中转站经至少一个其他候选中转站到第二目标中转站的路径,其他候选中转站是指候选中转站中除第一目标中转站和第二目标中转站以外的候选中转站。
从候选中转站中确定与机器人位置对应的第一目标中转站和与充电座位置对应的第二目标中转站;获取从第一目标中转站到第二目标中转站的所有候选中转路径;将长度最短且不经过障碍物的候选路径作为目标中转路径。
选取中转站Ni(i=1,2,3,4)中两点分别为第一目标中转站和第二目标中转站,其中机器人位置距离最近的第一目标中转站为Sm(m=1,2,3,4),充电座位置距离最近的第二目标中转站为En(n=1,2,3,4);
参照图5,本实施例提供了一种机器人的工作后回充电座的的目标路径,机器人距离最近的第一目标中转站为N2,即m=2;距离充电座最近的第二目标中转站为N1,即n=1;因此取第一目标中转站为S2,第二目标中转站为E1;
产生回家路径的一般规则,即机器人从第一目标中转站到第二目标中转站的一般规则:
机器可以执行顺时针行走,也可以执行逆时针行走;其中N1、N2、N3、N4四个候选中转站按顺序依次构成一个循环路径。
a.如果m=n,若顺时针,回家路径为Nm+1为第一目标中转站,Nn为第二目标中转站,依次递增排序,中转站数量为4;
b.如果m=n,若逆时针,回家路径为Nm-1为第一目标中转站,Nn为第 二目标中转站,依次递减排序,中转站数量为4;
c.如果m<n,若顺时针,回家路径为Nm为第一目标中转站,Nn为第二目标中转站,依次递增排序,中转站数量为n-m+1;
d.如果m<n,若逆时针,回家路径为Nm为第一目标中转站,Nn为第二目标中转站,依次递减排序,中转站数量为5-n+m;
e.如果m>n,若顺时针,回家路径为Nm为第一目标中转站,Nn为第二目标中转站,依次递增排序,中转站数量为5-m+n;
f.如果m>n,若逆时针,回家路径为Nm为第一目标中转站,Nn为第二目标中转站,依次递减排序,中转站数量为m-n+1;
g.当顺时针、逆时针均无法走到第一目标中转站时,则更改第一目标中转站为路径中下一个中转站点;
m=2,n=1,m>n,符合规则e和f,按顺时针行走生成路径为N2→N3-→N4→N1,按逆时针行走生成路径为N2→N1;但是从B点出发,实际情况下机器是无法到达第一目标中转站N2点,符合规则g,改第一目标中转站为下一个中转站点,就会生成路径N3→N4→N1,得到目标中转路径。
S206、确定从机器人位置到充电座位置的目标路径。
根据机器人位置到第一目标中转站的路径、目标中转路径和第二目标中转站到充电座位置的路径,确定从机器人位置到充电座位置的目标路径
参照S205实施例,本实施例机器人回到充电座的目标路径为机器人位置→N3→N4→N1→充电座位置。
本发明提供的机器人寻路方法、寻路装置、设备和计算机可读存储介质,通过获取机器人在草坪区域的工作路径,并将工作路径构建栅格地图,获取栅格地图中机器人的机器人位置和充电座的充电座位置,获取机器人位置到充电座的最短路径,一方面,在最短路径未经过障碍物的情况下,确定最短路径为从机器人位置到充电座位置为目标路径,无需针对整个目标路径进行寻找,可以极大地降低进行目标路径的搜索,从而降低寻路上 的数据处理量,缩短搜路消耗的时间,提高寻路速度,进而可以快速回到充电座;
另一方面在最短路径经过障碍物的情况下,确定从机器人位置到充电座位置的候选中转站,从候选中转站中确定与机器人位置对应的第一目标中转站和与充电座位置对应的第二目标中转站,获取从第一目标中转站到第二目标中转站的所有候选中转路径;将长度最短且不经过障碍物的候选路径作为目标中转路径;根据机器人位置到第一目标中转站的路径、目标中转路径和第二目标中转站到充电座位置的路径,确定从机器人位置到充电座位置的目标路径,避免了不连通的区域的无效数据处理,因而可以在满足寻路所需数据的基础上,降低目标路径的数据计算量,也在一定程度上可以降低寻路时的数据处理量,从而提高寻路速度,进而可以快速回到充电座。
图4示出了根据本公开的实施例的寻路装置的框图。请参照图4,寻路装置包括第一获取模块401、第二获取模块402和第一处理模块404。
第一获取模块401,用于获取栅格地图中机器人的机器人位置和充电座的充电座位置;
第二获取模块402,用于获取所述机器人位置到所述充电座位置的最短路径;
第一处理模块404,用于在所述最短路径经过障碍物的情况下,确定从所述机器人位置到所述充电座位置的候选中转站;从所述候选中转站中确定与所述机器人位置对应的第一目标中转站和与所述充电座位置对应的第二目标中转站;获取从所述第一目标中转站到所述第二目标中转站的所有候选中转路径;将长度最短且不经过障碍物的候选路径作为目标中转路径;根据所述机器人位置到所述第一目标中转站的路径、所述目标中转路径和所述第二目标中转站到所述充电座位置的路径,确定从所述机器人位置到所述充电座位置的目标路径。
在一种可能的实现方式中,所述寻路装置还可以包括判断模块403和第二处理模块405。
判断模块403,用于判断所述最短路径是否经过障碍物;
第二处理模块405,用于在所述最短路径未经过障碍物的情况下,确定所述最短路径为从所述机器人位置到所述充电座位置的目标路径。
应当理解,图4中所示出的第一获取模块401、第二获取模块402以及第一处理模块404可以被包括在参考图1所描述的计算设备120中。而且,应当理解,图4中所示出的模块可以执行参考本公开的实施例的方法或过程中的步骤或动作。
图6示出了本申请一个示例性实施例提供的终端设备的结构框图。该终端设备600可以是便携式移动终端,比如:智能手机、平板电脑、MP3(Moving Picture ExpertsGroup Audio Layer III,动态影像专家压缩标准音频层面3)播放器、MP4(Moving PictureExperts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、笔记本电脑或台式电脑。终端设备700还可能被称为用户设备、便携式终端、膝上型终端、台式终端等其他名称。
通常,终端设备600包括有:处理器601和存储器602。
处理器601可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器601可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器601也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central ProcessingUnit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器601可以集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘 制。一些实施例中,处理器601还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。
存储器602可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器602还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器602中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器601所执行以实现本申请中方法实施例提供的机器人寻路方法。
在一些实施例中,终端设备600还可选包括有:外围设备接口603和至少一个外围设备。处理器601、存储器602和外围设备接口603之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口603相连。具体地,外围设备包括:射频电路604、显示屏605、摄像头组件606、音频电路607、定位组件608和电源609中的至少一种。
外围设备接口603可被用于将I/O(Input/Output,输入/输出)相关的至少一个外围设备连接到处理器601和存储器602。在一些实施例中,处理器601、存储器602和外围设备接口603被集成在同一芯片或电路板上;在一些其他实施例中,处理器601、存储器602和外围设备接口603中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不加以限定。
射频电路604用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路604通过电磁信号与通信网络以及其他通信设备进行通信。射频电路604将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路604包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路604可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:万维网、城 域网、内联网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路604还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请对此不加以限定。
显示屏605用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏605是触摸显示屏时,显示屏605还具有采集在显示屏605的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器601进行处理。此时,显示屏705还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏605可以为一个,设置在终端设备600的前面板;在另一些实施例中,显示屏605可以为至少两个,分别设置在终端设备600的不同表面或呈折叠设计;在另一些实施例中,显示屏605可以是柔性显示屏,设置在终端设备600的弯曲表面上或折叠面上。甚至,显示屏605还可以设置成非矩形的不规则图形,也即异形屏。显示屏605可以采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。
摄像头组件606用于采集图像或视频。可选地,摄像头组件606包括前置摄像头和后置摄像头。通常,前置摄像头设置在终端的前面板,后置摄像头设置在终端的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件606还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以用于不同色温下的光线补偿。
音频电路607可以包括麦克风和扬声器。麦克风用于采集用户及环境 的声波,并将声波转换为电信号输入至处理器601进行处理,或者输入至射频电路604以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分别设置在终端设备600的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器601或射频电路604的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路607还可以包括耳机插孔。
定位组件608用于定位终端设备600的当前地理位置,以实现导航或LBS(LocationBased Service,基于位置的服务)。定位组件608可以是基于美国的GPS(GlobalPositioning System,全球定位系统)、中国的北斗系统或俄罗斯的伽利略系统的定位组件。
电源609用于为终端设备600中的各个组件进行供电。电源609可以是交流电、直流电、一次性电池或可充电电池。当电源609包括可充电电池时,该可充电电池可以是有线充电电池或无线充电电池。有线充电电池是通过有线线路充电的电池,无线充电电池是通过无线线圈充电的电池。该可充电电池还可以用于支持快充技术。
在一些实施例中,终端设备600还包括有一个或多个传感器610。该一个或多个传感器610包括但不限于:加速度传感器611、陀螺仪传感器612、压力传感器613、指纹传感器614、光学传感器615以及接近传感器616。
加速度传感器611可以检测以终端设备600建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器611可以用于检测重力加速度在三个坐标轴上的分量。处理器601可以根据加速度传感器611采集的重力加速度信号,控制显示屏605以横向视图或纵向视图进行用户界面的显示。加速度传感器611还可以用于游戏或者用户的运动数据的采集。
陀螺仪传感器612可以检测终端设备600的机体方向及转动角度,陀 螺仪传感器612可以与加速度传感器611协同采集用户对终端设备600的3D动作。处理器601根据陀螺仪传感器612采集的数据,可以实现如下功能:动作感应(比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。
压力传感器613可以设置在终端设备600的侧边框和/或显示屏605的下层。当压力传感器613设置在终端设备600的侧边框时,可以检测用户对终端设备600的握持信号,由处理器601根据压力传感器613采集的握持信号进行左右手识别或快捷操作。当压力传感器613设置在显示屏605的下层时,由处理器601根据用户对显示屏605的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。
指纹传感器614用于采集用户的指纹,由处理器601根据指纹传感器614采集到的指纹识别用户的身份,或者,由指纹传感器614根据采集到的指纹识别用户的身份。在识别出用户的身份为可信身份时,由处理器601授权该用户执行相关的敏感操作,该敏感操作包括解锁屏幕、查看加密信息、下载软件、支付及更改设置等。指纹传感器614可以被设置在终端设备600的正面、背面或侧面。当终端设备600上设置有物理按键或厂商Logo时,指纹传感器614可以与物理按键或厂商Logo集成在一起。
光学传感器615用于采集环境光强度。在一个实施例中,处理器601可以根据光学传感器615采集的环境光强度,控制显示屏605的显示亮度。具体地,当环境光强度较高时,调高显示屏605的显示亮度;当环境光强度较低时,调低显示屏605的显示亮度。在另一个实施例中,处理器601还可以根据光学传感器615采集的环境光强度,动态调整摄像头组件606的拍摄参数。
接近传感器616,也称距离传感器,通常设置在终端设备600的前面板。接近传感器616用于采集用户与终端设备600的正面之间的距离。在一个 实施例中,当接近传感器616检测到用户与终端设备600的正面之间的距离逐渐变小时,由处理器601控制显示屏605从亮屏状态切换为息屏状态;当接近传感器616检测到用户与终端设备600的正面之间的距离逐渐变大时,由处理器601控制显示屏605从息屏状态切换为亮屏状态。
本领域技术人员可以理解,图6中示出的结构并不构成对终端设备600的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。
图7为本申请实施例提供的服务器的结构示意图,该服务器700可因配置或性能不同而产生比较大的差异,可以包括一个或多个处理器701和一个或多个的存储器702,其中,该一个或多个存储器702中存储有至少一条程序代码,该至少一条程序代码由该一个或多个处理器701加载并执行以实现上述各个方法实施例提供的机器人寻路方法,示例性的,处理器701为CPU。当然,该服务器700还可以具有有线或无线网络接口、键盘以及输入输出接口等部件,以便进行输入输出,该服务器700还可以包括其他用于实现设备功能的部件,在此不做赘述。
在示例性实施例中,还提供了一种计算机可读存储介质,该存储介质中存储有至少一条程序代码,该至少一条程序代码由处理器加载并执行,以使电子设备实现上述任一种机器人寻路方法。
可选地,上述计算机可读存储介质可以是只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、只读光盘(Compact Disc Read-OnlyMemory,CD-ROM)、磁带、软盘和光数据存储设备等。
在示例性实施例中,还提供了一种计算机程序或计算机程序产品,该计算机程序或计算机程序产品中存储有至少一条计算机指令,该至少一条计算机指令由处理器加载并执行,以使计算机实现上述任一种机器人寻路方法。
应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
以上所述仅为本申请的示例性实施例,并不用以限制本申请,凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (10)

  1. 一种机器人寻路方法,其特征在于,包括:
    获取栅格地图中机器人的机器人位置和充电座的充电座位置;
    获取所述机器人位置到所述充电座位置的最短路径;
    在所述最短路径经过障碍物的情况下,确定从所述机器人位置到所述充电座位置的候选中转站;
    从所述候选中转站中确定与所述机器人位置对应的第一目标中转站和与所述充电座位置对应的第二目标中转站;
    获取从所述第一目标中转站到所述第二目标中转站的所有候选中转路径;将长度最短且不经过障碍物的候选路径作为目标中转路径;
    根据所述机器人位置到所述第一目标中转站的路径、所述目标中转路径和所述第二目标中转站到所述充电座位置的路径,确定从所述机器人位置到所述充电座位置的目标路径。
  2. 根据权利要求1所述的机器人寻路方法,其特征在于,所述在所述最短路径经过障碍物的情况下,确定从所述机器人位置到所述充电座位置的候选中转站之前,还包括:
    判断所述最短路径是否经过障碍物;
    在所述最短路径未经过障碍物的情况下,确定所述最短路径为从所述机器人位置到所述充电座位置的目标路径。
  3. 根据权利要求1所述的机器人寻路方法,其特征在于,所述获取栅格地图中机器人的机器人位置和充电座的充电座位置之前,还包括:
    获取机器人在草坪区域的工作路径,所述充电座位于所述工作路径上;
    根据所述工作路径构建栅格地图。
  4. 根据权利要求1所述的机器人寻路方法,其特征在于,所述确定从所述机器人位置到所述充电座位置的候选中转站包括:
    绘制所述栅格地图的外切矩形,从所述外切矩形的四条边上分别确定一个第一基准点;
    将所述外切矩形的一组对边向所述外切矩形的中心偏移第一预设步长,得到两条偏移边;
    将两条偏移边与所述栅格地图边缘的四个交点作为第二基准点,将处于同一偏移边的两个第二基准点相向偏移第二预设步长,得到四个第三基准点;
    将所述第三基准点作为所述候选中转站。
  5. 根据权利要求1所述的机器人寻路方法,其特征在于,所有候选中转路径包括:
    所述第一目标中转站到所述第二目标中转站的直线路径以及所述第一目标中转站经至少一个其他候选中转站到所述第二目标中转站的路径,所述其他候选中转站是指所述候选中转站中除所述第一目标中转站和所述第二目标中转站以外的候选中转站。
  6. 根据权利要求1所述的机器人寻路方法,其特征在于,所述从所述候选中转站中确定与所述机器人位置对应的第一目标中转站和与所述充电座位置对应的第二目标中转站,包括:
    确定所述机器人位置到各所述候选中转站的第一移动路径,将长度最短且不经过障碍物的第一移动路径所对应的候选中转站作为第一目标中转站;
    确定所述充电座位置到各所述候选中转站的第二移动路径,将长度最短且不经过障碍物的第二移动路径所对应的候选中转站作为第二目标中转 站。
  7. 一种机器人寻路装置,其特征在于,包括:
    第一获取模块,用于获取栅格地图中机器人的机器人位置和充电座的充电座位置;
    第二获取模块,用于获取所述机器人位置到所述充电座位置的最短路径;
    第一处理模块,用于在所述最短路径经过障碍物的情况下,确定从所述机器人位置到所述充电座位置的候选中转站;从所述候选中转站中确定与所述机器人位置对应的第一目标中转站和与所述充电座位置对应的第二目标中转站;获取从所述第一目标中转站到所述第二目标中转站的所有候选中转路径;将长度最短且不经过障碍物的候选路径作为目标中转路径;根据所述机器人位置到所述第一目标中转站的路径、所述目标中转路径和所述第二目标中转站到所述充电座位置的路径,确定从所述机器人位置到所述充电座位置的目标路径。
  8. 根据权利要求7所述的装置,其特征在于,还包括:
    判断模块,用于判断所述最短路径是否经过障碍物;
    第二处理模块,用于在所述最短路径未经过障碍物的情况下,确定所述最短路径为从所述机器人位置到所述充电座位置的目标路径。
  9. 一种设备,其特征在于,
    包括:
    存储器,用于存储可执行指令;
    处理器,用于执行所述存储器中存储的可执行指令时,实现权利要求1至6任一项所述的机器人寻路方法。
  10. 一种计算机可读存储介质,其特征在于,其包括程序代码,当所述程序产品在电子设备上运行时,所述程序代码用于使所述电子设备执行权利要求1至6中任一所述方法的步骤。
PCT/CN2023/077859 2022-02-15 2023-02-23 机器人寻路方法、寻路装置、设备和计算机可读存储介质 WO2023155928A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210138551.9A CN116643558A (zh) 2022-02-15 2022-02-15 机器人寻路方法、寻路装置、设备和计算机可读存储介质
CN202210138551.9 2022-02-15

Publications (1)

Publication Number Publication Date
WO2023155928A1 true WO2023155928A1 (zh) 2023-08-24

Family

ID=87577639

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/077859 WO2023155928A1 (zh) 2022-02-15 2023-02-23 机器人寻路方法、寻路装置、设备和计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN116643558A (zh)
WO (1) WO2023155928A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090030683A (ko) * 2007-09-20 2009-03-25 한국과학기술연구원 로봇의 경로 설계 방법 및 그 로봇
CN109947100A (zh) * 2019-03-12 2019-06-28 深圳优地科技有限公司 路径规划方法、系统及终端设备
CN113238549A (zh) * 2021-03-31 2021-08-10 珠海市一微半导体有限公司 机器人基于可直达的节点的路径规划方法、芯片及机器人
CN113934218A (zh) * 2021-11-16 2022-01-14 杭州云象商用机器有限公司 一种清扫机器人路径规划方法、装置、设备及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090030683A (ko) * 2007-09-20 2009-03-25 한국과학기술연구원 로봇의 경로 설계 방법 및 그 로봇
CN109947100A (zh) * 2019-03-12 2019-06-28 深圳优地科技有限公司 路径规划方法、系统及终端设备
CN113238549A (zh) * 2021-03-31 2021-08-10 珠海市一微半导体有限公司 机器人基于可直达的节点的路径规划方法、芯片及机器人
CN113934218A (zh) * 2021-11-16 2022-01-14 杭州云象商用机器有限公司 一种清扫机器人路径规划方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN116643558A (zh) 2023-08-25

Similar Documents

Publication Publication Date Title
US11565181B2 (en) Virtual object control method and apparatus, computer device, and storage medium
US11205282B2 (en) Relocalization method and apparatus in camera pose tracking process and storage medium
US11189037B2 (en) Repositioning method and apparatus in camera pose tracking process, device, and storage medium
JP7026819B2 (ja) カメラの位置決め方法および装置、端末並びにコンピュータプログラム
CN110986930B (zh) 设备定位方法、装置、电子设备及存储介质
CN111768454B (zh) 位姿确定方法、装置、设备及存储介质
JP2022511427A (ja) 画像特徴点の動き情報の決定方法、タスク実行方法およびデバイス
EP3832605B1 (en) Method and device for determining potentially visible set, apparatus, and storage medium
WO2021103841A1 (zh) 控制车辆
CN112230908A (zh) 一种对齐组件的方法、装置、电子设备及存储介质
JP7483056B2 (ja) 選択ターゲットの決定方法、装置、機器、及びコンピュータプログラム
CN114092655A (zh) 构建地图的方法、装置、设备及存储介质
CN111928861B (zh) 地图构建方法及装置
WO2023155928A1 (zh) 机器人寻路方法、寻路装置、设备和计算机可读存储介质
CN111596925B (zh) 自动生成代码的方法、装置、计算机设备及介质
CN112365088B (zh) 行程关键点的确定方法、装置、设备及可读存储介质
WO2023169265A1 (zh) 机器人寻路方法、寻路装置、设备和计算机可读存储介质
CN111061918B (zh) 图数据的处理方法、装置及存储介质
CN111984755A (zh) 确定目标停车点的方法、装置、电子设备及存储介质
WO2019233299A1 (zh) 地图构建方法、装置及计算机可读存储介质
CN111523876A (zh) 支付方式的显示方法、装置、系统及存储介质
CN112214645B (zh) 一种存储轨迹数据的方法及装置
CN113409235B (zh) 一种灭点估计的方法及装置
CN113359851B (zh) 控制飞行器航行的方法、装置、设备及存储介质
CN113176789B (zh) 飞行器的控制方法、装置、设备及可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23755928

Country of ref document: EP

Kind code of ref document: A1