A robot control method, a chip, and a robot

Through lidar or collision sensors, the position of obstacles is judged, the rotation angle and margins are calculated, and the collision problem of D-type robots is solved, achieving efficient turning alignment and reducing leakage sweep.

CN114879663BActive Publication Date: 2025-07-08AMICRO SEMICONDUCTOR CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210419742.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-21
Publication Date
2025-07-08
Estimated Expiration
2042-04-21

AI Technical Summary

Technical Problem

When existing sweeping robot D-type machines encounter obstacles or walls, they are prone to collisions due to insufficient space when turning and alignment, and cannot efficiently complete the cleaning along the edge.

Method used

Use lidar or collision sensor to determine the position of the obstacle in front, calculate the rotation angle and margin required during turn, and adjust the position to avoid directly collide with the obstacle due to insufficient space on the back of the robot.

Benefits of technology

It realizes efficient turning alignment of D-type robots, avoids collisions, reduces the leakage of sweeping caused by excessive turning amplitude, and has a small cost to adjust space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114879663B_ABST
    Figure CN114879663B_ABST
Patent Text Reader

Abstract

The present invention discloses a robot control method, a chip, and a robot. The method includes: Step S1, according to the position of an obstacle ahead, the robot calculates the rotation angle required when turning; Step S2, based on the rotation angle and the body parameters of the robot, the robot calculates the margin that needs to be adjusted when turning; Step S3, based on the margin, the robot adjusts its position according to a preset action and then turns according to the rotation angle. The method determines the position of the obstacle ahead through a lidar or a collision sensor carried by the robot, so as to obtain the rotation angle required when turning. Then, according to the body parameters, the margin that needs to be adjusted when the robot turns is further calculated and the position is adjusted, which can prevent the rear side of the robot from directly colliding with the obstacle due to insufficient space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent robots, and particularly to a robot control method, a chip, and a robot. Background Art

[0002] A floor cleaning robot, also known as an automatic sweeper, intelligent vacuum cleaner, or robot vacuum cleaner, is a type of intelligent household appliance that can automatically clean the floor in a room with a certain degree of artificial intelligence. Generally, it uses a brushing and vacuuming method to first suck up the debris on the ground into its own trash collection box, thus completing the function of floor cleaning. Generally speaking, robots that can complete cleaning, vacuuming, and mopping work are also uniformly classified as floor cleaning robots.

[0003] Currently, floor cleaning robots are mainly circular, and various problems will occur when the edge cleaning method suitable for circular floor cleaning machines is applied to D-shaped machines. When the D-shaped machine encounters an obstacle or a wall along the edge, it needs to turn to align with the obstacle or the wall and continue along the edge. At this time, if it turns directly, there is insufficient space for the rear side of the machine to adjust, and it will directly hit the obstacle or the wall. Summary of the Invention

[0004] To solve the above problems, the present invention provides a robot control method, a chip, and a robot, which can enable the D-shaped robot to efficiently complete the turning alignment action without collision. The specific technical solutions of the present invention are as follows:

[0005] A robot control method, the method includes the following steps: Step S1, according to the position of the obstacle in front, the robot calculates the rotation angle required for turning; Step S2, based on the rotation angle and the body parameters of the robot, the robot calculates the margin that needs to be adjusted during turning; Step S3, based on the margin, the robot adjusts its position according to a preset action, and then turns according to the rotation angle.

[0006] Further, the robot is a D-shaped robot; the D-shaped robot includes a semi-circular head, a rectangular body, and two symmetrically arranged wheels. The two symmetrically arranged wheels are connected by a wheel axle, and the wheel axle is arranged at the boundary line between the head and the body; the D-shaped robot further includes a lidar and / or a collision sensor, wherein the lidar is used to collect the point cloud data of the obstacle, and the collision sensor is arranged at the front end of the head at a preset installation angle and is used to feedback a collision signal when the D-shaped robot has a collision.

