Cleaning track display method and device, equipment and storage medium
By obtaining the environment map and determining the reference direction in the cleaning robot, and adjusting the trajectory point collection, the problems of jitter and skew in the trajectory display of traditional cleaning robots are solved, and the visual effect of the trajectory is improved.
Patent Information
- Application Number
- CN202411373204.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-27
AI Technical Summary
The traditional cleaning robot trajectory display method causes jitter and skew in motion trajectory due to trajectory point deviation, which has poor visual effect.
By obtaining the environmental map of the area to be cleaned, determining the reference direction, and fitting and adjusting the set of track points based on this direction, presenting the cleaning track segments to avoid segment jitter and offset generated directly based on the track points.
Improve the visual effect of the cleaning trajectory on the environmental map, achieving neat and beautiful trajectory display.
Smart Images

Figure CN119184576A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robotics, and in particular to a cleaning trajectory display method, device, equipment and storage medium. Background Art
[0002] During the cleaning process in home and commercial scenarios, in order to facilitate users to intuitively understand information such as cleaning progress and cleaning range, and to meet the needs of trajectory tracking and historical tracing, the cleaning robot usually records its trajectory points in the cleaning area according to a preset sampling period, connects all the trajectory points in sequence to obtain the motion trajectory of the cleaning robot, and displays it on the application (Application, APP).
[0003] The traditional motion trajectory constructed by connecting trajectory points in sequence has the following problems: 1. Due to the limitation of sensor accuracy or interference, the recorded trajectory points have deviations. When the cleaning robot walks in a straight line, the trajectory on the APP will jitter due to the deviation of the trajectory points, such as Figure 1 (a) as shown; 2. The actual walking trajectory of the cleaning robot is somewhat skewed, which causes multiple straight line segments on the APP to be skewed, such as Figure 1 As shown in (b), the visual effect presented by the traditional cleaning trajectory display method is not beautiful. Summary of the invention
[0004] The present application provides a cleaning trajectory display method, device, equipment and storage medium, which are used to solve the technical problem that the traditional cleaning operation trajectory presented by sequentially connecting trajectory points has poor visual effect.
[0005] The first aspect of the present application provides a cleaning trajectory display method, comprising: obtaining an environmental map of an area to be cleaned; determining a reference direction corresponding to the environmental map; controlling a cleaning robot to clean the area to be cleaned, and collecting each trajectory point to obtain a trajectory point set; adjusting the cleaning trajectory segment fitted by the trajectory point set based on the reference direction, and presenting it on the environmental map.
[0006] The second aspect of the present application provides a cleaning trajectory display device, comprising: an acquisition module, used to acquire an environmental map of the area to be cleaned; a determination module, used to determine a reference direction corresponding to the environmental map; a collection module, used to control a cleaning robot to clean the area to be cleaned, and collect each trajectory point to obtain a trajectory point set; a display module, used to adjust the cleaning trajectory segment fitted by the trajectory point set based on the reference direction, and present it on the environmental map.
[0007] The third aspect of the present application provides a cleaning trajectory display device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the cleaning trajectory display device executes the above-mentioned cleaning trajectory display method.
[0008] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned cleaning trajectory display method.
[0009] In the technical solution provided in the present application, by determining the reference direction of the area to be cleaned and controlling the cleaning robot to perform cleaning and track point collection, the cleaning track segments presented on the environmental map are further beautified based on the reference direction, thereby avoiding problems such as jitter and offset of the cleaning track segments directly generated on the environmental map based on the track points, and improving the visual effect of the cleaning track on the environmental map. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 This is a schematic diagram of the actual cleaning trajectory that is not optimized in this application;
[0011] Figure 2 A schematic diagram of a first embodiment of a method for displaying a cleaning trajectory in the present application;
[0012] Figure 3 A schematic diagram of the cleaning trajectory planned in this application and the actual cleaning trajectory before and after optimization;
[0013] Figure 4 A schematic diagram of a second embodiment of the cleaning trajectory display method in this application;
[0014] Figure 5 Schematic diagram of the trajectory correction process in this application;
[0015] Figure 6 A schematic diagram of a third embodiment of the cleaning trajectory display method in this application;
[0016] Figure 7 A schematic diagram of an embodiment of a cleaning trajectory display device in the present application;
[0017] Figure 8 A schematic diagram of another embodiment of the cleaning trajectory display device in the present application;
[0018] Fig. 9 A schematic diagram of an embodiment of a cleaning trajectory display device in the present application. DETAILED DESCRIPTION
[0019] The present application provides a cleaning trajectory display method, device, equipment and storage medium for beautifying the visual effect of the cleaning trajectory display.
[0020] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0021] For ease of understanding, the specific process of the embodiment of the present application is described below. Figure 1 , the first embodiment of the cleaning trajectory display method in the embodiment of the present application includes:
[0022] 201. Obtain an environmental map of the area to be cleaned.
[0023] It is understandable that the execution subject of the present application can be a cleaning trajectory display device, or a terminal or server equipped with a display device, such as a mobile phone or a cleaning robot control terminal or other devices, which are not specifically limited here. The present application embodiment is described by taking the terminal as the execution subject as an example.
[0024] When the cleaning robot performs a cleaning task, it can plan the cleaning trajectory by obtaining an environmental map of the area to be cleaned, wherein the environmental map is used to determine the location of the mobile robot and the environmental status of the area to be cleaned, and the environmental map includes information about each wall in the area to be cleaned.
[0025] The cleaning robot of this embodiment can be any one of a sweeping robot, a sweeping and mopping robot, a mopping robot or a floor washing robot, etc., and the specific details are not limited here.
[0026] 202. Determine a reference direction corresponding to the environment map.
[0027] Specifically, the reference direction is determined according to the layout information of the environment map, wherein the reference direction is used to indicate the direction selected to make the cleaning trajectory present the best visual effect, and the layout information is used to indicate the distribution of objects in the environment map, such as the distribution of walls and / or obstacles.
[0028] In this embodiment, the reference direction can be the direction parallel or perpendicular to the most walls in the environmental map. The reference direction can also be the direction corresponding to the longest side of the area to be cleaned, that is, the direction corresponding to the longest side of the environmental map outline. The reference direction can also be the main direction corresponding to the optimal planned cleaning trajectory, etc., which is not limited here.
[0029] The above-mentioned optimal planned cleaning trajectory is the optimal cleaning route generated by the system for the cleaning area according to the corresponding cleaning trajectory planning logic, that is, the simulated cleaning trajectory, or virtual cleaning trajectory, planned cleaning trajectory. The cleaning robot will move and perform the cleaning task according to the optimal planned cleaning trajectory, and the main direction of the planned cleaning trajectory is used to indicate the forward direction of most cleaning trajectory segments in the planned cleaning trajectory, such as Figure 1 (a) indicates the direction indicated by each lateral sweeping trajectory segment, rather than the direction indicated by the line break segment, where the line break segment refers to the turning line segment between two adjacent sweeping trajectory segments, such as Figure 1 The vertical line segment between two adjacent lateral sweeping trajectory segments in (a).
[0030] It is understandable that if the area to be cleaned needs to be further divided into sections for cleaning, that is, there are multiple sections, the reference direction corresponding to each section needs to be determined based on the layout information of each section. The reference directions corresponding to the sections may be the same or different, and are not specifically limited here.
[0031] 203. Control the cleaning robot to clean the area to be cleaned, and collect each track point to obtain a track point set.
[0032] Specifically, the cleaning robot cleans the area to be cleaned according to the planned cleaning trajectory, and collects the real-time posture information of the cleaning robot, that is, trajectory points, according to the preset sampling period, and saves them in the trajectory point set corresponding to this cleaning task. By connecting the trajectory points, the motion trajectory of the cleaning robot can be presented to meet user needs such as trajectory tracking and historical tracing; among them, the trajectory points include the current position information and orientation information of the cleaning robot.
[0033] In this embodiment, the main direction of the planned cleaning trajectory is parallel to the reference direction, or perpendicular to it, or at a certain angle (ie, the target angle), which is not specifically limited here.
[0034] It should be further explained that the method for generating the planned cleaning trajectory can be executed with reference to the existing technology, and the planned cleaning trajectory can be arch-shaped, circular-shaped, mixed-shaped, or other types, which are not specifically limited in this embodiment.
[0035] Optionally, the cleaning robot is controlled to clean the area to be cleaned based on the reference direction; this embodiment plans the cleaning trajectory based on the reference direction, which can ensure that the planned cleaning trajectory has the best visual effect and provide a good data basis for the visual effect of the actual cleaning trajectory.
[0036] It is understandable that the selection of reference direction will affect the planning of the cleaning trajectory. Taking the arc cleaning trajectory planning as an example, Figure 3 The area to be cleaned includes four walls. If the AB direction is used as the reference direction and the AB direction is used as the starting direction of the cleaning robot, the planned cleaning trajectory is as follows: Figure 3 As shown in (a), at this time, the main direction of the planned cleaning trajectory is parallel to the reference direction; if the BC direction is taken as the reference direction and the BC direction is taken as the starting direction of the cleaning robot, the planned cleaning trajectory is as follows Figure 3 As shown in (b), at this time, the main direction of the planned cleaning trajectory is parallel to the reference direction; optionally, if the AB direction is used as the reference direction, the starting direction of the cleaning robot can also be the AD direction, that is, the starting direction of the planned cleaning trajectory is perpendicular to the reference direction. At this time, the main direction of the planned cleaning trajectory is perpendicular to the reference direction.
[0037] 204. Adjust the cleaning trajectory segment fitted by the trajectory point set based on the reference direction and present it on the environment map.
[0038] Specifically, each cleaning track segment is generated according to the track point set; each cleaning track segment is adjusted according to the reference direction and presented on the environment map. In this embodiment, the cleaning track beautified by the reference direction presents a neat and beautiful visual effect on the environment map.
[0039] Continue above Figure 3 Taking the beautification process of the bow-shaped cleaning trajectory as an example, the initial cleaning trajectory fitted according to each trajectory point in the trajectory point set includes at least one cleaning trajectory segment, such as Figure 3 The lateral cleaning track segments before beautification shown in (c) are jittery and skewed. Taking the AB direction as the reference direction, each cleaning track segment is adjusted. After the adjustment, each cleaning track segment is parallel to the reference direction, as shown in FIG. Figure 3 (d) as shown.
[0040] In this embodiment, the adjusted cleaning trajectory segments can be perpendicular or parallel to the reference direction. Under appropriate circumstances, the adjusted cleaning trajectory segments form a target angle with the reference direction, and the adjusted cleaning trajectory segments are evenly distributed on the environmental map, which can also present a neat and beautiful visual effect.
[0041] It can be understood that the cleaning trajectory display method of the present application can be applied to real-time trajectory display scenarios, and can also be applied to historical trajectory display scenarios, without specific limitation.
[0042] Taking the historical trajectory display scene as an example, the above-mentioned adjusting the cleaning trajectory line segment fitted to the trajectory point set based on the reference direction and presenting it on the environment map includes: adjusting the straight line segments fitted to the two preceding and following trajectory points in the trajectory point set in sequence based on the reference direction and presenting them on the environment map;
[0043] Optionally, the above-mentioned adjusting the straight line segments fitted by the two front and rear trajectory points in the trajectory point set in sequence based on the reference direction includes: fitting the cleaning trajectory based on the trajectory point set to obtain each initial trajectory segment; correcting each initial trajectory segment according to the reference direction to obtain each target trajectory segment, that is, the adjusted robot operation trajectory.
[0044] Optionally, fitting the cleaning trajectory based on the trajectory point set to obtain each initial trajectory segment includes: selecting a preset number of key points corresponding to each planned trajectory segment in the trajectory point set to obtain multiple key points corresponding to each planned trajectory segment; performing straight line fitting on the multiple key points corresponding to each planned trajectory segment to obtain each initial trajectory segment; in this embodiment, the total number of key points corresponding to each planned trajectory segment is less than the actual number of trajectory points of each planned trajectory segment. By selecting a preset number of key points for fitting, the processing amount can be reduced and the display efficiency of the cleaning trajectory can be improved.
[0045] The fitting of the above initial trajectory segment can be performed by least square method to perform line segment fitting, or by random sampling consistency algorithm, spline interpolation and other methods, and there is no specific limitation.
[0046] In an embodiment of the present application, the direction with the best visual presentation effect is selected as the reference direction of the environmental map, and the cleaning robot is controlled to perform cleaning and track point collection based on the reference direction, thereby providing a good data basis for optimizing the visual effect of the subsequent cleaning track. The cleaning track segments are further beautified based on the reference direction, thereby avoiding problems such as segment jitter and offset that occur when the cleaning track is directly generated based on track points, thereby improving the visual effect of the cleaning track on the environmental map.
[0047] In actual applications, users can also track the trajectory of the cleaning robot to quickly understand the current cleaning progress of the cleaning robot. This embodiment takes the real-time display scene of the bow-shaped cleaning trajectory as an example for explanation. Figure 4 , the second embodiment of the cleaning trajectory display method in the embodiment of the present application includes:
[0048] 401. Obtain an environmental map of the area to be cleaned.
[0049] Step 401 is executed with reference to step 201 and will not be described again here.
[0050] 402. Determine a direction parallel to or perpendicular to the most walls as a reference direction based on the environment map.
[0051] Specifically, based on the environment map, the number of walls perpendicular or parallel to each wall is determined to obtain the number of targets corresponding to each wall; the direction corresponding to the target wall is determined as the reference direction of the area to be cleaned, and the target wall is the wall with the largest number of targets. In this embodiment, the direction parallel or perpendicular to the most walls is determined as the reference direction, so that the cleaning trajectory presents the best visual effect.
[0052] It can be understood that the direction parallel to or perpendicular to the most walls can be determined by the vector dot product method, or by the normal vector of each wall, or by statistical analysis of the angles between each wall and the set direction, so as to determine the main wall directions in the environment map. Using this reference direction for cleaning path planning and display can make the cleaning trajectory orthogonal to the most walls, so as to present the best visual effect of the cleaning trajectory.
[0053] The following example uses the vector dot product method to determine the reference direction. According to the geometric characteristics of vector multiplication, the dot product of two unit vectors is theta is the angle between two unit vectors, so if two vectors are horizontal or perpendicular, the dot product of the two vectors is 0 or 1.
[0054] Optionally, the number of walls perpendicular or parallel to each wall is determined based on the environment map to obtain the number of targets corresponding to each wall, including: determining the wall unit vector corresponding to each wall according to the environment map; and determining the number of targets corresponding to each wall unit vector based on the dot product between the wall unit vectors.
[0055] For ease of understanding, continue with the above Figure 3 Take the environment map shown in the figure as an example. The environment map includes 4 walls. The unit vector corresponding to wall AB is The unit vector corresponding to wall BC is The unit vector corresponding to the wall CD is The unit vector corresponding to the wall DA is, and each wall vector is dot-multiplied with other wall vectors to obtain the target matrix in the environment map as follows:
[0056]
[0057] Among them, each row in the target matrix corresponds to all dot products of a wall with other walls. The target number can be set to the number of data with 0 or 1 in each row, so as to determine the number of walls perpendicular or parallel to each wall. The target number of wall AB is 2, the target number of wall BC is 0, the target number of wall CD is 2, and the target number of wall DA is 2.
[0058] If there are multiple rows with the largest number of targets, that is, there are multiple walls with the same number of vertical or parallel walls, such as the number of targets in the first, third and fourth rows above are all 2, then the wall vector corresponding to any one of the maximum number of targets is selected as the target wall vector, that is, the target wall vector is determined as the reference baseline vector, such as The reference baseline vector is determined as the target wall vector, and the target wall vector is the wall vector with the largest number of targets.
[0059] It should be further explained that, in practical applications, the reference direction has better visual effects within a certain deviation range, and the number of targets can be determined by setting a preset threshold and each dot product, wherein the preset threshold is the set allowable deviation range, and the preset threshold range can be set according to actual conditions, which can improve the adaptability of multi-wall vectors in complex scenes.
[0060] The above-mentioned determining the target number corresponding to each wall unit vector based on the dot product between each wall unit vector includes: if the dot product between two wall unit vectors is within a preset threshold range, then the target number of each candidate wall vector is increased by one, wherein the candidate wall vector is any wall unit vector.
[0061] Optionally, if the dot product between two wall unit vectors is within a preset first threshold range, such as the first threshold range is set to [-0.10, 0.10], the target number of each candidate wall vector is increased by one, that is, the two walls are close to the mutually perpendicular direction, wherein the candidate wall vector is any wall unit vector;
[0062] Optionally, if the difference between the dot product of two wall unit vectors and 1 is within a preset first threshold range, the target number of each candidate wall vector is increased by one, that is, the two walls are close to being parallel to each other.
[0063] Optionally, if the dot product between two wall unit vectors is within a preset second threshold range, such as the second threshold range is set to [0.90, 1.10], the target number of each candidate wall vector is increased by one, that is, the two walls are close to being parallel to each other. For example, a wall is exactly in the horizontal direction, and the angle between the other wall and the horizontal direction is 1 degree. The dot product of their unit vectors is 0.99, and the target numbers corresponding to the two wall unit vectors are each increased by one.
[0064] 403. Based on the reference direction, the cleaning robot is controlled to clean the area to be cleaned, and each trajectory point is collected to obtain a trajectory point set.
[0065] Step 403 may be performed with reference to step 203 and will not be described in detail here.
[0066] 404. Connect the current trajectory point and the previous trajectory point in the trajectory point set to obtain a first straight line segment.
[0067] In this embodiment, the cleaning robot collects real-time trajectory points according to a preset sampling period. When a new trajectory point is added to the trajectory point set, that is, the current trajectory point is collected, the current trajectory point and the previous trajectory point are connected to obtain the first straight line segment.
[0068] In this embodiment, the first straight line segment L1 is an initial trajectory segment generated by connecting the two trajectory points before and after. Figure 5 In (a), the dotted line segment between the current trajectory point P2 and the previous trajectory point P1 has a deviation. If P1 and P2 are directly displayed on the APP, the trajectory segment will jitter.
[0069] 405. Adjust the first straight line segment according to the reference direction and display it on the environment map.
[0070] Optionally, the horizontal coordinate or vertical coordinate of the current trajectory point is adjusted based on the reference direction and the position coordinate corresponding to the previous trajectory point to obtain an adjusted first straight line segment L2, and the adjusted first straight line segment is perpendicular or parallel to the reference direction. In this embodiment, by correcting the first straight line segment, real-time trajectory generation and optimization of the cleaning robot can be achieved to obtain the best visual effect.
[0071] Continue with Figure 5 Taking (a) as an example, if the AB direction is determined as the reference direction, the horizontal coordinate of the current trajectory point P2 is maintained unchanged, and the vertical coordinate of P2 is adjusted to be consistent with the vertical coordinate of the previous trajectory point P1, the adjusted first straight line segment is parallel to the reference direction AB.
[0072] Similarly, if the direction of the current trajectory segment is perpendicular to the reference direction, the first straight line segment is rotated to be exactly perpendicular to the reference direction with the previous trajectory point as the origin, which will not be described in detail here.
[0073] 406. Adjust the second straight line segment fitted to the trajectory point set according to the reference direction, and update the environment map.
[0074] In practical applications, the real-time correction of each initial trajectory segment is based on the starting trajectory point of each initial trajectory segment, that is, the starting point. This can ensure that the corrected candidate trajectory segment is perpendicular or parallel to the reference direction. If there is an error in the starting point, the entire candidate trajectory segment will deviate greatly from the actual operating trajectory due to the cumulative error. The present application corrects the entire trajectory segment based on the reference direction, which can take into account the aesthetics of the fitting line segment while being more in line with the actual cleaning path of the cleaning robot.
[0075] Specifically, the current cleaning trajectory point is detected, and when it is found that the straight cleaning trajectory segment where the current trajectory point is located has been completed, the second straight line segment is fitted according to the multiple target trajectory points corresponding to the current trajectory segment in the trajectory point set; based on the reference direction and the starting position coordinates of the second straight line segment, the end point horizontal coordinate or the end point vertical coordinate of the second straight line segment is adjusted to obtain an adjusted second straight line segment, the adjusted second straight line segment is perpendicular or parallel to the reference direction, and is updated in the environment map.
[0076] The above-mentioned adjustment of the end point horizontal coordinate or end point vertical coordinate of the second straight line segment based on the reference direction and the starting point position coordinate of the second straight line segment includes: taking the starting point of the second straight line segment as the origin, and rotating the second straight line segment based on the reference direction to be exactly parallel or perpendicular to the reference direction.
[0077] Reference Figure 5 (b) If the current trajectory point Pn is detected as the end point of the cleaning trajectory segment, that is, the straight line cleaning trajectory segment where the current trajectory point is located has been completed, the multiple target trajectory points corresponding to the current trajectory segment are corrected based on the reference direction AB. Since the ordinates of the subsequent trajectory points are adjusted in sequence based on the starting point P3, the obtained candidate trajectory segment L3 is overall offset downward compared with the actual trajectory segment. In order to correct the candidate trajectory segment, this embodiment can fit the second straight line segment L4 according to the multiple target trajectory points corresponding to the current trajectory segment in the trajectory point set through the least squares fitting method, rotate the second straight line segment L4 to be exactly parallel to the reference direction with the starting point P4 of the second straight line segment L4 as the origin, and rotate L4 to be exactly parallel to the reference direction. a Updates to the environment map.
[0078] In an embodiment of the present application, the direction parallel to or perpendicular to the most walls is determined as a reference direction, and the cleaning robot is controlled to perform cleaning and trajectory point collection according to the reference direction, thereby providing a good data basis for optimizing the visual effect of the subsequent cleaning trajectory, and correcting the first straight line segment generated in real time based on the reference direction to ensure the real-time position update visual effect and avoid segment jitter when the real-time cleaning trajectory is generated; further, when the current trajectory segment is cleaned, the second straight line segment is corrected based on the reference direction to avoid offset of the entire trajectory segment caused by the starting point error, so that the final fitted cleaning line segment is more in line with the actual cleaning path of the cleaning robot.
[0079] In practical applications, the main direction of the planned cleaning trajectory is perpendicular or parallel to the reference direction, that is, the forward direction of most cleaning trajectory segments is perpendicular or parallel to the reference direction. For regular areas such as rectangles and trapezoids to be cleaned, or irregular areas are cleaned by partitioning, or appropriate cleaning trajectory planning methods are adopted for irregular areas, such as using bow trajectory planning, and adjusting the reference direction to adapt to the cleaning trajectory correction needs of most scenes. However, due to obstacles or other reasons in the environment map, some planned cleaning trajectory segments are at a certain angle to the reference direction. In order to enhance the adaptability of the cleaning trajectory display method to complex scenes, reference Figure 6 A third embodiment of the cleaning trajectory display method in the embodiments of the present application is provided.
[0080] 601. Obtain an environmental map of the area to be cleaned.
[0081] 602. Determine a direction parallel to or perpendicular to the most walls as a reference direction based on the environment map.
[0082] 603. Based on the reference direction, the cleaning robot is controlled to clean the area to be cleaned, and each trajectory point is collected to obtain a trajectory point set.
[0083] Steps 601-603 may be performed with reference to steps 401-403 and will not be described in detail here.
[0084] 604. Determine whether the direction of the current planned trajectory where the current trajectory point is located is perpendicular or parallel to the reference direction;
[0085] 605. If yes, the first straight line segment fitted between the current trajectory point and the previous trajectory point is corrected according to the reference direction and displayed on the environment map.
[0086] Specifically, if the direction of the current planned trajectory is perpendicular to the reference direction, the first straight line segment is rotated with the previous trajectory point as the origin until it is exactly perpendicular to the reference direction; if the direction of the current planned trajectory is parallel to the reference direction, the first straight line segment is rotated with the previous trajectory point as the origin until it is exactly parallel to the reference direction and displayed on the environment map.
[0087] 606. If not, the first straight line segment fitted between the current trajectory point and the previous trajectory point is corrected according to the current planned trajectory direction, and displayed on the environment map.
[0088] Specifically, if the direction of the current planned trajectory is not vertical and not parallel to the reference direction, the first straight line segment is rotated to be exactly parallel to the direction of the current planned trajectory with the previous trajectory point as the origin, and is displayed on the environment map.
[0089] In an embodiment of the present application, the direction with the best visual presentation effect is selected as the reference direction of the environmental map, and the cleaning robot is controlled to perform cleaning and track point collection according to the reference direction, so as to provide a good data basis for optimizing the visual effect of the subsequent cleaning track. When the current planned track direction of the current track point is perpendicular or parallel to the reference direction, the first straight line segment generated in real time is corrected based on the reference direction to ensure the real-time position update visual effect and avoid the line segment jitter phenomenon when the real-time cleaning track is generated. When the current planned track direction is not perpendicular and parallel to the reference direction, the first straight line segment generated in real time based on the current planned track direction is corrected to ensure the beauty of the overall visual effect.
[0090] The above describes the cleaning trajectory display method in the embodiment of the present application. The following describes the cleaning trajectory display device in the embodiment of the present application. Figure 7 In the embodiment of the present application, one embodiment of the cleaning trajectory display device includes:
[0091] An acquisition module 701 is used to acquire an environmental map of the area to be cleaned;
[0092] A determination module 702 is used to determine a reference direction corresponding to the environment map;
[0093] The collection module 703 is used to control the cleaning robot to clean the area to be cleaned and collect each track point to obtain a track point set;
[0094] The display module 704 is used to adjust the cleaning trajectory segment fitted by the trajectory point set based on the reference direction and present it on the environment map.
[0095] In an embodiment of the present application, by determining the reference direction of the area to be cleaned, and controlling the cleaning robot to perform cleaning and track point collection based on the reference direction, a good data basis is provided for optimizing the visual effect of the subsequent cleaning track, and the cleaning track segments are further beautified based on the reference direction, thereby avoiding problems such as segment jitter and offset that occur when the cleaning track is directly generated based on track points, and improving the visual effect of the cleaning track on the environmental map.
[0096] See also Figure 8 Another embodiment of the cleaning trajectory display device in the embodiment of the present application includes:
[0097] An acquisition module 701 is used to acquire an environmental map of the area to be cleaned;
[0098] A determination module 702 is used to determine a reference direction corresponding to the environment map;
[0099] The collection module 703 is used to control the cleaning robot to clean the area to be cleaned and collect each track point to obtain a track point set;
[0100] The display module 704 is used to adjust the cleaning trajectory segment fitted by the trajectory point set based on the reference direction and present it on the environment map.
[0101] Optionally, the display module 704 includes:
[0102] A connecting unit 7041, configured to connect the current trajectory point and the previous trajectory point in the trajectory point set to obtain a first straight line segment;
[0103] The first adjustment unit 7042 is used for first adjustment to correct the first straight line segment according to the reference direction and display it on the environment map.
[0104] Optionally, the first adjustment unit 7042 is specifically used to adjust the horizontal coordinate or the vertical coordinate of the current trajectory point based on the reference direction and the position coordinates corresponding to the previous trajectory point, so that the adjusted first straight line segment is perpendicular or parallel to the reference direction.
[0105] Optionally, the display module 704 further includes:
[0106] The second adjustment unit 7043 is used to adjust the first straight line segment based on the direction of the planned trajectory segment where the current trajectory point is located, and display it on the environment map.
[0107] Optionally, the display module 704 further includes: a third adjustment unit 7044, configured to adjust the second straight line segment fitted to the trajectory point set according to the reference direction, and update the second straight line segment in the environment map.
[0108] Optionally, the determination module 702 is specifically configured to determine the direction parallel to or perpendicular to the most walls as a reference direction based on the environment map.
[0109] Optionally, the determining module 702 includes:
[0110] A vector determination unit 7021, configured to determine a wall unit vector corresponding to each wall according to the environment map;
[0111] A dot product processing unit 7022, configured to determine the number of targets corresponding to each of the wall unit vectors based on the dot product between the wall unit vectors;
[0112] The direction determination unit 7023 is used to determine the direction corresponding to the target wall vector as the reference direction of the area to be cleaned, and the target wall vector is the wall unit vector with the largest number of targets.
[0113] Optionally, the dot product processing unit 7022 is specifically configured to increase the target number of each candidate wall vector by one if the dot product between two candidate wall vectors is within a preset threshold range, and the candidate wall vector is any wall unit vector.
[0114] In an embodiment of the present application, in an embodiment of the present application, the direction parallel to or perpendicular to the most walls is determined as a reference direction, and the cleaning robot is controlled to perform cleaning and trajectory point collection according to the reference direction, so as to provide a good data basis for optimizing the visual effect of the subsequent cleaning trajectory, and the first straight line segment generated in real time is corrected based on the reference direction to ensure the real-time position update visual effect and avoid the segment jitter phenomenon when the real-time cleaning trajectory is generated; further, when the current trajectory segment is cleaned, the second straight line segment is corrected based on the reference direction to avoid the offset of the entire trajectory segment caused by the starting point error, so that the final fitted cleaning line segment is more in line with the actual cleaning path of the cleaning robot.
[0115] above Figure 7 and Figure 8 The cleaning trajectory display device in the embodiment of the present application is described in detail from the perspective of modular functional entities. The cleaning trajectory display device in the embodiment of the present application is described in detail from the perspective of hardware processing.
[0116] See also Fig. 9 As shown, the cleaning trajectory display device includes a processor 900 and a memory 901, wherein the memory 901 stores machine executable instructions that can be executed by the processor 900, and the processor 900 executes the machine executable instructions to implement the above-mentioned cleaning trajectory display method.
[0117] Further, Figure 8 The cleaning trajectory display device shown also includes a bus 902 and a communication interface 903 , and the processor 900 , the communication interface 903 and the memory 901 are connected via the bus 902 .
[0118] Among them, the memory 901 may include a high-speed random access memory (Random Access Memory, RAM), and may also include a non-volatile memory (non-volatile memory), for example, at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 903 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 902 can be an ISA bus, a PCI bus or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0119] The processor 900 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 900. The above processor 900 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly embodied as a hardware decoding processor to be executed, or a combination of hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 901 , and the processor 900 reads the information in the memory 901 and completes the method steps of the above-mentioned embodiment in combination with its hardware.
[0120] The present application also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the cleaning trajectory display method.
[0121] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0122] If the integrated unit 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 technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0123] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A cleaning trajectory display method, characterized in that: The cleaning trajectory display method comprises: Obtain an environmental map of the area to be cleaned; Determining a reference direction corresponding to the environment map; Controlling the cleaning robot to clean the area to be cleaned, and collecting each track point to obtain a track point set; The cleaning trajectory segment fitted by the trajectory point set is adjusted based on the reference direction and presented on the environment map.
2. The cleaning trajectory display method according to claim 1, characterized in that: The adjusting the cleaning trajectory segment fitted by the trajectory point set based on the reference direction and presenting it on the environment map includes: Connecting the current trajectory point and the previous trajectory point in the trajectory point set to obtain a first straight line segment; The first straight line segment is corrected according to the reference direction and displayed on the environment map.
3. The cleaning trajectory display method according to claim 2, characterized in that: If the direction of the planned trajectory segment where the current trajectory point is located is perpendicular or parallel to the reference direction; The adjusting the first straight line segment according to the reference direction comprises: The horizontal coordinate or the vertical coordinate of the current trajectory point is adjusted based on the reference direction and the position coordinates corresponding to the previous trajectory point, so that the adjusted first straight line segment is perpendicular or parallel to the reference direction.
4. The cleaning trajectory display method according to claim 1, characterized in that: If the current track segment where the current track point is located has been cleaned; The adjusting the cleaning trajectory segment fitted by the trajectory point set based on the reference direction also includes: The second straight line segment fitted by the trajectory point set is adjusted according to the reference direction, and the environment map is updated.
5. The cleaning trajectory display method according to claim 1, characterized in that: The determining a reference direction corresponding to the environment map includes: Based on the environment map, a direction parallel to or perpendicular to most walls is determined as a reference direction.
6. The cleaning trajectory display method according to claim 5, characterized in that: The step of determining the direction parallel to or perpendicular to the most walls as the reference direction based on the environment map includes: Determine the wall unit vector corresponding to each wall according to the environment map; Determining the number of targets corresponding to each of the wall unit vectors based on the dot product between the wall unit vectors; The direction corresponding to the target wall vector is determined as the reference direction of the area to be cleaned, and the target wall vector is the wall unit vector with the largest number of targets.
7. The cleaning trajectory display method according to claim 6, characterized in that: The determining the number of targets corresponding to each of the wall unit vectors based on the dot product between the wall unit vectors includes: If the dot product between two candidate wall vectors is within a preset threshold range, the target number of each candidate wall vector is increased by one, and the candidate wall vector is any wall unit vector.
8. A cleaning trajectory display device, characterized in that: The cleaning trajectory display device comprises: An acquisition module is used to obtain an environmental map of the area to be cleaned; A determination module, used to determine a reference direction corresponding to the environment map; A collection module, used to control the cleaning robot to clean the area to be cleaned, and collect each track point to obtain a track point set; The display module is used to adjust the cleaning trajectory segment fitted by the trajectory point set based on the reference direction and present it on the environment map.
9. A cleaning track display device, characterized in that: The cleaning track display device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory so that the sweeping trajectory display device executes the sweeping trajectory display method as described in any one of claims 1-7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instruction is read and executed, the cleaning trajectory display method as described in any one of claims 1-7 is executed.
Citation Information
Cited By
Track beautifying method and device for cleaning robot, control system and device and storage medium
CN120740592A
