A following method and robot
Patent Information
- Application Number
- CN202510494572.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2026-10-23
AI Technical Summary
由于家庭环境中的障碍物如家具、家电、墙壁较多且家庭环境中房间布局较为复杂,目前没有针对家庭环境中的机器人的跟随方法
[0025]以理解地,上述第二方面其任一种可能的设计方式的机器人,第三方面的芯片系统,第四方面的计算机可读存储介质,第五方面的计算机程序产品所能达到的有益效果,可参考如第一方面及其任一种可能的设计方式中的有益效果,此处不再赘述。
Smart Images

Figure CN122963152A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics, and more particularly to a following method and a robot. Background Technology
[0002] With the continuous development of artificial intelligence technology, robots are gradually integrating into people's daily lives. Following is one of the common functions of robots in practical applications. However, due to the numerous obstacles in the home environment, such as furniture, appliances, and walls, and the complex room layout, there is currently no method for robots to follow in the home environment. Summary of the Invention
[0003] This application provides a following method and a robot, specifically a method for a robot to follow a user in a home environment.
[0004] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:
[0005] Firstly, a following method is provided for a robot that follows the movement of a user. The robot's current position is a first position, and the user's current position is a second position. The method includes: when the distance between the first and second positions is greater than a first value, there is an obstacle between the robot and the user, and a first reachable point exists, controlling the robot to move from the first position to the first reachable point; wherein, the first reachable point is the closest reachable point to the user in a first direction, with a distance between the first and second values, and no obstacles at the reachable point; the second value is greater than the first value; and the first direction is the direction of the line connecting the robot and the user.
[0006] In this application, when the robot is following a user and the distance between the user and the robot is greater than a first value and there is an obstacle between them, the robot is controlled to move to a first reachable point. Since the first reachable point is the closest reachable point to the user along the line connecting the user and the robot, the distance between the robot and the user can be controlled between the first and second values, ensuring the robot is as close to the user as possible. The second value is greater than the first value. For example, the first value can be the minimum preset distance between the robot and the user. The second value can be the maximum preset distance between the robot and the user. This application provides a method for a robot to follow a user in a home environment. This method can control the distance between the robot and the user within a suitable range, ensuring the robot is as close to the user as possible. This not only avoids congestion caused by being too close but also avoids the problem of losing the robot due to being too far away.
[0007] In one possible implementation of the first aspect, the method further includes: when the distance between the first position and the second position is greater than a first value, there is an obstacle between the robot and the user, there is no first reachable point but there is a second reachable point, controlling the robot to move from the first position to the second reachable point; wherein, the second reachable point is the reachable point closest to the user in a second direction, with a distance between it and the user between the first and second values; the angle between the second direction and the first direction is within a preset range. In this application, when the distance between the user and the robot is greater than a first value, there is an obstacle between the robot and the user, but there is no first reachable point, the robot can determine whether a second reachable point exists. The second reachable point is the reachable point closest to the user in a second direction, with a distance between it and the user between the first and second values. If a second reachable point exists, the robot can move to it. Thus, by using the second reachable point, the robot can bypass the obstacle and move to the reachable point closest to the user in a second direction, with a distance between it and the user between the first and second values.
[0008] In one possible implementation of the first aspect, the method further includes: the robot determining whether a first reachable point exists based on information about the first position, the second position, and obstacles in the space where the robot is located.
[0009] In one possible implementation of the first aspect, the robot can determine whether a first reachable point exists based on the following method: The robot acquires at least one coordinate point based on a first position and a second position. The at least one coordinate point is an equally spaced coordinate point acquired sequentially along a first direction, starting from the second position and ending at the first position, with a step length between each coordinate point. The robot determines whether a reachable point exists among the at least one coordinate point based on information about obstacles in the robot's space, a first value, and a second value. Wherein, if a reachable point exists among the at least one coordinate point, the existence of a first reachable point is determined; if no reachable point exists among the at least one coordinate point, the absence of a first reachable point is determined. This implementation provides a specific method for determining whether a first reachable point exists.
[0010] In one possible implementation of the first aspect, at least one coordinate point is an equally spaced coordinate point obtained sequentially along the first direction according to the first step length, with the starting position being the position where the distance between the user and the first value is the first position and the ending position being the second position.
[0011] In one possible implementation of the first aspect, the robot can determine whether a reachable point exists among at least one coordinate point based on the following method: For one of the at least one coordinate point, if the coordinate point is located in an area containing an obstacle, the robot determines that the coordinate point is not a reachable point. If the coordinate point is not located in an area containing an obstacle, the robot determines that the coordinate point is a reachable point. This implementation provides a specific method for determining whether a reachable point exists among at least one coordinate point.
[0012] In one possible implementation of the first aspect, the method further includes: determining whether a second reachable point exists based on information about the first position, the second position, and obstacles in the space where the robot is located.
[0013] In one possible implementation of the first aspect, there are multiple second directions. These multiple second directions are equally spaced angles obtained sequentially along clockwise and / or counterclockwise directions, with the second position as the origin and the first direction as the starting position, according to a second step size. For each second direction, the robot determines whether a second reachable point exists along the second direction based on the information of the first position, the second position, and obstacles in the robot's space. If a second direction among the multiple second directions includes a second reachable point, then the existence of a second reachable point is determined. This implementation provides a specific method for determining whether a second reachable point exists.
[0014] In one possible implementation of the first aspect, there are multiple second reachable points along a second direction. Specifically, each second reachable point is located along a target direction, which is the second direction among the multiple second reachable points that has the smallest angle with the first direction. When multiple second reachable points exist, the second reachable point along the target direction is the one closest to the robot. This avoids the robot moving excessively far, reduces its power consumption, and saves battery power.
[0015] In one possible implementation of the first aspect, the robot determines whether a second reachable point exists by performing the following method: The robot takes the second position as its origin and the first direction as its starting position, and acquires a second direction clockwise by a second step size. The angle between this second direction and the first direction is one time the second step size. The robot identifies whether a second reachable point exists in this second direction. If a second reachable point exists in this second direction, it is designated as the second reachable point. If no second reachable point exists in this second direction, the robot takes the second position as its origin and the first direction as its starting position, and acquires a second direction counterclockwise by a second step size. The angle between this second direction and the first direction is -1 time the second step size. The robot identifies whether a second reachable point exists in this second direction. If a second reachable point exists in this second direction, it is designated as the second reachable point. If no second reachable point exists in the second direction, the robot takes the second position as the origin and the first direction as the starting position, and moves clockwise by a second step to obtain a second direction. The angle between this second direction and the first direction is twice the second step. The robot identifies whether a second reachable point exists in this second direction, and so on, until it identifies a second direction that includes a second reachable point or no second direction within a preset range includes a second reachable point. In other words, the robot can alternately traverse multiple positive and negative angles, and while traversing one angle, it can determine whether a second reachable point exists at that angle. Traversing stops when an angle containing a second reachable point is encountered. The second reachable point obtained in this way is the second reachable point in the target direction, which is the second direction with the smallest angle to the first direction among multiple second directions. Alternatively, after traversing, if no second direction including a second reachable point exists in multiple positive and negative angles, then it is determined that no second reachable point exists.
[0016] In one possible implementation of the first aspect, for one of a plurality of second directions, the robot performs the following method to identify whether a second reachable point exists in that second direction. The robot acquires at least one coordinate point based on a second position and a target position. The at least one coordinate point is an equally spaced coordinate point acquired sequentially along the second direction, starting from the second position and ending at the target position, according to a step length. The target position is the position in the second direction at a distance equal to a target value from the user. The target value is the minimum of the distance between the robot and the user and the second value. Based on information about obstacles in the robot's space, the first value, and the target value, the robot determines whether a reachable point exists among the at least one coordinate point. Wherein, if a reachable point exists among at least one coordinate point, it is determined that a second reachable point exists in that second direction; if no reachable point exists among at least one coordinate point, it is determined that no second reachable point exists in that second direction.
[0017] In one possible implementation of the first aspect, at least one coordinate point is an equally spaced coordinate point obtained sequentially along the second direction according to the first step length, with the starting position being the location where the distance between the user and the first value is located in the second direction and the ending position being the target position.
[0018] In one possible implementation of the first aspect, the method further includes: controlling the robot to face the user when neither a first reachable point nor a second reachable point exists; or controlling the robot to face the user when the distance between the first position and the second position is less than or equal to a first value; or controlling the robot to face the user after the robot moves from the first position to the first reachable point; or controlling the robot to face the user after the robot moves from the first position to the second reachable point.
[0019] In one possible implementation of the first aspect, the robot periodically acquires a first reachable point or a second reachable point at a preset frequency.
[0020] In one possible implementation of the first aspect, the method further includes: if the user is not identified, moving to the most recently acquired target reachable point; the target reachable point is either a first reachable point or a second reachable point. If the robot does not identify the user at the target reachable point and there are other spaces within a preset range, the robot enters the other space to identify the user, and follows the user if the user is identified. If the robot does not identify the user at the target reachable point and there are no other spaces within the preset range, the robot rotates a preset angle according to the user's departure direction to identify the user, and follows the user if the user is identified. In this application, while following the user, the robot can autonomously search for the user if it does not identify the user.
[0021] A second aspect. A robot is provided, the robot comprising: a memory and one or more processors; the memory being coupled to the processors; wherein the memory is used to store computer program code, the computer program code including computer instructions; when the computer instructions are executed by the processor, the robot causes to perform the method as described in any of the first aspects.
[0022] Thirdly, a chip system is provided that can be applied to a robot including a memory. The chip system includes one or more interface circuits and one or more processors. The interface circuits and processors are interconnected via lines. The interface circuits are used to receive signals from the aforementioned memory and send the signals to the processors, the signals including computer instructions stored in the memory. When the processor executes the computer instructions, the robot performs a method as described in the first aspect and any of its possible design embodiments.
[0023] Fourthly, a computer-readable storage medium is provided, including computer instructions that, when executed on a robot, cause the robot to perform the method as described in any of the first aspects.
[0024] Fifthly, a computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of any of the methods in the first aspect.
[0025] In understanding, the beneficial effects that the robot of any of the possible design embodiments of the second aspect, the chip system of the third aspect, the computer-readable storage medium of the fourth aspect, and the computer program product of the fifth aspect can achieve can be referred to as the beneficial effects of the first aspect and any of its possible design embodiments, which will not be repeated here. Attached Figure Description
[0026] Figure 1 A schematic diagram of the hardware structure of a robot provided in an embodiment of this application;
[0027] Figure 2 A flowchart illustrating a following method provided in an embodiment of this application;
[0028] Figure 3 A top view in three-dimensional space provided for an embodiment of this application;
[0029] Figure 4 A schematic diagram illustrating the determination of a first reachable point, as provided in an embodiment of this application;
[0030] Figure 5 This is a schematic diagram illustrating another method for determining a first reachable point, as provided in an embodiment of this application.
[0031] Figure 6 A flowchart illustrating a method for determining a second reachable point, provided as an embodiment of this application;
[0032] Figure 7 A schematic diagram illustrating the determination of a second reachable point provided in an embodiment of this application;
[0033] Figure 8 This application provides a schematic diagram of determining a target reachable point according to an embodiment of the present application.
[0034] Figure 9 A schematic diagram of a following method provided in an embodiment of this application;
[0035] Figure 10 A flowchart illustrating another following method provided in an embodiment of this application;
[0036] Figure 11 A schematic diagram illustrating another following method provided in an embodiment of this application;
[0037] Figure 12 This is a flowchart illustrating another following method provided in an embodiment of this application. Detailed Implementation
[0038] With the continuous development of artificial intelligence technology, robots are gradually integrating into people's daily lives. Following is one of the common functions of robots in practical applications. Following refers to the robot's ability to automatically identify and track a target. This target can be, for example, a user. For instance, a robot can respond to a user's command and continuously follow the user until the user instructs it to stop following.
[0039] Robots need to maintain an appropriate distance from users when following them, especially in a home environment. Home environments often contain numerous obstacles such as furniture, appliances, and walls, and the room layouts are often complex. If the robot is too close to the user, it can cause crowding, leading to a poor user experience. If the robot is too far away, obstacles can obstruct its view, causing it to lose track of the user. Furthermore, paths that are passable for the user in a home environment, such as the path between two obstacles, may be impassable for the robot. For example, a path between a coffee table and a sofa that a user can pass through might be too large for the robot.
[0040] Therefore, how robots can follow users in the home environment is a problem that urgently needs to be solved.
[0041] This application provides a following method applied to a robot. During the process of following a user, the robot can control the distance between the robot and the user within a suitable range, such as controlling the distance between the robot and the user between a first value and a second value, and bringing the robot as close to the user as possible. The first value is the minimum preset distance between the robot and the user. The second value is the maximum preset distance between the robot and the user. This application provides a solution for robot following in a home environment. This solution not only avoids crowding caused by excessively close proximity but also avoids the problem of losing the robot due to excessively large distances.
[0042] The following method provided in this application is applicable to robots. A robot can be any of various robot types, specifically including but not limited to at least one of wheeled robots, legged robots, tracked robots, crawling robots, worm-like robots, or swimming robots. For example, a robot can specifically be a legged robot, a wheeled robot, or a combination of legged and wheeled robots. Legged robots include monopodial, bipodial, or multipodial robots. Multipodial robots refer to legged robots with three or more legs; for example, a multipodial robot can specifically be a quadrupedal robot. A robot is a machine capable of performing semi-autonomous or fully autonomous tasks. Robots are not limited to humanoid robotic devices and can also include biomimetic robots such as dogs, horses, apes, or monkeys.
[0043] Please see Figure 1 , Figure 1 This is a schematic diagram of the hardware structure of the robot 100 provided in an embodiment of this application. The robot 100 may include, but is not limited to, a processor 110, a memory 120, an interface unit 130, a communication module 140, a display screen 150, an audio module 160, and a sensing unit 170.
[0044] The processor 110 is the control center of the robot 100. It connects various components of the robot 100 through various interfaces and lines. It controls the robot 100 as a whole by running or executing software programs stored in the memory 120 and calling data stored in the memory 120.
[0045] The memory 120 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the robot 100 by running the instructions stored in the memory 120.
[0046] Interface unit 130 can be used to receive input data or power from external devices and transmit the received input data or power to one or more parts within robot 100. Interface unit 130 can also be used to output data or power to external devices. Interface unit 130 may include a power port, a data port (such as a general purpose serial bus port), a memory card port, an audio input / output port, a video input / output port, etc.
[0047] The communication module 140 can provide solutions for wireless communication applications on the robot 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR). The communication module 140 can be one or more devices integrating at least one communication processing module.
[0048] Display screen 150 is used to display images, videos, etc. Display screen 360 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini-LED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc.
[0049] The audio module 160 is used to convert digital audio signals into analog audio signals for output, and also to convert input analog audio signals into digital audio signals. The audio module 160 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 160 may be located in the processor 110, or some functional modules of the audio module 160 may be located in the processor 110.
[0050] The sensing unit 170 is used to acquire data about the environment surrounding the robot 100 and to monitor parameters of various components inside the robot 100. The sensing unit 170 includes various sensors, such as sensors for acquiring data about the surrounding environment, including but not limited to lidar, millimeter-wave radar, cameras, infrared cameras, and depth cameras. The sensing unit 170 may also include sensors for monitoring various components inside the robot 100, including but not limited to inertial measurement units (IMUs), foot sensors, and temperature sensors. Other sensors that the robot 100 may also be configured with, such as load sensors, touch sensors, motor angle sensors, and torque sensors, will not be described further here.
[0051] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on robot 100. In other embodiments, robot 100 may include more or fewer components than illustrated, or combine some components, or separate some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0052] After receiving a follow command, the robot activates its follow function and begins to follow the user. Following the user can be understood as moving in accordance with the user's movements. For example, the follow command can be a voice command, such as "Follow me." Alternatively, the follow command can be a preset gesture command, such as waving. In some embodiments, the robot can also respond to the user after receiving the follow command. For example, the robot can display text such as "Okay, I'm coming." Alternatively, the robot can output audio such as "Okay, I'm coming" through its speaker. After receiving a stop follow command, the robot can stop following the user. For example, the stop follow command can be a voice command, such as "Stop." Alternatively, the stop command can be a preset gesture command, such as raising a hand.
[0053] In this embodiment, after the robot activates the follow function, the robot can periodically execute the follow method provided in this embodiment at a preset frequency. The preset frequency is greater than or equal to 5Hz and less than or equal to 50Hz.
[0054] The following is combined with Figure 2 This application introduces a following method provided by an embodiment. Figure 2 This is a flowchart illustrating a following method provided in an embodiment of this application. The method may include:
[0055] S1, the robot obtains the user's pose.
[0056] Pose describes the position and orientation of an object in three-dimensional space. Position can be represented using coordinates (x, y, z). Orientation can be the object's orientation in three-dimensional space, for example, using Euler angles or quaternions. Euler angles can include, for example, yaw, pitch, and roll angles.
[0057] The three-dimensional space could be, for example, a space comprised of a user's home. For example, such as... Figure 3 The image shown is a top view of a room, i.e., a three-dimensional top view. In this three-dimensional space, the X-axis represents the width of the room (from left to right), the Y-axis represents the length of the room (from front to back), and the Z-axis represents the height of the room (from low to high). The plane containing the ground in this three-dimensional space is a horizontal plane. That is, a horizontal plane is a plane parallel to the ground. The horizontal plane can be a two-dimensional space composed of the X-axis and Y-axis. In some embodiments, the horizontal plane is also called the XY plane. The plane containing the walls in this three-dimensional space is a vertical plane, i.e., a plane perpendicular to the ground.
[0058] In some embodiments, the robot can acquire the user's pose based on visual tracking technology. For example, the robot acquires the user's pose based on a first video sequence and a second video sequence. The first video sequence includes multiple frames of red-green-blue (RGB) images, and the second video sequence includes multiple frames of depth maps. The value of each pixel in the depth map represents the distance, or depth, between the object corresponding to that pixel and the camera. The first and second video sequences can be acquired by the robot. For example, the robot includes a first camera for acquiring the first video sequence. The robot also includes a second camera for acquiring the second video sequence. For example, the second camera could be a depth camera. As another example, the robot includes a third camera for acquiring both the first and second video sequences. For example, the third camera could be a 3D camera (RGB-D camera). An RGB-D camera is an image sensor capable of simultaneously acquiring RGB images and depth maps of the scene being captured. It should be understood that the robot continuously acquires RGB images and depth maps of the surrounding environment after powering on. The aforementioned first and second video sequences can be video sequences acquired by the robot within a preset duration prior to the current moment. The preset duration could be, for example, 1 second or 2 seconds. For instance, the robot uses an image recognition algorithm to identify the user's image from a first video sequence. Based on the user's image and a second video sequence, the robot determines the depth of the user's image. Then, the robot calculates the user's position based on the depth of the user's image. The robot can also determine the user's pose based on the user's image from the first and / or second video sequences.
[0059] In other embodiments, the robot can acquire the user's pose using technologies such as ultra-wideband (UWB), radio frequency (RF), ultrasonic, and Bluetooth. RF technology can be, for example, radar technology. Radar technology can be, for example, lidar or millimeter-wave radar. For instance, the robot can transmit detection signals using one or more of these technologies. The robot can then acquire the user's pose based on the detection signals reflected by the user.
[0060] It should be understood that the robot can also obtain the user's pose through other methods besides those shown in the above embodiments, and this application embodiment does not specifically limit this.
[0061] S2, the robot obtains its pose.
[0062] Robots possess the ability to perceive their own pose. Similarly, a robot's pose describes its position and orientation in three-dimensional space; for a detailed description, please refer to the relevant content in S2, which will not be elaborated upon here.
[0063] In some embodiments, the robot acquires its pose using an inertial measurement unit (IMU). For example, the IMU may be an accelerometer, a gyroscope, etc. For example, the robot acquires its pose based on the acceleration and / or angular velocity obtained from the IMU.
[0064] In some other embodiments, the robot acquires its pose using simultaneous localization and mapping (SLAM) technology. For example, the robot scans its environment using a lidar sensor to obtain point cloud data. The robot then matches the current point cloud data with an existing map, calculates its pose change relative to the map using a scan-matching algorithm, and updates its pose based on the motion model.
[0065] In other embodiments, the robot acquires its pose using visual SLAM technology. For example, the robot matches a first video sequence and / or a second video sequence with a constructed map, calculates the robot's pose change relative to the map using an optimization algorithm, and updates the robot's pose by combining this with a motion model.
[0066] It should be understood that the robot can also obtain its pose through other methods besides those shown in the above embodiments, and this application does not specifically limit this method.
[0067] S3, the robot determines whether the distance between the user and the robot is greater than the first value based on the user's pose and the robot's pose.
[0068] In some embodiments, the robot can calculate the distance between the user and the robot based on the user's pose and the robot's pose. Specifically, the distance between the user and the robot can be the distance between them on a horizontal plane. This is because the robot can only move on a horizontal plane, such as the floor. For example, if the user's current position in the pose obtained in S1 is (x2, y2, z2), and the robot's current position in the pose obtained in S2 is (x1, y1, z1), the distance between the user and the robot is the distance between coordinates (x1, y1) and coordinates (x2, y2). Specifically, it can be the Euclidean distance between these two coordinates. Here, coordinates (x2, y2) represent the user's current position on the horizontal plane, and coordinates (x1, y1) represent the robot's current position on the horizontal plane. In other words, the robot's current position on the horizontal plane can be called the first position, and the user's current position on the horizontal plane can be called the second position. The distance between the user and the robot can specifically be the distance between the first position and the second position.
[0069] In other embodiments, the robot can simultaneously acquire the distance between the user and the robot while acquiring the user's pose.
[0070] The first value is the minimum preset distance between the robot and the user. This first value can be preset in the robot by the developers. For example, the first value can be greater than or equal to 0.2 meters and less than or equal to 0.5 meters. A distance between the user and the robot less than or equal to the first value indicates that the robot is close to the user; in this case, the robot does not need to move closer to avoid crowding. A distance greater than the first value indicates that the robot is far from the user; in this case, to avoid losing track of the user, the robot needs to determine whether it can move closer. For example, the robot can execute S4 or S5.
[0071] S4, when the distance between the user and the robot is less than or equal to the first value, the robot controls the robot's posture to face the user.
[0072] The robot can control its posture to face the user based on the user's pose obtained in S1 and the robot's pose obtained in S2. The user's pose includes the user's yaw angle, pitch angle, and roll angle. The robot's pose includes the robot's yaw angle, pitch angle, and roll angle.
[0073] In some embodiments, the robot can adjust its posture based on the azimuth and pitch angles between itself and the user to control the robot's orientation towards the user. The azimuth angle between the robot and the user represents the angle between them on the horizontal plane. The pitch angle between the robot and the user represents the angle between them on the vertical plane. For example, the robot can calculate the azimuth and pitch angles between itself and the user. For instance, the robot calculates the angle between the line connecting the user's position on the horizontal plane and the robot's position on the horizontal plane, and the X-axis. This angle is the azimuth angle between the robot and the user. Similarly, the robot calculates the angle between the line connecting the user's position on the vertical plane and the robot's position on the vertical plane, and the Z-axis. This angle is the pitch angle between the robot and the user. For example, the robot can acquire the azimuth and pitch angles between itself and the user during the process of acquiring the user's pose.
[0074] For example, the robot calculates the horizontal adjustment angle based on the azimuth angle between the robot and the user. This horizontal adjustment angle is used to adjust the robot to face the user horizontally. The horizontal adjustment angle is the difference between the azimuth angle between the robot and the user and the robot's yaw angle. The robot calculates the vertical adjustment angle based on the pitch angle between the robot and the user. This vertical adjustment angle is used to adjust the robot to face the user vertically. The vertical adjustment angle is the difference between the pitch angle between the robot and the user and the robot's roll angle. When the adjustment angle is positive, the robot can rotate counter-clockwise. When the adjustment angle is negative, the robot can rotate clockwise.
[0075] For example, if the user is to the right of the robot, the azimuth angle between them is 60°, and the robot's horizontal orientation is 30°, then the horizontal adjustment angle is 30°. Therefore, the robot can rotate 30° counterclockwise in the horizontal plane. As another example, if the user is to the right of the robot, the azimuth angle is 10°, and the robot's horizontal orientation is 30°, then the horizontal adjustment angle is -20°. Therefore, the robot can rotate 20° clockwise in the horizontal plane, thus facing the user in the horizontal plane. As yet another example, if the user is above the robot, the pitch angle between them is 60°, and the robot's roll angle is 0°, then the vertical adjustment angle is 60°. Therefore, the robot can rotate 60° counterclockwise in the vertical plane, thus also facing the user in the vertical plane.
[0076] In other embodiments, the robot can adjust its posture based on the azimuth angle between the robot and the user to ensure it faces the user on a horizontal plane. The specific adjustment process is described above and will not be repeated here. If the robot's head cannot rotate vertically, or if the robot does not include a head, it is sufficient to ensure the robot is on a horizontal plane and facing the user.
[0077] In this context, a robot's rotation in the horizontal plane can be understood as the robot's body and head rotating together, or the robot's body remaining stationary while the head rotates, such as turning its head left or right, or the robot's body rotating without excluding the head. A robot's rotation in the vertical plane can be understood as the robot's body remaining stationary while the head rotates up and down, such as the robot raising or lowering its head.
[0078] If the distance between the user and the robot is greater than the first value, the robot can proceed to execute S5.
[0079] S5, if the distance between the user and the robot is greater than the first value, the robot determines whether there is a first reachable point.
[0080] A reachable point is a position that the robot can reach on a horizontal plane. It should be understood that there are no obstacles at a reachable point. A first reachable point is a reachable point in a first direction that satisfies a first condition. Here, a reachable point in the first direction is a position that the robot can reach in the first direction. The first condition is that the distance between the reachable point and the user is between a first value and a second value, and that the reachable point is closest to the user. In other words, the first reachable point is a reachable point in the first direction whose distance to the user is between the first value and a second value, and which is closest to the user. Here, the first direction is the direction of the line connecting the robot and the user. Specifically, the first direction is the direction of the line connecting the second position and the first position. For example, the user's current position is (x2, y2, z2), and the robot's current position is (x1, y1, z1). The first direction can specifically be the direction of the line connecting coordinate points (x1, y1) and (x2, y2).
[0081] The first value is the minimum preset distance between the robot and the user. The second value is the maximum preset distance between them. The first value is less than the second value. The second value is greater than or equal to 0.5 meters and less than or equal to 2 meters. Both the first and second values can be preset in the robot by the developers. Using the first reachable point, the distance between the robot and the user can be controlled between the first and second values, ensuring the robot is as close to the user as possible. This not only avoids congestion caused by excessive closeness but also effectively prevents the robot from losing track of the user.
[0082] In some embodiments, the robot determines whether a first reachable point exists based on a first position, a second position, and information about obstacles in the space where the robot is located. An obstacle refers to a person or object in the room that can affect the robot's movement. An obstacle can be a dynamic obstacle, i.e., an obstacle in motion, such as a person, pet, or other robot. An obstacle can also be a static obstacle, i.e., an obstacle in a stationary state, such as an object or environmental structure. The aforementioned objects may include, but are not limited to, household appliances and furniture. Environmental structures may include the walls of the room. The obstacle information includes the obstacle's position, size, and orientation relative to the robot. The space can be a room. Specifically, a room can be a room in a user's home, such as a living room or bedroom.
[0083] If the distance between the user and the robot is greater than a first value and there are no obstacles between the robot and the user, the robot determines the first reachable point as the position where the distance between the robot and the user in the first direction is the first value.
[0084] If the distance between the user and the robot is greater than a first value, and there are obstacles between the robot and the user, the robot performs the following method to determine whether a first reachable point exists.
[0085] First, the robot acquires at least one coordinate point based on the first and second positions. The at least one coordinate point is an equally spaced coordinate point acquired sequentially along a first direction, starting from the second position and ending at the first position, according to a first step length. The first step length can, for example, be between 0.01 meters and 0.5 meters. For example, the robot acquires M coordinate points along the first direction, starting from the second position and ending at the first position, with each step length representing a distance between any two adjacent coordinate points. Here, M is an integer greater than or equal to 1. For example, if the first step length is 0.1 meters, the first value is 0.2 meters, and the second value is 0.7 meters, then... Figure 4 As shown in (a) or (b), the robot can acquire 7 coordinate points, such as point 1, point 2, point 3, point 4, point 5, point 6, and point 7. The distance between any two adjacent points among points 1, 2, 3, 4, 5, 6, and 7 is 0.1 meters, and point 1 is also 0.1 meters from the second position.
[0086] Then, based on information about obstacles in the space where the robot is located, and a first value and a second value, the robot determines whether at least one coordinate point includes a reachable point. This reachable point is one that is accessible to the user at a distance between the first and second values.
[0087] Specifically, the robot can first filter from at least one coordinate point to select target coordinate points whose distance to the user falls between a first value and a second value. For example, based on the distance between the coordinate points and the user, the robot can filter from at least one coordinate point located between a second position and a first position to select target coordinate points whose distance to the user falls between the first and second values. Figure 4 In (a) or (b), the target coordinates are points 2, 3, 4, 5, 6, and 7. Then, for each of these target coordinates, the robot determines whether it is a reachable point based on information about obstacles in its surrounding space. As mentioned earlier, a reachable point is a point without obstacles. In other words, there are no obstacles at a reachable point. Figure 4 As shown in (a) of the diagram, points 5, 6, and 7 in the target coordinate system are reachable points. Figure 4 As shown in (b), points 2, 6 and 7 in the target coordinates are reachable points.
[0088] Taking one of the target coordinate points as an example, let's illustrate how a robot determines whether a coordinate point is reachable. For instance, the robot determines reachability by checking for the presence of obstacles at that point. For example, the robot determines whether the coordinate point is located within the area containing the obstacles based on information about obstacles in the robot's space. If the coordinate point is within the area containing the obstacles, the robot determines that there is an obstacle at that point and further determines that the coordinate point is not reachable. If the coordinate point is not located within the area containing the obstacles, the robot determines that there is no obstacle at that point and further determines that the coordinate point is reachable. The area containing the obstacles is the region encompassing the obstacle and its adjacent space. For example, the size of the area containing the obstacles is based on the actual size of the obstacle, plus a safety margin. For example, the actual size of the obstacle on a horizontal plane is 0.5 meters × 1 meter. The size of the area containing the obstacles is (0.5 + 0.2) meters × (1 + 0.2) meters. Here, 0.2 meters is the safety margin. This safety margin can be pre-set in the robot by the developers.
[0089] After traversing each target coordinate point, the robot can determine whether each target coordinate point is a reachable point. Based on this determination, the robot determines whether the at least one coordinate point includes a first reachable point. If a reachable point exists among at least one coordinate point, the robot determines that a first reachable point exists; if no reachable point exists among at least one coordinate point, the robot determines that a first reachable point does not exist. For example, if the determination result indicates that there is no reachable point among the target coordinate points, the robot determines that at least one coordinate point does not include a first reachable point, and the robot further determines that there is no first reachable point. As another example, if the determination result indicates that there is at least one reachable point among the target coordinate points, the robot determines that at least one coordinate point includes a first reachable point, and the robot further determines that a first reachable point exists.
[0090] In other words, if none of the target coordinates are reachable points, the robot determines that there is no first reachable point. For example, ... Figure 5 In the scenario shown in (a), the robot is close to the user, such as when the distance between the robot and the user is between the first and second values, and the robot is also close to the obstacle. There is no reachable point in the first direction that is between the first and second values and is the closest to the user. Figure 5 In the scenario shown in (a), the point closest to the user is the robot's current location, which is not the first reachable point. It should be understood that the robot needs to move from its current location to a reachable point while following the user; that is, the reachable point does not include the robot's current location. In other words, the robot needs to move from its current location to the next reachable point while following the user. Figure 5 In the case shown in (a), there are no reachable points between the robot and the obstacle. Target coordinates such as points 2, 3, and 4 are all unreachable. For example, as... Figure 5 In the case shown in (b), the robot is far from the user. For example, the distance between the robot and the user is greater than the second value, but the obstacle is long in the first direction, and the target coordinate points such as point 2, point 3, point 4, point 5, point 6 and point 7 are not reachable points.
[0091] In some embodiments, at least one coordinate point is an equally spaced coordinate point obtained sequentially along the first direction at a distance of a first value from the user, starting from the first position and ending at the first position. In this embodiment, at least one coordinate point is the target coordinate point.
[0092] If the robot determines that a first reachable point exists, the robot can execute S6. If the robot determines that a first reachable point does not exist, the robot can execute S7.
[0093] S6, if the robot determines that a first reachable point exists, the robot controls itself to move to the first reachable point.
[0094] If the robot determines that a first reachable point exists, it can acquire that first reachable point. For example, if there is at least one reachable point among the target coordinates, the robot can select the first reachable point from these at least one reachable point. For instance, if there is one reachable point among the target coordinates, the robot will select this one as the first reachable point. If there are two or more reachable points among the target coordinates, the robot will select the first reachable point from these two or more reachable points. For example, the robot will select the reachable point closest to the user from these two or more reachable points as the first reachable point. Figure 4 As shown in (a), the first reachable point is point 5. Figure 4 As shown in (b) in the diagram, the first reachable point is point 2.
[0095] After acquiring the first reachable point, the robot can control itself to move from its first position to the first reachable point. In some embodiments, after moving to the first reachable point, the robot controls itself to face the user. For example, after moving to the first reachable point, the robot can re-perceive its own pose and adjust its posture to face the user based on its re-perceived pose and the user's pose. Refer to the preceding description; it will not be repeated here. For example, the robot can plan its movement path based on a map, moving from its current position to the first reachable point. The map can be pre-built and stored in the robot. For example, the map includes, but is not limited to, a grid map, a topological map, etc.
[0096] S7, if the robot determines that there is no first reachable point, the robot determines whether there is a second reachable point.
[0097] The second reachable point is a reachable point in the second direction that satisfies the second condition. The second direction is the direction from the second position to any point on the horizontal plane. The angle between the second direction and the first direction is within a preset range. For example, the angle between the second direction and the first direction is between [first negative angle, 0°] or between (0°, first positive angle]. For example, the first negative angle and the first positive angle can be two angles of the same magnitude but different directions. For example, the first negative angle is -45° and the first positive angle is 45°. Again, for example, the first negative angle and the first positive angle can be two angles of different magnitudes and different directions. For example, the first negative angle is -45° and the first positive angle is 30°.
[0098] The second condition is that the distance between the reachable point and the user is between the first and second values, and that the reachable point is closest to the user. In other words, the second reachable point is the reachable point in the second direction whose distance to the user is between the first and second values and which is closest to the user. By using the second reachable point, the distance between the robot and the user can be controlled to be between the first and second values and closest to the user.
[0099] Based on the information of the first position, the second position, and obstacles in the space where the robot is located, the robot determines whether a second reachable point exists. For example, there are multiple second directions, which are equally spaced angles obtained sequentially in a clockwise and / or counterclockwise direction according to a second step size, with the second position as the origin and the first direction as the starting position. For example, if the second step size is 5° and the angle between the second direction and the first direction is between [-45°, 0°) or (0°, 45°], then multiple second directions are directions with angles of -45°, -40°, -35°, -30°, -25°, -20°, -15°, -10°, -5°, 5°, 10°, 15°, 20°, 25°, 30°, 35°, 40°, and 45° with respect to the first direction. As another example, if the second step size is 5° and the angle between the second direction and the first direction is between [-30°, 0°), then multiple second directions are directions with angles of -30°, -25°, -20°, -15°, -10°, and -5° with respect to the first direction. For example, if the second step length is 5° and the angle between the second direction and the first direction is between (0°, 15°), then multiple second directions are directions with angles of 5°, 10°, and 15° to the first direction. For each second direction, the robot can determine whether a second reachable point exists in that direction based on the first position, the second position, and information about obstacles in the robot's space. If a second direction includes a second reachable point, then a second reachable point is determined to exist. If no second direction includes a second reachable point, then a second reachable point is determined not to exist.
[0100] Specifically, for a second direction, the robot can obtain at least one coordinate point based on the second position and the target position. This at least one coordinate point is an equally spaced coordinate point obtained sequentially along the second direction, starting from the second position and ending at the target position, following the first step length. The target position is the location in the second direction at a distance equal to the target value from the user. The target value is the minimum of the distance between the robot and the user and the second value. Based on information about obstacles in the robot's space, the first value, and the target value, the robot determines whether there is a reachable point among the at least one coordinate point. If a reachable point exists among the at least one coordinate point, it is determined that a second reachable point exists in this second direction. If no reachable point exists among the at least one coordinate point, it is determined that no second reachable point exists in this second direction.
[0101] For example, the robot can perform actions such as Figure 6 The method shown is used to determine whether a second reachable point exists.
[0102] Step 1: The robot determines the third direction based on the first direction. The angle between the third direction and the first direction is i * the second step length, where i takes values sequentially from [1, 2, ..., n].
[0103] The second step size is a preset angle, which can take values in the range [1°, 10°]. n is the absolute value of the ratio of the first positive angle to the second step size. n is an integer greater than or equal to 1. For example, if the second step size is 5°, the first positive angle is 45°, and n equals 9.
[0104] It should be understood that during the first execution Figure 6 When the method is shown, i = 1. In the second execution... Figure 6 In the method shown, i = 2. That is, the initial value of i is 1, and it is incremented each time the operation is performed. Figure 6 The method shown increments the value of i by one. Taking a second step size of 5° as an example, the angle between the first determined third direction and the first direction is 5°, the angle between the second determined third direction and the first direction is 10°, ..., and the angle between the nth determined third direction and the first direction is n*5°.
[0105] After determining a third direction, the robot can determine whether there is a second reachable point in that third direction. For example, the robot can perform step 2.
[0106] Step 2: The robot determines whether there is a second reachable point above the third party.
[0107] For example, the robot starts at a second position and ends at a target position, using the first step to extend along that third direction to obtain at least one coordinate point. The target position is the point on that third direction at a distance equal to the target value from the user. The target value is the minimum of the distance between the robot and the user and the second value.
[0108] by Figure 5 For example, in Figure 5In the scenario shown in (a), since the distance between the robot and the user falls between the first and second values, a second reachable point needs to be found in the second direction, using the distance between the robot and the user as a constraint. This way, the obtained second reachable point will fall in front of the robot, allowing the robot to move further towards the user. If the second value is used as the constraint, the obtained second reachable point might fall behind the robot, causing the robot to move away from the user. To conserve the robot's power and avoid losing track of the user due to distance, in this case, the distance between the robot and the user should be prioritized as the constraint when searching for the second reachable point. Figure 5 In the case shown in (b), since the distance between the robot and the user is greater than the second value, in order to control the distance between the robot and the user between the first and second values, it is necessary to find a second reachable point in the second direction with the second value as a constraint.
[0109] Next, based on information about obstacles in the robot's space, the first value, and the target value, the robot determines whether at least one of the coordinate points is reachable. For example, the robot can filter out target coordinate points whose distance to the user is between the first value and the target value from at least one coordinate point. Finally, based on information about faulty objects in the robot's space, the robot determines whether these target coordinate points include reachable points.
[0110] For example, at least one coordinate point is a set of equally spaced coordinate points obtained sequentially along a third direction, with the starting position being the location where the distance between the user and the target position is the first value, and the ending position being the target position. In this embodiment, at least one coordinate point is the target coordinate point.
[0111] The method for determining whether the target coordinate point includes a reachable point is similar to the method for determining the existence of a first reachable point described earlier, and will not be repeated here. If the target coordinate point includes a reachable point, the robot determines that there is a second reachable point upwards from this third point. If the robot further determines that there is a second reachable point, the process ends. If the target coordinate point does not include a reachable point, the robot determines that there is no second reachable point upwards from this third point, and the robot can proceed to step 3.
[0112] Step 3: If there is no second reachable point in the third direction, determine the fourth direction. The angle between the fourth direction and the first direction is -i * the second step size, where i takes values in [1,2,...,m].
[0113] m is the absolute value of the ratio of the first negative angle to the second step size. m is an integer greater than or equal to 1. For example, if the second step size is 5° and the first negative angle is -45°, m equals 9.
[0114] Step 4: The robot determines whether there is a second reachable point in the fourth direction.
[0115] For a detailed description of steps 3 and 4, please refer to the descriptions of the corresponding content in steps 1 and 2; they will not be repeated here.
[0116] If a second reachable point exists in the fourth direction, the robot determines that a second reachable point exists and the process ends. If no second reachable point exists in the fourth direction, the robot executes step 1. In other words, the robot executes the process cyclically. Figure 6 The method shown is used to determine if a second reachable point exists. This is done in a loop. Figure 6 In the process shown, if a second reachable point exists in any third or fourth direction, the robot determines that a second reachable point exists and exits the loop. After the loop ends, if no second reachable point exists in multiple fourth directions or multiple third directions, the robot determines that no second reachable point exists.
[0117] The robot is executing in a loop. Figure 6 The method shown can be executed sequentially from step 1 to step 4. For example, when n and m are equal, steps 1 to 4 can be executed sequentially. When n and m are not equal and n is greater than m, steps 1 to 4 are executed repeatedly, followed by steps 1 to 2. For example, n equals 6 and m equals 3. If steps 1 to 4 are executed three times and it is determined that no second reachable point exists, the robot can continue to execute steps 1 to 2 three times to determine if a second reachable point exists. Similarly, when n and m are not equal and n is less than m, steps 1 to 4 are executed repeatedly, followed by steps 3 to 4.
[0118] The following example uses a first negative angle of -45 degrees, a first positive angle of 45 degrees, a second step length of 5 degrees, and a first step length of 0.1 meters. Figure 7 Here is an example of finding the second reachable point.
[0119] like Figure 7 As shown in (a), the robot determines a third direction, such as direction 1, with an angle of 5° between direction 1 and the first direction. The robot then determines whether a second reachable point exists on direction 1. Specifically, the robot starts at the user's position and ends at the target position on direction 1, acquiring coordinates in steps of 0.1 meters. The target position on direction 1 is a point on direction 1 whose distance from the user is the target value. Figure 7 As shown in (a), there are four target coordinate points whose distance to the user falls between the first value and the target value. For these four coordinate points, the robot determines whether they are reachable based on information about obstacles in the robot's space. For example... Figure 7As shown in (a), none of the four target coordinate points are reachable. The robot determines that there is no second reachable point in direction 1. Then, as... Figure 7 As shown in (b), the robot determines a fourth direction, such as direction 2, where the angle between direction 2 and the first direction is -5°. The robot then uses the same method to determine whether a second reachable point exists in direction 2, such as... Figure 7 As shown in (b), the target coordinates along direction 2, between the first and target values, are not reachable points. The robot determines that there is no second reachable point along direction 2. Then, as... Figure 7 As shown in (c), the robot determines a third direction, such as direction 3, where the angle between direction 3 and the first direction is 10°, and the angle between direction 3 and direction 1 is 5°. The robot uses the same method to determine whether a second reachable point exists on direction 3. Figure 7 As shown in (c), there are four target coordinate points along direction 3 whose distance from the user is between the first value and the target value. These four target coordinate points include reachable points, such as points a, b, c, and d. The robot determines that there is a second reachable point along direction 3, and further confirms the existence of a second reachable point. Specifically, the second direction can be direction 3, and the reachable point closest to the user among these four reachable points, such as point a, is the second reachable point.
[0120] In the above embodiments, the robot can alternately traverse multiple positive angles and multiple negative angles. When traversing one of the angles, it can determine whether a second reachable point exists at that angle. When traversing to an angle where a second reachable point exists, the traversal stops. The second reachable point obtained in this way is the second reachable point in the target direction, and the target direction is the second direction among multiple second directions that has the smallest angle with the first direction.
[0121] For example, the robot can identify multiple third directions that have a positive angle with the first direction, and traverse these multiple third directions to determine whether any of the multiple third directions includes the second reachable point. If none of the multiple third directions includes the second reachable point, the robot can identify multiple fourth directions that have a negative angle with the first direction, and traverse these multiple fourth directions to determine whether any of the multiple fourth directions includes the second reachable point.
[0122] Taking a first positive angle of 30°, a first negative angle of -45°, and a second step size of 5° as an example, the robot can determine 6 third directions, with an angle of 5° between any two adjacent third directions. Each of these 6 third directions is traversed to determine if any third direction includes a second reachable point. The specific determination process can be found in the previous method and will not be repeated here. If any of these 6 third directions includes a second reachable point, the robot determines that a second reachable point exists. This third direction including the second reachable point is the second direction, and the process ends. If none of these 6 third directions includes a second reachable point, the robot determines 9 fourth directions. The angle between any two adjacent fourth directions is 5°. Each of these 9 fourth directions is traversed to determine if any fourth direction includes a second reachable point. The specific determination process can be found in the previous method and will not be repeated here. If any of these 9 fourth directions includes a second reachable point, the robot determines that a second reachable point exists. The fourth direction that includes the second reachable point is the second direction. The process ends. If none of the nine fourth directions include the second reachable point, the robot determines that there is no second reachable point.
[0123] In this embodiment, the robot can first traverse multiple positive angles. If none of the positive angles includes the second reachable point, it then traverses multiple negative angles. In other embodiments, the robot can first traverse multiple negative angles. If none of the negative angles includes the second reachable point, it then traverses multiple positive angles. Where multiple second directions including the second reachable point exist, the second reachable point is specifically the second reachable point located in the target direction. The target direction is the second direction among the multiple second directions including the second reachable point that has the smallest angle with the first direction. For example, multiple third directions include the second reachable point, and multiple fourth directions include the second reachable point. The robot ultimately uses the second reachable point in the target direction as the second reachable point. Here, the target direction is the direction among the multiple third and fourth directions that has the smallest angle with the first direction.
[0124] If a second reachable point exists, the robot can execute S8. If no reachable point exists, the robot can execute either S9a or S9b.
[0125] S8, if a second reachable point exists, the robot controls the robot to move to the second reachable point.
[0126] If the robot determines that a second reachable point exists, the robot can acquire the second reachable point.
[0127] The robot can move from the first position to the second reachable point, and after moving to the second reachable point, adjust the robot's posture to face the user. Please refer to the previous explanation; it will not be repeated here.
[0128] S9a, In the absence of a second reachable point, the robot controls the robot's posture to face the user.
[0129] In other words, if there is no first reachable point in the first direction and no second reachable point in the second direction, the robot will adjust its posture to face the user. For example, Figure 8 In the case shown in (a), the distance between the robot and the user is between the first and second values. The robot is too close to the obstacle. The coordinates of the distances to the user in the first direction, each of the third directions, and each of the fourth directions are not reachable points between the first value and the first distance. Here, the first distance is the distance between the robot and the user. In this case, the robot does not need to move closer to the user; the robot can adjust its posture to face the user. For example, as... Figure 8 In the scenario shown in (b), the distance between the robot and the user is greater than the second value. However, the robot is too close to the obstacle, and the coordinates between the robot and the user in the first direction, each of the third directions, and each of the fourth directions are not reachable points between the first and second values. In this case, the robot does not need to move closer to the user; the robot can adjust its posture to face the user.
[0130] S9b, if there is no second reachable point, the robot obtains a third reachable point in the first direction and controls the robot to move to the third reachable point.
[0131] In this context, the third reachable point in the first direction is the closest reachable point to the user whose distance from the user is greater than the second value. For example, such as... Figure 8In the scenario shown in (c), the distance between the robot and the user is greater than the second value. However, the robot is far from the obstacle, and although the coordinates between the robot and the user in the first direction, each of the third direction, and each of the fourth direction are not reachable points between the first and second values, this situation allows the robot to be as close to the user as possible, even though the distance between the robot and the user cannot be controlled between the first and second values. Therefore, in this case, the robot can obtain a third reachable point in the first direction, such as point e. For example, the robot obtains the third reachable point based on the distance between the robot and the obstacle in the first direction to get as close to the user as possible. For example, if the distance between the third reachable point and the obstacle is a safe distance such as 0.2 meters, and the distance between the robot and the obstacle is 0.5 meters, then the position 0.3 meters in front of the robot in the first direction is the third reachable point. Optionally, after controlling the robot to move to the third reachable point, the robot can also control its posture to face the user.
[0132] In some embodiments, when there is no second reachable point, the robot determines whether to execute S9a or S9b based on the distance between the robot and the obstacle. For example, if the distance between the robot and the obstacle is greater than or equal to the safe distance, the robot executes S9b. If the distance between the robot and the obstacle is less than the safe distance, the robot executes S9a.
[0133] In the embodiments provided above, this application does not limit the order in which the robot determines whether a first reachable point exists and whether a second reachable point exists. As described above, the robot may first determine whether a first reachable point exists, and if the first reachable point does not exist, determine whether a second reachable point exists. In other embodiments, the robot may first determine whether a second reachable point exists, and if the second reachable point does not exist, determine whether a first reachable point exists. In still other embodiments, the robot may simultaneously determine whether a first reachable point and a second reachable point exist; if a first reachable point exists, the robot may move to the first reachable point regardless of whether a second reachable point exists. If a first reachable point does not exist but a second reachable point does exist, the robot may move to the second reachable point. If neither a first nor a second reachable point exists, the robot may remain stationary and only face the user.
[0134] The following is combined with Figure 9 To introduce it. For example... Figure 9 As shown in (a), when the distance between the robot and the user is less than the first value, the robot can be controlled to face the user. Figure 9 As shown in (b), when the distance between the robot and the user is greater than a first value and there are no obstacles between them, the robot can control itself to move to the first reachable point and face the user. The first reachable point is a position in the first direction where the distance from the user is the first value. Figure 9 As shown in (c), the user is positioned between the coffee table and the sofa. If the distance between the robot and the user is greater than a first value, and there is an obstacle such as the coffee table between them, and a first reachable point exists in the first direction, then the robot can control itself to move to the first reachable point and face the user. Figure 9 As shown in (d), the user is located between the coffee table and the sofa. The distance between the robot and the user is greater than the first value. There is an obstacle between the robot and the user, such as the coffee table. There is no first reachable point in the first direction. The robot can determine whether a second reachable point exists using the method described above. Figure 9 As shown in (d), if a second reachable point exists in the direction where the second direction makes an angle of -5° with the first direction, the robot can control itself to move to the second reachable point and face the user. In conventional technologies, such as... Figure 9 As shown in (e), when the user is positioned between the coffee table and the sofa, the robot will move to that space, maintaining a preset distance from the user. This can lead to overcrowding and inconvenience for the user. Furthermore, the robot's large size may cause it to get stuck or malfunction.
[0135] As can be seen, the following method provided in this application can control the distance between the robot and the user within a suitable range, such as controlling the distance between the robot and the user between a first value and a second value, and bringing the robot as close to the user as possible. This not only avoids crowding caused by being too close, but also avoids the problem of losing track of the robot due to being too far away.
[0136] In this embodiment, the robot can also determine in real time whether it has lost track of the user while following them. If it loses track of the user, the robot can autonomously search for the user. This will be described below with reference to the accompanying drawings.
[0137] Figure 10 This application provides a following method, which includes:
[0138] S21, the robot determines whether it has identified the user.
[0139] The robot has the ability to recognize users.
[0140] In some embodiments, the robot can emit detection signals using technologies such as ultra-wideband, radio frequency, ultrasonic, and Bluetooth, and identify the user based on the detection signals reflected from objects. For example, if the user cannot be detected in multiple consecutive frames of reflected detection signals, the robot determines that it has not identified the user and further determines that it has lost track of the user. Conversely, if the user can be detected in multiple consecutive frames of reflected detection signals, the robot determines that it has identified the user and further determines that it has not lost track of the user.
[0141] In other embodiments, the robot can identify users based on visual tracking technology. For example, the robot identifies users based on captured video frames, which may be, for example, RGB images. For instance, if no image of the user is detected in multiple consecutive video frames, the robot determines that it has not identified the user and further determines that it has lost track of the user. If an image of the user is detected in multiple consecutive video frames, the robot determines that it has identified the user and further determines that it has not lost track of the user.
[0142] In other words, the robot identifies itself as having lost the user when the user is no longer within its field of vision. For example, if the user and robot are in the same room but the robot's view is obstructed by an obstacle, the robot identifies itself as having lost the user. Another example is if the user moves from their current room to another room, and a wall obstructs the robot's view, causing it to lose sight of the user. Yet another example is if the user suddenly accelerates or changes direction rapidly, moving out of the robot's field of vision, the robot identifies itself as having lost the user. In this embodiment, the robot can autonomously search for the lost user. For example, the robot can execute step S22.
[0143] S22, the robot moves from its current position to the most recently acquired target reachable point.
[0144] The target reachable point can be either the first reachable point or the second reachable point mentioned above. In this embodiment, the robot can periodically acquire the first reachable point or the second reachable point at a preset frequency, and follow the user in real time through the first reachable point or the second reachable point. The most recently acquired target reachable point can be the target reachable point acquired last time.
[0145] After the robot reaches the target reachable point, it can autonomously search for the person. For example, after reaching the target reachable point, the robot can continue to identify the user. If the user is identified, the search process ends. If the user is not identified, for example, the robot can execute S23.
[0146] S23, the robot determines whether there are other spaces within the preset range.
[0147] In this context, "other spaces" can refer to other rooms, which can be any room in the user's home other than the room where the robot is currently located. For example, the robot might be in the living room, while "other rooms" could be the bedroom.
[0148] In some embodiments, the robot uses laser SLAM technology to scan its surrounding environment with lidar. By analyzing lidar signals reflected from objects, the robot can identify the locations of walls, doors, etc., and thus determine whether there are other spaces within a preset range.
[0149] In other embodiments, the robot uses visual SLAM technology to identify objects in its surrounding environment in real time through video frames captured by a camera. Based on image recognition technology, the robot can identify objects such as doorways, corridors, and walls, and thus determine whether there are other spaces within a preset range.
[0150] In other real-time examples, the robot can determine whether other spaces exist within a preset area based on a pre-built map and its current location. The robot can pre-build a map using laser SLAM technology, marking the locations of rooms, corridors, and doors, etc. The robot can then combine its current location with the pre-built map to determine if other spaces exist within the preset area.
[0151] The preset range is a circular area centered on the robot's current location with a preset length as its radius. The preset length can be, for example, 1 meter or 2 meters.
[0152] S24, if there are other spaces within the preset range, the robot enters those other spaces and searches for the user.
[0153] For example, if there are other spaces within a preset range, the robot enters those spaces. After entering, the robot can identify the user. If the user is identified, the search process ends. If the user is not identified, the robot can rotate a preset angle, such as 360° or 180°, to further search for the user. During rotation, it can rotate a preset step size each time, up to a preset angle. The preset step size can be 10° or 20°. After rotating one preset step size, the robot can pause for 1 second or 0.5 seconds to identify the user. If the user is identified again, it indicates that the user has been successfully found, and the process ends. If the user is not identified again, the robot can rotate another preset step size and continue the user identification process. If the user is identified, the robot can perform... Figure 2 The robot continues to follow the user, as shown in the following description. If the user is still not recognized after rotating to a preset angle, the robot can issue a voice prompt to indicate that the tracking has been lost and to remind the user to return to the robot's field of vision. The voice prompt could be something like, "Master, I can't see you anymore, where did you go?"
[0154] The specific implementation of robot user recognition can be found in the description of the relevant content in S21, and will not be elaborated here.
[0155] S25, if there is no other space within the preset range, the robot determines the direction of rotation.
[0156] The rotation direction includes turning to the right and turning to the left. The robot determines the rotation direction based on the user's departure direction. The user's departure direction is the direction in which the user leaves the robot's field of vision. For example, if the user leaves from the left side of the robot, the robot will rotate to the left. If the user leaves from the right side of the robot, the robot will rotate to the right.
[0157] The robot can determine the user's departure direction. For example, the robot uses visual tracking technology to determine the user's departure direction. For instance, the robot determines the user's departure direction based on a target video frame in the captured video frames. The target video frame is one or more video frames that include the user's image and were captured most recently. For example, the robot determines the position of the user's image within the video frame based on the target video frame. If the user's image disappears to the left of the video frame, the robot determines that the user is leaving from the left side of the robot. If the user's image disappears to the right of the video frame, the robot determines that the user is leaving from the right side of the robot. As another example, the robot can determine the user's departure direction using the last captured user pose. For instance, the robot determines the user's direction relative to the robot based on the last captured user pose and the robot's pose. If the user is to the left of the robot, the robot determines that the user is leaving from the left side of the robot. If the user is to the right of the robot, the robot determines that the user is leaving from the right side of the robot.
[0158] S26, the robot rotates by a preset angle based on the rotation direction to find the user.
[0159] The preset angle can be 360° or 180°. For example, if the rotation direction is left, the robot will turn left and rotate the preset angle to find the user. If the rotation direction is right, the robot will turn right and rotate the preset angle to find the user. Specific implementation details can be found in the previous section and will not be repeated here. Similarly, once the user is found, the robot can perform... Figure 2 The robot continues to follow the user, as shown in the following instructions. If the robot cannot find the user after rotating the preset angle, it can issue a voice prompt to indicate that the user has lost track and to ask the user to return to the robot's field of vision.
[0160] The following is combined with Figure 11 To introduce it. For example... Figure 11 As shown in (a), the user enters the bedroom from the living room, but the robot does not recognize the user. The robot moves to the most recently acquired reachable point. After reaching the reachable point, the robot can continue to identify the user. If the user is not recognized but other rooms are detected within a preset range, the robot can enter those other rooms to further search for the user. Figure 11 As shown in (b), the user and the robot are in the same room, but the robot's view is obstructed by an obstacle, and the robot does not recognize the user. The robot moves to the nearest accessible target point. After reaching the target point, since the user left from the robot's right side, the robot can rotate a preset angle from the right side to search for the user.
[0161] As can be seen, the following method provided in this application embodiment allows the robot to autonomously search for the user and continue following them once the user is found. Figure 12 As shown, the robot responds to the user's command and activates its follow function. After activating the follow function, the robot follows the user. Specifically, the robot periodically performs actions at a preset frequency, such as... Figure 2 The method shown follows the user. During this process, the robot can periodically determine whether it has lost track of the user at a preset frequency. If the robot determines that it has lost track of the user, it can execute... Figure 10 The method shown autonomously locates people. If the robot determines it hasn't lost track of the user, it continues to follow them. The robot then executes... Figure 10 If the method shown finds the user, the robot can continue to follow the user. During the robot's execution... Figure 10 If the method shown fails to locate the user, the robot can issue a voice prompt to indicate that the user has lost track and to alert the user to return to the robot's field of vision.
[0162] This application provides a robot comprising: a memory and one or more processors. The memory is coupled to the processors. The memory stores computer program code. The computer program code includes computer instructions. When the processor executes the computer instructions, the robot can perform various functions or steps performed by the mobile phone in the above method embodiments. The structure of the robot can be referred to... Figure 1 The structure of robot 100 shown.
[0163] This application embodiment also provides a computer storage medium, which includes computer instructions, when the computer instructions are executed on the aforementioned robot (e.g., Figure 1 When the robot 100 shown is run, it causes the robot to perform the various functions or steps in the above method embodiments.
[0164] This application also provides a computer program product that, when run on a computer, causes the computer to perform the various functions or steps described in the above method embodiments.
[0165] This application also provides a chip system including at least one processor and at least one interface circuit. The processor and the interface circuit are interconnected via lines. For example, the interface circuit can be used to receive signals from other devices (e.g., a robot's memory). Or, for example, the interface circuit can be used to send signals to other devices (e.g., a processor). Exemplarily, the interface circuit can read instructions stored in memory and send those instructions to the processor. When the instructions are executed by the processor, the robot can perform the steps described in the above embodiments. Of course, the chip system may also include other discrete devices, and this application does not specifically limit this.
[0166] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0167] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0168] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0169] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0170] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0171] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A following method, characterized in that, Applied to a robot, the robot moves following the user's movement, the robot's current position is a first position, and the user's current position is a second position; the method includes: If the distance between the first position and the second position is greater than a first value, there is an obstacle between the robot and the user, and a first reachable point exists, the robot is controlled to move from the first position to the first reachable point. Wherein, the first reachable point is the closest reachable point to the user in the first direction whose distance from the user is between the first value and the second value, and the reachable point has no obstacles, and the second value is greater than the first value; the first direction is the direction of the line connecting the robot and the user.
2. The method according to claim 1, characterized in that, The method further includes: If the distance between the first position and the second position is greater than a first value, there is an obstacle between the robot and the user, and there is no first reachable point but there is a second reachable point, the robot is controlled to move from the first position to the second reachable point. Wherein, the second reachable point is the reachable point closest to the user in the second direction whose distance from the user is between the first value and the second value; the angle between the second direction and the first direction is within a preset range.
3. The method according to claim 1 or 2, characterized in that, The method further includes: Based on the first position, the second position, and information about obstacles in the space where the robot is located, determine whether the first reachable point exists.
4. The method according to claim 3, characterized in that, The step of determining whether the first reachable point exists based on the first position, the second position, and information about obstacles in the space where the robot is located includes: Based on the first position and the second position, at least one coordinate point is obtained; the at least one coordinate point is an equally spaced coordinate point obtained sequentially along the first direction according to the first step length, with the second position as the starting position and the first position as the ending position. Based on the information about obstacles in the space where the robot is located, the first value and the second value, determine whether there is a reachable point among the at least one coordinate point; Wherein, if there is a reachable point among the at least one coordinate point, it is determined that the first reachable point exists; if there is no reachable point among the at least one coordinate point, it is determined that the first reachable point does not exist.
5. The method according to any one of claims 2-4, characterized in that, The method further includes: Based on the first position, the second position, and information about obstacles in the space where the robot is located, determine whether the second reachable point exists.
6. The method according to claim 5, characterized in that, There are multiple second directions. Each of the multiple second directions is an equally spaced angle obtained sequentially along clockwise and / or counterclockwise directions, with the second position as the origin and the first direction as the starting position, according to the second step size. The step of determining whether a second reachable point exists based on the first position, the second position, and information about obstacles in the space where the robot is located includes: For each second direction, based on the first position, the second position, and information about obstacles in the space where the robot is located, determine whether there is a second reachable point in the second direction; If, among multiple second directions, there is a second direction that includes the second reachable point, then the existence of the second reachable point is determined.
7. The method according to claim 6, characterized in that, There are multiple second directions including the second reachable point. Specifically, the second reachable point is a second reachable point located in the target direction. The target direction is the second direction among the multiple second directions including the second reachable point that has the smallest angle with the first direction.
8. The method according to claim 6 or 7, characterized in that, The step of determining whether a second reachable point exists in the second direction based on the first position, the second position, and information about obstacles in the space where the robot is located includes: Based on the second position and the target position, at least one coordinate point is obtained; the at least one coordinate point is an equally spaced coordinate point obtained sequentially along the second direction according to the first step length, with the second position as the starting position and the target position as the ending position; the target position is the position in the second direction where the distance between the robot and the user is a target value; the target value is the minimum value between the distance between the robot and the user and the second value; Based on the information of obstacles in the space where the robot is located, the first value and the target value, determine whether there is a reachable point among the at least one coordinate point; Wherein, if there is a reachable point among the at least one coordinate point, it is determined that there is a second reachable point in the second direction; if there is no reachable point among the at least one coordinate point, it is determined that there is no second reachable point in the second direction.
9. The method according to any one of claims 1-8, characterized in that, The method further includes: If neither the first reachable point nor the second reachable point exists, control the robot to face the user; or, if the distance between the first position and the second position is less than or equal to the first value, control the robot to face the user; or, after controlling the robot to move from the first position to the first reachable point, control the robot to face the user; or, after controlling the robot to move from the first position to the second reachable point, control the robot to face the user.
10. The method according to any one of claims 2-9, characterized in that, The robot periodically acquires either the first reachable point or the second reachable point at a preset frequency; the method further includes: If the user is not identified, move to the most recently obtained target reachable point; the target reachable point is either the first reachable point or the second reachable point; If the robot fails to identify the user at the target reachable point and there are other spaces within the preset range, the robot enters the other spaces to identify the user and follows the user if the user is identified. If the robot does not detect the user at the target reachable point and there is no other space within the preset range, the robot rotates by a preset angle according to the user's departure direction to detect the user, and follows the user if the user is detected.
11. A robot, characterized in that, The robot includes: a memory and one or more processors; the memory is coupled to the processors; wherein the memory is used to store computer program code, the computer program code including computer instructions; when the computer instructions are executed by the processor, the robot performs the method as described in any one of claims 1-10.
12. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on the robot, cause the robot to perform the method as described in any one of claims 1-10.
13. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1-10.