Robot control method, device, medium and robot
By obtaining obstacle information and point cloud data, the robot's moving speed in follow mode is adjusted, which solves the problem of poor speed control of the robot in complex scenes and improves safety and adaptability.
Patent Information
- Application Number
- CN202311022608.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-14
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2043-08-14
AI Technical Summary
The robot lacks global path planning in follow mode, resulting in the inability to effectively control the movement speed and the inability to adaptively adjust the speed in human-machine collaboration, posing safety risks.
By obtaining the obstacle information around the robot, the target speed interval is determined, and the robot's moving speed is adjusted according to the number of obstacle point cloud points and area information to achieve adaptive speed control in follow mode.
It achieves effective control of the robot's movement speed in human-machine collaboration, improves safety and adaptability, avoids collisions with obstacles, and enhances the robot's operating capabilities in complex scenarios.
Smart Images

Figure CN116859953B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of robot technology, and in particular to a robot control method, device, medium and robot. Background Art
[0002] Trajectory planning and control plays a vital role in robot autonomous navigation, object grasping, path tracking and other tasks. In related technologies, when the robot performs trajectory planning in the follow-up mode, it does not plan the global path, but relies on the local map to make random speed control, does not adjust the speed in combination with the scene, and cannot ensure that the robot effectively controls the moving speed. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a robot control method, device, medium and robot.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided a robot control method, comprising:
[0005] When the robot is in a following mode, obtaining obstacle information around the robot;
[0006] Determine a target speed range of the robot according to obstacle information in a target area, wherein the target area is an area in the forward direction of the robot;
[0007] According to the target speed range, the robot is controlled to move in the following mode.
[0008] Optionally, determining a target speed range of the robot according to obstacle information in a target area includes:
[0009] Determine the number of obstacle point cloud points in the target area according to the obstacle information in the target area;
[0010] A target speed range of the robot is determined according to the number of points in the obstacle point cloud.
[0011] Optionally, determining the number of obstacle point cloud points in the target area according to the obstacle information in the target area includes:
[0012] Determining size information of the target area;
[0013] Determining obstacle point cloud information according to the obstacle information;
[0014] The number of obstacle point cloud points in the target area is determined according to the obstacle point cloud information and the size information.
[0015] Optionally, determining the number of obstacle point cloud points in the target area according to the obstacle point cloud information and the size information includes:
[0016] Determine, according to the obstacle point cloud information, the coordinate information of each point in the obstacle point cloud information in a preset coordinate system;
[0017] The number of obstacle point cloud points in the target area is determined according to the coordinate information and the size information.
[0018] Optionally, determining the number of obstacle point cloud points in the target area according to the obstacle point cloud information and the size information includes:
[0019] Determining, according to the obstacle point cloud information and the size information, a distance between each point in the obstacle point cloud information and a sensor, wherein the sensor is used to obtain the obstacle point cloud information;
[0020] The number of obstacle point cloud points in the target area is determined according to the distance between each point in the obstacle point cloud information and the sensor.
[0021] Optionally, determining the distance between each point in the obstacle point cloud information and the sensor according to the obstacle point cloud information and the size information includes:
[0022] According to the obstacle point cloud information, determine the angle information of each point in the obstacle point cloud information, wherein the angle information represents the angle between the connecting line between each point in the obstacle point cloud information and the sensor and the target reference line, wherein the target reference line is a reference line that is horizontally perpendicular to the forward direction of the robot;
[0023] The distance between each point in the obstacle point cloud information and the sensor is determined according to the angle information and the size information.
[0024] Optionally, the target area is a first area, and determining the target speed range of the robot according to the number of points in the obstacle point cloud includes:
[0025] When the number of points in the obstacle point cloud is greater than or equal to a first threshold, the target speed interval is determined to be a first speed interval, wherein a speed value in the first speed interval is less than or equal to a first speed threshold.
[0026] Optionally, the target area is a second area, the second area includes sub-areas, and determining the target speed range of the robot according to the number of points in the obstacle point cloud includes:
[0027] When the number of obstacle point cloud points in the sub-area is less than a second threshold and the number of obstacle point cloud points on the left and right sides of the second area are both greater than or equal to a third threshold, the target speed interval is determined to be a second speed interval, wherein the third threshold is less than the second threshold, and the speed value of the second speed interval is less than or equal to the second speed threshold.
[0028] Optionally, the target area is a third area, and determining the target speed range of the robot according to the number of points in the obstacle point cloud includes:
[0029] When the number of obstacle point cloud points in the third area is less than a fourth threshold, or the number of obstacle point cloud points on at least one of the left and right sides of the third area is less than a fifth threshold, the target speed interval is determined to be a third speed interval, wherein the fifth threshold is less than the fourth threshold, and the speed value of the third speed interval is less than or equal to the third speed threshold.
[0030] Optionally, the target area includes a fourth area and a fifth area, and the fifth area includes the fourth area, and determining the target speed range of the robot according to the number of points in the obstacle point cloud includes:
[0031] When the number of obstacle point cloud points in the fourth area is greater than or equal to a sixth threshold, determining that the target speed interval is a fourth speed interval, and the speed value of the fourth speed interval is less than or equal to a fourth speed threshold;
[0032] When the number of obstacle point cloud points in the fourth area is less than the sixth threshold, and the number of obstacle point cloud points on the left and right sides of the fifth area are both greater than or equal to the seventh threshold, determining that the target speed interval is the fifth speed interval, wherein the seventh threshold is less than the sixth threshold, the speed value of the fifth speed interval is less than or equal to the fifth speed threshold, and the fifth speed threshold is greater than the fourth speed threshold;
[0033] When the number of obstacle point cloud points in the fifth area is less than the eighth threshold, or the number of obstacle point cloud points on at least one of the left and right sides in the fifth area is less than the seventh threshold, the target speed interval is determined to be a sixth speed interval, wherein the seventh threshold is less than the eighth threshold, the speed value of the sixth speed interval is less than or equal to the sixth speed threshold, and the sixth speed threshold is greater than the fifth speed threshold.
[0034] Optionally, the method further comprises:
[0035] Obtaining the moving speed of the robot;
[0036] Determining a target speed range of the robot according to obstacle information in a target area includes:
[0037] When the moving speed is greater than or equal to a seventh speed threshold, a target speed range of the robot is determined according to obstacle information in the target area.
[0038] Optionally, according to the target speed interval, controlling the robot to move in the following mode includes:
[0039] In response to a control instruction for controlling the robot to stop suddenly, the robot is controlled to reduce a moving speed in the following mode according to the target speed interval until the robot stops moving.
[0040] Optionally, after controlling the robot to reduce a moving speed in the following mode until the robot stops moving, the method further comprises:
[0041] In response to a backward instruction, the robot is controlled to perform a backward operation in the following mode according to a backward speed and a backward duration in the backward instruction.
[0042] Optionally, the method further comprises:
[0043] Before determining the target speed range of the robot according to the obstacle information in the target area, obtaining the current speed range of the robot;
[0044] Determining a target speed range of the robot according to obstacle information in a target area includes:
[0045] Determining a candidate speed range of the robot according to obstacle information in the target area;
[0046] When the current speed interval is consistent with the candidate speed interval, the current speed interval is determined to be the target speed interval.
[0047] Optionally, the method further comprises:
[0048] When the current speed section is consistent with the candidate speed section, the robot is controlled not to perform an adjustment operation for the current speed section.
[0049] Optionally, determining a target speed range of the robot according to obstacle information in a target area further includes:
[0050] Determine a candidate speed interval of the robot according to obstacle information in a target area; and determine the candidate speed interval as the target speed interval when the current speed interval is inconsistent with the candidate speed interval.
[0051] Optionally, the method further comprises:
[0052] When the current speed section is inconsistent with the candidate speed section, in response to an adjustment instruction for the current speed section, the robot is controlled to perform an adjustment operation for the current speed section.
[0053] According to a second aspect of an embodiment of the present disclosure, there is provided a control device for a robot, comprising:
[0054] An acquisition module, configured to acquire obstacle information around the robot when the robot is in a following mode;
[0055] A determination module is configured to determine a target speed range of the robot according to obstacle information in a target area, wherein the target area is an area in a forward direction of the robot;
[0056] The control module is configured to control the robot to move in the following mode according to the target speed range.
[0057] Optionally, the determination module includes:
[0058] A first determination submodule is configured to determine the number of obstacle point cloud points in the target area according to the obstacle information in the target area;
[0059] The second determination submodule is configured to determine a target speed range of the robot according to the number of obstacle point cloud points.
[0060] Optionally, the first determining submodule includes:
[0061] A third determination submodule is configured to determine size information of the target area;
[0062] A fourth determination submodule is configured to determine obstacle point cloud information according to the obstacle information;
[0063] The fifth determination submodule is configured to determine the number of obstacle point cloud points in the target area according to the obstacle point cloud information and size information.
[0064] Optionally, the fifth determining submodule includes:
[0065] A sixth determination submodule is configured to determine the coordinate information of each point in the obstacle point cloud information in a preset coordinate system according to the obstacle point cloud information;
[0066] The seventh determination submodule is configured to determine the number of obstacle point cloud points in the target area according to the coordinate information and the size information.
[0067] Optionally, the fifth determining submodule includes:
[0068] an eighth determination submodule, configured to determine the distance between each point in the obstacle point cloud information and the sensor according to the obstacle point cloud information and the size information, the sensor being used to obtain the obstacle point cloud information;
[0069] The ninth determination submodule is configured to determine the number of obstacle point cloud points in the target area according to the distance between each point in the obstacle point cloud information and the sensor.
[0070] Optionally, the eighth determining submodule is specifically configured as follows:
[0071] According to the obstacle point cloud information, determine the angle information of each point in the obstacle point cloud information, the angle information represents the angle between the connecting line between each point in the obstacle point cloud information and the sensor and the target reference line, the target reference line is a reference line horizontally and vertically to the forward direction of the robot;
[0072] According to the angle information and size information, the distance between each point in the obstacle point cloud information and the sensor is determined.
[0073] Optionally, the target area is the first area, and the second determination submodule is specifically configured as follows:
[0074] When the number of obstacle point cloud points is greater than or equal to the first threshold, the target speed interval is determined to be the first speed interval, wherein the speed value of the first speed interval is less than or equal to the first speed threshold.
[0075] As an optional embodiment, the target area is the second area, the second area includes sub-areas, and the second determination submodule is specifically configured as follows:
[0076] When the number of obstacle point cloud points in the sub-area is less than the second threshold and the number of obstacle point cloud points on the left and right sides of the second area are both greater than or equal to the third threshold, the target speed interval is determined to be the second speed interval, wherein the third threshold is less than the second threshold, and the speed value of the second speed interval is less than or equal to the second speed threshold.
[0077] Optionally, the target area is the third area, and the second determining submodule is specifically configured as follows:
[0078] When the number of obstacle point cloud points in the third area is less than the fourth threshold, or the number of obstacle point cloud points on at least one of the left and right sides in the third area is less than the fifth threshold, the target speed interval is determined to be the third speed interval, wherein the fifth threshold is less than the fourth threshold, and the speed value of the third speed interval is less than or equal to the third speed threshold.
[0079] Optionally, the target area includes the fourth area and the fifth area, and the fifth area includes the fourth area, and the second determining submodule is specifically configured as follows:
[0080] When the number of obstacle point cloud points in the fourth area is greater than or equal to the sixth threshold, determining the target speed interval to be the fourth speed interval, and the speed value of the fourth speed interval is less than or equal to the fourth speed threshold;
[0081] When the number of obstacle point cloud points in the fourth area is less than the sixth threshold, and the number of obstacle point cloud points on the left and right sides of the fifth area are both greater than or equal to the seventh threshold, the target speed interval is determined to be the fifth speed interval, wherein the seventh threshold is less than the sixth threshold, the speed value of the fifth speed interval is less than or equal to the fifth speed threshold, and the fifth speed threshold is greater than the fourth speed threshold;
[0082] When the number of obstacle point cloud points in the fifth area is less than the eighth threshold, or the number of obstacle point cloud points on at least one of the left and right sides in the fifth area is less than the seventh threshold, the target speed interval is determined to be the sixth speed interval, wherein the seventh threshold is less than the eighth threshold, the speed value of the sixth speed interval is less than or equal to the sixth speed threshold, and the sixth speed threshold is greater than the fifth speed threshold.
[0083] Optionally, the control device of the robot further includes:
[0084] A first speed acquisition module is configured to acquire the moving speed of the robot before determining the target speed range of the robot according to the obstacle information in the target area;
[0085] Determine the module is specifically configured as:
[0086] When the moving speed is greater than or equal to the seventh speed threshold, the target speed range of the robot is determined according to the obstacle information in the target area.
[0087] Optionally, the control module includes:
[0088] The emergency stop module is configured to respond to a control instruction for controlling the robot to stop urgently, and control the robot to reduce the moving speed in the following mode according to a target speed range until the robot stops moving.
[0089] Optionally, the control device of the robot further includes:
[0090] The backward module is configured to respond to the backward instruction and control the robot to perform a backward operation in the follow-up mode according to the backward speed and the backward duration in the backward instruction.
[0091] Optionally, the control device of the robot further includes:
[0092] A second speed acquisition module is configured to acquire a current speed interval of the robot before determining a target speed interval of the robot according to obstacle information in a target area;
[0093] Determine the module is specifically configured as:
[0094] Determine the candidate speed range of the robot based on the obstacle information in the target area;
[0095] When the current speed interval is consistent with the candidate speed interval, the current speed interval is determined as the target speed interval.
[0096] Optionally, the control device of the robot further includes:
[0097] The first control submodule is configured to control the robot not to perform an adjustment operation for the current speed interval when the current speed interval is consistent with the candidate speed interval.
[0098] Optionally, the determination module is specifically configured as:
[0099] When the current speed interval is inconsistent with the candidate speed interval, the candidate speed interval is determined as the target speed interval.
[0100] Optionally, the control device of the robot further includes:
[0101] The second control submodule is configured to control the robot to perform an adjustment operation for the current speed interval in response to an adjustment instruction for the current speed interval when the current speed interval is inconsistent with the candidate speed interval.
[0102] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the robot control method provided by the first aspect of the embodiment of the present disclosure is implemented.
[0103] According to a fourth aspect of an embodiment of the present disclosure, there is provided a robot, comprising:
[0104] a storage device including a computer program;
[0105] A processing device is used to execute the computer program to implement the robot control method provided by the first aspect of the embodiment of the present disclosure.
[0106] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0107] In the disclosed embodiment, when the robot is in the following mode, the target area in the robot's forward direction is combined with the obstacle information in the target area to determine the target speed range of the robot. In this way, the target speed range is obtained in combination with the obstacle information in the target area in the following mode of the robot, and the target speed range is used to control the movement of the robot in the following mode. The movement speed of the robot can be effectively controlled in combination with the scene in human-machine collaboration.
[0108] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0109] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0110] Figure 1 The figure is a flow chart of a method for controlling a robot according to an exemplary embodiment.
[0111] Figure 2 is a schematic diagram of a scene of a robot in a following mode according to an exemplary embodiment.
[0112] Figure 3 is a schematic diagram of a target area according to an exemplary embodiment.
[0113] Figure 4 The figure is a flow chart of another method for controlling a robot according to an exemplary embodiment.
[0114] Figure 5 It is a block diagram of a control device of a robot according to an exemplary embodiment.
[0115] Figure 6 is a block diagram of a robot according to an exemplary embodiment.
[0116] Figure 7 It is a block diagram of a device for implementing a robot control method according to an exemplary embodiment.
[0117] Figure 8 The figure is a schematic diagram showing determination of the distance between each point in obstacle point cloud information and a sensor according to an exemplary embodiment. DETAILED DESCRIPTION
[0118] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0119] Robot kinematic control is widely used in industrial automation, robot navigation, logistics systems, medical robots and other fields. The robot kinematic control algorithms and methods vary according to the structure and task of the robot, and can include PID (Proportional Integral Derivative) controller, trajectory planning-based control, feedback linearization control, optimal control and other technologies. Kinematic control is essential for accurate robot movement, efficient task execution and safe operation.
[0120] In the robot's trajectory planning, the robot's end effector's motion trajectory is planned to achieve the control process of the robot from the starting position to the target position. Trajectory planning control plays a vital role in robot autonomous navigation, object grasping, path tracking and other tasks.
[0121] In the following mode, the robot has no global path and mainly relies on the local map to make random speed control in the fixed speed gear to control the movement of the robot. It mainly relies on the DWA (Dynamic Window Approach) algorithm to achieve sampling control. The DWA algorithm determines a sampling speed space that meets the hardware constraints of the mobile robot in the speed space (v, ω) according to the current position state and speed state of the mobile robot, and then calculates the trajectory of the mobile robot moving for a certain period of time under these speed conditions, and evaluates the trajectory through the evaluation function. Finally, the speed corresponding to the best evaluated trajectory is selected as the movement speed of the mobile robot, and this cycle is repeated until the mobile robot reaches the target position.
[0122] The above method does not incorporate the scenario of real-time detection of the robot, and is strictly dependent on the speed in a fixed speed gear, without adaptive capabilities, and therefore cannot effectively guarantee effective speed control in human-machine collaboration.
[0123] Figure 1 is a flow chart of a robot control method according to an exemplary embodiment. Figure 1 As shown, the control method includes the following steps.
[0124] S101. When the robot is in a following mode, obtain obstacle information around the robot.
[0125] S102. Determine a target speed range of the robot according to obstacle information in a target area, where the target area is an area in the robot's forward direction.
[0126] S103: Control the robot to move in a following mode according to the target speed range.
[0127] For example, obstacle information can be obtained by the robot's sensors (such as laser radar, radar, distance sensor, etc.), and the obstacle information can be used to characterize the position and size of the obstacle, etc., wherein the obstacle information can include obstacle point cloud information, and the obstacle point cloud information can include the position information of each point in the obstacle point cloud, the obstacle point cloud density, the area of the obstacle point cloud, the number of obstacle point cloud points, etc. The obstacle information can be used to determine whether there is an obstacle in the robot's forward direction area and the location of the obstacle. The target area is an area of the robot in the forward direction, and the size of this area can be determined based on the robot's own size information. The target speed range is the robot's moving speed gear determined based on the obstacle information in the target area. It can be understood that each speed gear corresponds to a speed range, the minimum value of each speed range is zero, and the maximum value of each speed range is different. Generally, the higher the speed gear, the larger the corresponding maximum value of the speed range.
[0128] For example, the robot here is a mobile robot, such as a medical robot, a disability assistance robot, a cleaning robot, etc., which has a follow mode. In the follow mode, the robot moves along the trajectory of the user's free walking. Generally, the robot can be controlled to move according to the speed range preset by the user, and the preset speed range cannot be adjusted. Figure 2 As shown, in the embodiment of the present disclosure, the target speed range of the robot can be determined according to the obstacle information in the target area in the forward direction of the robot, and the target speed range can be used to control the robot to move in the following mode.
[0129] Specifically, the closer the obstacle position represented by the obstacle information is, or the more and denser the number of obstacles represented is, the smaller the maximum value of the determined target speed interval is. On the contrary, if the obstacle information represents that there is no obstacle in the target range, or the farther the obstacle position is, or the fewer and sparser the number of obstacles is, the larger the maximum value of the determined target speed interval is.
[0130] For example, according to the target speed range, the robot can be controlled to move in the follow mode. For example, the robot can be controlled to move in the follow mode according to the maximum speed in the target speed range. The robot can also make corresponding turning, steering, obstacle avoidance and other decisions in combination with the target speed range to determine the target moving speed of the robot, and control the robot to move in the follow mode at the target moving speed.
[0131] In the disclosed embodiment, when the robot is in the following mode, the target area in the robot's forward direction is combined with the obstacle information in the target area to determine the target speed range of the robot. In this way, the target speed range is obtained in combination with the obstacle information in the target area in the following mode of the robot, and the target speed range is used to control the movement of the robot in the following mode. The movement speed of the robot can be effectively controlled in combination with the scene in human-machine collaboration.
[0132] In the scenario where the robot follows the user, the safety of the robot, the user and third parties is guaranteed to avoid collisions. In addition, on the basis of safety, a highly bionic adaptive speed adjustment capability is achieved, which can be independent of the user's control over the speed range and complete autonomous following.
[0133] As an optional embodiment, determining the target speed range of the robot according to obstacle information in the target area includes:
[0134] According to the obstacle information in the target area, determine the number of obstacle point cloud points in the target area;
[0135] Determine the robot's target speed range based on the number of obstacle point cloud points.
[0136] For example, according to the number of obstacle point cloud points in the target area, it is determined whether there are obstacles in the target interval, or the number of obstacles in the target interval is determined, thereby determining the target speed interval of the robot.
[0137] In another optional embodiment, determining the target speed range of the robot according to the obstacle point cloud information in the target area includes:
[0138] According to the obstacle point cloud information in the target area, determine the number of obstacle point cloud points and the obstacle point cloud density in the target area;
[0139] Determine the target speed range of the robot based on the number of obstacle point clouds and the density of obstacle point clouds.
[0140] As an optional embodiment, determining the number of obstacle point cloud points in the target area according to obstacle information in the target area includes:
[0141] Determine the size information of the target area;
[0142] According to the obstacle information, determine the obstacle point cloud information;
[0143] According to the obstacle point cloud information and size information, the number of obstacle point cloud points in the target area is determined.
[0144] For example, the size information is used to characterize the size of the target area, and the obstacle point cloud information can be obtained by a sensor. According to the obstacle point cloud information and the size information of the target area, the number of point cloud points of the obstacles in the target area can be determined, and then the target speed range of the robot can be determined according to the number of point cloud points of the obstacles in the target area.
[0145] As an optional embodiment, determining the number of obstacle point cloud points in the target area according to the obstacle point cloud information and size information includes:
[0146] According to the obstacle point cloud information, determine the coordinate information of each point in the obstacle point cloud information in a preset coordinate system;
[0147] According to the coordinate information and size information, the number of obstacle point cloud points in the target area is determined.
[0148] For example, the preset coordinate system can be a global coordinate system of the sensor or a coordinate system for the target area. In the preset coordinate system, the location of the sensor can be used as the origin of the preset coordinate system, the robot's forward direction can be used as the y-axis, and the horizontal and vertical direction of the robot's forward direction can be used as the x-axis. According to the obstacle point cloud information obtained by the sensor, the coordinate information of each point in the obstacle point cloud information can be determined, that is, the position of each point in the obstacle point cloud in the preset coordinate system.
[0149] For example, when the preset coordinate system is the global coordinate system of the sensor, the coordinate range of the target area in the preset coordinate system can be determined based on the coordinate conversion relationship between the size information of the target area and the preset coordinate system, so as to determine the number of obstacle point cloud points in the target area based on the coordinate information of each point in the obstacle point cloud information in the preset coordinate system. When the preset coordinate system is a coordinate system for the target area, the size information of the target area can be directly converted into the preset coordinate system, and the number of obstacle point cloud points in the target area can be determined based on the coordinate information of each point in the obstacle point cloud information in the preset coordinate system.
[0150] As another optional embodiment, determining the number of obstacle point cloud points in the target area according to the obstacle point cloud information and size information includes:
[0151] According to the obstacle point cloud information and size information, the distance between each point in the obstacle point cloud information and the sensor is determined, and the sensor is used to obtain the obstacle point cloud information;
[0152] According to the distance between each point in the obstacle point cloud information and the sensor, the number of obstacle point cloud points in the target area is determined.
[0153] For example, the distance information between each point in the obstacle point cloud information and the sensor can be determined based on the obstacle point cloud information and the size information of the target area, and the number of obstacle point cloud points in the target area can be determined based on the size information and the distance information.
[0154] In one implementation, determining the distance between each point in the obstacle point cloud information and the sensor according to the obstacle point cloud information and the size information includes:
[0155] According to the obstacle point cloud information, determine the angle information of each point in the obstacle point cloud information, the angle information represents the angle between the connecting line between each point in the obstacle point cloud information and the sensor and the target reference line, the target reference line is a reference line horizontally and vertically to the forward direction of the robot;
[0156] According to the angle information and size information, the distance between each point in the obstacle point cloud information and the sensor is determined.
[0157] Using LiDAR as an example sensor, see Figure 8 , when the target area of the robot 600 is a rectangular area with sizes of A2 and B2, L1 is the line connecting the laser radar and the upper right corner of the target area, L2 is the symmetry line of the target area, L3 is the line connecting the laser radar and the upper left corner of the target area, L4 is the target reference line, n is one of the obstacle points in the obstacle point cloud information, d represents the distance between the obstacle point n and the laser radar, d1 is equal to A2 / 2, θ0 represents the acute angle between the line connecting the obstacle point n and the laser radar and L4, that is, the angle information, and θ represents the acute angle between L1 and L4.
[0158] In an exemplary embodiment, if the size B2 and size A2 of the target area are known, and it is known that d1 is equal to A2 / 2, the acute angle θ0 between the line connecting the obstacle point n and the laser radar and L4 can be determined by the laser radar, and the distance d between the obstacle point n in the target area and the laser radar should be less than d1 / cosθ0. Therefore, if the distance between the obstacle point and the laser radar is less than d1 / cosθ0, it means that the obstacle point is located in the target area. If the distance between the obstacle point and the laser radar is greater than or equal to d1 / cosθ0, it means that the obstacle point is not located in the target area. The number of obstacle point cloud points in the target area can be determined based on the distance d between all obstacle points and the laser radar.
[0159] In another exemplary embodiment, if only the size B2 of the target area in the robot's forward direction is known, and the size A2 is unknown, the target area can be divided into four areas according to L1, L2 and L3, wherein the acute angle θ between L1 and L4, the acute angle θ between L2 and L4, and the acute angle θ between L3 and L4 can be obtained according to the laser radar. For example, it is determined that the obstacle point n is located between L1 and L4, and the size B2 of the target area, the acute angle θ between L1 and L4, and the acute angle θ0 between the line connecting the obstacle point n and the laser radar and L4 are known. At this time, d should be less than (B2 / tanθ) / cosθ0. Therefore, if the distance between the obstacle point and the laser radar is less than (B2 / tanθ) / cosθ0, it means that the obstacle point is located in the target area. If the distance between the obstacle point and the laser radar is greater than or equal to (B2 / tanθ) / cosθ0, it means that the obstacle point is not located in the target area. The number of obstacle point cloud points in the target area can be determined according to the distance d between all obstacle points and the laser radar. It can be understood that if the obstacle point is in the area between L1 and L2, the area between L2 and L3, or the area between L3 and L4, the method for determining the distance between the obstacle point and the laser radar can also refer to the above method, which will not be repeated here.
[0160] As an optional embodiment, the target area is the first area, and the target speed range of the robot is determined according to the number of obstacle point cloud points, including:
[0161] When the number of obstacle point cloud points is greater than or equal to the first threshold, the target speed interval is determined to be the first speed interval, wherein the speed value of the first speed interval is less than or equal to the first speed threshold.
[0162] For example, the first area can be a rectangular area or a semicircular area. When the first area is a rectangular area, the longitudinal distance of the first area in the forward direction of the robot is less than or equal to the first longitudinal distance threshold, and the vertical distances between the two sides of the first area and the sides closest to the robot are less than or equal to the first lateral distance threshold. For example, the first longitudinal distance threshold is 0.7m, and the first lateral distance threshold is 0.4m. In this case, if the lateral dimension of the robot is 0.3m, the lateral dimension of the first area is 0.4+0.3+0.4=1.1m, and the longitudinal dimension is 0.7m. When the first area is a semicircular area, the robot's laser radar can be used as the origin, and the first longitudinal distance threshold in the forward direction can be used as the radius.
[0163] For example, when the number of obstacle point cloud points in the first area is greater than or equal to the first threshold, it can be characterized that there is an obstacle in the first area and the obstacle is close to the robot, so the control target speed interval is the first speed interval, wherein the speed value of the first speed interval is less than or equal to the first speed threshold. Both the first threshold and the first speed threshold can be set according to actual conditions, for example, the first threshold can be any value from 14 to 20, and the first speed threshold can be any value from 0 m / s to 1 m / s.
[0164] As an optional embodiment, the target area is the second area, the second area includes sub-areas, and the target speed range of the robot is determined according to the number of obstacle point cloud points, including:
[0165] When the number of obstacle point cloud points in the sub-area is less than the second threshold and the number of obstacle point cloud points on the left and right sides of the second area are both greater than or equal to the third threshold, the target speed interval is determined to be the second speed interval, wherein the third threshold is less than the second threshold, and the speed value of the second speed interval is less than or equal to the second speed threshold.
[0166] For example, the second area includes a sub-area, wherein the sub-area may be equivalent to the first area described above, that is, the second area is larger than the sub-area. When the number of obstacle point cloud points in the sub-area is less than the second threshold, it can be characterized that there are no obstacles in the sub-area, or the obstacles are not sufficient to block the robot's moving path; when the number of obstacle point cloud points on the left and right sides of the second area are both greater than or equal to the third threshold, it can be characterized that there are obstacles on both sides of the second area, and the robot's moving path is blocked, but the distance between the obstacles and the robot is far. Since the obstacle may be movable and may be far away from the robot at the next moment, the robot may not stop moving, but reduce its speed.
[0167] For example, the second threshold value may be the same as or different from the value of the first threshold value, but the values of the first threshold value and the second threshold value are both used to determine whether there is an obstacle in the area, or whether the obstacle will block the movement path of the robot, so the first threshold value and the second threshold value are similar. The third threshold value is judged on both sides of the second area, so the third threshold value is less than the second threshold value. The second threshold value, the third threshold value and the second speed threshold value can all be set according to actual conditions. For example, the second threshold value can be any value from 14 to 20, the third threshold value can be any value from 6 to 10, and the second speed threshold value can be any value from 0.5 m / s to 1.5 m / s.
[0168] As an optional embodiment, the target area is the third area, and the target speed range of the robot is determined according to the number of obstacle point cloud points, including:
[0169] When the number of obstacle point cloud points in the third area is less than the fourth threshold, or the number of obstacle point cloud points on at least one of the left and right sides in the third area is less than the fifth threshold, the target speed interval is determined to be the third speed interval, wherein the fifth threshold is less than the fourth threshold, and the speed value of the third speed interval is less than or equal to the third speed threshold.
[0170] For example, the third area can be equivalent to the second area mentioned above. When the number of obstacle point cloud points in the third area is less than the fourth threshold, it can be characterized that there are no obstacles in the third area, or the obstacles are not enough to block the robot's moving path; when the number of obstacle point cloud points on at least one of the left and right sides in the third area is less than the fifth threshold, it can be characterized that there are obstacles on only one side of the left and right sides of the third area, or the distance between one side of the obstacle and the robot is far and will not block the robot's moving path, or there are no obstacles on both sides of the third area. In the case that there are no obstacles in the third area, or the obstacles are not enough to block the robot's moving path, the robot can be controlled to accelerate. In the case that there are obstacles on one side of the left and right sides in the third area, the route design can be replanned to avoid obstacles according to the other side where there are no obstacles, and acceleration can also be performed during the path avoidance process. Since the speed interval during the movement of the robot is fixed, in order to avoid the robot accelerating to the maximum value of the current speed interval and not being able to continue to accelerate, the speed interval is adjusted to the third speed interval.
[0171] For example, the values of the first threshold, the second threshold, and the fourth threshold are all used to determine whether there is an obstacle in the area, or whether the obstacle will block the robot's moving path. The fourth threshold may be the same as the first threshold or the second threshold, or may be different. The fifth threshold is judged on both sides of the third area, so the fifth threshold is less than the fourth threshold. The fourth threshold, the fifth threshold, and the third speed threshold can all be set according to actual conditions. For example, the fourth threshold can be any value from 14 to 20, the fifth threshold can be any value from 6 to 10, and the third speed threshold can be any value from 1 m / s to 3 m / s.
[0172] As an optional embodiment, the target area includes the fourth area and the fifth area, and the fifth area includes the fourth area. According to the number of obstacle point cloud points, the target speed range of the robot is determined, including:
[0173] When the number of obstacle point cloud points in the fourth area is greater than or equal to the sixth threshold, determining the target speed interval to be the fourth speed interval, and the speed value of the fourth speed interval is less than or equal to the fourth speed threshold;
[0174] When the number of obstacle point cloud points in the fourth area is less than the sixth threshold, and the number of obstacle point cloud points on the left and right sides of the fifth area are both greater than or equal to the seventh threshold, the target speed interval is determined to be the fifth speed interval, wherein the seventh threshold is less than the sixth threshold, the speed value of the fifth speed interval is less than or equal to the fifth speed threshold, and the fifth speed threshold is greater than the fourth speed threshold;
[0175] When the number of obstacle point cloud points in the fifth area is less than the eighth threshold, or the number of obstacle point cloud points on at least one of the left and right sides in the fifth area is less than the seventh threshold, the target speed interval is determined to be the sixth speed interval, wherein the seventh threshold is less than the eighth threshold, the speed value of the sixth speed interval is less than or equal to the sixth speed threshold, and the sixth speed threshold is greater than the fifth speed threshold.
[0176] For example, see Figure 3 , black dots can be used to represent sensors installed on the robot 600. Taking the laser radar as an example, the fifth area 320 includes the fourth area 310, A1 represents the horizontal dimension of the robot 600, B1 represents the vertical dimension of the robot 600, A2 represents the horizontal dimension of the fourth area 310, B2 represents the vertical dimension of the fourth area 310, A3 represents the horizontal dimension of the fifth area 320, and B3 represents the vertical dimension of the fifth area 320. For example, A1 = 0.32m, A2 = 0.38m, A3 = 0.76m, B1 = 0.6m, B2 = 0.7m, and B3 = 1.5m. Among them, the fourth area 310 can be equivalent to a sub-area of the first area or the second area, and the fifth area 320 can be equivalent to the second area or the third area.
[0177] For example, when the number of obstacle point cloud points in the fourth area 310 is greater than or equal to the sixth threshold, it can be characterized that there is an obstacle in the fourth area 310 and the obstacle is close to the robot, so the control target speed interval is the fourth speed interval. The sixth threshold can be any value from 14 to 20, and the fourth speed threshold can be any value from 0 m / s to 1 m / s.
[0178] For example, when the number of obstacle point cloud points in the fourth area 310 is less than the sixth threshold, if the number of obstacle point cloud points on the left and right sides of the fifth area 320 is greater than or equal to the seventh threshold, it can be characterized that there are obstacles on both sides of the fifth area 320, and the robot's moving path is blocked, but the distance between the obstacle and the robot is farther than the fourth area 310. Since the obstacle may be movable and may be far away from the robot, the robot can reduce the speed. Of course, when the obstacle is stationary, the robot moves to the obstacle in the fourth area 310, and the robot will move at a lower speed or even stop moving. Among them, the seventh threshold can be any value from 6 to 10, and the fifth speed threshold can be any value from 0.5 m / s to 1.5 m / s, but since the fifth speed threshold is greater than the fourth speed threshold, if the fourth speed threshold is 1 m / s, the fifth speed threshold can only be taken within the range of 1 m / s to 1.5 m / s (excluding 1 m / s).
[0179] For example, when the number of obstacle point cloud points in the fifth area 320 is less than the eighth threshold, it can be characterized that there is no obstacle in the fifth area 320, or the obstacle is not enough to block the robot's moving path; when the number of obstacle point cloud points on at least one of the left and right sides of the fifth area 320 is less than the seventh threshold, it can be characterized that there is an obstacle on only one of the left and right sides of the fifth area 320, or the distance between one obstacle and the robot is far and will not block the robot's moving path, or there is no obstacle on both sides of the fifth area 320. In the case that there is no obstacle in the fifth area 320, or the obstacle is not enough to block the robot's moving path, the robot can be controlled to accelerate. In the case that there is an obstacle on one of the left and right sides of the fifth area 320, the route design can be replanned to avoid the obstacle according to the other side where there is no obstacle, and acceleration can also be performed during the path avoidance process. Since the speed interval of the robot during movement is fixed, in order to avoid the robot accelerating to the maximum value of the current speed interval and not being able to continue to accelerate, the speed interval is adjusted to the sixth speed interval. The eighth threshold value may be any value from 14 to 20, and the eighth threshold value may be the same as or different from the sixth threshold value. The sixth speed threshold value may be any value from 1 m / s to 3 m / s, but since the sixth speed threshold value is greater than the fifth speed threshold value, if the fifth speed threshold value is 1.5 m / s, the fifth speed threshold value can only be within the range of 1.5 m / s to 3 m / s (excluding 1.5 m / s).
[0180] It can be understood that the second area, the sub-area of the second area, the third area, the fourth area 310 and the fifth area 320 are all set in the same manner as the first area, and can be rectangular areas or semicircular areas. They can generally be of a uniform shape, but can also be of different shapes. Taking the second area and its sub-area as an example, the sub-area of the second area can be a semicircular area, and the second area can be a rectangular area. Specifically, the longitudinal distance of the second area in the forward direction of the robot is less than or equal to the second longitudinal distance threshold, and the vertical distances between the two sides of the second area and the side closest to the robot are both less than or equal to the second lateral distance threshold. For example, the second longitudinal distance threshold is 1.5m, and the second lateral distance threshold is 0.6m. In this case, if the lateral dimension of the robot is 0.3m, the lateral dimension of the first area is 0.6+0.3+0.6=1.5m, and the longitudinal dimension is 1.5m. The sub-area of the second area can be a semicircle with the robot's laser radar as the origin and the third longitudinal distance threshold as the radius in the forward direction. The third longitudinal distance threshold can be greater than or equal to the robot's lateral size and less than the second longitudinal distance size. For example, the third longitudinal distance threshold is 0.6m. Other implementations are not repeated here.
[0181] As an optional embodiment, the method further includes:
[0182] Get the robot's moving speed;
[0183] According to the obstacle information in the target area, determine the robot's target speed range, including:
[0184] When the moving speed is greater than or equal to the seventh speed threshold, the target speed range of the robot is determined according to the obstacle information in the target area.
[0185] For example, the target user followed by the robot walks back and forth within a certain range. The actual robot may be stationary, but when the robot identifies that there are obstacles in the downshift range, or there are no obstacles, it will re-determine the target speed interval and perform a gear shift operation, but it is not very meaningful to perform a gear shift operation at this time. Therefore, before determining the target speed interval of the robot based on the obstacle information in the target area, it is possible to determine whether the robot is in a mobile state, that is, the seventh speed threshold can be set to determine whether the robot is in a mobile state. Among them, the seventh speed threshold can be any value from 0.1m / s to 0.7m / s. In addition, the seventh speed threshold can also be determined based on the information of the target area. For example, when the target area is the fourth area 310, the seventh speed threshold is 0.7m / s, and when the target area is the fifth area 320, the seventh speed threshold is 0.3m / s.
[0186] As an optional embodiment, according to the target speed range, controlling the robot to move in the following mode includes:
[0187] In response to a control instruction for controlling the robot to stop suddenly, the robot is controlled to reduce the moving speed in a following mode according to a target speed interval until the robot stops moving.
[0188] For example, see Figure 3 , it can be determined whether to control the robot 600 to make an emergency stop according to the obstacle information in the fourth area 310. Specifically, when the obstacle information in the fourth area 310 indicates that there is an obstacle and the obstacle is very close to the robot 600, the robot is controlled to make an emergency stop. According to the fourth speed interval corresponding to the fourth area 310, the robot is controlled to reduce the moving speed in the following mode until the robot 600 stops moving.
[0189] As an optional embodiment, controlling the robot to reduce the moving speed in the following mode until the robot stops moving, the method further includes:
[0190] In response to the backward instruction, the robot is controlled to perform a backward operation in a follow-up mode according to the backward speed and the backward duration in the backward instruction.
[0191] For example, when the robot recognizes that the target user followed by the robot moves, or recognizes that an obstacle in the fourth area 310 continues to approach the robot, the robot can be controlled to perform a backward operation in the follow mode according to the backward speed and backward duration in the backward instruction. The backward speed and backward duration are decisions made by the robot in a specific scenario and are not limited here.
[0192] As an optional embodiment, the method further includes:
[0193] Before determining the target speed range of the robot according to the obstacle information in the target area, obtaining the current speed range of the robot;
[0194] According to the obstacle information in the target area, determine the robot's target speed range, including:
[0195] Determine the candidate speed range of the robot based on the obstacle information in the target area;
[0196] When the current speed interval is consistent with the candidate speed interval, determining the current speed interval as the target speed interval;
[0197] When the current speed interval is inconsistent with the candidate speed interval, the candidate speed interval is determined as the target speed interval.
[0198] For example, it is determined whether the current speed interval of the robot is consistent with the candidate speed interval of the robot determined according to the obstacle information in the target area. When the current speed interval is consistent with the candidate speed interval, the current speed interval is determined to be the target speed interval. When the current speed interval is inconsistent with the candidate speed interval, the candidate speed interval is determined to be the target speed interval.
[0199] Specifically, when the current speed interval is consistent with the candidate speed interval, the robot is controlled not to perform an adjustment operation for the current speed interval.
[0200] As an optional embodiment, when the current speed interval is inconsistent with the candidate speed interval, in response to an adjustment instruction for the current speed interval, the robot is controlled to perform an adjustment operation for the current speed interval.
[0201] Specifically, the speed interval is adjusted only when the current speed interval is inconsistent with the candidate speed interval. When the current speed interval is consistent with the candidate speed interval, the speed interval is not adjusted, thereby avoiding unnecessary switching that causes the robot to respond more slowly.
[0202] Figure 4 FIG. 1 is a flow chart of another robot control method according to an exemplary embodiment, which specifically includes the following steps:
[0203] S401, the robot starts.
[0204] Among them, the robot is controlled to connect to the power supply and network, and the robot is controlled to start.
[0205] S402: Enable and configure parameters.
[0206] Among them, enabling is to ensure that the function of determining the target speed interval according to obstacle information in the following mode is available, and parameter configuration is to configure the sixth threshold, seventh threshold, eighth threshold, fourth speed threshold, fifth speed threshold and sixth speed threshold corresponding to the fourth interval and the fifth interval.
[0207] S403: Determine whether the system is in the follow mode.
[0208] If the answer is yes, then step S404 is executed; if the answer is no, then the process ends.
[0209] S404, traverse the single-frame laser frame data to obtain the number of obstacle point cloud points in the emergency stop area, the downshift area, and the upshift area of the robot respectively.
[0210] Among them, a single frame of laser frame data is one of the frames in the laser frame data stream acquired by the laser radar, which can be a frame of laser frame data at the current moment. The emergency stop area can be, for example, Figure 3 The fourth region 310 in the downshift region may be, for example, Figure 3 The fifth region 320, while the upshift region may be greater than Figure 3 The area of the fifth area 320.
[0211] S405: Determine whether an emergency stop condition is triggered.
[0212] If the judgment is yes, step S406 is executed, and if the judgment is no, step S410 is executed.
[0213] Specifically, it may be determined that the emergency stop condition is met when the number of obstacle point cloud points in the emergency stop area is greater than or equal to a first quantity threshold, or it may be determined that the emergency stop condition is met when the current moving speed of the robot is greater than a first speed value and the number of obstacle point cloud points in the emergency stop area is greater than or equal to a first quantity threshold. The first quantity threshold may be 15, and the first speed value may be 0.7 m / s.
[0214] S406: Send a stop servo instruction to the motor of the robot.
[0215] The stop servo command is used to control the motor to stop rotating, so as to control the robot to stop moving. The stop servo command can be sent only once, or continuously. For example, the stop servo command can be sent to the motor continuously for 1 second, and the stop servo command can be sent to the motor every 10ms. Continuous sending can ensure that the motor can receive the stop servo command. At the same time, the user can be reminded by the light effect that the robot is about to stop.
[0216] S407: Determine whether the motor has stopped.
[0217] If the answer is yes, then step S408 is executed. If the answer is no, then step S407 is repeated.
[0218] S408: Determine whether to control the robot to move backward.
[0219] If the judgment is yes, then step S409 is executed and then the process returns to step S403; if the judgment is no, then the process directly returns to step S403.
[0220] S409: Send a backward servo instruction to the motor of the robot.
[0221] The backward servo command is used to control the robot to move backward, and the backward duration and backward speed are configured in the backward servo command. The backward servo command can be sent only once, or it can be sent continuously, for example, the backward servo command is sent to the motor continuously for 1 second, and the stop servo command is sent to the motor every 10ms.
[0222] S410: Determine whether a downshift condition is triggered.
[0223] If the judgment is yes, step S411 is executed, and if the judgment is no, step S413 is executed.
[0224] Specifically, it can be determined that the downshift condition is met when the number of obstacle point cloud points in the emergency stop area is less than the first quantity threshold, and the number of obstacle point cloud points on the left and right sides of the downshift area are both greater than or equal to the second quantity threshold, or it can be determined that the downshift condition is met when the current moving speed of the robot is greater than the second speed value, and the number of obstacle point cloud points in the emergency stop area is less than the first quantity threshold, and the number of obstacle point cloud points on the left and right sides of the downshift area are both greater than or equal to the second quantity threshold. The first quantity threshold can be 15, the second quantity threshold can be 7, and the second speed value can be 0.3m / s.
[0225] S411. Determine whether the current speed gear is a downshift gear.
[0226] If the judgment is no, then step S412 is executed and then step S403 is returned. If the judgment is yes, then step S416 is executed. Each speed gear corresponds to a speed interval. The current speed gear is the speed gear currently used by the robot in the follow mode, corresponding to the current speed interval. The downshift gear is the gear with a smaller maximum value of the speed interval.
[0227] S412: Send a downshift command.
[0228] After sending the downshift command, the process returns to step S403. The robot can adjust the speed gear, that is, the speed range, according to the downshift command, and finally adjust to the first target speed range, which is, for example, [0, 1.5] in m / s.
[0229] S413: Determine whether an upshift condition is triggered.
[0230] If the judgment is yes, step S414 is executed, and if the judgment is no, step S416 is executed.
[0231] Specifically, it may be determined that the upshift condition is satisfied when the number of obstacle point cloud points on at least one of the left and right sides in the downshift area is less than the second quantity threshold; it may be determined that the upshift condition is satisfied when the number of obstacle point cloud points on the downshift area is less than the third quantity threshold; it may be determined that the upshift condition is satisfied when the current moving speed of the robot is greater than the third speed value and the number of obstacle point cloud points on at least one of the left and right sides in the downshift area is less than the second quantity threshold; it may be determined that the upshift condition is satisfied when the current moving speed of the robot is greater than the third speed value and the number of obstacle point cloud points in the downshift area is less than the third quantity threshold; it may be determined that the upshift condition is satisfied when the number of obstacle point cloud points in the upshift area is less than the fourth quantity threshold; it may also be determined that the upshift condition is satisfied when the current moving speed of the robot is greater than the third speed value and the number of obstacle point cloud points in the upshift area is less than the fourth quantity threshold. Wherein, the second quantity threshold may be 7, the third quantity threshold may be 15, the fourth quantity threshold may be 15, and the third speed value may be 0.3m / s.
[0232] S414: Determine whether the current speed gear is an upshift gear.
[0233] If the judgment is no, then step S415 is executed and then step S403 is returned. If the judgment is yes, then step S416 is executed. Each speed gear corresponds to a speed interval. The current speed gear is the speed gear currently used by the robot in the follow mode, corresponding to the current speed interval. The up gear is the gear with the larger maximum value of the speed interval.
[0234] S415: Send an upshift command.
[0235] After sending the upshift command, the process returns to step S403. The robot can adjust the speed gear, that is, the speed range, according to the upshift command, and finally adjust to the second target speed range, which is, for example, [0, 3] in m / s.
[0236] S416: Keep the original gear position unchanged, and execute step S403 again after a cycle time T.
[0237] Figure 5 is a block diagram of a robot control device according to an exemplary embodiment. Figure 5 The robot control device 500 includes an acquisition module 510, a determination module 520 and a control module 530.
[0238] The acquisition module 510 is configured to acquire obstacle information around the robot when the robot is in the following mode;
[0239] The determination module 520 is configured to determine the target speed range of the robot according to the obstacle information in the target area, where the target area is the area in the forward direction of the robot;
[0240] The control module 530 is configured to control the robot to move in the following mode according to the target speed range.
[0241] In the disclosed embodiment, when the robot is in the following mode, the target area in the robot's forward direction is combined with the obstacle information in the target area to determine the target speed range of the robot. In this way, the target speed range is obtained in combination with the obstacle information in the target area in the following mode of the robot, and the target speed range is used to control the movement of the robot in the following mode. The movement speed of the robot can be effectively controlled in combination with the scene in human-machine collaboration.
[0242] As an optional embodiment, the determination module 520 includes:
[0243] A first determination submodule is configured to determine the number of obstacle point cloud points in the target area according to the obstacle information in the target area;
[0244] The second determination submodule is configured to determine a target speed range of the robot according to the number of obstacle point cloud points.
[0245] As an optional embodiment, the first determining submodule includes:
[0246] A third determination submodule is configured to determine size information of the target area;
[0247] A fourth determination submodule is configured to determine obstacle point cloud information according to the obstacle information;
[0248] The fifth determination submodule is configured to determine the number of obstacle point cloud points in the target area according to the obstacle point cloud information and size information.
[0249] As an optional embodiment, the fifth determining submodule includes:
[0250] A sixth determination submodule is configured to determine the coordinate information of each point in the obstacle point cloud information in a preset coordinate system according to the obstacle point cloud information;
[0251] The seventh determination submodule is configured to determine the number of obstacle point cloud points in the target area according to the coordinate information and the size information.
[0252] As an optional embodiment, the fifth determining submodule includes:
[0253] an eighth determination submodule, configured to determine the distance between each point in the obstacle point cloud information and the sensor according to the obstacle point cloud information and the size information, the sensor being used to obtain the obstacle point cloud information;
[0254] The ninth determination submodule is configured to determine the number of obstacle point cloud points in the target area according to the distance between each point in the obstacle point cloud information and the sensor.
[0255] As an optional embodiment, the eighth determining submodule is specifically configured as follows:
[0256] According to the obstacle point cloud information, determine the angle information of each point in the obstacle point cloud information, the angle information represents the angle between the connecting line between each point in the obstacle point cloud information and the sensor and the target reference line, the target reference line is a reference line horizontally and vertically to the forward direction of the robot;
[0257] According to the angle information and size information, the distance between each point in the obstacle point cloud information and the sensor is determined.
[0258] As an optional embodiment, the target area is the first area, and the second determination submodule is specifically configured as follows:
[0259] When the number of obstacle point cloud points is greater than or equal to the first threshold, the target speed interval is determined to be the first speed interval, wherein the speed value of the first speed interval is less than or equal to the first speed threshold.
[0260] As an optional embodiment, the target area is the second area, the second area includes sub-areas, and the second determination submodule is specifically configured as follows:
[0261] When the number of obstacle point cloud points in the sub-area is less than the second threshold and the number of obstacle point cloud points on the left and right sides of the second area are both greater than or equal to the third threshold, the target speed interval is determined to be the second speed interval, wherein the third threshold is less than the second threshold, and the speed value of the second speed interval is less than or equal to the second speed threshold.
[0262] As an optional embodiment, the target area is the third area, and the second determination submodule is specifically configured as follows:
[0263] When the number of obstacle point cloud points in the third area is less than the fourth threshold, or the number of obstacle point cloud points on at least one of the left and right sides in the third area is less than the fifth threshold, the target speed interval is determined to be the third speed interval, wherein the fifth threshold is less than the fourth threshold, and the speed value of the third speed interval is less than or equal to the third speed threshold.
[0264] As an optional embodiment, the target area includes the fourth area and the fifth area, and the fifth area includes the fourth area, and the second determining submodule is specifically configured as follows:
[0265] When the number of obstacle point cloud points in the fourth area is greater than or equal to the sixth threshold, determining the target speed interval to be the fourth speed interval, and the speed value of the fourth speed interval is less than or equal to the fourth speed threshold;
[0266] When the number of obstacle point cloud points in the fourth area is less than the sixth threshold, and the number of obstacle point cloud points on the left and right sides of the fifth area are both greater than or equal to the seventh threshold, the target speed interval is determined to be the fifth speed interval, wherein the seventh threshold is less than the sixth threshold, the speed value of the fifth speed interval is less than or equal to the fifth speed threshold, and the fifth speed threshold is greater than the fourth speed threshold;
[0267] When the number of obstacle point cloud points in the fifth area is less than the eighth threshold, or the number of obstacle point cloud points on at least one of the left and right sides in the fifth area is less than the seventh threshold, the target speed interval is determined to be the sixth speed interval, wherein the seventh threshold is less than the eighth threshold, the speed value of the sixth speed interval is less than or equal to the sixth speed threshold, and the sixth speed threshold is greater than the fifth speed threshold.
[0268] As an optional embodiment, the robot control device 500 further includes:
[0269] A first speed acquisition module is configured to acquire the moving speed of the robot before determining the target speed range of the robot according to the obstacle information in the target area;
[0270] The determination module 520 is specifically configured to:
[0271] When the moving speed is greater than or equal to the seventh speed threshold, the target speed range of the robot is determined according to the obstacle information in the target area.
[0272] As an optional embodiment, the control module 530 includes:
[0273] The emergency stop module is configured to respond to a control instruction for controlling the robot to stop urgently, and control the robot to reduce the moving speed in the following mode according to a target speed range until the robot stops moving.
[0274] As an optional embodiment, the robot control device 500 further includes:
[0275] The backward module is configured to respond to the backward instruction and control the robot to perform a backward operation in the follow-up mode according to the backward speed and the backward duration in the backward instruction.
[0276] As an optional embodiment, the robot control device 500 further includes:
[0277] A second speed acquisition module is configured to acquire a current speed interval of the robot before determining a target speed interval of the robot according to obstacle information in a target area;
[0278] The determination module 520 is specifically configured to:
[0279] Determine the candidate speed range of the robot based on the obstacle information in the target area;
[0280] When the current speed interval is consistent with the candidate speed interval, the current speed interval is determined as the target speed interval.
[0281] As an optional embodiment, the robot control device 500 further includes:
[0282] The first control submodule is configured to control the robot not to perform an adjustment operation for the current speed interval when the current speed interval is consistent with the candidate speed interval.
[0283] As an optional embodiment, the determination module 520 is specifically configured to:
[0284] When the current speed interval is inconsistent with the candidate speed interval, the candidate speed interval is determined as the target speed interval.
[0285] As an optional embodiment, the robot control device 500 further includes:
[0286] The second control submodule is configured to control the robot to perform an adjustment operation for the current speed interval in response to an adjustment instruction for the current speed interval when the current speed interval is inconsistent with the candidate speed interval.
[0287] Regarding the robot control device 500 in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the robot control method, and will not be elaborated here.
[0288] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, and the program instructions, when executed by a processor, implement the robot control method provided by the present disclosure.
[0289] The present disclosure also provides a robot, comprising:
[0290] a storage device including a computer program;
[0291] A processing device is used to execute the computer program to implement the robot control method provided by the present disclosure.
[0292] Figure 6is a block diagram of a robot 600 according to an exemplary embodiment, referring to Figure 6 The robot 600 may include one or more of the following components: a first processing component 602 , a first memory 604 , a first power component 606 , a multimedia component 608 , an audio component 610 , a first input / output interface 612 , a sensor component 614 , and a communication component 616 .
[0293] The first processing component 602 generally controls the overall operation of the robot 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The first processing component 602 may include one or more first processors 620 to execute instructions to complete all or part of the steps of the control method of the above-mentioned robot. In addition, the first processing component 602 may include one or more modules to facilitate the interaction between the first processing component 602 and other components. For example, the first processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the first processing component 602.
[0294] The first memory 604 is configured to store various types of data to support operations on the robot 600. Examples of such data include instructions for any application or method operating on the robot 600, contact data, phone book data, messages, pictures, videos, etc. The first memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0295] The first power supply assembly 606 provides power to various components of the robot 600. The first power supply assembly 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the robot 600.
[0296] The multimedia component 608 includes a screen that provides an output interface between the robot 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the robot 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0297] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the robot 600 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the first memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
[0298] The first input / output interface 612 provides an interface between the first processing component 602 and a peripheral interface module, which may be a keyboard, a click wheel, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0299] The sensor assembly 614 includes one or more sensors for providing various aspects of the status assessment of the robot 600. For example, the sensor assembly 614 can detect the open / closed state of the robot 600, the relative positioning of components, such as the display and keypad of the robot 600, the sensor assembly 614 can also detect the position change of the robot 600 or a component of the robot 600, the presence or absence of user contact with the robot 600, the orientation or acceleration / deceleration of the robot 600, and the temperature change of the robot 600. The sensor assembly 614 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 614 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0300] The communication component 616 is configured to facilitate wired or wireless communication between the robot 600 and other devices. The robot 600 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0301] In an exemplary embodiment, the robot 600 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the above-mentioned robot control method.
[0302] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a first memory 604 including instructions, and the instructions can be executed by a first processor 620 of the robot 600 to complete the control method of the robot. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0303] In another exemplary embodiment, a computer program product is also provided. The computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for executing the above-mentioned robot control method when executed by the programmable device.
[0304] Figure 7 is a block diagram of a device 700 for implementing a robot control method according to an exemplary embodiment. For example, the device 700 may be provided as a server. Figure 7 The apparatus 700 includes a second processing component 722, which further includes one or more processors, and a memory resource represented by a second memory 732 for storing instructions executable by the second processing component 722, such as an application. The application stored in the second memory 732 may include one or more modules, each corresponding to a set of instructions. In addition, the second processing component 722 is configured to execute the instructions to perform the control method of the robot.
[0305] The device 700 may further include a second power supply component 726 configured to perform power management of the device 700, a wired or wireless network interface 750 configured to connect the device 700 to a network, and a second input / output interface 758. The device 700 may operate based on an operating system stored in the second memory 732, such as Windows Server 2000. TM , MacOS X TM , Unix TM , Linux TM , FreeBSD TM or similar.
[0306] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0307] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A robot control method, characterized in that: include: When the robot is in a following mode, obtaining obstacle information around the robot; Determine a target speed range of the robot according to obstacle information in a target area, wherein the target area is an area in the forward direction of the robot; According to the target speed range, controlling the robot to move in the following mode; The step of determining the target speed range of the robot according to obstacle information in the target area includes: Determine the number of obstacle point cloud points in the target area according to the obstacle information in the target area; According to the number of points in the obstacle point cloud, a target speed range of the robot is determined.
2. The control method according to claim 1, characterized in that: Determining the number of obstacle point cloud points in the target area according to the obstacle information in the target area includes: Determining size information of the target area; Determining obstacle point cloud information according to the obstacle information; The number of obstacle point cloud points in the target area is determined according to the obstacle point cloud information and the size information.
3. The control method according to claim 2, characterized in that: Determining the number of obstacle point cloud points in the target area according to the obstacle point cloud information and the size information includes: Determine, according to the obstacle point cloud information, the coordinate information of each point in the obstacle point cloud information in a preset coordinate system; The number of obstacle point cloud points in the target area is determined according to the coordinate information and the size information.
4. The control method according to claim 2, characterized in that: Determining the number of obstacle point cloud points in the target area according to the obstacle point cloud information and the size information includes: Determining, according to the obstacle point cloud information and the size information, a distance between each point in the obstacle point cloud information and a sensor, wherein the sensor is used to obtain the obstacle point cloud information; The number of obstacle point cloud points in the target area is determined according to the distance between each point in the obstacle point cloud information and the sensor.
5. The control method according to claim 4, characterized in that: Determining the distance between each point in the obstacle point cloud information and the sensor according to the obstacle point cloud information and the size information includes: According to the obstacle point cloud information, determine the angle information of each point in the obstacle point cloud information, wherein the angle information represents the angle between the connecting line between each point in the obstacle point cloud information and the sensor and the target reference line, wherein the target reference line is a reference line that is horizontally perpendicular to the forward direction of the robot; The distance between each point in the obstacle point cloud information and the sensor is determined according to the angle information and the size information.
6. The control method according to claim 1, characterized in that: The target area is a first area, and determining the target speed range of the robot according to the number of points in the obstacle point cloud includes: When the number of points in the obstacle point cloud is greater than or equal to a first threshold, the target speed interval is determined to be a first speed interval, wherein a speed value in the first speed interval is less than or equal to a first speed threshold.
7. The control method according to claim 1, characterized in that: The target area is a second area, the second area includes sub-areas, and the determining the target speed range of the robot according to the number of points in the obstacle point cloud includes: When the number of obstacle point cloud points in the sub-area is less than a second threshold and the number of obstacle point cloud points on the left and right sides of the second area are both greater than or equal to a third threshold, the target speed interval is determined to be a second speed interval, wherein the third threshold is less than the second threshold, and the speed value of the second speed interval is less than or equal to the second speed threshold.
8. The control method according to claim 1, characterized in that: The target area is a third area, and determining the target speed range of the robot according to the number of points in the obstacle point cloud includes: When the number of obstacle point cloud points in the third area is less than a fourth threshold, or the number of obstacle point cloud points on at least one of the left and right sides of the third area is less than a fifth threshold, the target speed interval is determined to be a third speed interval, wherein the fifth threshold is less than the fourth threshold, and the speed value of the third speed interval is less than or equal to the third speed threshold.
9. The control method according to claim 1, characterized in that: The target area includes a fourth area and a fifth area, and the fifth area includes the fourth area, and determining the target speed range of the robot according to the number of points in the obstacle point cloud includes: When the number of obstacle point cloud points in the fourth area is greater than or equal to a sixth threshold, determining that the target speed interval is a fourth speed interval, and the speed value of the fourth speed interval is less than or equal to a fourth speed threshold; When the number of obstacle point cloud points in the fourth area is less than the sixth threshold, and the number of obstacle point cloud points on the left and right sides of the fifth area are both greater than or equal to the seventh threshold, determining that the target speed interval is the fifth speed interval, wherein the seventh threshold is less than the sixth threshold, the speed value of the fifth speed interval is less than or equal to the fifth speed threshold, and the fifth speed threshold is greater than the fourth speed threshold; When the number of obstacle point cloud points in the fifth area is less than the eighth threshold, or the number of obstacle point cloud points on at least one of the left and right sides in the fifth area is less than the seventh threshold, the target speed interval is determined to be a sixth speed interval, wherein the seventh threshold is less than the eighth threshold, the speed value of the sixth speed interval is less than or equal to the sixth speed threshold, and the sixth speed threshold is greater than the fifth speed threshold.
10. The control method according to any one of claims 1 to 9, characterized in that: The method further comprises: Obtaining the moving speed of the robot; Determining a target speed range of the robot according to obstacle information in a target area includes: When the moving speed is greater than or equal to a seventh speed threshold, a target speed range of the robot is determined according to obstacle information in the target area.
11. The control method according to any one of claims 1 to 9, characterized in that: According to the target speed range, controlling the robot to move in the following mode includes: In response to a control instruction for controlling the robot to stop suddenly, the robot is controlled to reduce a moving speed in the following mode according to the target speed range until the robot stops moving.
12. The control method according to claim 11, characterized in that: Controlling the robot to reduce the moving speed in the following mode until the robot stops moving, the method further includes: In response to a backward instruction, the robot is controlled to perform a backward operation in the following mode according to a backward speed and a backward duration in the backward instruction.
13. The control method according to any one of claims 1 to 9, characterized in that: The method further comprises: Before determining the target speed range of the robot according to the obstacle information in the target area, obtaining the current speed range of the robot; Determining a target speed range of the robot according to obstacle information in a target area includes: Determining a candidate speed range of the robot according to obstacle information in the target area; When the current speed interval is consistent with the candidate speed interval, the current speed interval is determined to be the target speed interval.
14. The control method according to claim 13, characterized in that: The method further comprises: When the current speed section is consistent with the candidate speed section, the robot is controlled not to perform an adjustment operation for the current speed section.
15. The control method according to claim 13, characterized in that: Determining the target speed range of the robot according to obstacle information in the target area also includes: Determine a candidate speed interval of the robot according to obstacle information in a target area; and determine the candidate speed interval as the target speed interval when the current speed interval is inconsistent with the candidate speed interval.
16. The control method according to claim 15, characterized in that: The method further comprises: When the current speed section is inconsistent with the candidate speed section, in response to an adjustment instruction for the current speed section, the robot is controlled to perform an adjustment operation for the current speed section.
17. A robot control device, characterized in that: include: An acquisition module is configured to acquire obstacle information around the robot when the robot is in a following mode; A determination module is configured to determine a target speed range of the robot according to obstacle information in a target area, wherein the target area is an area in a forward direction of the robot; A control module, configured to control the robot to move in the following mode according to the target speed interval; The modules are determined to include: A first determination submodule is configured to determine the number of obstacle point cloud points in the target area according to the obstacle information in the target area; The second determination submodule is configured to determine a target speed range of the robot according to the number of points in the obstacle point cloud.
18. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the robot control method described in any one of claims 1-16 is implemented.
19. A robot, characterized in that: include: a storage device including a computer program; A processing device, used to execute the computer program to implement the robot control method described in any one of claims 1-16.
Citation Information
Patent Citations
Indoor adaptive panoramic obstacle avoidance method and system based on multi-line laser radar
CN114815821A
Robot obstacle avoidance method and system, storage medium and electronic equipment
CN115993828A
