Method, system, robot and storage medium for edge behavior control
By acquiring and processing sensor feedback events and historical combined forces, the robot can accurately determine the target direction and adjust its position, solving the problem of being unable to detach in complex scenarios and achieving effective edge-side behavior control.
Patent Information
- Application Number
- CN202211105827.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-09
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-09-09
AI Technical Summary
When robots encounter complex scenarios, they are unable to detect the appropriate direction and get stuck in a loop, unable to escape the complex scenario.
By acquiring signals from multiple sensors when they detect obstacles or specific areas, reaction events are generated. By combining the combined forces of current and historical events, the robot's target direction is determined, and the robot's position is adjusted to move along the target direction.
This solves the problem of robots being unable to escape from complex scenarios, enabling robots to move accurately along the target direction and avoid getting stuck in a dead loop.
Smart Images

Figure CN116483063B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of robot control, and in particular to an edge-following behavior control method and system, a robot, and a storage medium. BACKGROUND
[0002] Currently, robots are increasingly widely used in our daily production and life. Some self-moving robots can move along the edge of obstacles, i.e., move along the edge of obstacles.
[0003] However, when a self-moving robot passively moves along the edge, it may fall into a dead loop of reciprocating motion if it encounters some complex scenarios and cannot detect a new target direction. For example, the two ends of two obstacles are connected to form a scenario with a certain angle (which can be an acute angle). When the robot enters such a scenario from which it cannot escape, it cannot detect a suitable direction and thus falls into a dead loop of behavior. SUMMARY
[0004] The present application provides an edge-following behavior control method and system, a robot, and a storage medium, which are designed to enable a robot to escape from some complex scenarios.
[0005] In a first aspect, the present application provides an edge-following behavior control method applied to a robot, wherein a plurality of sensors are arranged on the robot, and the method comprises:
[0006] obtaining a reaction event, wherein the reaction event is generated by signals fed back when a plurality of sensors received by the robot detect an obstacle or a specific area, and the specific area includes a forbidden area and / or a base station area;
[0007] obtaining a first resultant force generated by the robot when the reaction event occurs;
[0008] obtaining a second resultant force generated by the robot when a reaction event at a historical time occurs;
[0009] determining a target direction of the robot according to the first resultant force and the second resultant force.
[0010] In a second aspect, the present application also provides an edge-following behavior control system, which comprises a robot, sensors arranged on the robot, and a controller, and the controller can implement the steps of the edge-following behavior control method.
[0011] In a third aspect, the present application also provides a robot, which comprises:
[0012] an obstacle detection module;
[0013] a moving module; and
[0014] A control device, the obstacle detection module and the moving module are connected with the control device, the control device comprises a memory, a processor and a robot control program stored in the memory and executable on the processor, the robot control program is executed by the processor to realize the steps of the edge behavior control method.
[0015] In a fourth aspect, the present application further provides a computer readable storage medium, the computer readable storage medium stores a computer program, wherein the computer program is executed by a processor to realize the steps of the edge behavior control method.
[0016] The present application provides an edge behavior control method, system, robot and storage medium, the present application can obtain the reaction event generated by each sensor when the robot moves along the edge, and the historical state reaction event, and calculate the resultant force of the current reaction event and the historical reaction event, thereby determining the target direction of the robot, and adjusting the position of the robot, so that the robot can move along the target direction, solving the problem that the robot cannot escape from the complex scene because it fails to detect a suitable direction. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0018] Figure 1 A flowchart of an edge behavior control method provided by an embodiment of the present application is shown in the figure.
[0019] Figure 2 A flowchart of a sub-step of an edge behavior control method provided by an embodiment of the present application is shown in the figure.
[0020] Figure 3 Another flowchart of a sub-step of an edge behavior control method provided by an embodiment of the present application is shown in the figure.
[0021] Figure 4 Another flowchart of a sub-step of an edge behavior control method provided by an embodiment of the present application is shown in the figure.
[0022] Figure 5 A schematic diagram of the first repulsive force in an edge behavior control method provided by an embodiment of the present application is shown in the figure.
[0023] Figure 6A schematic diagram of the first attractive force in the edge-following behavior control method provided for the embodiments of the present application;
[0024] Figure 7 A schematic diagram of calculating the resultant force, attractive force and repulsive force in the edge-following behavior control method provided for the embodiments of the present application;
[0025] Figure 8a A first state schematic diagram of the robot touching the wall without considering the historical state provided for the embodiments of the present application;
[0026] Figure 8b A second state schematic diagram of the robot touching the wall without considering the historical state provided for the embodiments of the present application;
[0027] Figure 8c A third state schematic diagram of the robot touching the wall without considering the historical state provided for the embodiments of the present application;
[0028] Figure 8d A fourth state schematic diagram of the robot touching the wall without considering the historical state provided for the embodiments of the present application;
[0029] Figure 9a A first state schematic diagram of the robot touching the wall considering the historical state provided for the embodiments of the present application;
[0030] Figure 9b A second state schematic diagram of the robot touching the wall considering the historical state provided for the embodiments of the present application;
[0031] Figure 9c A third state schematic diagram of the robot touching the wall considering the historical state provided for the embodiments of the present application;
[0032] Figure 9d A fourth state schematic diagram of the robot touching the wall considering the historical state provided for the embodiments of the present application;
[0033] Figure 9e A fifth state schematic diagram of the robot touching the wall considering the historical state provided for the embodiments of the present application;
[0034] Figure 10 A structural schematic block diagram of a computer device provided for the embodiments of the present application. DETAILED DESCRIPTION
[0035] With reference to the drawings, the technical solutions in the embodiments of the present application will be clearly and completely described below. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of the present application.
[0036] The flowcharts shown in the drawings are only illustrative, and do not necessarily include all the contents and operations / steps, nor are they necessarily executed in the order described. For example, some operations / steps can be further decomposed, combined or partially merged, so the actual execution order can be changed according to the actual situation.
[0037] Some embodiments of the present application will be described in detail below with reference to the drawings. The following embodiments and features in the embodiments can be combined with each other without conflict.
[0038] In order to facilitate understanding of the present application, some special terms will be explained first.
[0039] Active edge following: refers to that the robot perceives the distance and angle deviation between itself and the "edge" to be followed, and compares the distance and angle deviation with preset values, and triggers the active edge following instruction through the comparison result. The robot adjusts the movement direction of the robot in an active manner, so that the distance and angle deviation between the robot and the "edge" to be followed is equal to or approximately equal to the preset distance and preset angle value. The preset distance is the distance between the robot and the "edge" to be followed, which is set by a person in advance. The preset angle value is the angle deviation between the movement direction of the robot and the "edge" to be followed, which is set by a person in advance.
[0040] Passive edge following: the robot receives reaction events (i.e. reaction), and adjusts the movement direction of the robot in a passive manner through fusion processing of all reaction events at this moment.
[0041] Reaction event: can be generated by detecting / colliding with obstacles or specific areas by multiple sensors preset on the robot.
[0042] The multiple sensors include bumper (safety touch edge sensor), cliff (cliff sensor), ultrasonic wave, radar cover bumper, front tof, etc. The TOF (Time of Flight) technology is to emit infrared light source to the measured object, the light wave is reflected back by the object, and then collected by the sensor, and the system calculates the pulse difference or time difference of the received light wave, thereby calculating the distance between the measured object and the camera. Multiple sensors of different types are arranged on each robot, and multiple sensors of each type can also be arranged.
[0043] Specific area: can include the area set by human on the robot built-in map and forbidden area, etc. The area set on the robot built-in map, for example, is a specified cleaning area.
[0044] Embodiments of the present application provide a method, system, robot and storage medium for edge-following behavior control, which can determine the target direction of the robot and adjust the position of the robot, so that the robot can move along the target direction, and solve the problem that the robot cannot escape from a complex scene because it fails to detect a suitable direction.
[0045] When a reaction event occurs, the factors that need to be considered when the robot adjusts the direction mainly include the following three:
[0046] (1) The force of the robot avoiding the current obstacle.
[0047] (2) The force of the robot next time towards the edge of the current obstacle, so that the robot can smoothly complete the next exploration of the edge.
[0048] (3) Avoiding the reaction event triggered at the historical moment.
[0049] Therefore, if the above three factors are considered comprehensively, the target direction of the robot can be determined more accurately.
[0050] Therefore, in the edge-following behavior control method provided by the embodiments of the present application, the above three factors are considered, so that the target direction can be determined more accurately.
[0051] Please refer to Figure 1 , Figure 1 The flowchart of the edge-following behavior control method provided by the embodiments of the present application. The edge-following behavior control method is applied to a robot, a plurality of sensors are arranged on the robot, and the method comprises steps S100 to S400.
[0052] Step S100, obtaining a reaction event, wherein the reaction event is generated by the robot receiving a signal fed back when the sensor detects an obstacle or a specific area, and the specific area includes a forbidden area and / or a base station area.
[0053] The sensor can send a detection signal to the front of the movement direction, and when an obstacle or a specific area is detected, it will return to the robot; at this time, the robot obtains a feedback signal, and the distance between the edge of the obstacle edge or the characteristic area and the robot is less than the preset distance, and the robot generates a reaction event.
[0054] In step S200, the first resultant force generated by the robot when the reaction event occurs is obtained.
[0055] When a reaction event occurs, it indicates that the robot is along the original movement direction, and it is possible to have touched an obstacle or a cliff (i.e., a step) or the like, so the robot can generate a resultant force corresponding to each reaction event to adjust the movement direction of the robot. When multiple reaction events occur, the resultant forces corresponding to each reaction event are synthesized, and a first resultant force is obtained.
[0056] Specifically, referring to Figure 2 illustrated, Figure 2 a flowchart of a sub-step of an edge behavior control method provided for an embodiment of the present application. Step S200 can include:
[0057] S201, obtaining a first attractive force and a first repulsive force currently received by the robot, wherein the first repulsive force is an acting force of the robot avoiding a current obstacle, and the first attractive force is an acting force of the robot next time towards an edge of the current obstacle.
[0058] S202, synthesizing the first attractive force and the first repulsive force to obtain a third resultant force corresponding to a sensor triggering the reaction event.
[0059] It can be understood that when a certain reaction event occurs, the robot generates a resultant force corresponding to a sensor triggering the reaction event, i.e., a third resultant force.
[0060] S203, synthesizing third resultant forces corresponding to all sensors currently triggering reaction events to obtain a first resultant force.
[0061] The robot generates a reaction event according to the feedback signal of the sensor, and generates a corresponding first attractive force and a first repulsive force accordingly. When an obstacle is detected, multiple sensors may detect or touch the obstacle and feed back signals, so that the robot generates multiple first attractive forces and first repulsive forces. Therefore, at the same time, when multiple reaction events occur, the first resultant force is obtained by synthesizing the multiple first attractive forces and first repulsive forces generated by the robot according to the feedback signals sent by the multiple sensors.
[0062] Further, in an embodiment of the present application, obtaining the first attractive force and the first repulsive force currently received by the robot can include: determining the direction of each acting force currently received by the robot based on the position of the sensor and in combination with the direction of the sensor towards the center of the robot; and determining each first repulsive force and first attractive force according to the size of the acting force and the direction of the acting force.
[0063] The plurality of sensors arranged on the robot are each pre-set at a position. When the type of each sensor is known, the position of the sensor arranged on the robot can be known. The magnitude of the force acting on the robot is generally known, because the magnitude of the specific force can be configured and adjusted according to the importance of different sensors.
[0064] Further, in the embodiments of the present application, referring to Figure 3 , a flowchart of another sub-step of the edge behavior control method provided by the embodiments of the present application is shown. Figure 3 Based on the position of the sensor and in combination with the direction of the sensor towards the center of the robot, the first repulsive force currently acting on the robot can be determined, which can include:
[0065] In step S2021, when the reaction event occurs, the direction of the sensor towards the center of the robot corresponding to the reaction event is obtained, to obtain a first direction.
[0066] In step S2022, the force magnitude of the robot in the first direction is obtained, and in combination with the first direction, the first repulsive force is determined.
[0067] The force magnitude of the robot in the first direction can generally be obtained in advance, and at this time, in combination with the force in the first direction, the magnitude of the first repulsive force can be determined.
[0068] Referring to Figure 5 , a schematic diagram of the first repulsive force in the edge behavior control method provided by the embodiments of the present application is shown. Figure 5 The ultrasonic sensor is an ultrasonic sensor, when the ultrasonic sensor detects an obstacle in front, a signal is fed back to the robot, and the robot generates a first repulsive force. The direction of the first magnetic force is the direction of the ultrasonic sensor towards the center of the robot. Similarly, for cliff-1, cliff-2 (cliff sensor), mangnet (magnet sensor), ir (infrared), bumper-1, etc., the magnitude of the first repulsive force corresponding to each sensor can be determined by the same method.
[0069] In addition, it is emphasized that the conditions for triggering the feedback signals of different sensors are different. For example, when the wall is touched, the bumper-1 at this time will be triggered, and if it is a cliff (such as a step), the cliff-1 can be triggered at this time.
[0070] When the sensor detects that there is an obstacle in front of the robot, and the distance between the obstacle and the robot is less than or equal to a preset distance, a signal is fed back to the robot, and the robot also generates a first attractive force. The resultant force obtained by combining the first attractive force and the first repulsive force is the resultant force acting on the robot when the reaction event triggered by the sensor occurs.
[0071] Further, referring to Figure 4 shown, Figure 4 A flowchart of another sub-step of the edge-following behavior control method provided by an embodiment of the present application is shown. The robot has a first side and a second side perpendicular to the first side, and sensors are arranged on the first side and the second side of the robot respectively. The direction in which the robot moves towards the first side is a second direction, and the direction in which the robot moves towards the second side is a third direction. Based on the positions of the sensors and in combination with the directions of the sensors towards the center of the robot, the first attractive force currently acting on the robot is determined, including:
[0072] In step S2023, the first distance between the position of the robot when the current reaction event occurs and the obstacle is calculated.
[0073] In step S2024, the second distance between the position of the robot when the last reaction event occurs and the position of the robot when the current reaction event occurs is calculated.
[0074] In step S2025, when the first distance and the second distance are both less than or equal to a first preset threshold, the direction of the first attractive force is determined according to whether the sensor corresponding to the current reaction event is on the first side or the second side.
[0075] In step S2026, the first attractive force is determined according to the magnitude of the force acting on the robot in the second direction or the third direction and the second direction or the third direction.
[0076] For example, as shown in Figure 5 shown, Figure 5 A schematic diagram of the first repulsive force in the edge-following behavior control method provided by an embodiment of the present application is shown. The second direction can be the left side of the robot, and the third direction can be the front side of the robot. Therefore, Figure 5 When the robot walks along the right side, the sensor on the right side sends a feedback signal, and at this time, the robot can move towards the front. When the sensor on the left side sends a feedback signal, the force generated by the robot is towards the left.
[0077] Further, when the first distance and the second distance are both greater than the preset threshold, the midpoint of the line segment between the position of the robot and the obstacle moves along the perpendicular bisector of the line segment towards the direction of the obstacle, and the direction is the target direction.
[0078] In addition, the influence of the historical state on the robot also needs to be considered, so in the embodiments of the present application, the following is also included:
[0079] In step S300, when a reaction event occurs at a historical time, a second resultant force generated by the robot is obtained.
[0080] Specifically, step S300 includes: obtaining a second repulsive force and a second attractive force received by the robot. The second repulsive force and the second attractive force are combined to obtain a fourth resultant force corresponding to the reaction event. The decay coefficient corresponding to the fourth resultant force received by the robot when each reaction event occurs at a historical time is obtained, and each decay coefficient is multiplied by the fourth resultant force under the same reaction event and summed to obtain a second resultant force.
[0081] In the embodiments of the present application, the historical time can include the time when the robot generates a reaction event in the historical time. For example, the historical time can include the time when the last sensor detects an obstacle, causing the robot to generate a plurality of reaction events, and the time when the last sensor detects an obstacle, causing the robot to generate a plurality of reaction events.
[0082] When considering the historical state, the resultant force at the historical time (i.e. the fourth resultant force after combining the second attractive force and the second repulsive force) also needs to be multiplied by the corresponding decay coefficient. For example, the fourth resultant force at the historical time includes F2, F3, F4... Then multiply each force by the corresponding decay coefficient α∈(0,1), such as: F ‘ 2=F2*α, F ‘ 3=F3*α 2 ... Finally, F ‘ 1, F2 ‘ , F ‘ 3... are combined to obtain a second resultant force, and the direction of the final second resultant force is the target rotation direction of the robot.
[0083] Wherein, the decay coefficient corresponding to each resultant force is α n . Wherein, n represents the frequency of reaction events before the current reaction event occurs.
[0084] Further, the second repulsive force and the second attractive force received by the robot include:
[0085] The position of the sensor when each reaction event occurs at a historical time is obtained; based on the position of the sensor and in combination with the direction of the sensor towards the center of the robot, the second repulsive force and the second attractive force received by the robot are determined, wherein the second repulsive force is the force with which the robot avoids the current obstacle, and the second attractive force is the force with which the robot next time towards the edge of the current obstacle.
[0086] determining the second repulsive force currently suffered by the robot based on the position of the sensor and in combination with the direction of the sensor towards the center of the robot, comprising:
[0087] when the reaction event occurs, obtaining a fourth direction of the sensor towards the center of the robot corresponding to the reaction event; determining the second repulsive force based on the force suffered by the robot in the fourth direction and in combination with the fourth direction.
[0088] The method of obtaining the second repulsive force is basically similar to the method of obtaining the first repulsive force, so it will not be explained here.
[0089] Further, the robot has a third side and a fourth side perpendicular to the third side, the third side and the fourth side of the robot are respectively provided with sensors, the direction of the robot moving towards the third side is a fourth direction, and the direction of the robot moving towards the fourth side is a fifth direction. The second attractive force suffered by the robot is determined based on the position of the sensor and in combination with the direction of the sensor towards the center of the robot, comprising:
[0090] calculating a third distance between the position of the robot when the current reaction event occurs and the obstacle; calculating a fourth distance between the position of the robot when the last reaction event occurs and the position of the robot when the current reaction event occurs; when the third distance and the fourth distance are less than or equal to a second preset threshold, determining the direction of the second attractive force as the fourth direction or the fifth direction according to the third side or the fourth side where the sensor corresponding to the current reaction event is located; and determining the second attractive force based on the force of the robot in the fourth direction or the fifth direction and in combination with the fourth direction or the fifth direction.
[0091] Wherein, the third side can be the right side of the robot, and the fourth side can be the front side of the robot. When the robot walks along the right side, the sensor on the right side sends a feedback signal, and at this time the robot can be directed towards the front. The sensor on the left side sends a feedback signal, and the force generated by the robot is directed towards the left.
[0092] It can be understood that if the robot walks along the left side, the sensor on the left side sends a feedback signal to make the robot generate a reaction event, and at this time the force generated by the robot is directed towards the front. The sensor on the right side sends a feedback signal to make the robot generate a reaction event, and at this time the force generated by the robot is directed towards the right.
[0093] The method further comprises: when the third distance and the fourth distance are greater than the second preset threshold, the direction of the midpoint of the line segment between the position of the robot and the obstacle towards the obstacle is the target direction.
[0094] In order to facilitate the robot to pass through the obstacle, a midpoint between the position of the robot and the obstacle is obtained, a straight line perpendicular to or close to the line segment and passing through the midpoint is determined, and a direction of the straight line is taken as the target direction.
[0095] The second preset threshold is set according to actual conditions, and when the third distance and the fourth distance are both greater than the second preset threshold, it indicates that there is a certain distance between the robot and the obstacle. Therefore, the straight line perpendicular to or close to the line segment and passing through the midpoint can be taken as the target direction.
[0096] S400, according to the first resultant force and the second resultant force, the target direction of the robot is determined.
[0097] After the first resultant force and the second resultant force are combined, the direction of the final resultant force is obtained, and the target direction of the robot is determined at this time. The robot moves along the direction, that is, can pass through the current obstacle.
[0098] Through the above scheme, the reaction events generated by each sensor when detecting the obstacle or the specific area during the edge movement of the current robot and the historical state reaction events can be obtained, and the resultant force of the current reaction event and the historical reaction event is calculated, so as to determine the target direction of the robot and adjust the position of the robot, so that the robot can move along the target direction. The problem that the robot cannot escape from the complex scene because it fails to detect a suitable direction in some complex scenes is solved.
[0099] Referring to Figure 7 , Figure 7 A schematic diagram for calculating the resultant force, attractive force and repulsive force in an edge behavior control method provided by an embodiment of the present application is provided. The following left and right, front and back, and the like are determined with reference to the perspective of Figure 7 . Taking the bumper-1 sensor on the right side of the robot as an example, the robot is right-side edge at this time, so the corresponding attractive force direction is the front of the robot, and the repulsive force is the direction of the bumper-1 sensor towards the center of the robot, and the sizes of the repulsive force and the attractive force are also known. The resultant force is obtained by combining the repulsive force and the attractive force, and the direction is as shown in Figure 4 .
[0100] If the robot adjusts the angle at the current position, it may touch the obstacle. Therefore, in order to enable the robot to safely complete the rotation of a certain angle in place, in an embodiment of the present application, the position of the robot is adjusted, including:
[0101] acquiring a historical speed of the robot; driving the robot to return along a historical route according to the historical speed; and stopping the robot from moving when the reaction event is no longer generated.
[0102] The robot returns along the historical route at the historical speed, so that the robot retreats along the original route, and does not need to retreat along the original route until the current reaction event is removed. In this way, the robot can be maximally guaranteed to return to the scene just passed, and then move forward according to the adjusted target direction to successfully avoid the obstacle.
[0103] When the reaction event occurs, the robot needs to retreat until the reaction event is removed. In order to avoid generating a reaction during the retreat, the robot needs to retreat according to the trajectory of the reaction generated by the robot until the reaction is removed.
[0104] The historical speed and the historical route can be acquired in advance. Specifically, by sending the robot reverse sequence speed history data, the robot can be caused to return along the original route.
[0105] In order to facilitate adjustment of the robot, the method further includes adjusting a moving direction of the robot, so that the robot moves along the target direction, including:
[0106] Adjusting an angular velocity and a linear velocity of the robot, so that the moving direction of the robot is the target direction.
[0107] In the above scheme, by adjusting the angular velocity of the robot, the orientation of the robot can be changed, and by adjusting the linear velocity of the robot, the robot can move forward. The angular velocity and the linear velocity are adjusted in sequence or synchronously, so that the robot can find the target direction as soon as possible and move along the target direction.
[0108] In addition, after the target direction of the robot is determined, the method further includes:
[0109] Adjusting a position of the robot and the moving direction of the robot, so that the robot moves along the target direction.
[0110] In order to facilitate adjustment of the position of the robot, the robot can be stopped from moving before the position of the robot is adjusted. Then the angular velocity of the robot is adjusted to change the moving direction of the robot, and when the moving direction of the robot is the target direction, the linear velocity of the robot is adjusted to make the robot move toward the target direction.
[0111] In order to facilitate understanding of the embodiment, some application scenarios are explained as follows:
[0112] Participation Figure 8a - Figure 8d as shown, Figure 8a - Figure 8dThe history state factor is not considered when the robot moves. Among them, the circular structure is a robot. When the robot moves towards the front (i.e. the dotted arrow part in Figure 8a ), the right side of the robot touches the wall; the bumper-1 sensor on the right side detects the obstacle, at this time, the bumper-1 feedback signal is given to the robot, the robot generates repulsive force towards the front and repulsive force of the bumper-1 towards the center position of the robot, the resultant force is obtained by combining the attractive force and the repulsive force, and the direction of the resultant force is as shown in Figure 8a . The robot can adjust the direction at this time and turn, as shown by the dotted arrow direction in Figure 8b . At this time, the robot still moves forward, and after reaching the position in Figure 8c , the bumper-2 and bumper-1 on the left and right sides of the robot touch the wall, the robot receives the feedback signals of multiple sensors (bumper-2 and bumper-1 respectively), and the robot starts to retreat.
[0113] Figure 9a - Figure 9e The application scenarios of multiple sensors and the history state are considered. Figure 9a In Figure 9a , when the right side of the robot touches the wall, the bumper-1 sensor on the upper right side of the robot detects the obstacle, at this time, the bumper-1 generates repulsive force towards the front and repulsive force of the bumper-1 towards the center position of the robot, and the resultant force is as shown in Figure 9a . The robot adjusts the moving direction according to the direction of the resultant force, Figure 9b , the dotted arrow in Figure 9b represents that the robot starts to turn.
[0114] In Figure 9c , it is explained that the robot moves to the cliff and at the same time the right side touches the wall. At this time, the two sensors send feedback signals, so that the robot generates two pairs of repulsive forces and resultant forces, as shown in Figure 9d . After combining each pair of repulsive force and resultant force, as shown in Figure 9e . Then the robot will retreat to the original position and move along the target direction, so as to avoid the low wall and the cliff.
[0115] In an embodiment of the present application, an edge-following behavior control system is provided, which comprises a robot, a sensor arranged on the robot, and a controller, and the controller can realize the steps of the above-mentioned edge-following behavior control method.
[0116] In an embodiment of the present application, a robot is also provided, comprising: an obstacle detection module; a moving module; and a control device, the obstacle detection module and the moving module being connected to the control device, the control device comprising: a memory, a processor, and a control program of the robot stored in the memory and executable on the processor, the control program of the robot being executed by the processor to implement the steps of the above edge behavior control method.
[0117] It should be noted that, for the convenience and brevity of description, the specific working processes of the above-described device and modules can be referred to the corresponding processes in the above edge behavior control method embodiments, which will not be described here.
[0118] The device provided in the above embodiments can be implemented in the form of a computer program, which can run on a computer device as shown in the specification. Figure 10
[0119] Please refer to Figure 10 , Figure 10 is a structural schematic block diagram of a computer device provided in an embodiment of the present application. The computer device can be a terminal.
[0120] Please refer to Figure 10 , the computer device comprises a processor, a memory and a network interface connected through a system bus, wherein the memory can comprise a non-volatile storage medium and an internal memory.
[0121] The non-volatile storage medium can store an operating system and a computer program. The computer program comprises program instructions, which when executed, can cause the processor to execute any edge behavior control method.
[0122] The processor is configured to provide computing and control capabilities to support the operation of the entire computer device.
[0123] The internal memory provides an environment for the execution of the computer program in the non-volatile storage medium, which when executed by the processor, can cause the processor to execute any edge behavior control method.
[0124] The network interface is configured to perform network communication, such as sending assigned tasks. Those skilled in the art can understand that the structure shown in Figure 10 is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can comprise more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0125] It should be appreciated that a processor can be a central processing unit (CPU), a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like. The general purpose processor can be a microprocessor or the processor can be any conventional processor.
[0126] In one embodiment, a plurality of sensors are disposed on the robot, and the processor is configured to execute a computer program stored in the memory to implement the following steps:
[0127] acquiring a reaction event, wherein the reaction event is generated by signals fed back when the robot receives detection of obstacles or specific areas by the plurality of sensors, the specific areas including forbidden areas and / or base station areas; acquiring a first resultant force generated by the robot when the reaction event occurs; acquiring a second resultant force generated by the robot when a reaction event occurred at a historical time; and determining a target direction of the robot according to the first resultant force and the second resultant force.
[0128] In one embodiment, the processor, after determining the target direction of the robot, is configured to implement:
[0129] adjusting the position of the robot and the moving direction of the robot so that the robot moves along the target direction.
[0130] In one embodiment, the processor, before adjusting the position of the robot, is configured to implement:
[0131] stopping the robot from moving.
[0132] In one embodiment, the processor, when acquiring the first resultant force generated by the robot when the reaction event occurs, is configured to implement:
[0133] obtaining a first attractive force and a first repulsive force currently acting on the robot, wherein the first repulsive force is a force for the robot to avoid a current obstacle, and the first attractive force is a force for the robot to move towards an edge of the current obstacle next time; synthesizing the first attractive force and the first repulsive force to obtain a third resultant force corresponding to a sensor triggering the reaction event; and synthesizing third resultant forces corresponding to all sensors triggering reaction events to obtain a first resultant force.
[0134] In one embodiment, the processor, when implementing the obtaining of the first attractive force and the first repulsive force currently acting on the robot, is configured to implement:
[0135] When the reaction event occurs, obtaining a position of the sensor triggering the reaction event; determining directions of respective forces currently acting on the robot based on the position of the sensor and a direction of the sensor towards a center of the robot; and determining respective first repulsive forces and first attractive forces according to magnitudes of the forces and the directions of the forces.
[0136] In one embodiment, the processor, when implementing the determining of the first repulsive force based on the position of the sensor and the direction of the sensor towards the center of the robot, is configured to implement:
[0137] When the reaction event occurs, obtaining a direction of the sensor corresponding to the reaction event towards a position of the center of the robot to obtain a first direction; obtaining a magnitude of a force in the first direction; and determining the first repulsive force based on the first direction.
[0138] In one embodiment, the robot has a first side and a second side perpendicular to the first side, the first side and the second side of the robot are respectively provided with sensors, a direction in which the robot moves towards the first side is a second direction, and a direction in which the robot moves towards the second side is a third direction; and the processor, when implementing the determining of the first attractive force based on the position of the sensor and the direction of the sensor towards the center of the robot, is further configured to implement:
[0139] calculating a first distance between a position of the robot when the current reaction event occurs and the obstacle; calculating a second distance between the position of the robot when the previous reaction event occurs and the position of the robot when the current reaction event occurs; when the first distance and the second distance are both less than or equal to a first preset threshold, determining a direction of the first attractive force as the second direction or the third direction according to a first side or a second side on which the sensor corresponding to the current reaction event is located; and determining the first attractive force according to a magnitude of a force in the second direction or the third direction and the second direction or the third direction.
[0140] In an embodiment, the processor, when implementing the edge behavior control method, is further configured to determine that, when the first distance and the second distance are both greater than a preset threshold, a midpoint between the position of the robot and the obstacle is the target direction.
[0141] In an embodiment, the processor, when implementing the second resultant force generated by the robot at the time of occurrence of the reaction event at the historical moment, is configured to: obtain the second repulsive force and the second attractive force received by the robot; combine the second repulsive force and the second attractive force to obtain the fourth resultant force corresponding to the reaction event; obtain the decay coefficient corresponding to the fourth resultant force received by the robot at the time of occurrence of each reaction event at the historical moment, and multiply each decay coefficient by the fourth resultant force under the same reaction event and sum them up to obtain the second resultant force.
[0142] In an embodiment, the processor, when implementing the second repulsive force and the second attractive force received by the robot, is configured to: obtain the position of the sensor at the time of occurrence of each reaction event at the historical moment; and determine the second repulsive force and the second attractive force received by the robot based on the position of the sensor and in combination with the direction of the sensor towards the center of the robot, wherein the second repulsive force is the force by which the robot avoids the current obstacle, and the second attractive force is the force by which the robot next time moves towards the edge of the current obstacle.
[0143] In an embodiment, the processor, when implementing the determination of the second repulsive force currently received by the robot based on the position of the sensor and in combination with the direction of the sensor towards the center of the robot, is configured to: obtain the fourth direction of the sensor towards the center of the robot corresponding to the reaction event at the time of occurrence of the reaction event; and determine the second repulsive force based on the force received by the robot towards the fourth direction and in combination with the fourth direction.
[0144] In an embodiment, the robot has a third side and a fourth side perpendicular to the third side, the third side and the fourth side of the robot are respectively provided with sensors, the direction in which the robot moves towards the third side is a fourth direction, and the direction in which the robot moves towards the fourth side is a fifth direction; and the processor, when implementing the determination of the second attractive force received by the robot based on the position of the sensor and in combination with the direction of the sensor towards the center of the robot, is configured to:
[0145] calculate a third distance between the position of the robot when the current reaction event occurs and the obstacle; calculate a fourth distance between the position of the robot when the last reaction event occurs and the position of the robot when the current reaction event occurs; when the third distance and the fourth distance are both less than or equal to a second preset threshold, determine the direction of the second attractive force as a fourth direction or a fifth direction according to the third side or the fourth side where the sensor corresponding to the current reaction event is located; and determine the second attractive force according to the size of the force of the robot towards the fourth direction or the fifth direction in combination with the fourth direction or the fifth direction.
[0146] In an embodiment, when implementing the edge-following behavior control method, the processor is configured to implement: when the third distance and the fourth distance are both greater than the second preset threshold, the direction of the midpoint of the line segment between the position of the robot and the obstacle towards the obstacle is the target direction.
[0147] In an embodiment, when implementing the direction of the midpoint of the line segment between the position of the robot and the obstacle towards the obstacle as the target direction, the processor is configured to implement: obtaining the position of the midpoint of the line segment between the position of the robot and the obstacle; determining a straight line that is perpendicular to or close to perpendicular to the line segment and passes through the midpoint position through the midpoint position; and taking the direction of the straight line as the target direction.
[0148] In an embodiment, when implementing adjusting the position of the robot, the processor is configured to implement:
[0149] obtaining the historical speed of the robot; driving the robot to return along the historical route according to the historical speed; and stopping the robot from moving when the reaction event no longer occurs.
[0150] In an embodiment, when implementing adjusting the direction of the robot to move along the target direction, the processor is configured to implement: adjusting the angular velocity and the linear velocity of the robot so that the direction of the robot is the target direction.
[0151] An embodiment of the present application also provides a computer readable storage medium storing a computer program, the computer program including program instructions, and the processor executes the program instructions to implement any one of the edge-following behavior control methods provided by the embodiments of the present application.
[0152] The computer readable storage medium can be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. The computer readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like.
[0153] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements shall be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A method for controlling behavior along an edge, characterized in that, Applied to a robot equipped with multiple sensors, the method includes: Acquire reaction events, wherein the reaction events are generated by signals fed back by multiple sensors received by the robot when they detect obstacles or specific areas, the specific areas including restricted areas and / or base station areas; The first resultant force generated by the robot when the reaction event occurs; The second resultant force generated by the robot at the time the reaction event occurred in the historical moment is obtained; The target direction of the robot is determined based on the first resultant force and the second resultant force; Wherein, obtaining the first resultant force generated by the robot when the reaction event occurs includes: The robot is currently subjected to a first gravitational force and a first repulsive force, wherein the first repulsive force is the force that the robot exerts to avoid the current obstacle, and the first gravitational force is the force that the robot exerts on the edge of the current obstacle next time; By combining the first attractive force and the first repulsive force, a third resultant force corresponding to the sensor that triggered the reaction event is obtained; The first resultant force is obtained by synthesizing the third resultant force corresponding to all sensors generated by the current triggering reaction event.
2. The edge behavior control method as described in claim 1, characterized in that, After determining the target orientation of the robot, the method further includes: Adjust the position and direction of the robot so that it moves along the target direction.
3. The edge behavior control method as described in claim 2, characterized in that, Before adjusting the position of the robot, the method further includes: Stop the robot's movement.
4. The edge-behind behavior control method as described in claim 1, characterized in that, The process of obtaining the first gravitational force and the first repulsive force currently acting on the robot includes: When a reaction event occurs, the location of the sensor that generated the reaction event is obtained; Based on the position of the sensor and the direction of the sensor toward the center of the robot, the direction of each force currently acting on the robot is determined. Based on the magnitude and direction of the forces, each of the first repulsive force and the first attractive force is determined.
5. The edge-behind behavior control method as described in claim 4, characterized in that, The determination of the first repulsive force currently experienced by the robot based on the position of the sensor and the direction of the sensor toward the center of the robot includes: When the reaction event occurs, the direction of the sensor toward the center of the robot corresponding to the reaction event is obtained to obtain the first direction; Obtain the magnitude of the force in the first direction, and determine the first repulsive force based on the first direction.
6. The edge behavior control method as described in claim 4, characterized in that, The robot has a first side and a second side perpendicular to the first side. Sensors are respectively installed on the first and second sides of the robot. The direction in which the robot moves toward the first side is a second direction, and the direction in which the robot moves toward the second side is a third direction. Based on the positions of the sensors and in combination with the direction of the sensors toward the center of the robot, a first gravitational force currently acting on the robot is determined, including: Calculate the first distance between the robot's position and the obstacle at the time the current reaction event occurs; Calculate a second distance between the robot's position at the time of the last reaction event and the robot's position at the time of the current reaction event; When both the first distance and the second distance are less than or equal to the first preset threshold, the direction of the first gravitational force is determined to be the second direction or the third direction based on the location of the sensor on the first or second side corresponding to the current reaction event. The first gravitational force is determined based on the magnitude of the force exerted by the robot toward the second or third direction, and the second or third direction.
7. The edge behavior control method as described in claim 6, characterized in that, The method further includes: When both the first distance and the second distance are greater than a preset threshold, the target direction is the direction from the midpoint of the line segment between the robot's position and the obstacle along the perpendicular bisector of that line segment toward the obstacle.
8. The edge behavior control method as described in claim 1, characterized in that, When the reaction event at the historical moment occurs, the second resultant force generated by the robot includes: Obtain the second repulsive force and the second attractive force acting on the robot; By combining the second repulsive force and the second attractive force, a fourth resultant force corresponding to the reaction event is obtained; When each reaction event occurs in the historical time, the attenuation coefficient corresponding to the fourth resultant force on the robot is obtained. Each attenuation coefficient is multiplied by the fourth resultant force under the same reaction event and summed to obtain the second resultant force.
9. The edge behavior control method as described in claim 8, characterized in that, The process of obtaining the second repulsive force and the second attractive force acting on the robot includes: The position of the sensor is acquired at each historical moment when a reaction event occurs; Based on the position of the sensor and the direction of the sensor toward the center of the robot, the second repulsive force and the second attractive force acting on the robot are determined, wherein the second repulsive force is the force that the robot exerts to avoid the current obstacle, and the second attractive force is the force that the robot exerts toward the edge of the current obstacle next time.
10. The edge behavior control method as described in claim 9, characterized in that, The determination of the second repulsive force currently experienced by the robot based on the position of the sensor and the direction of the sensor toward the center of the robot includes: When the reaction event occurs, the sensor corresponding to the reaction event is located in the fourth direction at the center of the robot. The second repulsive force is determined based on the magnitude of the force exerted on the robot in the fourth direction, combined with the fourth direction.
11. The edge behavior control method as described in claim 9, characterized in that, The robot has a third side and a fourth side perpendicular to the third side. Sensors are respectively installed on the third and fourth sides of the robot. The direction in which the robot moves toward the third side is the fourth direction, and the direction in which the robot moves toward the fourth side is the fifth direction. The determination of the second gravitational force acting on the robot based on the positions of the sensors and the direction of the sensors toward the center of the robot includes: Calculate the third distance between the robot's position and the obstacle at the time the current reaction event occurs; Calculate the fourth distance between the robot's position when the last reaction event occurred and the robot's position when the current reaction event occurs; When both the third distance and the fourth distance are less than or equal to the second preset threshold, the direction of the second gravitational force is determined based on the third or fourth side where the sensor corresponding to the current reaction event is located, and is either the fourth or fifth direction. The second gravitational force is determined based on the magnitude of the force exerted by the robot toward the fourth or fifth direction, combined with the fourth or fifth direction.
12. The edge behavior control method as described in claim 11, characterized in that, The method further includes: When both the third distance and the fourth distance are greater than the second preset threshold, the direction in which the midpoint of the line segment between the robot's position and the obstacle points toward the obstacle is the target direction.
13. The edge behavior control method as described in claim 12, characterized in that, The target direction is defined by the direction from the midpoint of the line segment between the robot's position and the obstacle towards the obstacle, including: Obtain the midpoint of the line segment between the robot and the obstacle; The midpoint position is used to determine a straight line that is perpendicular to or nearly perpendicular to the line segment and passes through the midpoint position. The direction in which the straight line lies is taken as the target direction.
14. The edge-behind behavior control method as described in claim 2, characterized in that, Adjusting the position of the robot includes: Obtain the robot's historical speed; Based on the historical speed, the robot is driven to return along the historical route; When the reaction event ceases to be generated, the robot stops moving.
15. The edge-behind behavior control method as described in claim 2, characterized in that, Adjusting the position and direction of movement of the robot to make it move along the target direction includes: Adjust the angular velocity and linear velocity of the robot so that the robot's direction of motion is the target direction.
16. A control system for edge-movement behavior, characterized in that, The device includes a robot, sensors mounted on the robot, and a controller, the controller being capable of implementing the steps of the edge behavior control method as described in any one of claims 1-15.
17. A robot, characterized in that, include: Obstacle detection module; Mobile module; as well as A control device, wherein the obstacle detection module and the movement module are both connected to the control device, the control device comprising: a memory, a processor, and a robot control program stored in the memory and executable on the processor, wherein the robot control program, when executed by the processor, implements the steps of the edge behavior control method as described in any one of claims 1 to 15.
18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the steps of the edge behavior control method as described in any one of claims 1 to 15.
Citation Information
Patent Citations
Method for removing polygonal obstacle for ground mobile robot group
CN102053620A
Robot obstacle avoidance method, device and equipment, and storage medium
CN113031617A