[0007] Further, in step S1, the method for the robot to determine the position of the obstacle ahead and calculate the rotation angle required during turning specifically includes: Step S11, the robot obtains the point cloud data of the obstacle ahead through a lidar, and then uses the least squares method to perform linear fitting on the point cloud data to obtain a straight line representing the position of the obstacle ahead; Step S12, take the perpendicular line of the straight line representing the position of the obstacle ahead, and use the included angle between the perpendicular line and the positive direction of the X-axis as the rotation angle required for the robot to turn; wherein, the direction perpendicular to the side of the robot and towards the obstacle on the side of the robot is taken as the positive direction of the X-axis.

[0008] Further, in step S12, the calculation method for the included angle between the perpendicular line and the positive direction of the X-axis is as follows: Take any two points R0(x0, y0) and R1(x1, y1) on the straight line representing the position of the obstacle, and substitute them into the preset formula to calculate the included angle α between the perpendicular line and the positive direction of the X-axis; wherein, the preset formula is α = atan((y1 - y0) / (x1 - x0)) + 90°.

[0009] Further, in step S2, the method for the robot to calculate the margin that needs to be adjusted during turning specifically includes: When the rotation angle α is greater than or equal to 90°,

[0010] d1 = R - D;

[0011] d2 = (R - D) * tan(α - 90°) + (D - H);

[0012] When the rotation angle α is less than 90°, if α is less than arccos(R / D), then

[0013] d1 = R - D;

[0014] d2 = (D - H) - d1 * tan(90° - α);

[0015] If α is greater than or equal to arccos(R / D), then

[0016] d1 = cos(arccos(R / D) - α) * R - D;

[0017] d2 = (D - H) - d1 * tan(90° - α);

[0018] Among them, d1 represents the margin that needs to be adjusted between the side of the robot and the obstacle, d2 represents the margin that needs to be adjusted between the nose of the robot and the obstacle ahead, R represents the longest distance from the midpoint of the wheel axle as the starting point to the boundary of the robot body, D represents half of the width of the robot body, and H represents the maximum radius of the nose.

[0019] Further, in the step S3, the specific method for the robot to adjust its position according to a preset action includes: Step S31, the robot controls the wheel on the side close to the side obstacle to retreat. When the included angle formed by the positions of the wheel axle before and after the movement reaches a preset angle, the retreat stops. Then, it controls the wheel on the other side to retreat until the wheel axle is parallel to the wheel axle of the robot before the position adjustment, completing the adjustment of the side margin between the robot and the obstacle. Wherein, the preset angle is β = arccos(L / (L - d1)), L represents the length of the wheel axle; Step S32, after completing the adjustment of the side margin between the robot and the obstacle, the robot calculates the changing distance between the robot's head and the front obstacle, and subtracts d2 from the changing distance to obtain a difference value. If the difference value is greater than 0, the robot advances the distance of the difference value, otherwise it retreats the distance of the difference value, completing the adjustment of the side margin between the robot's head and the front obstacle. Wherein, the changing distance is d3 = L * sinβ.

[0020] Further, in the step S1, the method for the robot to determine the position of the front obstacle and calculate the rotation angle required during turning specifically includes: When the robot cannot fit a straight line for the front obstacle, if both collision sensors are triggered, the rotation angle α required for the robot to turn is 90°; if the left or right collision sensor is triggered, the rotation angle α required for the robot to turn is equal to the preset installation angle of the collision sensor. Wherein, the robot is equipped with two collision sensors, and the two collision sensors are respectively arranged at the front ends on the left and right sides of the head at the preset installation angle. Wherein, the preset installation angle refers to the included angle between the central axis of the collision sensor and the positive direction of the X-axis. Wherein, the direction towards the side obstacle of the robot and perpendicular to the side of the robot is taken as the positive direction of the X-axis.

[0021] A robot, which is used to implement the described robot control method. The robot includes: a rotation angle calculation module, which is used to calculate the rotation angle required for the robot to turn according to the position of the front obstacle; an adjustment margin calculation module, which is used to calculate the margin that needs to be adjusted for the robot to turn according to the rotation angle and the body parameters of the robot; a turning control module, which is used to adjust the position of the robot according to the preset action according to the margin, and then control the robot to turn according to the rotation angle.

