Mobile robot recharging method, device, equipment and medium
By obtaining the contour of the action area, filtering and compressing candidate recharge points during the recharge process of mobile robots, and fitting a curve, the problem of low recharge efficiency of mobile robots is solved, and more efficient recharge path search is achieved.
Patent Information
- Application Number
- CN202411640747.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-11-18
Smart Images

Figure CN119148760B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a recharging method, device, equipment and medium for a mobile robot. Background Art
[0002] With the continuous advancement of science and technology, mobile robots such as sweeping robots have also been widely used. Since mobile robots are highly dependent on electricity, they need to be charged in time to ensure the stable operation of the mobile robots.
[0003] Take the robot vacuum cleaner as an example. When the robot vacuum cleaner needs to be recharged, it will first detect whether there is a charging station mark in the current area. If there is a charging station mark, the robot vacuum cleaner will be directly controlled to navigate to the marked point and successfully recharge. If there is no charging station mark, the robot vacuum cleaner will search all rooms and use infrared receiving sensors to detect whether there is a charging station around during driving.
[0004] The prior art mainly uses the following two methods to search for rooms:
[0005] (1) Search along the wall.
[0006] Control the robot vacuum cleaner to search along the wall in a clockwise or counterclockwise direction. Collisions often occur during the wall search process. It takes a lot of time for the robot vacuum cleaner to handle collisions, which reduces the efficiency of searching for the charging station.
[0007] (2) Reduce the outline of the room and select several points on the reduced outline of the room as search points.
[0008] In this processing method, the number of search points is relatively large. The robot vacuum cleaner must slow down at each point and detect whether there is an infrared signal. If the charging station is not found, the robot vacuum cleaner needs to adjust its direction to go to the next charging point. The above actions will increase the time spent on finding the charging station. Summary of the invention
[0009] In view of the above, it is necessary to provide a recharging method, device, equipment and medium for a mobile robot, aiming to solve the problem of low recharging efficiency of the mobile robot.
[0010] A recharging method for a mobile robot, the recharging method for the mobile robot comprising:
[0011] In response to a recharge instruction to the mobile robot, obtaining a contour of an action area where the mobile robot is located;
[0012] Determine a plurality of first candidate recharging points of the mobile robot within the action area;
[0013] Filtering the plurality of first candidate recharging points to obtain a plurality of second candidate recharging points;
[0014] Compressing the multiple second candidate recharging points to obtain multiple target recharging points;
[0015] Connecting the multiple target recharging points in sequence to obtain multiple line segments;
[0016] Fitting the multiple line segments into a curve to obtain a recharging path;
[0017] The mobile robot is controlled to search for a charging base for charging along the recharging path.
[0018] According to a preferred embodiment of the present invention, determining a plurality of first candidate recharging points of the mobile robot within the action area includes:
[0019] Acquire the position of the mobile robot in the action area as the current position;
[0020] Obtaining the point on the contour that is closest to the current position as the first reference point;
[0021] Taking the first reference point as the starting point, acquiring a contour point every first preset length along the contour in a first preset direction until the length between the acquired contour point and the first reference point is less than the first preset length, and then stopping acquiring contour points;
[0022] Determine each contour point currently acquired as a reference point;
[0023] Each corresponding first candidate recharging point is determined according to each reference point.
[0024] According to a preferred embodiment of the present invention, determining each corresponding first candidate recharging point according to each reference point includes:
[0025] For each reference point, taking the reference point as a starting point, taking a preset number of contour points forward and backward along the contour respectively;
[0026] Fit the acquired contour points into a straight line;
[0027] Taking the reference point as an endpoint, draw a line segment perpendicular to the straight line and having a length of a second preset length into the action area;
[0028] Another endpoint of the line segment other than the reference point is determined as a first candidate recharging point corresponding to the reference point.
[0029] According to a preferred embodiment of the present invention, filtering the plurality of first candidate recharge points to obtain a plurality of second candidate recharge points includes:
[0030] Obtaining a first preset distance and a second preset distance;
[0031] Calculating the shortest distance between each first candidate refill point and the contour;
[0032] Calculate the distance between every two first candidate recharging points;
[0033] The first candidate recharge points whose shortest distance is less than the first preset distance are deleted from the multiple first candidate recharge points, and two first candidate recharge points whose interval distance is less than the second preset distance are merged to obtain the multiple second candidate recharge points.
[0034] According to a preferred embodiment of the present invention, merging the two first candidate recharging points whose interval distance is less than the second preset distance includes:
[0035] For every two first candidate refill points whose interval distance is less than the second preset distance, obtain the abscissa and ordinate of each of the two first candidate refill points, calculate the mean of the abscissas of the two first candidate refill points according to the abscissa of each first candidate refill point, calculate the mean of the ordinates of the two first candidate refill points according to the ordinate of each first candidate refill point, generate a merge point according to the mean abscissas and the mean ordinates, and replace the two first candidate refill points with the merged point; or
[0036] For every two first candidate recharging points whose interval distance is less than the second preset distance, any one of the first candidate recharging points is deleted from the two first candidate recharging points.
[0037] According to a preferred embodiment of the present invention, compressing the multiple second candidate recharging points to obtain multiple target recharging points includes:
[0038] F. Obtaining a second candidate recharging point closest to the mobile robot from the multiple second candidate recharging points as the first target recharging point;
[0039] G. Obtaining, from the plurality of second candidate recharging points, a second candidate recharging point that is farthest from the first target recharging point as the next target recharging point;
[0040] H. Connect the first target recharging point and the next target recharging point to obtain a first compression line segment;
[0041] I. Acquire each area enclosed by the first compressed line segment and the contour according to a second preset direction;
[0042] J. For each area enclosed by the first compressed line segment and the contour, obtain all second candidate refill points in the area, and determine the second candidate refill point with the largest distance from the first compressed line segment among the obtained second candidate refill points as the candidate target refill point for the area;
[0043] K. Obtain a third preset distance;
[0044] L. When it is detected that the distance between the candidate target recharging point in the area and the first compressed line segment is greater than or equal to the third preset distance, each detected candidate target recharging point is determined as each target recharging point, and each target recharging point is sequentially connected to the two endpoints of the first compressed line segment to obtain two new compressed line segments;
[0045] M. Acquire each new area enclosed by each new compressed line segment and the contour according to the second preset direction;
[0046] N. For each new area, obtain all second candidate refill points in the area, and determine the second candidate refill point with the largest distance to the corresponding compressed line segment among the obtained second candidate refill points as the candidate target refill point of the area;
[0047] O. When it is detected that the distance between the candidate target refill point in the area and the corresponding compressed line segment is greater than or equal to the third preset distance, each detected candidate target refill point is determined as each new target refill point, and each new target refill point is sequentially connected to two endpoints of the corresponding compressed line segment to obtain a new compressed line segment;
[0048] Q. Repeat MO until there is no new target recharging point, and then combine all current target recharging points to obtain the multiple target recharging points.
[0049] According to a preferred embodiment of the present invention, fitting the multiple line segments into a curve to obtain a recharging path includes:
[0050] Taking any line segment among the plurality of line segments as an initial line segment, sequentially acquiring two adjacent line segments according to a third preset direction as a line segment group; wherein no repeated line segments exist in each line segment group;
[0051] Fit two line segments in each line segment group into a curve;
[0052] All the curves obtained after fitting are connected in sequence to obtain the recharging path.
[0053] A recharging device for a mobile robot, the recharging device for the mobile robot comprising:
[0054] an acquisition unit, configured to acquire a contour of an action area where the mobile robot is located in response to a recharging instruction to the mobile robot;
[0055] A determination unit, configured to determine a plurality of first candidate recharging points of the mobile robot within the action area;
[0056] a filtering unit, configured to filter the plurality of first candidate recharging points to obtain a plurality of second candidate recharging points;
[0057] a compression unit, configured to compress the plurality of second candidate recharging points to obtain a plurality of target recharging points;
[0058] A connecting unit, used to sequentially connect the multiple target recharging points to obtain multiple line segments;
[0059] A fitting unit, used for fitting the multiple line segments into a curve to obtain a recharging path;
[0060] The control unit is used to control the mobile robot to search for a charging base for charging along the recharging path.
[0061] A computer device, comprising:
[0062] a memory storing at least one instruction; and
[0063] The processor executes the instructions stored in the memory to implement the recharging method of the mobile robot.
[0064] A computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in a computer device to implement the recharging method of the mobile robot.
[0065] It can be seen from the above technical solutions that, on the one hand, the recharging points within the action area of the mobile robot are filtered and compressed to reduce the number of recharging points passed by the mobile robot when searching for a charging base, thereby reducing the time spent in searching for a charging base; on the other hand, curve fitting is performed on the multiple line segments composed of the recharging points to make the recharging path of the mobile robot smoother, further reducing the time spent by the mobile robot in searching for a charging base, thereby improving the charging efficiency of the mobile robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 It is a flow chart of a preferred embodiment of the recharging method of the mobile robot of the present invention;
[0067] Figure 2 is a schematic diagram of the first candidate recharging point of the present invention;
[0068] Figure 3is a schematic diagram of a second candidate recharging point of the present invention;
[0069] Figure 4 It is a schematic diagram of some target recharging points and compression line segments of the present invention;
[0070] Figure 5 is a schematic diagram of the target recharging point of the present invention;
[0071] Figure 6 is a schematic diagram of a recharging path of the present invention;
[0072] Figure 7 It is a functional module diagram of a preferred embodiment of the recharging device of the mobile robot of the present invention;
[0073] Figure 8 It is a structural schematic diagram of a computer device of a preferred embodiment of the present invention for implementing the recharging method of a mobile robot. DETAILED DESCRIPTION
[0074] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0075] like Figure 1 FIG. 1 is a flow chart of a preferred embodiment of the recharging method for a mobile robot of the present invention. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted.
[0076] The recharging method of the mobile robot is applied to one or more computer devices, and the computer device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0077] The computer device may be any electronic product that can perform human-computer interaction with a user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television (IPTV), a smart wearable device, etc.
[0078] The computer device may also include a network device and / or a user device, wherein the network device includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud consisting of a large number of hosts or network servers based on cloud computing.
[0079] The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.
[0080] Among them, Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0081] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0082] The network where the computer device is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.
[0083] S10, in response to a recharging instruction to the mobile robot, obtaining a contour of an action area where the mobile robot is located.
[0084] In this embodiment, the mobile robot may be a sweeping robot, a transport robot, or other robot that needs to find a charging station for charging.
[0085] In this embodiment, the recharge instruction can be automatically triggered when the power level of the mobile robot is lower than a preset threshold.
[0086] In this embodiment, the action area of the mobile robot may include an indoor area that the sweeping robot needs to clean.
[0087] In this embodiment, obtaining the contour of the action area where the mobile robot is located includes:
[0088] Obtaining an environmental map of the action area;
[0089] The SLAM (Simultaneous Localization and Mapping) algorithm is used to extract the contour information of the environment map as the contour of the action area where the mobile robot is located.
[0090] Of course, in other embodiments, other algorithms may also be used to extract the contour of the action area where the mobile robot is located, and the present invention does not limit the method of extracting the contour.
[0091] S11, determining a plurality of first candidate recharging points of the mobile robot within the action area.
[0092] In this embodiment, determining a plurality of first candidate recharging points of the mobile robot within the action area includes:
[0093] Acquire the position of the mobile robot in the action area as the current position;
[0094] Obtaining the point on the contour that is closest to the current position as the first reference point;
[0095] Taking the first reference point as the starting point, acquiring a contour point every first preset length along the contour in a first preset direction until the length between the acquired contour point and the first reference point is less than the first preset length, and then stopping acquiring contour points;
[0096] Determine each contour point currently acquired as a reference point;
[0097] Each corresponding first candidate recharging point is determined according to each reference point.
[0098] The first preset direction may be a clockwise direction or a counterclockwise direction.
[0099] The first preset length is an optimal value obtained after experiments based on actual scenarios. For example, the first preset length may be 2 m.
[0100] In this embodiment, determining each corresponding first candidate recharging point according to each reference point includes:
[0101] For each reference point, taking the reference point as a starting point, taking a preset number of contour points forward and backward along the contour respectively;
[0102] Fit the acquired contour points into a straight line;
[0103] Taking the reference point as an endpoint, draw a line segment perpendicular to the straight line and having a length of a second preset length into the action area;
[0104] Another endpoint of the line segment other than the reference point is determined as a first candidate recharging point corresponding to the reference point.
[0105] The preset number is an optimal value obtained after experiments based on actual scenarios. For example, the preset number may be 9.
[0106] The second preset length is an optimal value obtained after experiments based on actual scenarios. For example, the second preset length may be 1 m.
[0107] For example: See Figure 2 , which is a schematic diagram of the first candidate recharging point of the present invention. The circle represents the position of the mobile robot in the action area, the point P on the contour is the first reference point closest to the position of the mobile robot, and the point * corresponding to the arrow starting from point P is the first candidate recharging point corresponding to point P (the distance between point P and the corresponding first candidate recharging point is the second preset length of 1m). By processing counterclockwise or clockwise along the contour in the above manner, each first candidate recharging point represented by each * point such as P1, P2, P3, etc. can be obtained. Specifically:
[0108] 1. Get the first reference point P on the contour that is closest to the mobile robot;
[0109] 2. Take nine contour points before and after point P. Fitting the contour points can get a straight line. Draw a ray perpendicular to the straight line, which is the target vertical line. Take a point 1m away from the target vertical line. This point is the first candidate recharging point corresponding to point P.
[0110] 3. Take a contour point every 2m of the first preset length counterclockwise along the contour, and determine the first candidate backfilling point corresponding to other contour points in the same way as determining the first candidate backfilling point corresponding to point P. Similarly, we get Figure 2 All first candidate recharging points in .
[0111] S12: Filter the multiple first candidate recharging points to obtain multiple second candidate recharging points.
[0112] In this embodiment, filtering the plurality of first candidate recharge points to obtain a plurality of second candidate recharge points includes:
[0113] Obtaining a first preset distance and a second preset distance;
[0114] Calculating the shortest distance between each first candidate refill point and the contour;
[0115] Calculate the distance between every two first candidate recharging points;
[0116] The first candidate recharge points whose shortest distance is less than the first preset distance are deleted from the multiple first candidate recharge points, and two first candidate recharge points whose interval distance is less than the second preset distance are merged to obtain the multiple second candidate recharge points.
[0117] The first preset distance and the second preset distance are optimal values obtained after experiments based on actual scenarios. For example, the first preset distance may be 0.8 m, and the second preset distance may be 0.5 m.
[0118] The merging of the two first candidate recharging points whose interval distance is less than the second preset distance includes, but is not limited to, any of the following methods:
[0119] (1) For every two first candidate refill points whose interval distance is less than the second preset distance, obtain the abscissa and ordinate of each of the two first candidate refill points, calculate the average of the abscissas of the two first candidate refill points according to the abscissa of each first candidate refill point, calculate the average of the ordinates of the two first candidate refill points according to the ordinate of each first candidate refill point, generate a merge point according to the average abscissas and the average ordinates, and replace the two first candidate refill points with the merged point;
[0120] (2) For every two first candidate recharging points whose interval distance is less than the second preset distance, delete any one of the two first candidate recharging points.
[0121] For example: Please refer to Figure 3 , is a schematic diagram of the second candidate recharging point of the present invention. Figure 2 On the basis of, for the first candidate refill points whose vertical distance from the contour is less than the first preset distance 0.8m, since they are too close to the wall and are prone to collision, these first candidate refill points are discarded; Figure 2 The two first candidate recharging points P1 and P3 are too close because the distance between the two points is less than the second preset distance of 0.5m. The mobile robot will get the same result when searching for infrared signals at any of the two points. Therefore, the two points can be merged. Specifically, the midpoint of the two points can be taken, or any point can be retained. After filtering, we can get Figure 3 Multiple second candidate recharging points in .
[0122] Through the above embodiment, the first candidate recharging point that is too close to the wall can be deleted, and two first candidate recharging points that are too close can be merged to reduce the number of recharging points.
[0123] S13: compress the multiple second candidate recharging points to obtain multiple target recharging points.
[0124] In this embodiment, compressing the multiple second candidate recharging points to obtain multiple target recharging points includes:
[0125] F. Obtaining a second candidate recharging point closest to the mobile robot from the multiple second candidate recharging points as the first target recharging point;
[0126] G. Obtaining, from the plurality of second candidate recharging points, a second candidate recharging point that is farthest from the first target recharging point as the next target recharging point;
[0127] H. Connect the first target recharging point and the next target recharging point to obtain a first compression line segment;
[0128] I. Acquire each area enclosed by the first compressed line segment and the contour according to a second preset direction;
[0129] J. For each area enclosed by the first compressed line segment and the contour, obtain all second candidate refill points in the area, and determine the second candidate refill point with the largest distance from the first compressed line segment among the obtained second candidate refill points as the candidate target refill point for the area;
[0130] K. Obtain a third preset distance;
[0131] L. When it is detected that the distance between the candidate target recharging point in the area and the first compressed line segment is greater than or equal to the third preset distance, each detected candidate target recharging point is determined as each target recharging point, and each target recharging point is sequentially connected to the two endpoints of the first compressed line segment to obtain two new compressed line segments;
[0132] M. Acquire each new area enclosed by each new compressed line segment and the contour according to the second preset direction;
[0133] N. For each new area, obtain all second candidate refill points in the area, and determine the second candidate refill point with the largest distance to the corresponding compressed line segment among the obtained second candidate refill points as the candidate target refill point of the area;
[0134] O. When it is detected that the distance between the candidate target refill point in the area and the corresponding compressed line segment is greater than or equal to the third preset distance, each detected candidate target refill point is determined as each new target refill point, and each new target refill point is sequentially connected to two endpoints of the corresponding compressed line segment to obtain a new compressed line segment;
[0135] Q. Repeat MO until there is no new target recharging point, and then combine all current target recharging points to obtain the multiple target recharging points.
[0136] The third preset distance is an optimal value obtained after experiments based on actual scenarios. For example, the third preset distance may be 0.2 m.
[0137] For example: Please refer to Figure 4-Figure 5 . Figure 4 It is a schematic diagram of some target recharging points and compression line segments of the present invention. Figure 5 Schematic diagram of the target recharging point of the present invention. Figure 4 Point A in is the first target recharge point closest to the mobile robot. All the second candidate recharge points in the multiple second candidate recharge points are traversed to find the next target recharge point B farthest from point A. Connect AB to get the first compressed line segment. Line segment AB divides all second candidate recharge points into two parts, namely the area on the upper left of line segment AB and the area on the lower right of line segment AB. Taking the processing method of the area on the lower right of line segment AB as an example, all the second candidate recharge points in the lower right area enclosed by line segment AB and the contour are obtained in a counterclockwise direction, and point C with the largest distance from line segment AB is found as the candidate target recharge point corresponding to the area. If the distance between point C and line segment AB is greater than or equal to the third preset distance of 0.2m, point C is determined as the next target recharge point. Connect AC and CB to get two new compressed line segments. Taking the processing method of line segment AC as an example, all second candidate refill points in the area enclosed by line segment AC and the contour (i.e., the lower left area of line segment AC) are obtained counterclockwise, and point D with the largest distance from line segment AC is found. Since the distance between point D and AC is greater than or equal to 0.2m, point D is determined as a new target refill point, and AD and DC are connected as two new compressed line segments. Taking the processing method of AD as an example, we obtain the point farthest from segment AD in the area enclosed by segment AD and the contour counterclockwise. Since there is no second candidate refill point whose distance to segment AD is greater than 0.2m, AD is no longer split. We process it in this way. Taking the second candidate refill point E as an example, segment AD can be used as a substitute for segment AE and segment ED (since there is no second candidate refill point whose distance to segment AD is greater than 0.2m, it means that all second candidate refill points in the area corresponding to segment AD are very close to segment AD. Therefore, segment AD can be used to approximately replace all second candidate refill points in the corresponding area to achieve compression of the second candidate refill points). Similarly, there is no second candidate refill point in the area corresponding to segment DC whose distance to segment DC is greater than 0.2m. Therefore, the six second candidate refill points between point A and point C can eventually be compressed into three points: A, D, and C. By analogy, we can get Figure 5The compressed target recharge points in the.
[0138] Through the above embodiment, the compression operation can be performed on the filtered recharging points. Through reasonable compression, the number of compressed points is further reduced without affecting the search accuracy, thereby reducing the time consumption of pause detection.
[0139] S14, sequentially connecting the multiple target recharging points to obtain multiple line segments.
[0140] See also Figure 5 , by sequentially connecting the multiple target recharging points, each line segment corresponding to the dotted line can be obtained.
[0141] S15, fitting the multiple line segments into a curve to obtain a recharging path.
[0142] In this embodiment, fitting the multiple line segments into a curve to obtain a recharging path includes:
[0143] Taking any line segment among the plurality of line segments as an initial line segment, and sequentially acquiring two adjacent line segments as a line segment group according to a third preset direction; wherein no repeated line segments exist in each line segment group;
[0144] Fit two line segments in each line segment group into a curve;
[0145] All the curves obtained after fitting are connected in sequence to obtain the recharging path.
[0146] For example: See Figure 6 , which is a schematic diagram of the recharging path of the present invention. When there are too many broken line segments, the fitted curve may be too far from the inflection point of the original broken line, which will cause the mobile robot to be too far away from the wall and unable to normally detect the infrared signal of the wall charging station. Therefore, in this embodiment, only two adjacent line segments are used for curve fitting each time, that is, a point-by-point straight line search method is no longer used, but a smooth curve is fitted for every three points. In this way, the mobile robot will move more smoothly along the curve, further reducing the time spent by the mobile robot on pausing and adjusting the direction.
[0147] Wherein, a Bezier curve fitting algorithm or a B-spline curve algorithm may be used for curve fitting, and the present invention does not limit the specific algorithm of curve fitting.
[0148] S16, controlling the mobile robot to search for a charging station along the recharging path for charging.
[0149] For example, for a sweeping robot, the charging station can be found along the obtained recharging path. Since the path is smoother and more reasonable, the search time can be effectively reduced, thereby improving the charging efficiency to avoid affecting the normal operation of the sweeping robot due to untimely charging.
[0150] It can be seen from the above technical solutions that, on the one hand, the recharging points within the action area of the mobile robot are filtered and compressed to reduce the number of recharging points passed by the mobile robot when searching for a charging base, thereby reducing the time spent in searching for a charging base; on the other hand, curve fitting is performed on the multiple line segments composed of the recharging points to make the recharging path of the mobile robot smoother, further reducing the time spent by the mobile robot in searching for a charging base, thereby improving the charging efficiency of the mobile robot.
[0151] like Figure 7 , which is a functional module diagram of a preferred embodiment of the recharging device of the mobile robot of the present invention. The recharging device 11 of the mobile robot includes an acquisition unit 110, a determination unit 111, a filtering unit 112, a compression unit 113, a connection unit 114, a fitting unit 115, and a control unit 116. The module / unit referred to in the present invention refers to a series of computer program segments that can be executed by a processor and can perform fixed functions, which are stored in a memory. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.
[0152] The acquisition unit 110 is used to acquire the contour of the action area where the mobile robot is located in response to the recharging instruction to the mobile robot;
[0153] The determining unit 111 is used to determine a plurality of first candidate recharging points of the mobile robot within the action area;
[0154] The filtering unit 112 is configured to filter the plurality of first candidate recharging points to obtain a plurality of second candidate recharging points;
[0155] The compression unit 113 is used to compress the multiple second candidate recharging points to obtain multiple target recharging points;
[0156] The connecting unit 114 is used to sequentially connect the multiple target recharging points to obtain multiple line segments;
[0157] The fitting unit 115 is used to fit the multiple line segments into a curve to obtain a recharging path;
[0158] The control unit 116 is used to control the mobile robot to search for a charging station for charging along the recharging path.
[0159] It can be seen from the above technical solutions that, on the one hand, the recharging points within the action area of the mobile robot are filtered and compressed to reduce the number of recharging points passed by the mobile robot when searching for a charging base, thereby reducing the time spent in searching for a charging base; on the other hand, curve fitting is performed on the multiple line segments composed of the recharging points to make the recharging path of the mobile robot smoother, further reducing the time spent by the mobile robot in searching for a charging base, thereby improving the charging efficiency of the mobile robot.
[0160] like Figure 8 The figure is a schematic diagram of the structure of a computer device of a preferred embodiment of the mobile robot recharging method of the present invention.
[0161] The computer device 1 may include a memory 12, a processor 13 and a bus, and may also include a computer program stored in the memory 12 and executable on the processor 13, such as a recharging program for a mobile robot.
[0162] Those skilled in the art will appreciate that the schematic diagram is merely an example of the computer device 1 and does not constitute a limitation on the computer device 1. The computer device 1 may be a bus-type structure or a star-type structure. The computer device 1 may also include more or less other hardware or software than shown in the diagram, or a different arrangement of components. For example, the computer device 1 may also include input and output devices, network access devices, etc.
[0163] It should be noted that the computer device 1 is only an example, and other existing or future electronic products that are suitable for the present invention should also be included in the protection scope of the present invention and included here by reference.
[0164] Among them, the memory 12 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 12 can be an internal storage unit of the computer device 1, such as a mobile hard disk of the computer device 1. In other embodiments, the memory 12 can also be an external storage device of the computer device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 1. Further, the memory 12 can also include both an internal storage unit of the computer device 1 and an external storage device. The memory 12 can not only be used to store application software and various types of data installed in the computer device 1, such as the code of the recharge program of the mobile robot, but also can be used to temporarily store data that has been output or is to be output.
[0165] In some embodiments, the processor 13 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. The processor 13 is the control core (Control Unit) of the computer device 1, and uses various interfaces and lines to connect the various components of the entire computer device 1, and executes various functions and processes data of the computer device 1 by running or executing programs or modules stored in the memory 12 (for example, executing the recharge program of the mobile robot, etc.), and calling the data stored in the memory 12.
[0166] The processor 13 executes the operating system of the computer device 1 and various installed applications. The processor 13 executes the applications to implement the steps in the above-mentioned embodiments of the recharging method for each mobile robot, for example Figure 1 Steps shown.
[0167] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules / units may be a series of computer-readable instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the computer device 1. For example, the computer program may be divided into an acquisition unit 110, a determination unit 111, a filtering unit 112, a compression unit 113, a connection unit 114, a fitting unit 115, and a control unit 116.
[0168] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, and includes a number of instructions for enabling a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to execute the part of the recharging method of the mobile robot described in each embodiment of the present invention.
[0169] If the module / unit integrated in the computer device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware devices through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of each of the above-mentioned method embodiments can be implemented.
[0170] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory, etc.
[0171] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0172] The blockchain referred to in this invention is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the blockchain underlying platform, platform product service layer, and application service layer.
[0173] The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 The bus is represented by only one straight line, but it does not mean that there is only one bus or one type of bus. The bus is configured to realize the connection and communication between the memory 12 and at least one processor 13, etc.
[0174] Although not shown, the computer device 1 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 13 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, and power status indicators. The computer device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0175] Furthermore, the computer device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used to establish a communication connection between the computer device 1 and other computer devices.
[0176] Optionally, the computer device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the computer device 1 and to display a visual user interface.
[0177] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0178] It can be understood by those skilled in the art that Figure 8 The structure shown does not constitute a limitation on the computer device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0179] Combination Figure 1 The memory 12 in the computer device 1 stores a plurality of instructions to implement a recharging method for a mobile robot, and the processor 13 can execute the plurality of instructions to implement:
[0180] In response to a recharge instruction to the mobile robot, obtaining a contour of an action area where the mobile robot is located;
[0181] Determine a plurality of first candidate recharging points of the mobile robot within the action area;
[0182] Filtering the plurality of first candidate recharging points to obtain a plurality of second candidate recharging points;
[0183] Compressing the multiple second candidate recharging points to obtain multiple target recharging points;
[0184] Connecting the multiple target recharging points in sequence to obtain multiple line segments;
[0185] Fitting the multiple line segments into a curve to obtain a recharging path;
[0186] The mobile robot is controlled to search for a charging base for charging along the recharging path.
[0187] Specifically, the specific implementation method of the processor 13 for the above instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0188] It should be noted that the data involved in this case were all obtained legally.
[0189] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0190] The present invention can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0191] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0192] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0193] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0194] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0195] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the present invention can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0196] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A recharging method for a mobile robot, characterized in that: The recharging method of the mobile robot includes: In response to a recharge instruction to the mobile robot, an outline of the action area where the mobile robot is located is obtained; wherein the recharge instruction is automatically triggered when the power of the mobile robot is lower than a preset threshold; Determine a plurality of first candidate recharge points of the mobile robot in the action area, including: obtaining the position of the mobile robot in the action area as the current position; obtaining the point on the contour that is closest to the current position as the first reference point; taking the first reference point as the starting point, obtaining a contour point every first preset length along the contour in a first preset direction until the length between the obtained contour point and the first reference point is less than the first preset length, and then stop obtaining contour points; determine each contour point currently obtained as a reference point; determine each corresponding first candidate recharge point according to each reference point; wherein, determining each corresponding first candidate recharge point according to each reference point includes: for each reference point, taking the reference point as the starting point, taking a preset number of contour points forward and backward along the contour respectively; fitting the obtained contour points into a straight line; taking the reference point as an endpoint, making a line segment perpendicular to the straight line and having a length of a second preset length into the action area; determining the other endpoint of the line segment except the reference point as the first candidate recharge point corresponding to the reference point; Filtering the plurality of first candidate recharging points to obtain a plurality of second candidate recharging points; Compressing the multiple second candidate recharging points to obtain multiple target recharging points; Connecting the multiple target recharging points in sequence to obtain multiple line segments; Fitting the multiple line segments into a curve to obtain a recharging path; The mobile robot is controlled to search for a charging base for charging along the recharging path.
2. The mobile robot recharging method according to claim 1, characterized in that: The filtering the plurality of first candidate recharging points to obtain a plurality of second candidate recharging points includes: Obtaining a first preset distance and a second preset distance; Calculating the shortest distance between each first candidate refill point and the contour; Calculate the distance between every two first candidate recharging points; The first candidate recharge points whose shortest distance is less than the first preset distance are deleted from the multiple first candidate recharge points, and two first candidate recharge points whose interval distance is less than the second preset distance are merged to obtain the multiple second candidate recharge points.
3. The mobile robot recharging method according to claim 2, characterized in that: The merging of the two first candidate recharging points whose interval distance is less than the second preset distance includes: For every two first candidate refill points whose interval distance is less than the second preset distance, obtain the abscissa and ordinate of each of the two first candidate refill points, calculate the mean of the abscissas of the two first candidate refill points according to the abscissa of each first candidate refill point, calculate the mean of the ordinates of the two first candidate refill points according to the ordinate of each first candidate refill point, generate a merge point according to the mean abscissas and the mean ordinates, and replace the two first candidate refill points with the merged point; or For every two first candidate recharging points whose interval distance is less than the second preset distance, any one of the first candidate recharging points is deleted from the two first candidate recharging points.
4. The mobile robot recharging method according to claim 1, characterized in that: The compressing the multiple second candidate recharging points to obtain multiple target recharging points includes: F. Obtaining a second candidate recharging point closest to the mobile robot from the multiple second candidate recharging points as the first target recharging point; G. Obtaining, from the plurality of second candidate recharging points, a second candidate recharging point that is farthest from the first target recharging point as the next target recharging point; H. Connect the first target recharging point and the next target recharging point to obtain a first compression line segment; I. Acquire each area enclosed by the first compressed line segment and the contour according to a second preset direction; J. For each area enclosed by the first compressed line segment and the contour, obtain all second candidate refill points in the area, and determine the second candidate refill point with the largest distance from the first compressed line segment among the obtained second candidate refill points as the candidate target refill point for the area; K. Obtain a third preset distance; L. When it is detected that the distance between the candidate target recharging point in the area and the first compressed line segment is greater than or equal to the third preset distance, each detected candidate target recharging point is determined as each target recharging point, and each target recharging point is sequentially connected to the two endpoints of the first compressed line segment to obtain two new compressed line segments; M. Acquire each new area enclosed by each new compressed line segment and the contour according to the second preset direction; N. For each new area, obtain all second candidate refill points in the area, and determine the second candidate refill point with the largest distance to the corresponding compressed line segment among the obtained second candidate refill points as the candidate target refill point of the area; O. When it is detected that the distance between the candidate target refill point in the area and the corresponding compressed line segment is greater than or equal to the third preset distance, each detected candidate target refill point is determined as each new target refill point, and each new target refill point is sequentially connected to two endpoints of the corresponding compressed line segment to obtain a new compressed line segment; Q. Repeat MO until there is no new target recharging point, and then combine all current target recharging points to obtain the multiple target recharging points.
5. The mobile robot recharging method according to claim 1, characterized in that: The step of fitting the plurality of line segments into a curve to obtain a recharging path comprises: Taking any line segment among the plurality of line segments as an initial line segment, sequentially acquiring two adjacent line segments according to a third preset direction as a line segment group; wherein no repeated line segments exist in each line segment group; Fit two line segments in each line segment group into a curve; All the curves obtained after fitting are connected in sequence to obtain the recharging path.
6. A recharging device for a mobile robot, characterized in that: The recharging device of the mobile robot comprises: An acquisition unit, configured to acquire the contour of the action area where the mobile robot is located in response to a recharge instruction to the mobile robot; wherein the recharge instruction is automatically triggered when the power of the mobile robot is lower than a preset threshold; A determination unit, for determining a plurality of first candidate recharge points of the mobile robot within the action area, comprising: obtaining the position of the mobile robot within the action area as the current position; obtaining the point on the contour that is closest to the current position as the first reference point; taking the first reference point as the starting point, obtaining a contour point every first preset length along the contour in a first preset direction until the length between the obtained contour point and the first reference point is less than the first preset length, and then stopping obtaining contour points; determining each contour point currently obtained as a reference point; determining each corresponding first candidate recharge point according to each reference point; wherein, determining each corresponding first candidate recharge point according to each reference point comprises: for each reference point, taking the reference point as the starting point, respectively obtaining a preset number of contour points forward and backward along the contour; fitting the obtained contour points into a straight line; taking the reference point as an endpoint, making a line segment perpendicular to the straight line and having a length of a second preset length into the action area; determining the other endpoint of the line segment except the reference point as the first candidate recharge point corresponding to the reference point; a filtering unit, configured to filter the plurality of first candidate recharging points to obtain a plurality of second candidate recharging points; a compression unit, configured to compress the plurality of second candidate recharging points to obtain a plurality of target recharging points; A connecting unit, used to sequentially connect the multiple target recharging points to obtain multiple line segments; A fitting unit, used for fitting the multiple line segments into a curve to obtain a recharging path; The control unit is used to control the mobile robot to search for a charging base for charging along the recharging path.
7. A computer device, characterized in that: The computer device comprises: a memory storing at least one instruction; and A processor executes instructions stored in the memory to implement the recharging method for the mobile robot as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in a computer device to implement the recharging method for a mobile robot as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Robot curve path generation method, system and device and storage medium
CN110948493A
Recharging navigation method, intelligent device and storage medium
CN117008587A