A robot control method and main control chip
By using a robot to acquire map data and partition it into a nine-square grid, and by constructing a time zone mapping table using binocular cameras and sensors, the problem of increased hardware costs associated with UWB sensors was solved. This enabled low-cost and efficient pet monitoring, and improved the robot's intelligence and marketability.
Patent Information
- Application Number
- CN202410964649.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2044-07-18
AI Technical Summary
Existing pet-playing robots require UWB positioning sensors to be installed on both the robot and the pet, which increases hardware costs and hinders the promotion and popularization of the product.
By acquiring map data through robots, creating a 3x3 grid virtual partition, using binocular cameras and sensors to determine the pet's location, constructing a time zone mapping table, and analyzing the pet's behavioral habits, we can achieve rapid pet location and search without using UWB sensors.
It reduces hardware costs, improves the efficiency of robot monitoring of pets and its market potential, and enhances the robot's intelligence level.
Smart Images

Figure CN118897553B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent robots, specifically to a robot control method and a main control chip. Background Technology
[0002] A pet-playing robot is an intelligent, autonomously moving robot product that can interact and play with pets and monitor them. Chinese invention patent application number CN202111561906.7 discloses a technology that enables interaction and monitoring between multiple robots and pets. However, this technology requires the installation of UWB (Ultra Wide Band) positioning sensors on both the robots and the pets, which undoubtedly increases the hardware cost of the pet-playing robot, hindering its promotion and widespread adoption. Summary of the Invention
[0003] This application provides a robot control method and a main control chip, the specific technical solution of which is as follows:
[0004] A robot control method includes the following steps: Step S1, the robot acquires map data, determines the regional distribution in the map, and then proceeds to Step S2; Step S2, the robot tracks and photographs a pet, records the location of the pet at a certain point in time, and then proceeds to Step S3; Step S3, the robot analyzes the recorded data to form a time-region mapping table, and then proceeds to Step S4; Step S4, when the robot needs to find the pet and the pet is not within the robot's line of sight, the robot determines the area where the pet is located through the time-region mapping table and goes directly to that area to find the pet.
[0005] Further, step S1 specifically includes the following steps: Step S11, the robot receives map data sent by an external device and proceeds to step S12; Step S12, the robot performs a nine-square grid virtual partitioning of the map and proceeds to step S13; Step S13, the robot numbers the partitioned virtual areas.
[0006] Further, the robot's nine-square grid virtual partitioning of the map in step S12 specifically includes the following steps: Step S121, the robot determines the maximum value along the horizontal direction and the maximum value along the vertical direction of the map, and proceeds to step S122; Step S122, the robot divides the maximum value along the horizontal direction into three equal segments using two horizontal dividing points, and then sets two vertical dividing lines through the two horizontal dividing points respectively, dividing the map into three areas arranged along the horizontal direction, and proceeds to step S123; Step S123, the robot divides the maximum value along the vertical direction into three equal segments using two vertical dividing points, and then sets two horizontal dividing lines through the two vertical dividing points respectively, which, together with the vertical dividing lines, divide the map into nine areas, forming a nine-square grid virtual area.
[0007] Further, step S2 specifically includes the following steps: Step S21, the robot determines the current virtual area by using its own binocular camera, gyroscope sensor and odometer, and proceeds to step S22; Step S22, the robot takes a picture of the pet with the binocular camera and determines the pet's current location, and proceeds to step S23; Step S23, the robot determines the virtual area where the pet is currently located based on the pet's current location and records it in its own memory.
[0008] Further, step S3 specifically includes the following steps: Step S31, the robot counts the data recorded in the memory and determines whether the time when the pet appears in one virtual area overlaps with the time when the pet appears in another virtual area. If so, proceed to step S32; otherwise, proceed to step S35. Step S32, the robot uses the overlapping time as a reference time and then determines whether the number of days the pet appears in any virtual area during the reference time is the largest and unique. If so, proceed to step S33; otherwise, proceed to step S34. Step S33, the robot takes the virtual area corresponding to the largest and unique number of days as the location area where the pet will appear during the reference time and records it in the time area mapping table. Step S34, the robot takes all virtual areas with the largest and the same number of days as the location areas where the pet will appear during the reference time and records them in the time area mapping table. Step S35, the robot takes the virtual area where the pet is located during non-overlapping times as the location area where the pet will appear during non-overlapping times and records it in the time area mapping table.
[0009] Furthermore, step S34 also includes the following steps: when the positioning area corresponds to multiple virtual areas, the robot will first navigate to the virtual area closest to the robot according to the distance; if the distances are the same, the robot will randomly navigate to any of the virtual areas.
[0010] Further, the robot described in step S4 determines the area where the pet is located through the time area mapping table and directly goes to that area to find the pet. Specifically, this includes the following steps: Step S41, the robot obtains the current time and proceeds to step S42; Step S42, the robot searches for the positioning area corresponding to the current time in the time area mapping table and proceeds to step S43; Step S43, the robot moves to the center of the positioning area with the center position of the positioning area as the navigation endpoint and proceeds to step S44; Step S44, the robot rotates 360 degrees and determines whether the pet has been photographed. If so, proceed to step S2; otherwise, proceed to step S45; Step S45, the robot determines the next reference time closest to the current time in the time area mapping table, and if the positioning area corresponding to this reference time is not the current positioning area of the robot, then the robot takes the positioning area corresponding to this reference time as the new positioning area and proceeds to step S43.
[0011] Furthermore, the process of the robot moving to the center of the positioning area as the navigation endpoint in step S43 also includes the following steps: Step S431, the robot determines in real time whether it has captured a pet during the movement. If it has, it directly proceeds to step S2 and does not move to the navigation endpoint. If not, it proceeds to step S432. Step S432, the robot continues to move. When the robot detects an obstacle at the center, it moves around the passage between the central obstacle and the obstacles around the positioning area, and determines whether it has captured a pet during the movement. If it has, it proceeds to step S2; otherwise, it proceeds to step S45. When the robot does not detect an obstacle at the center, it moves to the center of the positioning area and proceeds to step S44.
[0012] Further, the robot moving around the channel between the intermediate obstacle and the obstacles around the positioning area as described in step S432 specifically includes the following steps: Step S4321, the robot takes the detected position of the intermediate obstacle as the starting point and proceeds to step S4322; Step S4322, the robot turns to one side and moves along the channel between the intermediate obstacle and the obstacles around the positioning area, and determines whether it has reached the end of the channel. If it has, it proceeds to step S4323; otherwise, it continues to move until the robot returns to the starting point, completing one circle of movement; Step S4323, the robot turns back to the starting point, and then moves to the other side along the channel between the intermediate obstacle and the obstacles around the positioning area until the robot reaches the end of the channel, thus completing one circle of movement.
[0013] A main control chip is installed in the electronic control system of a mobile robot, the main control chip being used to control the robot to execute the robot's control method.
[0014] The robot control method described in this application does not require the use of UWB or other sensors to locate pets. It only requires the construction of a time-zone mapping table and data analysis and processing to quickly locate pets. This allows the robot to achieve effective pet monitoring at a lower hardware cost, which is beneficial for the market promotion and application of robot products. Attached Figure Description
[0015] Figure 1 This is a flowchart illustrating a robot control method according to one embodiment of this application.
[0016] Figure 2 This is a schematic diagram illustrating how the robot performs a nine-square grid virtual partitioning of a map according to one embodiment of this application. Detailed Implementation
[0017] The embodiments of this application will now be described in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described below are for illustrative purposes only and are not intended to limit the scope of this application.
[0018] like Figure 1 The diagram illustrates a robot control method. This robot is an intelligent robot capable of autonomous movement, including but not limited to robotic vacuum cleaners, pet-playing robots, disinfection robots, and lawn-mowing robots. These robots are equipped with devices such as gyroscopes, odometers, infrared sensors, vision sensors, and / or laser sensors, which enable the robot to perform intelligent operations such as positioning, navigation, and mapping. The robot control method includes the following steps S1 to S4:
[0019] In step S1, the robot acquires map data, determines the distribution of areas on the map, and then proceeds to step S2. The map data is a grid map, including coordinates and status (obstacles, passable, unknown) of grid cells, representing map information that indicates the indoor environment. By reading this map information and combining it with data acquired by its own sensors, the robot can determine the map size, the distribution of obstacles, and its current position. It can also process the map data to determine the distribution of areas on the map.
[0020] In step S2, the robot tracks and photographs the pet, recording the pet's location at a certain point in time, and then proceeds to step S3. The robot can photograph the pet using a camera. When the pet moves, the robot moves and turns accordingly based on the pet's size changes and direction of movement in the image, thereby tracking and photographing the pet and recording its location at a certain point in time.
[0021] In step S3, the robot analyzes the recorded data to form a time-zone mapping table, and then proceeds to step S4. The data recorded by the robot mainly consists of two types: time and the pet's location area, specifically the area corresponding to the pet's grid coordinates. This area is the region on the map determined by the robot in step S1. The robot associates the pet's location within a given time zone with the corresponding area, forming the time-zone mapping table.
[0022] In step S4, when the robot needs to find a pet but the pet is not within its line of sight, the robot determines the pet's location using a time-zone mapping table and directly goes to that area to find the pet. The robot typically needs to find a pet when it finishes charging or receives a control signal from the user via a smart terminal. Because pets such as cats and dogs are agile and move quickly, the robot often cannot keep up when filming them, causing the pet to frequently disappear from its line of sight. Therefore, to maintain real-time tracking and filming of the pet, the robot quickly determines the pet's current location using a time-zone mapping table and directly navigates to that area to find the pet.
[0023] The robot control method described in this embodiment does not require the use of dedicated sensors such as UWB to locate pets. It only requires the construction of a time-zone mapping table and data analysis and processing to quickly locate pets. This allows the robot to achieve effective pet monitoring at a lower hardware cost, which is beneficial for the market promotion and application of robot products.
[0024] In one implementation, step S1 specifically includes the following steps S11 to S13:
[0025] In step S11, the robot receives map data sent by an external device and proceeds to step S12. The external device can be a user's mobile phone, iPad, computer, or other smart terminal device. Specifically, the user selects map data corresponding to the robot's current environment through the smart terminal and sends this map data to the robot via wireless communication methods such as Wi-Fi or Bluetooth. This map data can be drawn by the user through the smart terminal or constructed by other smart products during its operation.
[0026] In step S12, the robot divides the map into a nine-square grid, and then proceeds to step S13. The nine-square grid virtual partitioning refers to dividing the map into nine virtual areas, which are arranged in a nine-square grid pattern.
[0027] In step S13, the robot numbers the partitioned virtual regions. For example... Figure 2As shown, the nine regions formed after the nine-square grid virtual partitioning are labeled Q1 to Q9.
[0028] The control method described in this embodiment enables the robot to quickly obtain a map and process the map into a format suitable for its own work needs, greatly improving the robot's practicality and efficiency.
[0029] As one implementation method, the robot in step S12 performs a nine-square grid virtual partitioning of the map, specifically including the following steps S121 to S123:
[0030] In step S121, the robot determines the maximum value of the map along the horizontal direction and the maximum value along the vertical direction, and then proceeds to step S122. Figure 2 As shown, the rectangular border marked by points A, B, C, and D is the boundary of the map. Solid lines extending from within the rectangular border represent walls. Line segment AB or CD represents the maximum value of the map along the horizontal direction, and line segment AD or BC represents the maximum value of the map along the vertical direction.
[0031] In step S122, the robot divides the maximum value along the horizontal direction into three equal segments using two horizontal dividing points. Then, it sets two vertical dividing lines through the two horizontal dividing points, dividing the map into three horizontally arranged regions, and proceeds to step S123. The two vertical dividing lines are respectively... Figure 2 The dashed lines L1 and L2 are shown in the diagram.
[0032] In step S123, the robot divides the maximum value along the vertical direction into three equal segments using two vertical and horizontal dividing points. Then, it sets two horizontal dividing lines through the two vertical dividing points, which, together with the vertical dividing lines, divide the map into nine regions, forming a nine-square grid virtual area. The two horizontal dividing lines are respectively... Figure 2 The dashed lines L3 and L4 are shown in the diagram. The 3x3 grid virtual area is... Figure 2 The nine small rectangular regions marked Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, and Q9.
[0033] The control method described in this embodiment can achieve a nine-square grid virtual partitioning through simple bisectors, enabling the robot to quickly build a partitioned map without the need for complex image processing techniques such as dilation and erosion, which helps improve the robot's working efficiency.
[0034] In one implementation, step S2 specifically includes steps S21 to S23:
[0035] In step S21, the robot uses its built-in binocular camera, gyroscope sensor, and odometer to determine its current location based on the road signs captured by the binocular camera, the direction angle detected by the gyroscope sensor, and the walking distance detected by the odometer. Then, the robot can determine the virtual area it is currently in using the coordinates of that location and proceed to step S22.
[0036] In step S22, the robot uses a binocular camera to photograph the pet and determines the pet's current position, then proceeds to step S23. The binocular camera consists of two cameras placed at a certain distance, called the baseline distance. When both cameras simultaneously capture the pet, they create two 2D images. When the pet appears in both images, its position shifts due to the baseline distance between the cameras; this shift is called parallax. Parallax can be calculated by determining the distance difference between corresponding pixels in the two images. Using parallax, the distance difference between corresponding pixels of the same object in two images can be obtained. Knowing the baseline distance and viewing angle of the two cameras, the pet's 3D coordinates can be calculated using triangulation. Once the 3D coordinates are known, the distance to the pet can be calculated. This is typically done using the following formula: Distance = (Baseline Distance * Focal Length) / Parallax. Here, the baseline distance and focal length are fixed camera parameters, and the parallax is calculated from the image pixels.
[0037] In step S23, the robot can determine the virtual area where the pet is located at the current moment by using the coordinates of that location, and record it in its own memory.
[0038] The control method described in this embodiment generates a large amount of data that reflects the pet's behavior and habits by photographing and recording the pet's location at different times. This data can provide a reliable reference for the robot to quickly find the pet and improve the robot's intelligence level.
[0039] In one implementation, step S3 specifically includes the following steps S31 to S35:
[0040] In step S31, the robot analyzes the data recorded in its memory and determines whether the time when the pet appears in one virtual area overlaps with the time when the pet appears in another virtual area. If so, proceed to step S32; otherwise, proceed to step 35. Specifically, as shown... Figure 2As shown, when the recorded data shows that the pet appeared in area Q1 from 18:30 to 19:20 on May 1st and in area Q2 from 19:00 to 20:45 on May 2nd, it can be seen that the pet's appearance time in these two areas overlaps from 19:00 to 19:20. Therefore, the robot proceeds to step S32 for further processing. When the recorded data shows that the pet was in area Q3 from 22:10 to 6:30 on all recorded dates, it indicates that the pet's appearance time in one virtual area does not overlap with the pet's appearance time in another virtual area. Therefore, the robot proceeds to step S35 for further processing.
[0041] In step S32, the robot uses the overlapping time as a reference time and then determines whether the number of days the pet appears in any virtual area during the reference time is the maximum and unique. If so, it proceeds to step S33; otherwise, it proceeds to step S34. Specifically, when the overlap time between the pet and areas Q1 and Q2 is from 19:00 to 19:20, the robot uses this time period as a reference time and then analyzes the number of days the pet appears in each of the nine areas Q1 to Q9 during this period. This number of days can be understood as the number of occurrences, because there are repeated 24 hours every day, and the same time period only occurs once a day, so it can be counted as one occurrence. The data recorded from May 1st to May 16th is used as an example to illustrate this. If the pet appeared in region Q1 for 11 days during the reference time period from 19:00 to 19:20, specifically on May 1st, May 3rd, May 5th to May 12th, and May 16th; appeared in region Q2 for 3 days, specifically on May 2nd, May 4th, and May 13th; and appeared in region Q4 for 2 days, specifically on May 14th and May 15th. Therefore, the pet appeared in region Q1 for 11 days, compared to the pet appeared in region Q2 for 3 days and in region Q4 for 2 days. Thus, the pet's appearance in region Q1 during the reference time period is the largest and unique, and the robot proceeds to step S33 for further processing. If the pet appears in region Q1 for 7 days between 19:00 and 19:20 (May 1st, May 3rd, and May 5th to May 9th), in region Q2 for 7 days (May 2nd, May 4th, and May 10th to May 14th), and in region Q4 for 2 days (May 15th and May 16th), then the pet's appearance in region Q1 (7 days) is equal to its appearance in region Q2 (7 days) and greater than its appearance in region Q4 (2 days). Therefore, the pet's appearance in region Q1 during the reference time is at most (but not uniquely) the same as its appearance in region Q2. Thus, the robot proceeds to step S34 for further processing.
[0042] In step S33, the robot identifies the virtual area corresponding to the largest and unique number of days as the location area where the pet will appear within that reference time period and records it in the time area mapping table. Based on the example described in step S32 above, the pet appears in area Q1 for the largest and unique number of days during the reference time. Therefore, the robot identifies the virtual area marked Q1 as the location area and records it in the time area mapping table. When the robot wants to find the pet during the reference time period of 19:00 to 19:20, by querying the time area mapping table, it can find that the location area corresponding to this time period is Q1. The robot can then directly navigate to area Q1 to find the pet. The probability of the robot finding the pet in the location area is higher than the probability of finding the pet in other areas.
[0043] In step S34, the robot identifies the virtual areas with the largest number of days and the same number of days as the location areas where the pet will appear within the reference time period and records them in the time area mapping table. Based on the example described in step S32 above, the number of days the pet appears in area Q1 (7 days) is equal to the number of days the pet appears in area Q2 (7 days), and greater than the number of days the pet appears in area Q4 (2 days). This indicates that the probability of the pet appearing in areas Q1 and Q2 is the same. Therefore, the robot identifies both areas Q1 and Q2 as location areas and records them in the time area mapping table. When the robot wants to find the pet during the reference time period of 19:00 to 19:20, it can find the location areas Q1 and Q2 by querying the time area mapping table. The robot can then directly navigate to areas Q1 and Q2 to find the pet, as the probability of finding the pet in a location area is higher than in other areas. Preferably, if a location area corresponds to multiple virtual areas, the robot will prioritize navigating to the virtual area closest to it, further improving the efficiency of finding the pet. When both Q1 and Q2 are used as the location areas, the robot analyzes which area is closer to it. If Q1 is closer, it navigates to Q1 first; if the pet is not found there, it navigates to Q2. If Q2 is closer, it navigates to Q2 first; if the pet is not found there, it navigates to Q1. If the distances are the same, the robot randomly navigates to either Q1 or Q2.
[0044] In step S35, the robot defines the virtual area where the pet is located during non-overlapping time periods as the location area where the pet would appear during those non-overlapping time periods, and records it in the time area mapping table. For example, assuming that during the period from 22:10 to 6:30, the pet only appears in area Q3 across all recorded dates, and not in any other areas, the robot uses the virtual area marked Q3 as the location area and records it in the time area mapping table. When the robot wants to find the pet during this reference time period of 22:10 to 6:30, by querying the time area mapping table, it can determine that the corresponding location area for this period is Q3. The robot can then directly navigate to area Q3 to find the pet, as the probability of finding the pet in area Q3 is higher than in other areas.
[0045] The control method described in this embodiment allows the robot to quickly find the area where the pet is most likely to appear simply by querying the time zone mapping table, without the need for complex data processing and calculations. The whole process is simple and efficient, further improving the robot's work efficiency and intelligence level.
[0046] The time zone mapping table is a data format that reflects the location area corresponding to each time point or time period within 24 hours of any recorded day. The table is stored in the robot's memory, and the robot's main control chip can directly query and call the data in the table.
[0047] In one implementation, the robot in step S4 determines the area where the pet is located through a time zone mapping table and goes directly to that area to find the pet, specifically including the following steps S41 to S45:
[0048] In step S41, the robot acquires the current time and proceeds to step S42. The robot can acquire the current time through its own configured clock circuit, or through a GPS module or GPRS module. The acquired time includes the date and the specific time.
[0049] In step S42, the robot searches for the location area corresponding to the current time in the time area mapping table and proceeds to step S43.
[0050] In step S43, the robot moves to the center of the positioning area, using the center of the positioning area as its navigation endpoint, and proceeds to step S44. The center of the positioning area is the center of the virtual area corresponding to the positioning area. Figure 2 The center point of any of the rectangular areas marked Q1 to Q9 shown can be determined by the intersection of the diagonals of the rectangle.
[0051] In step S44, the robot rotates 360 degrees and determines whether a pet has been captured in the image. If so, proceed to step S2; otherwise, proceed to step S45. By rotating 360 degrees from its center point, the robot can capture a comprehensive view of the area at once, quickly determining if a pet is present and improving its pet-finding efficiency. The robot determines whether a pet has been captured primarily through existing image processing techniques such as image preprocessing, feature extraction, matching, and recognition. If a pet is present, it means the pet has been captured; otherwise, it means the pet has not been captured.
[0052] In step S45, the robot determines the next reference time closest to the current time in the time region mapping table, and if the positioning region corresponding to this reference time is not the current positioning region of the robot, then the robot uses the positioning region corresponding to this reference time as the new positioning region and proceeds to step S43. Specifically, taking... Figure 2 Taking regions Q5, Q6, and Q7 as examples, in the time zone mapping table, the reference time from 13:00 to 13:20 corresponds to region Q5, the reference time from 13:25 to 14:08 corresponds to region Q7, and the reference time from 14:22 to 15:10 corresponds to region Q6. When the robot does not capture a picture of the pet in region Q5, it determines that the next closest time point in the time zone mapping table is the reference time from 13:25 to 14:08, and the corresponding location region for this time is Q7, not the current location region Q5. Therefore, the robot adopts region Q7 as its new location region and navigates to region Q7 to search for the pet. Similarly, if the robot does not find the pet in region Q7, it navigates to region Q6 to search, and so on, until the robot finds the pet.
[0053] The control method described in this embodiment uses time as the order. By searching for the location area corresponding to the next reference time closest to the current time, the robot can gradually search from areas with a high probability of pets appearing to areas with a low probability of pets appearing, which helps to maximize the efficiency of the robot in finding pets.
[0054] As one implementation method, the process of the robot moving to the center of the positioning area with the center of the positioning area as the navigation endpoint in step S43 further includes the following steps:
[0055] In step S431, the robot determines in real time whether it has captured the pet during its movement. If it has, it means that the robot has found the pet and will directly proceed to step S2 to track and capture the pet without having to move to the navigation endpoint. If it has not, it means that the pet is not on the path the robot has taken and will proceed to step S432.
[0056] In step S432, the robot continues to move. When the robot detects an obstacle in the center, it moves around the passage between the central obstacle and the obstacles around the positioning area. During the movement, it determines whether the pet has been photographed. If so, it proceeds to step S2; otherwise, it proceeds to step S45. When the robot does not detect an obstacle in the center, it moves to the center of the positioning area and proceeds to step S44.
[0057] The control method described in this embodiment enables the robot to handle different situations flexibly, greatly improving the robot's intelligence level.
[0058] In one implementation, the robot described in step S432 moves around the channel between the intermediate obstacle and the obstacles around the positioning area, specifically including the following steps S4321 to S4323.
[0059] In step S4321, the robot takes the location of the detected intermediate obstacle as the starting point and proceeds to step S4322.
[0060] In step S4322, the robot turns to one side, either left or right, and then moves along the passage between the central obstacle and the obstacles surrounding the positioning area. This passage is determined by the robot based on a path composed of passable grid cells marked on the map, combined with the spatial positions of the obstacles on both sides captured by the camera. During the robot's movement, it determines whether it has reached the end of the passage by observing the obstacles ahead of the passage captured by the camera. If there are only obstacles ahead of the passage and no passable path, it indicates that the robot has reached the end of the passage and needs to proceed to step S4323 for the next step. Otherwise, the robot continues to move until it returns to the starting point, completing one loop along the passage between the central obstacle and the obstacles surrounding the positioning area.
[0061] In step S4323, the robot turns around and returns to the starting point, then moves to the other side along the channel between the central obstacle and the obstacles around the positioning area until the robot reaches the end of the channel, thus completing one circle of movement along the channel between the central obstacle and the obstacles around the positioning area.
[0062] As one implementation method, this application also provides a main control chip, which is assembled in the electronic control system of a mobile robot. The main control chip is used to control the robot to execute the robot control method described in the above embodiments.
[0063] During its movement, the robot will encounter various obstacles. To effectively simplify the description of the indoor environment and facilitate the development of reasonable corresponding strategies in path planning, indoor obstacles can be handled as follows: if the distance between an obstacle and a wall does not meet the minimum distance for the robot to pass through, the robot cannot pass through smoothly, and the obstacle is treated as a wall; when the distance between two obstacles is very close and the robot cannot pass through smoothly, they can be treated as one obstacle.
[0064] Obviously, the above embodiments are only some embodiments of the present invention, not all embodiments. The various embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the embodiments of the present invention will not describe other possible combinations separately. Those skilled in the art will understand that all or part of the steps of the above methods can be implemented by hardware related to program instructions. These programs can be stored in computer-readable storage media (such as ROM, RAM, magnetic disks, or optical disks, and other media capable of storing program code). When the program is executed, it performs the steps of the above-described method embodiments.
[0065] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some or all of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for controlling a robot, characterized in that, Includes the following steps: Step S1: The robot acquires map data, determines the distribution of areas in the map, and then proceeds to step S2. Step S2: The robot tracks and photographs the pet, records the location of the pet at a certain point in time, and then proceeds to step S3. Step S3: The robot analyzes the recorded data to form a time zone mapping table, and then proceeds to step S4. Step S4: When the robot needs to find a pet and the pet is not within the robot's line of sight, the robot determines the area where the pet is located through the time area mapping table and goes directly to that area to find the pet. Specifically, step S1 includes the following steps: Step S11: The robot receives map data sent by an external device and proceeds to step S12. Step S12: The robot divides the map into a 3x3 grid, then proceeds to step S13. Step S13: The robot numbers the partitioned virtual regions; Specifically, step S3 includes the following steps: Step S31: The robot counts the data recorded in the memory and determines whether the time when the pet appears in one virtual area overlaps with the time when the pet appears in another virtual area. If so, proceed to step S32; otherwise, proceed to step 35. Step S32: The robot uses the overlapping time as a reference time, and then determines whether the number of days the pet appears in any virtual area at the reference time is the largest and unique. If it is, proceed to step S33; otherwise, proceed to step S34. Step S33: The robot uses the virtual area corresponding to the largest and unique number of days as the location area where the pet will appear within that reference time period, and records it in the time area mapping table. Step S34: The robot takes the virtual areas with the largest number of days and the same number of days as the location areas where the pet will appear within the reference time period and records them in the time area mapping table. Step S35: The robot takes the virtual area where the pet is located during non-overlapping time periods as the location area where the pet will appear during those non-overlapping time periods and records it in the time area mapping table.
2. The robot control method according to claim 1, characterized in that, The robot performing the nine-square grid virtual partitioning of the map as described in step S12 specifically includes the following steps: Step S121: The robot determines the maximum value of the map along the horizontal direction and the maximum value along the vertical direction, and proceeds to step S122. Step S122: The robot divides the maximum value along the horizontal direction into three equal parts using two horizontal dividing points. Then, it sets two vertical dividing lines through the two horizontal dividing points to divide the map into three areas arranged along the horizontal direction. Proceed to step S123. In step S123, the robot divides the maximum value along the vertical direction into three equal segments using two vertical and horizontal dividing points. Then, it sets two horizontal dividing lines through the two vertical dividing points, which, together with the vertical dividing lines, divide the map into nine regions, forming a nine-square grid virtual region.
3. The robot control method according to claim 2, characterized in that, Step S2 specifically includes the following steps: Step S21: The robot uses its own binocular camera, gyroscope sensor and odometer to determine the current virtual area and proceeds to step S22. Step S22: The robot takes pictures of the pet using its binocular cameras and determines the pet's current location, then proceeds to step S23. Step S23: The robot determines the virtual area where the pet is located at the current moment based on the pet's current location and records it in its own memory.
4. The robot control method according to claim 1, characterized in that, Step S34 further includes the following steps: When the positioning area corresponds to multiple virtual areas, the robot will first navigate to the virtual area closest to it based on the distance; if the distances are the same, the robot will randomly navigate to any of the virtual areas.
5. The robot control method according to any one of claims 1 to 4, characterized in that, The robot described in step S4 determines the area where the pet is located through a time zone mapping table and goes directly to that area to find the pet. This specifically includes the following steps: Step S41: The robot obtains the current time and proceeds to step S42; Step S42: The robot searches for the location area corresponding to the current time in the time area mapping table, and proceeds to step S43; Step S43: The robot moves to the center of the positioning area, taking the center of the positioning area as the navigation endpoint, and proceeds to step S44. Step S44: The robot rotates 360 degrees and determines whether it has captured the pet. If it has, proceed to step S2; otherwise, proceed to step S45. In step S45, the robot determines the next reference time closest to the current time in the time region mapping table, and the positioning region corresponding to the reference time is not the current positioning region of the robot. Then the robot takes the positioning region corresponding to the reference time as the new positioning region and proceeds to step S43.
6. The robot control method according to claim 5, characterized in that, The process of the robot moving to the center of the positioning area, as described in step S43, with the center of the positioning area as the navigation endpoint, also includes the following steps: In step S431, the robot determines in real time whether it has captured the pet during its movement. If it has, it proceeds directly to step S2 and stops moving to the navigation endpoint. If it has not, it proceeds to step S432. In step S432, the robot continues to move. When the robot detects an obstacle in the center, it moves around the passage between the central obstacle and the obstacles around the positioning area. During the movement, it determines whether the pet has been photographed. If so, it proceeds to step S2; otherwise, it proceeds to step S45. When the robot does not detect an obstacle in the center, it moves to the center of the positioning area and proceeds to step S44.
7. The robot control method according to claim 6, characterized in that, The robot moving around the channel between the intermediate obstacle and the obstacles around the positioning area as described in step S432 specifically includes the following steps: Step S4321: The robot takes the location of the detected intermediate obstacle as the starting point and proceeds to step S4322. In step S4322, the robot turns to one side and moves along the passage between the central obstacle and the obstacles around the positioning area. It then determines whether it has reached the end of the passage. If it has, it proceeds to step S4323; otherwise, it continues to move until the robot returns to the starting point and completes one circle of movement. In step S4323, the robot turns around and returns to the starting point, then moves to the other side along the channel between the middle obstacle and the obstacles around the positioning area until the robot reaches the end of the channel, thus completing one circle of movement.
8. A main control chip, assembled in the electronic control system of a mobile robot, characterized in that, The main control chip is used to control the robot to execute the control method of the robot according to any one of claims 1 to 7.
Citation Information
Patent Citations
A method, system and chip for controlling a multi-pet robot
CN114190295B
System and method for quickly searching articles
CN111401325A
Sweeper capable of searching objects
CN116138662A