[0022] Further, the robot is a D-shaped robot; the D-shaped robot includes a semi-circular nose, a rectangular fuselage, and two symmetrically arranged wheels. The two symmetrically arranged wheels are connected by an axle, and the axle is arranged at the boundary line between the nose and the fuselage. The D-shaped robot further includes a lidar and / or a collision sensor. Among them, the lidar is used to collect point cloud data of obstacles, and the collision sensor is arranged at the front end of the nose at a preset installation angle and is used to feedback a collision signal when the D-shaped robot collides.

[0023] A chip stores computer program code, and when the computer program code is executed, the steps of the robot control method are implemented.

[0024] The beneficial effects of the present invention are as follows: Compared with the prior art, the method of the present invention determines the position of the front obstacle through the lidar or collision sensor carried by the D-shaped robot, so as to obtain the rotation angle required during turning. Then, according to the fuselage parameters, the margin that needs to be adjusted when the D-shaped robot turns is further calculated and the position is adjusted, which can avoid the direct collision of the rear side of the robot with the obstacle due to insufficient space. The method can enable the robot to efficiently complete the turning alignment action, and the adjustment space cost is small, avoiding the situation that the robot misses scanning due to too large a turning action amplitude. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a schematic diagram of a D-shaped robot.

[0026] Figure 2 It is a schematic flowchart of the robot control method according to an embodiment of the present invention.

[0027] Figure 3 It is a schematic diagram of the robot calculating the rotation angle through the lidar according to an embodiment of the present invention.

[0028] Figure 4 It is a schematic diagram of the robot calculating the rotation angle through the lidar according to another embodiment of the present invention.

[0029] Figure 5 It is a schematic diagram of the process of adjusting the position of the robot according to an embodiment of the present invention.

[0030] Figure 6 It is a schematic diagram of the distance between the robot and the obstacle after adjusting the position according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0031] In the following description, specific details such as specific system architectures, technologies, etc. are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. However, those skilled in the art should understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.

[0032] It should be understood that when used in this application, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations. It should also be understood that the term "and / or" as used in this application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0033] As used in this application, the term "if" can be interpreted as "when" or "once" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "if determined" or "if [the described condition or event] is detected" can be interpreted as meaning "once determined" or "in response to determining" or "once [the described condition or event] is detected" or "in response to detecting [the described condition or event]" depending on the context.

[0034] In addition, in the description of this application, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance. The reference to "an embodiment" or "some embodiments" etc. described in the specification of this application means that a specific feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of this application. Thus, statements such as "in an embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "comprising", "including", "having", and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0035] Currently, floor-sweeping robots are mainly circular, and the edge-cleaning method applicable to circular floor-sweeping machines will have various problems when applied to D-shaped machines. Figure 1 A schematic diagram of a D-shaped machine is shown. When the D-shaped machine encounters an obstacle or a wall along the edge, it needs to turn to align with the obstacle or the wall and continue to move along the edge. At this time, if it turns directly, there is insufficient adjustment space at the rear of the machine, and it will directly hit the obstacle or the wall.

[0036] As shown Figure 1 in FIG. Figure 1 , the D-shaped robot includes a semi-circular nose 1, a rectangular fuselage 2, and two symmetrically arranged wheels 3. The two symmetrically arranged wheels are connected by an axle 4, and the axle 4 is arranged at the boundary line between the nose 1 and the fuselage 2. Among them, the fuselage parameter R represents the maximum radius of the robot with the midpoint of the axle as the center of the circle. In other words, R is the longest distance from the midpoint of the axle as the starting point to the boundary of the robot's fuselage; D represents half of the length of the boundary line between the nose and the fuselage, that is, half of the width of the fuselage; H represents the maximum radius of the nose.

[0037] To solve the above problems, an embodiment of the present invention provides a robot control method, which can enable the D-shaped robot to efficiently complete the turning alignment action without collision. As shown Figure 1 in FIG. Figure 1 , the method includes the following steps:

[0038] Step S1, according to the position of the obstacle in front, the robot calculates the rotation angle required for turning;

[0039] Step S2, based on the rotation angle and the fuselage parameters of the robot, the robot calculates the margin that needs to be adjusted during turning;

[0040] Step S3, based on the margin, the robot adjusts its position according to the preset action, and then turns according to the rotation angle.

[0041] It should be noted that the robot can detect the obstacle in front through a variety of sensors during the process of moving along the edge. For example, the robot judges the situation of the obstacle through the point cloud of the lidar hitting the obstacle, with relatively high accuracy, but the price is relatively expensive and the detection effect for low obstacles is not ideal. Generally, for low obstacles, the robot detects them through a collision sensor ( Figure 1 the number 5 in Figure 1 is the collision sensor), and judges the situation of the obstacle based on the quantity and direction of the collision signals fed back when the robot generates a collision.

[0042] As one of the implementation manners, as shown Figure 3 in FIG. Figure 3 , in the step S1, the method for the robot to determine the position of the obstacle in front and calculate the rotation angle required for turning specifically includes:

[0043] Step S11, the robot obtains the point cloud data of the obstacle in front through the lidar, and then uses the least squares method to linearly fit the point cloud data to obtain a straight line 6 representing the position of the obstacle in front;

[0044] Step S12: Take the perpendicular line 8 to the straight line 6 representing the position of the obstacle in front. The included angle between the perpendicular line 8 and the positive direction of the X-axis is used as the rotation angle α required when the robot turns. Here, the direction perpendicular to the side obstacle 7 of the robot and facing the side of the robot is taken as the positive direction of the X-axis. It should be noted that currently, the main side of the sweeping robot is the right edge. Therefore, the embodiments of the present invention are all described by taking the right-side obstacle as an example.

[0045] During the execution of step S12, the calculation method of the included angle between the perpendicular line 8 and the positive direction of the X-axis is as follows: Take any two points R0(x0, y0) and R1(x1, y1) on the straight line 6 representing the obstacle position, and substitute them into the preset formula to calculate the included angle α between the perpendicular line and the positive direction of the X-axis. The preset formula is α = atan((y1 - y0) / (x1 - x0)) + 90°.

[0046] As another implementation manner, Figure 4 The situation of different rotation angles is shown. The method for obtaining this rotation angle is the same as that in the above embodiment, and it is still to find the included angle between the perpendicular line 8 and the positive direction of the X-axis, that is, α = atan((y1 - y0) / (x1 - x0)) + 90°. It should be noted that in this embodiment, atan((y1 - y0) / (x1 - x0)) is a negative value, and the result obtained after adding 90° conforms to Figure 4 The acute angle α shown.

[0047] Further, in step S2, the method for the robot to calculate the margin that needs to be adjusted when turning specifically includes:

[0048] When the rotation angle α is greater than or equal to 90°,

[0049] d1 = R - D;

[0050] d2 = (R - D) * tan(α - 90°) + (D - H);

[0051] When the rotation angle α is less than 90°,

[0052] If α is less than arccos(R / D), then

[0053] d1 = R - D;

[0054] d2 = (D - H) - d1 * tan(90° - α);

[0055] If α is greater than or equal to arccos(R / D), then

[0056] d1 = cos(arccos(R / D) - α) * R - D;

[0057] d2 = (D - H) - d1 * tan(90° - α);

[0058] Wherein, d1 represents the margin that needs to be adjusted between the side of the robot and the obstacle, d2 represents the margin that needs to be adjusted between the nose of the robot and the front obstacle, R represents the longest distance from the midpoint of the wheel axle as the starting point to the boundary of the robot body, D represents half of the width of the robot body, and H represents the maximum radius of the nose.

[0059] As Figure 5 shown, during the execution of step S3, the specific method for the robot to adjust its position according to the preset action includes:

[0060] Step S31, the robot controls the wheel W1 on the side close to the side obstacle to retreat. When the included angle formed by the positions of the wheel axle before and after the movement reaches the preset angle β, it stops retreating. Then it controls the other wheel W2 to retreat until the wheel axle is parallel to the wheel axle of the robot before adjusting the position, completing the adjustment of the margin between the side of the robot and the obstacle. Refer to Figure 6 , at this time, the robot has adjusted the distance d1 to the left (taking the right edge as an example); wherein, the preset angle is β = arccos(L / (L - d1)), and L represents the length of the wheel axle;

[0061] Step S32, after completing the adjustment of the margin between the side of the robot and the obstacle, the robot calculates the changed distance between the nose of the robot and the front obstacle, and subtracts d2 from the changed distance to obtain a difference value. If the difference value is greater than 0, it indicates that the distance between the robot and the front obstacle is too large at this time, then the robot advances the distance of the difference value. Otherwise, it retreats the distance of the difference value to complete the adjustment of the margin between the nose of the robot and the front obstacle. Refer to Figure 6 , at this time, the robot has adjusted the distance d2 downward; wherein, the changed distance is d3 = L * sinβ.

[0062] It should be noted that d1 and d2 are the minimum distances that the robot needs to maintain from the obstacle when turning theoretically. Among them, refer to Figure 6 , d1 is the vertical distance between the right side of the robot body and the side obstacle, and d2 is the distance from the middle of the nose of the robot to the front obstacle directly ahead. In practical applications, a constant can be added to d1 and d2 to ensure that the robot has enough adjustment space. However, the constant should not be too large to avoid the situation of missed sweeping due to too large a turning amplitude of the robot. In addition, the distances reserved by different robots when moving along the edge and encountering obstacles are not the same. Therefore, the size of the constant needs to be determined according to the actual situation. In the present invention, the constant is taken as 0.

[0063] At this point, the robot has enough adjustment space to turn. At this time, it rotates left (taking the right edge as an example) based on the rotation angle α calculated in step S1, and can align with the obstacle and continue to move along the edge. The method described in the above embodiment can prevent the rear side of the robot from directly colliding with the obstacle due to insufficient space, and the required adjustment space cost is small, and it will not cause missed scanning due to the excessive turning amplitude of the robot.

[0064] As another implementation manner, in the step S1, the method for the robot to determine the position of the obstacle in front and calculate the rotation angle required for turning specifically includes:

[0065] When the robot cannot fit a straight line for the obstacle in front, for example, the obstacle in front is irregular in shape or there are low obstacles that the robot cannot detect through the lidar, resulting in a collision with the obstacle. If both collision sensors are triggered, it indicates that the obstacle is directly in front of the robot. At this time, the rotation angle α required for the robot to turn is 90°; if the left collision sensor is triggered, it indicates that the obstacle is in the front left of the robot. At this time, the rotation angle α required for the robot to turn is equal to the preset installation angle of the collision sensor; if the right collision sensor is triggered, it indicates that the obstacle is in the front right of the robot. At this time, the rotation angle α required for the robot to turn is equal to the preset installation angle of the collision sensor. As Figure 1 shown, the robot is equipped with two collision sensors 5, and the two collision sensors 5 are respectively arranged at the front ends on the left and right sides of the machine head at a preset installation angle; wherein, the preset installation angle refers to the included angle between the central axis (the dotted line on the collision sensor 5) of the collision sensor 5 and the positive direction of the X-axis; wherein, the direction towards the obstacle on the side of the robot and perpendicular to the side of the robot is used as the positive direction of the X-axis.

[0066] An embodiment of the present invention provides a robot, which includes: a rotation angle calculation module, configured to calculate the rotation angle required for the robot to turn according to the position of the obstacle in front; an adjustment margin calculation module, configured to calculate the margin that needs to be adjusted when the robot turns according to the rotation angle and the body parameters of the robot; a turning control module, configured to adjust the position of the robot according to the margin according to a preset action, and then control the robot to turn according to the rotation angle.

[0067] Specifically, as Figure 1As shown, the robot is a D-type robot. The D-type robot includes a semi-circular nose 1, a rectangular fuselage 2, and two symmetrically arranged wheels 3. The two symmetrically arranged wheels are connected by an axle 4, and the axle 4 is arranged at the boundary line between the nose 1 and the fuselage 2. The D-type robot also includes a lidar (not shown in the figure) and / or a collision sensor 5. Among them, the lidar is used to collect the point cloud data of the obstacle and then transmit it to the rotation angle calculation module for calculation. Specifically, the point cloud data is linearly fitted by the least square method to obtain a straight line representing the position of the obstacle. Then, any two points R0(x0,y0) and R1(x1,y1) on the straight line are substituted into the preset formula α = atan((y1 - y0) / (x1 - x0)) + 90° to calculate the rotation angle. The collision sensor is arranged at the front end of the nose at a preset installation angle and is used to feedback a collision signal when the D-type robot collides with a low obstacle, and then judge the position of the obstacle and the rotation angle of the robot according to the number of triggered collision sensors and the preset installation angle.

[0068] The present invention also provides a chip, which stores computer program code. When the computer program code is executed, the steps of the robot control method are implemented. The chip can be assembled on the D-type robot, so that the robot can calculate the margin that needs to be adjusted during turning according to the fuselage parameters and make position adjustments to avoid the direct collision of the rear side of the robot with obstacles due to insufficient space, and the required adjustment space cost is small, and there will be no missed scanning due to the excessive turning amplitude of the robot.

[0069] Those of ordinary skill in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above method embodiments. Among them, the references to memory, storage, database, or other media used in the various embodiments provided in the present application can all include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory ROM, programmable memory PROM, electrically programmable memory DPROM, electrically erasable programmable memory DDPROM, or flash memory. Volatile memories can include random access memory RAM or external cache memory.

[0070] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0071] The above embodiments only illustrate several embodiments of the present invention, and the descriptions thereof are relatively specific and detailed. However, they should not be construed as limitations on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all fall within the protection scope of this application.

Claims

1. A robot control method, characterized in that, The method includes the following steps: Step S1, according to the position of the obstacle in front, the robot calculates the rotation angle required when turning; Step S2, based on the rotation angle and the body parameters of the robot, the robot calculates the margin that needs to be adjusted when turning; Step S3, based on the margin, the robot adjusts its position according to a preset action, and then turns according to the rotation angle; Among them, in the step S1, the method for the robot to determine the position of the obstacle in front and calculate the rotation angle required when turning specifically includes: Step S11, the robot obtains the point cloud data of the obstacle in front through a lidar, and then uses the least squares method to perform linear fitting on the point cloud data to obtain a straight line representing the position of the obstacle in front; Step S12, take the perpendicular line of the straight line representing the position of the obstacle in front, and the included angle between the perpendicular line and the positive direction of the X-axis is used as the rotation angle required when the robot turns; Among them, the direction facing the obstacle on the side of the robot and perpendicular to the side of the robot is used as the positive direction of the X-axis.

2. The robot control method according to claim 1, wherein, The robot is a D-type robot; The D-type robot includes a semi-circular nose, a rectangular body, and two symmetrically arranged wheels. The two symmetrically arranged wheels are connected by a wheel axle, and the wheel axle is arranged at the boundary line between the nose and the body; The D-type robot also includes a lidar and / or a collision sensor, where The lidar is used to collect the point cloud data of the obstacle, The collision sensor is set at the front end of the nose at a preset installation angle and is used to feedback a collision signal when the D-type robot has a collision.

3. A robot control method according to claim 1, wherein, In the step S12, the calculation method of the included angle between the perpendicular line and the positive direction of the X-axis is as follows: Take any two points R0(x0, y0) and R1(x1, y1) on the straight line representing the position of the obstacle, and substitute them into a preset formula to calculate the included angle α between the perpendicular line and the positive direction of the X-axis; among them, the preset formula is α = atan((y1− y0) / (x1 − x0) + 90°).

4. A robot control method according to claim 2, characterized in that In the step S2, the method for the robot to calculate the margin that needs to be adjusted when turning specifically includes: When the rotation angle α is greater than or equal to 90°, d1 = R − D; d2 = (R − D) ∗ tan(α − 90°) + (D − H); When the rotation angle α is less than 90°, If α is less than arccos(R / D), then d1 = R − D; d2 = (D − H) − d1 ∗ tan(90° − α); If α is greater than or equal to arccos(R / D), then d1 = cos(arccos(R / D) − α) ∗ R − D; d2 = (D − H) − d1 ∗ tan(90° − α); Wherein, d1 represents the margin that needs to be adjusted between the side of the robot and the obstacle, d2 represents the margin that needs to be adjusted between the nose of the robot and the front obstacle, R represents the longest distance from the midpoint of the wheel axle as the starting point to the boundary of the robot body, D represents half of the width of the robot body, and H represents the maximum radius of the nose.

5. A robot control method according to claim 4, characterized in that, In the step S3, the specific method for the robot to adjust its position according to the preset action includes: Step S31, the robot controls the wheel on the side close to the side obstacle to retreat. When the included angle formed by the positions of the wheel axle before and after the movement reaches the preset angle, it stops retreating. Then it controls the wheel on the other side to retreat until the wheel axle is parallel to the wheel axle of the robot before adjusting the position, completing the adjustment of the margin between the side of the robot and the obstacle. Wherein, the preset angle is β = arccos(L / (L - d1)), and L represents the length of the wheel axle; Step S32, after completing the adjustment of the margin between the side of the robot and the obstacle, the robot calculates the changed distance between the nose and the front obstacle, and subtracts d2 from the changed distance to obtain a difference value. If the difference value is greater than 0, the robot advances by the distance of the difference value, otherwise it retreats by the distance of the difference value, completing the adjustment of the margin between the nose of the robot and the front obstacle. Wherein, the changed distance is d3 = L * sin β.

6. A robot control method according to claim 2, wherein In the step S1, the method for the robot to determine the position of the front obstacle and calculate the rotation angle required during turning specifically includes: When the robot cannot fit a straight line for the front obstacle, If both collision sensors are triggered, the rotation angle α required for the robot to turn is 90°; If the left or right collision sensor is triggered, the rotation angle α required for the robot to turn is equal to the preset installation angle of the collision sensor; Wherein, the robot is equipped with two collision sensors, and the two collision sensors are respectively arranged at the front ends on the left and right sides of the nose at the preset installation angle; Wherein, the preset installation angle refers to the included angle between the central axis of the collision sensor and the positive direction of the X-axis; Wherein, the direction towards the side obstacle of the robot and perpendicular to the side of the robot is taken as the positive direction of the X-axis.

7. A robot, characterized in that, The robot is used to implement the robot control method according to any one of claims 1 to 6. The robot includes: A rotation angle calculation module, configured to calculate the rotation angle required for the robot to turn according to the position of the front obstacle; A margin adjustment calculation module, configured to calculate the margin that needs to be adjusted for the robot to turn according to the rotation angle and the body parameters of the robot; A turning control module, configured to adjust the position of the robot according to the preset action according to the margin, and then control the robot to turn according to the rotation angle.

8. A robot according to claim 7, characterized in that, The robot is a D-shaped robot; The D-shaped robot includes a semi-circular nose, a rectangular body, and two symmetrically arranged wheels. The two symmetrically arranged wheels are connected by a wheel axle, and the wheel axle is arranged at the boundary line between the nose and the body; The D-shaped robot further includes a lidar and / or a collision sensor, wherein, The lidar is used to collect the point cloud data of obstacles. The collision sensor is arranged at the front end of the nose with a preset installation angle and is used to feedback a collision signal when the D-type robot has a collision.

9. A chip, wherein the chip stores computer program code, characterized in that, When the computer program code is executed, the steps of the robot control method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Self-moving device and movement path control method thereof

    CN109426264A