Robot movement control method based on line laser
By using a cross-line laser module to detect obstacle contour points in real time and perform Bezier curve fitting, the robot can autonomously avoid obstacle collisions and walk smoothly, solving the collision problem in the robot's obstacle avoidance process and achieving collision-free obstacle avoidance and smoothing of obstacle contours.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AMICRO SEMICONDUCTOR CO LTD
- Filing Date
- 2024-07-17
- Publication Date
- 2026-05-05
AI Technical Summary
How can robots autonomously avoid collisions with obstacles during movement and smoothly walk along the contours of obstacles, especially how to determine the position coordinates of the obstacle contours in advance and plan a trajectory with strong continuity?
The robot uses a cross-line laser module to detect the contour points of obstacles in real time, obtain their position coordinates, and generate obstacle fitting curves by fitting Bézier curves. The robot turns and walks around obstacles according to the obstacle fitting curves. The cross-line laser module detects the contour area of obstacles in front of the robot in advance, marks the coordinates of the obstacle contour points, and generates historical coordinate points that can be used for turning and obstacle avoidance.
Without installing collision sensors, the robot achieved collision-free obstacle avoidance, avoiding grid errors caused by directly relying on grid maps for obstacle avoidance. By fitting Bezier curves, the obstacle contours were smoothed, ensuring that the robot avoided collisions with obstacles along the direction before turning.
Smart Images

Figure CN121411413B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robotics, and more specifically to a robot motion control method based on line lasers. Background Technology
[0002] With the continuous development of artificial intelligence, electronic communication technology, and other fields, robots have gradually become a popular and emerging research and development area, widely applied in various industries, including civilian applications. However, robots often encounter obstacles during their movement, such as fixed supports or temporary barriers that are difficult for temporarily stored robots to overcome. When moving from one location to another, robots must avoid collisions with these obstacles and therefore need to detour around them.
[0003] To enable robots to autonomously and smoothly walk along the contours of obstacles without collisions, it is essential to determine the coordinates of the obstacle's contour in advance and to plan a trajectory with strong continuity. Summary of the Invention
[0004] This application discloses a robot motion control method based on line laser, and the specific technical solution is as follows:
[0005] A robot movement control method based on line lasers is proposed, wherein the robot's front end is equipped with a cross-line laser module. The robot movement control method includes: Step S1, the robot controls the cross-line laser module to emit two intersecting line laser beams forward; Step S2, during the robot's movement, the robot collects obstacle contour points detected by the line lasers in real time and obtains the position coordinates of the obstacle contour points; Step S3, when the distance between the robot's center and the nearest obstacle contour point reaches a preset obstacle avoidance trigger distance, the robot turns at a preset angle, and then sets the robot's current position as the starting point for obstacle avoidance; Step S4, a reference detector is set on the side of the robot closest to the obstacle contour point. The robot then uses the position coordinates of the obstacle contour points defined by the reference detection area to perform Bézier curve fitting, generating an obstacle fitting curve; Step S5: Based on the adjacent position points of the obstacle avoidance starting point in the positive direction of the robot's longitudinal axis, obtain the target point with the same longitudinal coordinate as the adjacent position point from the obstacle fitting curve, and then obtain the look-ahead point by offsetting the coordinates of the target point; then the robot moves from the obstacle avoidance starting point to the look-ahead point; Step S6: Whenever the robot moves to a look-ahead point, update the look-ahead point to the obstacle avoidance starting point; then repeat steps S5 to S6, or repeat steps S4 to S6; until the robot moves to the preset obstacle avoidance endpoint.
[0006] Furthermore, the cross-line laser module includes two line laser emitters and one laser receiver; the two line laser emitters are mounted on the side of the robot, and the line lasers emitted by the two line laser emitters form an effective detection area within the robot's travel plane; with the robot's travel plane as a reference, the emission range of the two line laser emitters forms a preset upward emission angle and a preset downward emission angle; the laser receiver is mounted on the side of the robot and is located slightly above the middle of the two line laser emitters; with the robot's travel plane as a reference, the receiving range of the laser receiver forms a preset upward receiving angle and a preset downward receiving angle; the laser receiver is used to collect the reflection points formed by the line lasers on obstacles and configure the reflection points as the obstacle contour points detected by the line lasers emitted by the line laser emitters.
[0007] Furthermore, the robot includes a semi-circular head, a semi-circular body, and two symmetrically arranged wheels connected by an axle located at the boundary between the head and the body. The semi-circular head and body form a circular body. The center of the axle is the center of the robot's body. The length of the axle is less than the diameter of the body. The robot's direction of movement is forward, and the positive direction of the body's longitudinal axis is set as the robot's current direction of movement, perpendicular to the axle. The positive direction of the body's transverse axis is defined as the direction towards the side obstacle and parallel to the axle. The reference detection area is used to cover part or all of the outline of the side obstacle during the robot's movement.
[0008] Furthermore, the position coordinates of each collected obstacle contour point are set as local coordinates relative to the robot's current position. These local coordinates are set within the robot's coordinate system, with the robot's current position set as the origin of the robot's coordinate system. When transforming the local coordinates to the global map coordinate system used to construct the grid map, the local coordinates are transformed into the global map coordinate system through rotation and translation to obtain the grid coordinates of the obstacle contour points. The rotation angle required for the local coordinate rotation transformation is equal to the angle between the global map coordinate system and the robot's coordinate system along the same attribute coordinate axis. The coordinate offset required for the local coordinate translation transformation is the coordinates of the robot's current position within the global map coordinate system. The positive direction of the robot's vertical axis is parallel to the positive direction of the robot's body's vertical axis.
[0009] Furthermore, during the robot's movement, the nearest obstacle contour point is the obstacle contour point closest to the robot's center detected by the intersecting line laser module in the robot's current direction of movement; the nearest obstacle contour point is pre-collected by the intersecting line laser module; or, the nearest obstacle contour point is collected in real time by the intersecting line laser module; wherein, the coordinates of the robot's current position point are represented using the coordinates of the robot's center; the preset obstacle avoidance trigger distance is set to be equal to the sum of the robot's radius and a preset distance, so that when the robot moves to the distance between the robot's center and the nearest obstacle contour point reaches the preset obstacle avoidance trigger distance, the shortest distance between the robot's edge and the obstacle contour point is equal to the preset distance.
[0010] Furthermore, in step S3, when the robot moves to a distance between the center of the robot body and the nearest obstacle outline point that reaches the preset obstacle avoidance trigger distance, the preset angle is equal to the angle formed by the line connecting the center of the robot body and the nearest obstacle outline point on the side closer to the side obstacle with respect to the positive direction of the horizontal axis of the robot body; wherein, the nearest obstacle outline point is located in the side obstacle detected by the robot, and there is an overlapping area between the area covered by the side obstacle and the effective detection area.
[0011] Furthermore, in step S3, the specific method for the robot to turn at a preset angle includes: controlling the two wheels of the robot to generate a speed difference, driving the robot to rotate away from the side obstacle; when the robot rotates away from the side obstacle by the preset angle, the line connecting the center of the robot body and the outline point of the nearest obstacle is parallel to the positive direction of the horizontal axis of the robot body; and then setting the position of the robot after turning as the starting point of the obstacle avoidance movement.
[0012] Further, in step S4, a reference detection area is set on the side of the robot closest to the outline of the nearest obstacle to cover the outline of the side obstacle; there is an overlapping area or a gap between the reference detection area and the robot's body coverage area; the distance between the boundary point of the reference detection area farthest from the edge of the body on the side closest to the obstacle and the center of the body in the positive direction of the horizontal axis of the body is greater than or equal to the preset obstacle avoidance trigger distance; wherein, the reference detection area is set to cover the passable area between the body and the side obstacle; the straight-line distance covered by the reference detection area in the positive direction of the vertical axis of the body does not exceed the maximum detection distance of the line laser emitted by the line laser emitter; wherein, the area covered by the reference detection area outside the body is greater than the area covered by the reference detection area inside the body.
[0013] Further, the method for setting the reference detection area includes: selecting a position point located at a first preset vertical distance from the center of the aircraft body in the positive direction of the longitudinal axis and at a first preset horizontal distance from the center of the aircraft body in the positive direction of the transverse axis as the upper left corner point; selecting a position point located at a second preset vertical distance from the center of the aircraft body in the opposite direction of the positive longitudinal axis and at a first preset horizontal distance from the center of the aircraft body in the positive direction of the transverse axis as the lower left corner point; selecting a position point located at a first preset vertical distance from the center of the aircraft body in the positive direction of the longitudinal axis and at a second preset horizontal distance from the center of the aircraft body in the positive direction of the transverse axis as the upper right corner point; and selecting a position point located at a second preset vertical distance from the center of the aircraft body in the opposite direction of the positive longitudinal axis and at a second preset horizontal distance from the center of the aircraft body in the positive direction of the transverse axis as the upper right corner point. A point at a second preset horizontal distance from the center of the machine body is designated as the lower right corner point; then, the lower left corner point and the upper left corner point are connected, as are the upper left corner point and the upper right corner point, the upper right corner point and the lower right corner point, and the lower right corner point and the lower left corner point to obtain the reference detection area, making the reference detection area a rectangular area; wherein, the first preset horizontal distance is set to be greater than half the length of the wheel axle and less than the radius of the machine body; the second preset horizontal distance is set to be greater than or equal to the preset obstacle avoidance trigger distance, but less than the maximum detection distance of the line laser emitted by the line laser emitter; so that the line connecting the upper right corner point and the lower right corner point is located outside the machine body; the first preset vertical distance is set to be greater than or equal to the radius of the machine body, but less than the maximum detection distance of the line laser emitted by the line laser emitter; the second preset vertical distance is set to be less than half the radius of the machine body or the length of the wheel axle.
[0014] Further, the grid coordinates of obstacle contour points are extracted from the area covered by the reference detection area in the grid map. The extracted grid coordinates are then converted from the global map coordinate system back to the robot coordinate system to obtain local coordinates relative to the robot's current position. These local coordinates are then marked as the position coordinates of the obstacle contour points defined by the reference detection area. Between the global map coordinate system and the robot coordinate system, the rotation transformation of the grid coordinates of the obstacle contour points is the inverse transformation of the rotation transformation of the local coordinates, and the translation transformation of the grid coordinates of the obstacle contour points is the inverse transformation of the translation transformation of the local coordinates. In step S4, the reference detection area is configured to define the grid coordinates of the obstacle contour points in real time during the robot's movement.
[0015] Further, in step S4, the method of fitting a Bézier curve using the position coordinates of the obstacle contour points defined within the reference detection area includes: determining the starting point and the ending point of the obstacle fitting curve within the obstacle contour points defined within the reference detection area along the positive longitudinal axis of the aircraft; and sequentially marking each obstacle contour point distributed along the positive longitudinal axis of the aircraft within the reference detection area between the starting point and the ending point as control points required for fitting the Bézier curve, wherein the obstacle fitting curve is a Bézier curve; and the number of control points is equal to the number of Bézier curve points. The order of the Bézier curve is summed with the value 1; the order of the Bézier curve is represented by n; based on the starting point of the obstacle fitting curve, the ending point of the obstacle fitting curve, and the control points sequentially marked between the starting point and the ending point of the obstacle fitting curve, an obstacle fitting curve based on an n-order Bézier curve is generated, so that relatively discrete obstacle contour points are fitted and connected into a relatively continuous contour line, wherein the starting point and the ending point of the obstacle fitting curve are both control points; correspondingly, the trajectory equation of the obstacle fitting curve is:
[0016] ;
[0017] in, The x-coordinate of a point in the fitted curve of the obstacle is given. Let be the ordinate of a point in the obstacle fitting curve, i represent the sequence number of the control points required to fit the obstacle fitting curve, and t is equal to the ratio between i and (n+1). The x-coordinate represents the starting point position of the obstacle fitting curve within the reference detection area. The ordinate represents the starting point of the obstacle fitting curve within the reference detection area; The x-coordinate represents the endpoint of the obstacle fitting curve within the reference detection area. The ordinate represents the endpoint of the obstacle fitting curve within the reference detection area; where, Indicated as a reference detection area used to set up control points The x-coordinate of the obstacle outline point; Indicated as a reference detection area used to set up control points The ordinate of the obstacle outline points.
[0018] Furthermore, during the Bézier curve fitting process, the number of possible values for t is equal to the number of points interpolated by the fitted curve of the obstacle; the curvature of the fitted curve of the obstacle changes when the relative positions of two adjacent control points change in the positive longitudinal direction of the machine body; adjacent control points use and It means that, among them, The trajectory equation of the obstacle fitting curve belongs to the Bézier curve formula.
[0019] Furthermore, the starting point of the obstacle fitting curve is the obstacle contour point closest to the boundary of the reference detection area in the opposite direction of the positive longitudinal axis of the aircraft, or the boundary point of the reference detection area through which the outline of the obstacle represented by the obstacle fitting curve passes in the opposite direction of the positive longitudinal axis of the aircraft, so that the starting point of the obstacle fitting curve is the obstacle contour point farthest from the starting point of the obstacle avoidance movement in the opposite direction of the positive longitudinal axis of the aircraft; the ending point of the obstacle fitting curve is the obstacle contour point closest to the boundary of the reference detection area in the positive longitudinal axis of the aircraft, or the boundary point of the reference detection area through which the outline of the obstacle represented by the obstacle fitting curve passes in the positive longitudinal axis of the aircraft, so that the starting point of the obstacle fitting curve is the obstacle contour point farthest from the starting point of the obstacle avoidance movement in the positive longitudinal axis of the aircraft.
[0020] Furthermore, the obstacle profile to be represented by the obstacle fitting curve is located in the positive direction of the robot's horizontal axis, and the opposite direction of the positive direction of the robot's horizontal axis is configured as the target offset direction; wherein, the preset obstacle avoidance margin is set to be equal to the sum of the robot's radius and the preset obstacle avoidance distance.
[0021] Further, in step S5, the method of obtaining a target point with the same ordinate as the adjacent position point of the obstacle-avoidance walking starting point in the positive longitudinal direction of the body, and then obtaining the look-ahead point by offsetting the coordinates of the target point, includes: calculating the ordinate of the adjacent position point of the obstacle-avoidance walking starting point in the positive longitudinal direction of the body, and setting the ordinate of the adjacent position point as the initial look-ahead ordinate; then substituting the initial look-ahead ordinate into the trajectory equation of the obstacle fitting curve, calculating the abscissa of the point in the obstacle fitting curve with the same ordinate as the initial look-ahead ordinate, wherein the point in the obstacle fitting curve with the same ordinate as the initial look-ahead ordinate is marked as the target point; then offsetting the target point along the target offset direction by a preset obstacle avoidance margin to obtain the look-ahead point; and then the robot moves from the obstacle-avoidance walking starting point to the look-ahead point.
[0022] Further, the implementation method of step S6 includes: whenever the robot moves to a look-ahead point, the robot updates the current look-ahead point to the obstacle avoidance starting point, then executes step S5 to obtain the next look-ahead point in front of the robot, and then the robot moves to the next look-ahead point; then updates the next look-ahead point to the obstacle avoidance starting point, and then executes steps S5 to S6, and so on, until the robot moves to the preset obstacle avoidance endpoint, wherein the preset obstacle avoidance endpoint is obtained by offsetting the endpoint of the obstacle fitting curve along the target offset direction by the preset obstacle avoidance distance.
[0023] Furthermore, the implementation method of step S6 includes: whenever the robot moves to a look-ahead point, the robot updates the current look-ahead point to the obstacle-avoidance starting point, then executes steps S4 to S5 to obtain the next look-ahead point, and then the robot moves to the next look-ahead point; then updates the next look-ahead point to the obstacle-avoidance starting point, and then executes steps S4 to S6, and so on, until the robot moves to the preset obstacle-avoidance endpoint.
[0024] Furthermore, after the robot moves to the preset obstacle avoidance endpoint in step S6, the reference detection area set by the robot covers the new ground area. Then, by executing step S4, the Bézier curve is fitted to the obstacle contour points framed in the new ground area to obtain a new obstacle fitting curve; then steps S5 and S6 are executed; wherein, the ground area is parallel to the robot's travel plane.
[0025] Furthermore, the robot connects the look-ahead points it has moved through in step S6 sequentially to form the target obstacle avoidance curve trajectory; if the obstacle outline points defined by the reference detection area do not change before and after the robot moves, the target obstacle avoidance curve trajectory is parallel to the obstacle fitting curve obtained in step S4 before and after the robot moves; wherein, the points in the obstacle fitting curve are offset along the target offset direction by the preset obstacle avoidance margin to obtain the points in the target obstacle avoidance curve trajectory.
[0026] Furthermore, the difference between the ordinate of the adjacent position point of the obstacle-avoidance walking starting point in the positive direction of the robot's longitudinal axis and the ordinate of the obstacle-avoidance walking starting point is equal to the value 1, so that the absolute value of the difference between the ordinates of the two look-ahead points obtained in step S6 is equal to the value 1; the adjacent position points of the obstacle-avoidance walking starting point include: position points whose absolute value of the difference between the x-coordinate and the ordinate of the obstacle-avoidance walking starting point is equal to 1, and position points whose absolute value of the difference between the x-coordinate and the ordinate of the obstacle-avoidance walking starting point is equal to 1, and position points whose absolute value of the difference between the x-coordinate and the ordinate of the obstacle-avoidance walking starting point is equal to 1, and position points whose absolute value of the difference between the x-coordinate and the ordinate of the obstacle-avoidance walking starting point is equal to 0, and position points whose absolute value of the difference between the x-coordinate and the ordinate of the obstacle-avoidance walking starting point is equal to 0, and position points whose absolute value of the difference between the x-coordinate and the ordinate of the obstacle-avoidance walking starting point is equal to 1; wherein, the positive direction of the robot's longitudinal axis is set as the positive direction of the longitudinal axis in the coordinate system with the robot's body center as the origin.
[0027] The technical effects of this invention are as follows:
[0028] Without installing collision sensors, a cross-line laser module is used to detect the outline of obstacles in front of the robot in advance and mark the coordinates of the obstacle outline points on a grid map, forming historical coordinate points that can be used for subsequent turning and obstacle avoidance, as well as fitting obstacle outlines. When the robot moves to a distance from the preset obstacle avoidance trigger distance from the obstacle outline, the robot begins to turn and align with the nearest obstacle outline point, and then sets the robot's current position as the starting point for obstacle avoidance. Thus, without the need for side-mounted collision sensors, the robot can determine the starting point for obstacle avoidance based on the marked obstacle outline, select the position after the turn as the starting point, and continue moving forward in the direction after the turn. This avoids the robot colliding with obstacles along the direction before the turn, thus facilitating collision-free obstacle avoidance.
[0029] To overcome the grid error caused by directly using the grid map for obstacle avoidance, the obstacle contour points in the selected map area are converted from the grid map back to the robot's local coordinate system. This obtains the relative coordinate information with the obstacle avoidance starting point as the origin. Then, this relative coordinate information is used to perform Bézier curve fitting to obtain the obstacle fitting curve. This allows the relatively discrete obstacle contour points to be fitted and connected into a relatively continuous contour line, thus achieving the smoothing of the obstacle grid using Bézier curves.
[0030] To prevent the robot from colliding with obstacles during obstacle avoidance, the obstacle fitting curve is shifted a distance greater than the robot's radius towards the starting point of obstacle avoidance, resulting in a look-ahead point for the robot to navigate around. The robot is then controlled to move from its current position to a look-ahead point in front of it, and then sequentially tracks the points in front of the robot along the obstacle fitting curve. This allows the robot to perform curve fitting and node tracking based on the historical markers of the obstacle contour points, achieving collision-free obstacle avoidance or obstacle bypass during the tracking process. Attached Figure Description
[0031] Figure 1 This is a schematic diagram of a robot with a circular body scanning the outline points of a straight obstacle #1 before being triggered to avoid obstacles, wherein the robot with the circular body sequentially collects obstacle outline points P1, P2, P3, P4 and P5 along the direction of the arrow from left to right.
[0032] Figure 2 This is a schematic diagram of a robot with a circular body in one embodiment, which, when triggering obstacle avoidance, points along the left-to-right arrow toward the nearest obstacle outline point P1 of the detected linear obstacle #1.
[0033] Figure 3 yes Figure 2 A schematic diagram showing a robot with a circular body rotating to the left until the line connecting the obstacle outline point P1 and the center O of the body is parallel to the wheel axle S.
[0034] Figure 4 This is a schematic diagram of a robot with a circular body scanning obstacle contour points of obstacle #2 with a curved profile before being triggered to avoid obstacles, wherein the robot with the circular body scans obstacle contour points P6, P7, P8, P9 and P10 in sequence along the arrow pointing from left to right.
[0035] Figure 5 This is a schematic diagram of an embodiment where a robot with a circular body, when triggering obstacle avoidance, moves along an arrow from left to right to detect the nearest obstacle profile point P6 of obstacle #2 with a curved profile.
[0036] Figure 6 yes Figure 5 A schematic diagram showing a robot with a circular body rotating to the left until the line connecting the obstacle outline point P6 and the center O of the body is parallel to the wheel axle S.
[0037] Figure 7 This is a schematic diagram of an obstacle fitting curve U1 fitted in one embodiment, wherein the coordinate offset between the look-ahead point A2 and the starting point A1 of the obstacle fitting curve in the X-axis direction is equal to D; the obstacle fitting curve U1 is used to characterize the concave contour line bounded by the reference detection area EFGH in obstacle #3, the starting point of the obstacle fitting curve U1 (equivalent to the starting point of the Bézier curve) and the lower endpoint of the concave contour line bounded by the reference detection area EFGH are both position point A1, and the ending point of the obstacle fitting curve U1 (equivalent to the ending point of the Bézier curve) and the upper endpoint of the concave contour line bounded by the reference detection area EFGH are both position point B1.
[0038] Figure 8 This is a schematic diagram of an obstacle fitting curve U2 fitted in one embodiment, wherein the coordinate offset of the look-ahead point A5 and the position point A4 in the obstacle fitting curve in the X-axis direction is equal to D; the obstacle fitting curve U2 is used to characterize the rightward convex contour line of the obstacle #2 framed by the reference detection area EFGH. The starting point of the obstacle fitting curve U2 (equivalent to the starting point of the Bézier curve) and the lower endpoint of the rightward convex contour line framed by the reference detection area EFGH are both position point A3, and the ending point of the obstacle fitting curve U2 (equivalent to the ending point of the Bézier curve) and the upper endpoint of the rightward convex contour line framed by the reference detection area EFGH are both position point B2.
[0039] Figure 9 This is a flowchart of a robot motion control method based on a line laser, as disclosed in one embodiment. Detailed Implementation
[0040] To provide a clearer description of the present invention, specific embodiments are given below for further explanation. In the following description, specific details such as particular system structures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that the present application can also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of this application with unnecessary detail.
[0041] It should be understood that, when used in this application, the term "comprising" indicates the presence of the described feature, integral, step, operation, element, and / or component, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. It should also be understood that, as used in this application, the term "and / or" refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0042] As used in this application, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."
[0043] Furthermore, in the description of this application, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance. References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0044] As one embodiment, this embodiment discloses a robot motion control method based on line lasers, such as... Figure 9 As shown, the robot movement control method includes:
[0045] Step S1: The robot controls the intersecting line laser module to emit two intersecting line laser beams in front of the robot; then, step S2 is executed; within the robot's travel plane, one line laser beam is directed towards the robot's left front, and the other line laser beam is directed towards the robot's right front, corresponding to... Figure 3 and Figure 6 In the diagram, the two line laser beams intersect at point M. The triangular area formed between the robot's front end and point M is the blind zone generated by the intersecting line laser module. The triangular area formed by point M and the dashed line in front of it along the robot's movement direction is the effective detection area. The projection distance of the effective detection area in the direction of the arrow is the working range of the intersecting line laser module. The angle formed by the planes containing the two line laser beams is preferably 90 degrees, and both planes are perpendicular to the robot's travel plane, preferably perpendicular to the ground.
[0046] It should be noted that, for the purpose of brevity, the following description mainly uses the robot controller as the execution subject and the controller planning the robot's motion trajectory as the application scenario to describe the specific implementation process of the embodiments of this disclosure. However, this does not mean that the embodiments of this disclosure can only be applied to planning the robot's motion trajectory, nor does it mean that planning the robot's motion trajectory can only be executed by the robot's controller. The robot's body shape includes, but is not limited to, a circular body, a D-shaped body with a round front and round back, etc.
[0047] The robot's body shape corresponds to Figures 1 to 7 The disc-shaped body is shown in the image; the front end of the robot is equipped with a cross-line laser module, and the laser beam emitted by the cross-line laser module exhibits the following characteristics: Figures 1 to 6The diagram shows two intersecting line segments of finite length located at the front end of the robot within the corresponding robot travel plane area (horizontal ground area).
[0048] Step S2: During the robot's movement, the robot collects obstacle contour points detected by the line laser in real time and obtains the position coordinates of the obstacle contour points, and then executes step S3. In step S2, the obstacle contour points are reflection points formed by the reflection of the line laser on the surface of the obstacle. Each collected obstacle contour point has three-dimensional coordinate information, including the position coordinates, height information, and orientation angle (the angle formed by the line connecting the obstacle contour point and the current position point relative to the robot's current forward direction (current movement direction)) of the obstacle contour point relative to the robot's current position. Every time the robot moves to a new position along a predetermined direction, a new obstacle contour point is collected. If the robot's control system internally constructs a global map, the angle between the robot's current forward direction and a coordinate axis of the global map's coordinate system is the deflection angle between the robot's coordinate system (a local coordinate system with the robot's current position as the origin and the current forward direction as the positive direction of the coordinate axis) and the same type of coordinate axis of the global map's coordinate system. This is used for coordinate system transformation of the obstacle contour points between the global map's coordinate system and the robot's coordinate system.
[0049] Specifically Figure 1 In the scenario of detecting a straight obstacle #1, the robot moves along... Figure 1 As shown by the left-to-right arrow, the robot moves closer to the left side of the straight obstacle #1. The effective detection area formed by the intersecting two line laser beams covers the upper left profile of the straight obstacle #1 from far to near. As the robot moves along the left-to-right arrow, it sequentially collects obstacle profile points P1, P2, P3, P4, and P5, thus completing the outline marking of the straight wall. Of course, in... Figure 1 The arrows pointing upwards from left to right indicate that there may be other collected obstacle contour points between adjacent obstacle contour points, but these are not shown in the figure. Figure 1 The obstacle outline points marked in the figure are only part of the outline of obstacle #1; or when marking obstacle outline points on the grid map, due to the limited resolution of the grid, some collected outline points will be lost in the process of marking obstacles on the map. Among them, obstacle outline point P1 in the figure is the first obstacle outline point that the robot's body center O approaches during the movement along the arrow from left to right.
[0050] Specifically Figure 4 In the scenario of detecting the elliptical obstacle #2, the robot moves along... Figure 4The arrows pointing from left to right indicate movement, gradually approaching the left side of the elliptical obstacle #2. The effective detection area formed by the intersecting two line laser beams covers the upper left curve contour of the elliptical obstacle #2 from far to near. During the movement, the robot sequentially collects obstacle contour points P6, P7, P8, P9, and P10. Figure 1 The arrows pointing upwards from left to right indicate that there may be other collected obstacle contour points between adjacent obstacle contour points, but these are not shown in the figure. Figure 4 The obstacle contour points marked in the diagram are only a portion of the contour of obstacle #2; or, when marking obstacle contour points on the grid map, due to the limited resolution of the grid, some collected contour points will be lost during the process of marking obstacles on the map. In the diagram, obstacle contour point P6 is the first obstacle contour point that the robot approaches as it moves along the arrow from left to right, serving as the robot's body center O.
[0051] Step S3: When the robot moves to a point where the distance between its center O and the nearest obstacle outline reaches the preset obstacle avoidance trigger distance, the robot turns at a preset angle, and then sets the robot's current position as the starting point for obstacle avoidance; then proceed to step S4. In step S3, the nearest obstacle outline is located in the obstacle to the left or right of the robot's front. This serves as the closest obstacle outline to the robot before it turns, and also as a reference point for verifying that the robot has turned at the preset angle. This sets the starting point for effectively avoiding the obstacle where the nearest obstacle outline is located, thus initiating obstacle avoidance operation.
[0052] When a robot needs to avoid an approaching obstacle to its left front, this obstacle can be designated as a side obstacle. When the distance between the robot's center O and the side obstacle reaches a preset obstacle avoidance trigger distance, the robot is triggered to avoid the side obstacle. The robot first needs to turn right by a preset angle to begin walking around the right contour of the side obstacle. A side obstacle is an obstacle located outside the robot's side, which includes either the left or right side of the robot; therefore, a side obstacle refers to an obstacle located on the robot's left or right side that does not come into contact with the robot.
[0053] When the robot needs to avoid an approaching obstacle to its right front, such as Figure 2 As shown, the straight obstacle #1 on the right front can be set as a side obstacle, and the robot moves along the direction from O to M ( Figure 2As shown by the arrow pointing from left to right, when the distance between the robot's center O and the obstacle outline point P1 of the side obstacle #1 reaches the preset obstacle avoidance trigger distance, the robot is triggered to begin avoiding the side obstacle #1. This ensures that during the turn, the shortest distance between the edge point on the robot's body and the obstacle outline point P1 is equal to the preset distance. The edge point on the robot's body can be the intersection of the line connecting the obstacle outline point P1 and the robot's center O with the edge of the robot's body. The preset obstacle avoidance trigger distance is set to the sum of the robot's radius and the preset distance, which is set between 1cm and 2cm. To prevent the robot from colliding with obstacle #1, the robot first needs to turn left by a preset angle, changing its forward direction from... Figure 2 The arrow shown points from left to right to change direction. Figure 3 The arrow shown points to, making Figure 3 The deviation angle of the robot's forward direction relative to the side obstacle #1 is greater than Figure 2 The robot's forward direction deviates from the side obstacle #1 by an angle such that the robot will not come into contact with the side obstacle #1 while moving in the current forward direction. Therefore, while continuing to move along the forward direction after the turn, the robot will bypass the left contour of the side obstacle #1. At this time, the nearest obstacle contour point on the right side of the robot after the turn is still the nearest obstacle contour point P1. Meanwhile, the other pre-marked obstacle contour points P2, P3, P4, and P5 are less likely to play an obstructive role, not to mention other undetected obstacle contour points on the same straight contour. These other undetected obstacle contour points may be blind spots of the distributed line laser detection.
[0054] When the robot needs to avoid an approaching obstacle to its right front, such as Figure 5 As shown, obstacle #2 on the right front can be set as a side obstacle, and the robot moves along the direction from O to M ( Figure 5 As shown by the arrow pointing from left to right, when the distance between the robot's center O and the obstacle outline point P6 of the side obstacle #2 reaches the preset obstacle avoidance trigger distance, the robot is triggered to begin avoiding the side obstacle #2. This ensures that the shortest distance between the robot's edge and the obstacle outline point P6 during the turning process is equal to the preset distance. The preset obstacle avoidance trigger distance is set to be equal to the sum of the robot's radius and the preset distance, which is set between 1cm and 2cm. To prevent the robot from colliding with obstacle #2, the robot first needs to turn left by a preset angle, changing its forward direction from... Figure 5 The arrow shown points from left to right to change direction. Figure 6 The arrow shown points to, making Figure 6 The deflection angle of the robot's forward direction relative to the tangent line passing through obstacle contour point P6 is greater than... Figure 5 The robot's forward direction is deflected by the angle of the tangent to the obstacle contour point P6. At least during the robot's current forward movement, it will not come into contact with the side obstacle #2, so as to avoid the left contour of the side obstacle #2 while continuing to move along the forward direction after the turn. At this time, the nearest obstacle contour point on the right side of the robot after the turn is still the nearest obstacle contour point P6. Meanwhile, the other pre-marked obstacle contour points P7, P8 (protrusion point), P9 and P10 are less likely to play an obstructive role, not to mention other undetected obstacle contour points on the same curve contour. Other undetected obstacle contour points may be the detection blind spots of the distributed line laser.
[0055] It should be noted that the obstacles disclosed in this embodiment are detected in real time by a line laser. The line laser hits the obstacle and is reflected off the surface of the obstacle to form a reflection point. The height information of the obstacle ahead can be obtained through the reflection point, and the height information can be used to determine whether the object detected by the line laser is an obstacle. For example, when the height of the reflection point exceeds the preset obstacle-crossing height range, it is determined that an obstacle has been detected and is an obstacle that needs to be avoided. The height of the reflection point is the height difference between the reflection point and the ground area (based on the height of the ground area). The ground area is parallel to the robot's travel plane, and the height flatness of some areas can be analyzed by height mean square error to determine whether some areas are ground.
[0056] Step S4: Set a reference detection area on the side of the robot closest to the obstacle contour point, preferably... Figure 7 and Figure 8 The dashed polygonal region EFGH is set on the right side of the robot and moves with the robot to define the most recently traversed area outside the robot's side in real time. Figure 7 The dashed polygonal region EFGH set in the middle can cover the concave outline of the right side of obstacle #3 (represented by the discrete points shown in the figure, i.e., the discretely distributed obstacle outline points detected by the intersecting line laser module). Figure 8The dashed polygonal region EFGH set in the diagram can cover the outwardly convex contour of the right side of obstacle #2 (represented by discrete points in the diagram, i.e., discretely distributed obstacle contour points detected by the intersecting line laser module). Then, the robot uses the position coordinates of the obstacle contour points defined by the reference detection region to perform Bézier curve fitting, generating an obstacle fitting curve, and then executes step S5; wherein, the obstacle fitting curve is used to characterize the contour of the obstacle to which the obstacle contour points defined by the reference detection region belong. The obstacle contour points defined by the reference detection region are the control points configured as Bézier curves. The obstacle contour points defined by the reference detection region include the start point and the end point of the Bézier curve. The relative position of the start point and the end point of the Bézier curve controls the curvature of the Bézier curve, affecting the smoothness of the obstacle fitting curve, as well as the position points planned for obstacle avoidance / bypass for the robot to subsequently walk along the extension direction of the obstacle fitting curve.
[0057] Step S5: Based on the adjacent positions of the obstacle avoidance starting point along the positive longitudinal axis of the robot, obtain a target point from the obstacle fitting curve whose ordinate is the same as that of the adjacent positions. In step S5, the coordinates of the adjacent positions of the obstacle avoidance starting point along the positive longitudinal axis of the robot are equal to those of the obstacle avoidance starting point along the positive transverse axis of the robot. The positive transverse axis of the robot is perpendicular to the positive longitudinal axis of the robot. Then, a look-ahead point is obtained by offsetting the coordinates of the target point. Specifically, the target point is controlled to offset along the positive transverse axis of the robot or in the opposite direction, thereby obtaining a look-ahead point outside the obstacle and within the passable area. To prevent the robot from colliding with the obstacle, the coordinate offset is set considering the requirements of the robot radius and obstacle avoidance distance. Then, the robot moves from the obstacle avoidance starting point to the look-ahead point and then executes step S6. The movement here is generally a straight line movement along a predetermined direction. Figure 7 In the process, the robot's center of gravity will move from position point O (considered the starting point for obstacle avoidance) to position point A2 (the look-ahead point), where position point A1 is the target point. Corresponding to... Figure 8 In the process, the robot's center moves from position point O (considered as the starting point of obstacle avoidance) to position point A5 (look-ahead point). Position point A4 is the target point, and the positive direction of the robot's longitudinal axis is set as the current direction of movement. The robot's real-time forward direction is marked by the coordinate axis direction of the robot coordinate system. Thus, starting from the starting point of obstacle avoidance, the robot moves along the positive direction of the longitudinal axis to the real-time planned look-ahead point to begin walking along the extension direction of the obstacle fitting curve.
[0058] When the robot is relatively close to the obstacle and the area covered by the reference detection area outside the robot is small, the bounded obstacle contour points are closer to one side boundary (which can be the side boundary closer to the obstacle or the side boundary closer to the robot), resulting in the fitted obstacle curve being located outside the reference detection area; otherwise, the fitted obstacle curve will be confined to the inside of the reference detection area.
[0059] Step S6: Whenever the robot moves to a look-ahead point, the look-ahead point is updated as the obstacle avoidance starting point. Then, steps S5 to S6 are repeated. The trajectory equation (Bezier curve equation) of the obstacle fitting curve fitted in step S4 is used to continuously track and offset the next look-ahead point. A new look-ahead point can be obtained in step S5 until the robot moves to the preset obstacle avoidance endpoint. This allows the robot to walk along the extension direction of the obstacle fitting curve without touching the obstacle. Preferably, the preset obstacle avoidance endpoint is offset from the endpoint of the obstacle fitting curve fitted in the current execution of step S4, so as to complete the obstacle avoidance walking around the local contour of the obstacle. If each look-ahead point is translated from a point with the same vertical coordinate in the same obstacle fitting curve, then the obstacle avoidance trajectory formed by connecting each look-ahead point sequentially along the positive direction of the body's vertical axis is parallel to the obstacle fitting curve, enabling the robot to walk along the contour of the obstacle while maintaining a fixed distance from the obstacle fitting curve. After completing step S6, if necessary, after completing the obstacle fitting curve fitted in step S4 and reaching the preset obstacle-around endpoint, a new obstacle fitting curve will be fitted using step S4 (the extension direction and curvature will change), and then the vehicle will walk along the extension direction of the new obstacle fitting curve.
[0060] Alternatively, in step S6, whenever the robot moves to a aforementioned look-ahead point, the look-ahead point is updated as the obstacle avoidance starting point, and steps S4 to S6 are repeated. This allows the robot to update its path while moving, thereby continuously tracking and shifting to the next look-ahead point using the trajectory equation (Bezier curve equation) of the obstacle fitting curve fitted in the latest step S4. A new look-ahead point can be obtained in step S5 until the robot moves to a preset obstacle avoidance endpoint. This preset endpoint can be located on the boundary of the reference detection area, or on a selected obstacle contour point on the obstacle the robot is currently avoiding (the obstacle where the nearest obstacle contour point is located). From the robot's travel plane, this is located at a corner point, allowing the robot to completely avoid the obstacle by using this corner point. Implementing corresponding detour strategies for different positional characteristics can effectively improve the obstacle avoidance problem of laser-guided robots in the robot coordinate system and can effectively cope with different situations that occur during travel.
[0061] In summary, without installing collision sensors, this embodiment uses a cross-line laser module to detect the outline of obstacles in front of the robot in advance and marks the coordinates of the obstacle outline points in a grid map, forming historical coordinate points that can be used for subsequent turning and obstacle avoidance, as well as fitting obstacle outlines. When the robot moves to a distance from the preset obstacle avoidance trigger distance from the obstacle outline, the robot begins to turn and align with the nearest obstacle outline point, and then sets the robot's current position as the starting point for obstacle avoidance. Thus, without the need for side-mounted collision sensors, the robot can determine the starting point for obstacle avoidance based on the marked obstacle outline, select the position after the turn as the starting point, and continue moving forward in the direction after the turn. This avoids the robot colliding with obstacles along the direction before the turn, thus facilitating collision-free obstacle avoidance. To overcome grid errors introduced by directly using grid maps for obstacle avoidance, the obstacle contour points within the selected map area are converted from the grid map back to the robot's local coordinate system. This obtains relative coordinate information with the obstacle avoidance starting point as the origin. These relative coordinates are then used for Bézier curve fitting to obtain the obstacle fitting curve. This allows the relatively discrete obstacle contour points to be fitted and connected into a relatively continuous contour line, achieving smoothing of the obstacle grid using Bézier curves. To prevent collisions with obstacles during obstacle avoidance, the obstacle fitting curve is shifted towards the obstacle avoidance starting point by a distance greater than the robot's radius, creating a look-ahead point for the robot to navigate around. The robot is then controlled to move from its current position to this look-ahead point, sequentially tracking points ahead along the obstacle fitting curve. This allows the robot to perform curve fitting and node tracking based on historical markers of obstacle contour points, achieving collision-free obstacle avoidance or bypass during the tracking process.
[0062] As one embodiment, the cross-line laser module includes two line laser emitters and one laser receiver; the two line laser emitters are mounted on the side of the robot, see reference. Figure 3 and Figure 6 It can be seen that OM is set as the central axis of the robot's body, and two line laser emitters are respectively installed on the left and right sides of the central axis. The two line laser emitters are generally installed at the front end of the robot's side. The line lasers emitted by the two line laser emitters form an effective detection area in the robot's travel plane. Specifically, in the robot's travel plane, the line lasers emitted by the two line laser emitters intersect at a viewing point M. The area enclosed by the lines connecting the viewing point M and the two line laser emitters to the front end of the robot's side is the blind zone of the intersecting line laser module. The vertical distance from the viewing point M to the side of the robot is configured as an invalid detection distance. In the robot's travel plane, in front of the viewing point M ( Figure 3 and Figure 6(As shown by the arrow pointing upwards), the effective detection area is formed within the angle formed by the line lasers emitted by the two line laser emitters. The effective detection distance reached by the effective detection area in front of the robot is equal to the difference between the maximum detection range of the line laser emitted by the line laser emitter projected onto the angle bisector of the angle formed by the line lasers emitted by the two line laser emitters (equal to the product of the maximum detection distance of the line laser and the cosine of half the angle formed by the line lasers emitted by the two line laser emitters) and the ineffective detection distance.
[0063] Furthermore, using the robot's travel plane as a reference, the emission ranges of both line laser emitters are both upward at a preset upward emission angle and downward at a preset downward emission angle. The direction of the line laser emitted by the line laser emitters is consistent with the robot's forward direction. Preferably, using the horizontal plane as a reference, the emission ranges of both line laser emitters are 20 degrees upward and 30 degrees downward. The laser receiver is mounted on the side of the robot and located slightly above the middle of the two line laser emitters. Using the robot's travel plane as a reference, the receiving range of the laser receiver is both upward at a preset upward receiving angle and downward at a preset downward receiving angle. Preferably, using the horizontal plane as a reference, the receiving range of the laser receiver is both upward at a preset upward receiving angle and downward at a preset downward receiving angle, so that the laser receiver's acquisition range of the robot's travel plane is wider than the emission range of the laser emitters. The laser receiver is used to acquire the reflection points formed by the line laser on obstacles and configure the reflection points as the obstacle contour points detected by the line laser emitted by the line laser emitters.
[0064] Each collected obstacle contour point has position coordinates, azimuth angle information, and height information to determine the height, length, and width of the obstacle detected in the robot's movement direction, and to form the contour position of the detected obstacle. The laser receiver is used to collect the reflection points formed by the line laser on the obstacle, and configure the reflection points as the obstacle contour points detected by the line laser emitted by the line laser emitter. When the laser receiver is a camera, the intersection of the two line laser beams emitted by the two line laser emitters toward the front of the robot is within the camera's field of view. In a specific embodiment, both the laser illumination range and the camera's field of view can be adjusted by the mounting height on the robot. The height information of the obstacle contour point is detected by one line laser beam emitted by each of the two line laser emitters in the vertical plane region of the robot's travel plane.
[0065] Preferably, the angle formed by the line laser beams emitted by the two line laser emitters within the robot's travel plane is 90 degrees. This ensures that at least one line laser beam does not form a 90-degree angle with the central axis of the laser receiver, facilitating the acquisition of laser image information reflected from side obstacles. The laser image contains bright spots formed by the line laser hitting the obstacle surface. The two-dimensional pixel coordinates of the laser bright spots can be converted into three-dimensional coordinates using the light plane equation. The height information can be obtained by analyzing the three-dimensional coordinates of the bright spots, and the height information can be used to determine whether the object illuminated by the laser is an obstacle.
[0066] It should be noted that in step S2, the obstacle contour points detected by the line laser are formed by the reflection of the line laser emitted by at least one line laser emitter in the contours of the obstacles distributed within the effective detection area, and the obstacle contour points detected by the line laser are used to connect and form the contours of the obstacles detected by the line laser. The aforementioned bright spots are equivalent to the projection points of the reflection points of the incident line laser in the obstacle in the laser image.
[0067] Preferably, the robot acquires the contour points of obstacles in front of it through a laser receiver, for example, by collecting... Figure 4 The coordinate data of discrete points on the outline of obstacle #2 near the robot are P6, P7, P8, P9, and P10 from left to right. Although obstacle outline point P6 in the diagram is the first obstacle outline point that the robot's body center O approaches during the movement along the arrow from left to right, during the robot's movement, the outline points distributed to the lower left of obstacle outline point P6 ( Figure 4 (Not shown in the image) It is still within the effective detection area formed by the cross-line laser module. Figure 4 The obstacle contour points marked in the image are only a portion of the contour of obstacle #2; or, when marking obstacle contour points on a raster map, due to the limited resolution of the raster, some collected contour points will be lost during the obstacle marking process. Then, in a coordinate system with the machine's center O as the origin, the coordinate data of P6, P7, P8, P9, and P10 can be set as the coordinates of control points, where P6 is the starting point of the Bézier curve and P10 is the ending point of the Bézier curve, constructing a fourth-order Bézier curve equation. Then, based on the changes in time or the changes in the average length of points between two adjacent control points, the points in the fourth-order Bézier curve are calculated and used as points in the contour fitting curve of obstacle #2. For example, when collecting... Figure 1The coordinate data of discrete points on the straight profile of obstacle #1, from left to right, are P1, P2, P3, P4, and P5. Then, in a coordinate system with the body center O as the origin, the coordinate data of P1, P2, P3, P4, and P5 can be set as the coordinates of control points, where P1 is the starting point of the Bézier curve and P5 is the ending point. A fourth-order Bézier curve equation is constructed. Based on the changes in time or the changes in the average length between adjacent control points, the points in the fourth-order Bézier curve are calculated and used as points in the profile fitting curve of obstacle #1. Since P1, P2, P3, P4, and P5 are collinear, therefore, for... Figure 1 The fourth-order Bézier curve fitted to obstacle #1 is a straight line, and it is the straight line containing P1, P2, P3, P4, and P5. Figure 1 Obstacle #1 in the game can be a straight obstacle, belonging to the category of long and straight obstacles, such as straight walls, boxes, thresholds, etc.
[0068] As one example, see Figures 1 to 6 It is known that the robot includes a semi-circular head, a semi-circular body, and two symmetrically arranged wheels. These two symmetrically arranged wheels are connected by an axle S, which is located at the boundary between the head and the body, pointing along the robot's direction of movement. The head is positioned in front of the axle S, and the body is positioned behind it. The two symmetrically arranged wheels on the axle S are wheel L on the left side and wheel R on the right side of the axle S. The semi-circular head and semi-circular body are related to... The axles S are symmetrically arranged, forming a semi-circular head and a semi-circular body, thus creating a circular robot body. The center of the axle S is the robot body center O. The robot moves in the direction of forward movement, parallel to the positive longitudinal axis of the robot body, which is perpendicular to the axle S. The positive transverse axis of the robot body is defined as the direction towards the side obstacle and parallel to the axle S. The reference detection area is used to cover part or all of the outline of the side obstacle during robot movement. In this embodiment, the length of the axle S is the distance between wheels L and R in the positive transverse axis direction of the robot body. The distance from wheel L or wheel R to the robot body center O is less than the robot body radius. The length of the axle S is less than the robot body diameter, which is equal to the robot body width. The distance from the robot body center O to the edge of the robot body is represented as the robot body radius, which is set to be equal to half the width of the body or half the width of the head.
[0069] exist Figure 7In the diagram, the positive direction of the horizontal axis of the robot is the positive direction of the X-axis. The positive direction of the X-axis in the diagram is the direction towards the obstacle #3 on the side of the robot and parallel to the wheel axle S. The positive direction of the Y-axis is the positive direction of the vertical axis of the robot. The positive direction of the vertical axis of the robot is set perpendicular to the positive direction of the horizontal axis of the robot.
[0070] exist Figure 8 In the diagram, the positive direction of the horizontal axis of the robot is the positive direction of the X-axis. The positive direction of the X-axis in the diagram is the direction towards the obstacle #2 on the side of the robot and parallel to the wheel axle S. The positive direction of the Y-axis is the positive direction of the vertical axis of the robot. The positive direction of the vertical axis of the robot is set perpendicular to the positive direction of the horizontal axis of the robot.
[0071] As one embodiment, the position coordinates of each collected obstacle contour point are set as local coordinates relative to the robot's current position. These local coordinates are set within the robot's coordinate system, where the robot's current position is set as the origin. The positive direction of the robot's horizontal axis is the positive direction of the robot's X-axis, and the positive direction of the robot's vertical axis is the positive direction of the robot's Y-axis. It should be noted that the two-dimensional coordinates of the bright spot formed by the line laser striking the obstacle surface or the two-dimensional coordinates of the reflected point are also the position coordinates of the obstacle contour points, all belonging to local coordinates relative to the robot's current position. The positive direction of the robot's vertical axis is parallel to the positive direction of the robot's vertical axis, and the positive direction of the robot's horizontal axis is parallel to the positive direction of the robot's horizontal axis.
[0072] To mark the collected obstacle contour points onto the grid map, this embodiment transforms the local coordinates to the global map coordinate system used to construct the grid map. This transformation involves converting the robot coordinate system to the global map coordinate system of the grid map. Specifically, the local coordinates are transformed into the global map coordinate system through rotation and translation to obtain the grid coordinates of the obstacle contour points. The rotation angle required for the local coordinate transformation is equal to the angle between the same attribute coordinate axes of the global map coordinate system and the robot coordinate system. Specifically, it is the angle between the positive Y-axis of the global map coordinate system and the positive Y-axis of the robot coordinate system, or the angle between the positive X-axis of the global map coordinate system and the positive X-axis of the robot coordinate system. The angle between the positive X-axis and the coordinate system; the coordinate offset required for local coordinate translation transformation is the coordinate of the robot's current position point in the global map coordinate system, that is, the coordinate offset relationship between the origin of the global map coordinate system and the origin of the robot coordinate system; the coordinate system transformation equation can be constructed using the rotation angle required for local coordinate rotation transformation and the coordinate offset required for local coordinate translation transformation, based on the trigonometric function transformation relationship that can be mastered by those skilled in the art; then, the position coordinates of the obstacle contour points are substituted into the coordinate system transformation equation to obtain the grid coordinates of the obstacle contour points, thereby marking the obstacle contour points in the grid of the grid map, and thus marking the position information of the obstacle contour in the grid map.
[0073] Specifically, the coordinate system transformation equations are:
[0074] ;
[0075] ;
[0076] The position coordinates (coordinates in the robot coordinate system) of the obstacle contour points are ( , The robot's current position in the global map coordinate system is ( ). , The rotation angle required for local coordinate rotation transformation is , which is the angle required for the obstacle contour points to rotate in the coordinate system transformation; the grid coordinates of the obstacle contour points are ( , The obstacle contour points (belonging to the laser point cloud) acquired by the line laser at the front end of the robot head are discrete points reflected onto the side contour line of the obstacle closest to the robot. Each discrete point can be transformed to the global map coordinate system. Then, within the same grid map, the straight-line distance between the corresponding discrete point and the robot's center O is calculated using the transformed coordinates of each discrete point in the map coordinate system. This distance is reflected as the distance between the side contour line of the obstacle and the side of the robot.
[0077] As one embodiment, during robot movement, the nearest obstacle contour point is the obstacle contour point closest to the robot's center detected by the intersecting line laser module in the current direction of movement. Therefore, as the robot's position changes, the nearest obstacle contour point detected by the intersecting line laser module will also change, and the nearest obstacle contour point in step S3 will also change. The previously set nearest obstacle contour point will then be marked as a historical obstacle contour point. For example, when the robot is moving... Figure 2 The nearest obstacle contour point detected in real time is obstacle contour point P1, and it is necessary to bypass obstacle #1; the robot is in Figure 5 The nearest obstacle contour point detected in real time is obstacle contour point P6, and obstacle #2 needs to be bypassed. The robot will... Figure 7 The nearest obstacle contour point detected in real time is obstacle contour point A1, and it is necessary to bypass obstacle #3; the robot is in Figure 8 The nearest obstacle outline point is set as obstacle outline point P6, which is determined when executing step S3. After turning at the preset angle, step S5 is executed to begin bypassing obstacle outline point P6.
[0078] It should be noted that if the robot has already scanned the contour points of the relevant locations while moving in an area far from the obstacle, the nearest obstacle contour point is pre-collected by the intersecting line laser module; or, the nearest obstacle contour point is collected in real time by the intersecting line laser module, obtained when the robot begins to detect an obstacle within the effective detection area. The nearest obstacle contour point can be detected by the line laser emitter and marked on the grid map to obtain the grid coordinates of the nearest obstacle contour point, so as to calculate the distance and angle relationship between the robot's current position and the nearest obstacle contour point within the grid map; wherein, the coordinates of the robot's current position are represented using the coordinates of the robot's center. The preset obstacle avoidance trigger distance is set to be equal to the sum of the robot's radius and a preset distance. When the robot moves to the distance between the robot's center and the nearest obstacle contour point, reaching the preset obstacle avoidance trigger distance, the shortest distance between the edge of the robot and the obstacle contour point is equal to the preset distance, which is preferably a distance value between 1cm and 2cm. This ensures that the robot will not collide with the nearest obstacle contour point during turning.
[0079] In step S3, when the robot moves to a distance between its center and the nearest obstacle's outline point that reaches a preset obstacle avoidance trigger distance, the preset angle is equal to the angle formed by the line connecting the robot's center and the nearest obstacle's outline point on the side closest to the obstacle, relative to the positive direction of the robot's horizontal axis. The nearest obstacle's outline point serves as an alignment point, forming a reference point for adjusting the robot's turning motion. It also helps the robot avoid blind spots on the side of obstacles when making close-to-obstacle movements, preventing the robot from directly colliding with obstacles during turns. Figure 2 As shown, the preset angle is equal to the angle formed by the line OP1 connecting the robot's center O and the nearest obstacle contour point P1 on the side closest to the side obstacle #1 (to the right of the robot's central axis OM) relative to the positive direction of the robot's horizontal axis (the direction of the ray OR in the diagram). It is equal to the difference between 90 degrees and the angle P1OM (the angle between OP1 and OM). The angle between OP1 and OM is the azimuth angle detected by the line laser, representing the direction of the nearest obstacle contour point P1 relative to the robot's center. The line segment OM represents the robot's central axis and also the robot's current direction of movement. For example... Figure 5As shown, the preset angle is equal to the angle formed by the line OP6 connecting the body center O and the nearest obstacle contour point P6 on the side closer to the side obstacle #2 (to the right of the body's central axis OM) relative to the positive direction of the body's horizontal axis (the direction of the ray OR in the diagram). It is equal to the difference between 90 degrees and the angle P6OM (the angle formed by OP6 and OM). The angle formed by OP6 and OM is the azimuth angle detected by the line laser, which represents the direction of the nearest obstacle contour point P6 relative to the body center O. The line segment OM represents the body's central axis and also represents the robot's current direction of movement.
[0080] In this embodiment, the nearest obstacle contour point is located within the side obstacle detected by the robot. The area covered by the side obstacle overlaps with the effective detection area generated by the intersecting line laser module. Figure 2 The side obstacle #1 is covered by the triangular detection area in front of the viewpoint M, corresponding to... Figure 5 The side obstacle #2 is covered by the triangular detection area in front of the viewpoint M; therefore, the outline points of obstacles near the nearest obstacle outline point can be collected.
[0081] As one embodiment, the specific method for the robot to turn at a preset angle in step S3 includes: controlling the rotational speed difference between the two wheels of the robot to drive the robot to rotate away from the side obstacle. When the robot rotates away from the side obstacle by the preset angle, the line connecting the center of the robot body and the outline point of the nearest obstacle is parallel to the positive direction of the horizontal axis of the robot body, that is, the line connecting the center of the robot body and the outline point of the nearest obstacle is parallel to the wheel axle S, and the current movement direction of the robot is set perpendicular to the wheel axle S; then the position point where the robot is after turning is set as the starting point of the obstacle avoidance movement. At this time, the movement direction of the robot after turning is the starting direction of the obstacle avoidance movement.
[0082] A swivel wheel can be installed in the middle of the robot's head. When there is a speed difference between the two wheels, the robot turns. The wheel closer to the obstacle rotates faster than the wheel farther away from the obstacle, which can make the robot rotate around the center O of the body by the preset angle, thus avoiding the obstacle.
[0083] Specifically, the method of controlling the rotational speed difference between the two wheels of the robot includes: the robot controls the wheel closer to the side obstacle to move forward, and the robot controls the wheel farther from the side obstacle to move forward, with the rotational speed of the wheel closer to the side obstacle being greater than that of the wheel farther from the side obstacle. This drives the robot to rotate towards the side farther from the side obstacle, so that the wheel farther from the side obstacle is the center of rotation, and the sum of half the length of the wheel axle and the preset obstacle avoidance trigger distance equals the radius of rotation. Alternatively, the robot controls the wheel closer to the side obstacle to move forward, and the robot controls the wheel farther from the side obstacle not to rotate, driving the robot to rotate towards the side farther from the side obstacle, so that the wheel farther from the side obstacle is the center of rotation, and the sum of half the length of the wheel axle and the preset obstacle avoidance trigger distance equals the radius of rotation. Alternatively, the robot controls the wheel closest to the side obstacle to move forward, and the robot controls the wheel furthest from the side obstacle to move backward, driving the robot to rotate away from the side obstacle, so that the center of the wheel or axle furthest from the side obstacle serves as the center of rotation; wherein, the forward-moving wheel and the backward-moving wheel generate a speed difference in the same clockwise direction, driving the robot to rotate away from the side obstacle.
[0084] Corresponding to Figures 1 to 6 In the diagram, the wheel located on the side furthest from the side obstacle is wheel L, meaning that the position of wheel L or the center O of the machine body is set as the center of rotation; Figures 1 to 3 The side obstacle is a straight obstacle #1. Figures 3 to 6 The side obstacle is obstacle #2. The preset distance is preferably 0cm to 2cm to prevent the curved edge of the robot's head from colliding with the obstacle. The preset distance should not be set too large to avoid missed detection due to excessive turning radius of the robot. Furthermore, different robots have different distances reserved when encountering obstacles along edges; therefore, the preset obstacle avoidance trigger distance, while greater than the robot's radius, needs to be determined based on actual conditions.
[0085] Based on the above embodiments, during the robot's turning process, with the robot's center O set as the rotation center, as the wheel on the side closest to the obstacle rotates around the rotation center at a preset angle in a preset clockwise direction, the straight-line distance between the wheel on the side closest to the obstacle and the nearest obstacle's outline point is shortened in a preset clockwise direction; wherein, the preset clockwise direction can be clockwise (left edge) or counterclockwise (right edge).
[0086] contrast Figure 2 and Figure 3 It can be seen that, Figure 2 As the circular robot turns left, its right wheel R rotates counterclockwise by 90 degrees, and the difference between the angle P1OM (the angle between OP1 and OM) gradually shortens the straight-line distance between the right wheel R and the nearest obstacle outline point. This brings the right side of the robot closer to obstacle #1, and the robot's direction of movement becomes perpendicular to the line connecting OP1. The robot completes the turning alignment action, that is, it aligns with the obstacle outline point P1. At this time, the effective detection area generated by the cross-line laser module will cover the new area, so as to avoid other obstacles. In this way, it can continue to deal with other obstacles that may appear in the new area according to step S3, thereby achieving the effect of avoiding obstacles in real time.
[0087] contrast Figure 5 and Figure 6 It can be seen that, Figure 5 As the circular robot turns left, its right wheel R rotates counterclockwise by 90 degrees, and the difference between the angle P6OM (the angle between OP6 and OM) gradually shortens the straight-line distance between the right wheel R and the nearest obstacle outline point. This brings the right side of the robot closer to obstacle #1, and the robot's direction of movement becomes perpendicular to the line connecting OP6. The robot completes the turning alignment action, that is, it aligns with the obstacle outline point P1. At this time, the effective detection area generated by the cross-line laser module will cover the new area, so as to avoid other obstacles. In this way, it can continue to deal with other obstacles that may appear in the new area according to step S3, thereby achieving the effect of avoiding obstacles in real time.
[0088] Based on the aforementioned embodiments, the robot uses intersecting line lasers to non-contactly detect the position coordinates, orientation angle, and height information of obstacle contour points on the front side. This information is then converted into a grid map for grid position marking, thereby obtaining the three-dimensional coordinate information of the obstacle relative to the robot. When blind spots are permissible, intersecting line lasers are used to detect contour points at a relatively distant location in front and mark them in the grid map in a timely manner. This allows the robot to know the relative position information of contour points in the forward direction before approaching them, such as the distance between the contour point and the center of the robot body. Compared with existing technologies, this eliminates the need for side wall sensors to mark the contour points of obstacles within the effective detection area formed by the intersecting line lasers.
[0089] Because the robot's body is circular, and when the robot moves to a distance from the preset obstacle avoidance trigger distance from the obstacle outline, it only needs to turn so that the line connecting the center of the robot and the nearest obstacle outline point is parallel to the positive direction of the robot's horizontal axis. This allows the robot to align with the nearest obstacle outline point without collision and set the robot's current position as the starting point for obstacle avoidance. Therefore, the spatial adjustment cost required before the robot avoids obstacles is small, enabling the robot to efficiently complete the turning and alignment action and avoid colliding with obstacles in front of it while moving in the original direction, thus facilitating collision-free obstacle avoidance.
[0090] As one embodiment, in step S4, a reference detection area is set on the side of the robot that is close to the nearest obstacle contour point to cover the contour of the side obstacle. When the robot moves to the distance between the center of the robot body and the nearest obstacle contour point reaches the preset obstacle avoidance trigger distance, the reference detection area covers at least two obstacle contour points of the obstacle, which facilitates the subsequent Bezier curve fitting. In this embodiment, the reference detection area overlaps with the robot's body coverage area (covering the area near the edge of the body) or has a gap (i.e., the reference detection area is completely outside the robot's body); the distance between the boundary point of the reference detection area furthest from the boundary of the body near the obstacle and the center of the body in the positive direction of the body's horizontal axis is greater than or equal to the preset obstacle avoidance trigger distance, so as to cover the obstacle outline points outside the body; at the same time, the reference detection area is also set to cover the passable area between the body and the side obstacle, reflecting that the robot does not touch the obstacle; the straight-line distance covered by the reference detection area in the positive direction of the body's vertical axis does not exceed the maximum detection distance of the line laser emitted by the line laser emitter, and can be equal to the body radius, so as to cover the obstacle outline points that are relatively close, without needing to cover the obstacle outline points that have a large edge distance so that effective edge walking is not possible or the obstacle outline points that do not need to be close, wherein the reference detection area is set to cover part or all of the passable area between the body and the side obstacle. The area covered by the reference detection region outside the body is larger than the area covered by the reference detection region inside the body.
[0091] Preferably, when the reference detection area is a polygonal area, the reference detection area has at least one boundary parallel or perpendicular to the wheel axle S; when the reference detection area overlaps with the robot's body coverage area, the coverage area of the reference detection area at the head is greater than its coverage area at the body, and in the area occupied by the reference detection area outside the body, the coverage area of the reference detection area on the head side is greater than its coverage area on the body side, so that the reference detection area is biased towards covering the front area of the robot, adapting to the detection direction requirements of the line laser. Corresponding to... Figure 7 and Figure 8 The reference detection area EFGH has a larger coverage area above the wheel axle S (above the X-axis) than it has a larger coverage area below the wheel axle S (below the X-axis).
[0092] When the reference detection area is a regular geometric shape with a center point, the center of the reference detection area is set to the outside of the body, and the distance between the center of the reference detection area and the center of the body in the positive direction of the body's horizontal axis is greater than or equal to the radius of the body. The distance between the center of the reference detection area and the center of the body in the positive direction of the body's vertical axis can be less than or greater than or equal to the radius of the body, but it will not exceed the maximum detection range of the line laser emitted by the line laser emitter. The polygonal detection area is preferably a rectangular area, and the longest side of the rectangular area is preferably greater than or equal to the radius of the body.
[0093] If a circular region is used to represent the reference detection area, then only the center and radius need to be determined to set the reference detection area. This allows for the inclusion of all contour point information on the corresponding side of the obstacle with relatively low description cost, thus facilitating the restriction and real-time fitting of the contour points. The reference detection area may intersect or be externally tangent to the circular body, but it does not completely coincide with the body. The radius of the reference detection area is greater than or equal to the radius of the body, but preferably less than the maximum detection distance of the line laser emitted by the line laser emitter. Furthermore, the reference detection area can also be represented using an inscribed triangle or an externally tangent triangle of the circular region.
[0094] As a preferred example, combined with Figure 7 and Figure 8 It can be seen that the reference detection area is a rectangular area EFGH. The method for setting the reference detection area includes:
[0095] Select a point on the positive direction of the longitudinal axis of the machine body (the positive direction of the Y-axis in the figure) that is a first preset longitudinal distance from the center O of the machine body, and on the positive direction of the transverse axis of the machine body (the positive direction of the X-axis in the figure) that is a first preset transverse distance from the center O of the machine body, as the upper left corner point H; if a coordinate system is constructed with the center O of the machine body as the origin, the positive direction of the longitudinal axis of the machine body as the positive direction of the ordinate axis, and the positive direction of the transverse axis of the machine body as the positive direction of the abscissa axis, then the coordinates of the upper left corner point H are (first preset transverse distance, first preset longitudinal distance).
[0096] The lower left corner point E is selected as a position point located at a second preset vertical distance from the center O of the machine body in the opposite direction of the positive longitudinal axis of the machine body and at a first preset horizontal distance from the center O of the machine body in the positive horizontal axis of the machine body. If a coordinate system is constructed with the center O of the machine body as the origin, the positive direction of the longitudinal axis of the machine body as the positive direction of the vertical coordinate axis, and the positive direction of the horizontal axis of the machine body as the positive direction of the horizontal coordinate axis, then the coordinates of the upper left corner point H are (first preset horizontal distance, 0 - second preset vertical distance).
[0097] The upper right corner point is selected as a position point located at a first preset vertical distance from the center O of the body in the positive direction of the longitudinal axis and at a second preset horizontal distance from the center O of the body in the positive direction of the transverse axis. If a coordinate system is constructed with the center O of the body as the origin, the positive direction of the longitudinal axis of the body as the positive direction of the vertical coordinate axis, and the positive direction of the transverse axis of the body as the positive direction of the horizontal coordinate axis, then the coordinates of the upper right corner point G are (second preset horizontal distance, first preset vertical distance).
[0098] The lower right corner point is selected as a position point located at a second preset vertical distance from the center of the machine body in the opposite direction of the positive longitudinal axis of the machine body and at a second preset horizontal distance from the center of the machine body in the positive horizontal axis of the machine body. If a coordinate system is constructed with the center of the machine body O as the origin, the positive direction of the longitudinal axis of the machine body as the positive direction of the vertical coordinate axis, and the positive direction of the horizontal axis of the machine body as the positive direction of the horizontal coordinate axis, then the coordinates of the lower right corner point F are (second preset horizontal distance, 0 - second preset vertical distance).
[0099] Then, connect the lower left corner point E to the upper left corner point H, connect the upper left corner point H to the upper right corner point G, connect the upper right corner point G to the lower right corner point F, and connect the lower right corner point F to the lower left corner point E to obtain the reference detection area EFGH. For the lower left corner point E, upper left corner point H, upper right corner point G, and lower right corner point F, connect them sequentially with line segments to form the rectangular area EFGH. If the body center O is set in the global map coordinate system, the body center O is not necessarily the origin of the global map coordinate system. Correspondingly, the positive direction of the body's vertical axis is not necessarily the positive direction of the vertical axis of the global map coordinate system, and the positive direction of the body's horizontal axis is not necessarily the positive direction of the horizontal axis of the global map coordinate system. Therefore, when using the reference detection area EFGH to define a map area in the raster map, the lower left corner point E, upper left corner point H, upper right corner point G, and lower right corner point F all need to be converted to their coordinates in the global map coordinate system according to the coordinate system transformation equations disclosed in the aforementioned embodiments.
[0100] Corresponding to Figure 7 and Figure 8 The vertical distance from the body center O to the dashed line segment EH is equal to the first preset horizontal distance, the vertical distance from the body center O to the dashed line segment FG is equal to the second preset horizontal distance, the distance between the wheel axle and the dashed line segment HG is equal to the first preset vertical distance, and the distance between the wheel axle and the dashed line segment EF is equal to the second preset vertical distance.
[0101] In this embodiment, the second preset lateral distance is set to be greater than or equal to the preset obstacle avoidance trigger distance, but less than the maximum detection distance of the line laser emitted by the line laser emitter; this ensures that the line connecting the upper right corner point G and the lower right corner point F is located outside the body, reserving obstacle avoidance space. The first preset longitudinal distance is set to be greater than or equal to the body radius, but less than the maximum detection distance of the line laser emitted by the line laser emitter, to detect the outer region of the front boundary of the body. Simultaneously, the first preset lateral distance is set to be greater than half the length of the wheel axle and less than the body radius, thereby placing the lower left corner point E inside the body. The second preset longitudinal distance is set to be less than half the body radius or the length of the wheel axle, placing the lower left corner point E on the side of the body closer to side obstacles.
[0102] Generally, since obstacle outlines are represented in advance using a grid map, and the robot directly using the grid map to navigate around obstacles will introduce grid errors (determined by the resolution of the grid map; here the grid resolution is 10mm, so directly using it to navigate around obstacles will result in a 10mm positioning coordinate error), causing the differential speed robot, such as the sweeping robot, to continuously vibrate. Therefore, fitting is needed to eliminate errors and fill in the sampling points lost due to grid resolution. Specifically, the grid coordinates of the obstacle outlines are first converted back to the robot coordinate system, where the robot coordinate system is a coordinate system with the center of the robot's body as the origin, that is, a coordinate system with the robot's current position as the origin.
[0103] In this embodiment, the reference detection area is set in the grid map to define a portion of the map area. The robot extracts the grid coordinates of obstacle outline points from the area covered by the reference detection area in the grid map, and then converts the extracted grid coordinates from the global map coordinate system back to the robot coordinate system to obtain local coordinates relative to the robot's current position. These local coordinates are then marked as the position coordinates of the obstacle outline points defined by the reference detection area, corresponding to the coordinates of the obstacle outline points in the robot coordinate system. It should be noted that the reference detection area is configured to cover the grid map in step S4 to define the grid coordinates of obstacle outline points in real time during robot movement and convert them into position coordinates of the obstacle outline points in real time.
[0104] In this embodiment, the rotation transformation of the grid coordinates of the obstacle contour points between the global map coordinate system and the robot coordinate system is the inverse transformation of the local coordinate rotation transformation, and the translation transformation of the grid coordinates of the obstacle contour points is the inverse transformation of the local coordinate translation transformation; specifically, the inverse coordinate system transformation equation is:
[0105] ;
[0106] ;
[0107] The position coordinates (coordinates in the robot coordinate system) of the obstacle contour points are ( , The robot's current position in the global map coordinate system is ( ). , The rotation angle required for the raster coordinate rotation transformation of the obstacle contour points is... , which is the angle required for the obstacle contour points to rotate in the coordinate system transformation; the grid coordinates of the obstacle contour points are ( , ).
[0108] As an example of curve fitting, in step S4, the method of fitting a Bézier curve using the position coordinates of the obstacle contour points defined within the reference detection area includes:
[0109] The robot outlines the obstacle points within the reference detection area EFGH along the positive direction of its longitudinal axis. Figure 7 and Figure 8Within the reference detection area EFGH, the starting point and ending point of the obstacle fitting curve are determined from discrete points located near the left contour of the obstacle. The Bézier curve to be fitted extends along the positive direction of the body's longitudinal axis, which is the positive direction of the Y-axis shown in the figure. Then, within the reference detection area, each obstacle contour point distributed along the positive direction of the body's longitudinal axis between the starting point and the ending point is sequentially marked as the control points required to fit the Bézier curve. The obstacle fitting curve is a Bézier curve. The number of control points is equal to the sum of the order of the Bézier curve and the value 1. The order of the Bézier curve is represented by n.
[0110] Based on the starting point of the obstacle fitting curve, the ending point of the obstacle fitting curve, and the control points sequentially marked between the starting point and the ending point of the obstacle fitting curve, an obstacle fitting curve based on an nth-order Bézier curve is generated, resulting in the equation of the nth-order Bézier curve, so that the relatively discrete obstacle contour points ( Figure 7 and Figure 8 Discrete points located near the left contour of the obstacle within the reference detection area EFGH are fitted and connected to form a relatively continuous contour line, such as... Figure 7 The concave dashed curve on the left side of the left contour of obstacle #3, or Figure 8 The right-side convex dashed curve is located on the left side of the outline of obstacle #2. This overcomes the grid error that can occur when directly navigating around obstacles based on the grid map. The starting point and ending point of the obstacle fitting curve are both control points.
[0111] Specifically, the trajectory equation of the obstacle fitting curve is:
[0112] ;
[0113] in, The x-coordinate of a point in the fitted curve of the obstacle is given. Let be the ordinate of the point in the obstacle fitting curve, and let i represent the sequence number of the control point required to fit the obstacle fitting curve. The sequence number i represents the order of the control points required to fit the obstacle fitting curve along the positive direction of the body's longitudinal axis, that is, the arrangement order of the obstacle outline points within the reference detection area along the positive direction of the body's longitudinal axis, and is configured to start from 0 and increase along the positive direction of the body's longitudinal axis; and t is equal to the ratio between i and (n+1), used to represent the ratio of the sequence number of the most recently fitted point along the positive direction of the body's longitudinal axis to the total number of points that need to be fitted. The absolute value of the difference between the ordinate of the point with sequence number i and the ordinate of the point with sequence number (i+1) can be fixed. It is the x-coordinate of the i-th control point required to fit the curve of the obstacle. It is the ordinate of the i-th control point required to fit the curve of the obstacle; The x-coordinate represents the starting point position of the obstacle fitting curve within the reference detection area. The ordinate represents the starting point of the obstacle fitting curve within the reference detection area; The x-coordinate represents the endpoint of the obstacle fitting curve within the reference detection area. The vertical coordinate represents the endpoint of the obstacle fitting curve within the reference detection area. express( , The number of combinations at a specific t value is similar to the binomial coefficients (combinations) in a binomial expansion, and follows Pascal's triangle distribution. Indicated as a reference detection area used to set up control points The x-coordinate of the obstacle outline point; Indicated as a reference detection area used to set up control points The ordinate of the obstacle outline points.
[0114] It should be noted that the trajectory equation of the obstacle fitting curve is based on the Bézier curve formula. A Bézier curve is a mathematical curve used in two-dimensional graphics applications; the curve is defined by: a starting point (also called the initial point), an ending point (also called the final point), and control points; by adjusting the control points, the shape of the Bézier curve will change.
[0115] During Bézier curve fitting, the number of possible values for 't' equals the number of points interpolated from the fitted curve of the obstacle, thus interpolating points with low continuity into points that appear relatively continuous. In the positive longitudinal direction of the machine body, the curvature (degree of bending) of the fitted curve of the obstacle changes as the relative positions of two adjacent control points change. Adjacent control points use... and It means that, among them, The starting point of the obstacle fitting curve is then used. This indicates that the endpoint of the obstacle fitting curve is used This means that i gradually increases from the starting point to the end point during the Bézier curve fitting process, at which point t equals 1; so that the relatively discrete obstacle contour points are fitted and connected into a relatively continuous contour line. Compared with the error of the grid marker contour points, the Bézier curve fitting can use the fitted points to fill the contour points lost during the acquisition process and fit a curve that is closer to the direction of the obstacle contour, thus realizing the smoothing of the obstacle grid using Bézier curves.
[0116] As those skilled in the art will know, when the start and end points of a Bézier curve are locked, the value t will change by moving the midpoint on the line connecting two adjacent control points. A Bézier curve will not pass through all midpoints, but it can be guaranteed that it will definitely pass through the start and end points.
[0117] As one embodiment, the starting point of the obstacle fitting curve is the obstacle contour point closest to the boundary of the reference detection area in the opposite direction of the positive longitudinal axis of the aircraft, or the boundary point of the reference detection area through which the outline of the obstacle represented by the obstacle fitting curve passes in the opposite direction of the positive longitudinal axis of the aircraft, so that the starting point of the obstacle fitting curve in the opposite direction of the positive longitudinal axis of the aircraft is the obstacle contour point farthest from the starting point of the obstacle avoidance movement; the ending point of the obstacle fitting curve is the obstacle contour point closest to the boundary of the reference detection area in the positive longitudinal axis of the aircraft, or the boundary point of the reference detection area through which the outline of the obstacle represented by the obstacle fitting curve passes in the positive longitudinal axis of the aircraft, so that the starting point of the obstacle fitting curve in the positive longitudinal axis of the aircraft is the obstacle contour point farthest from the starting point of the obstacle avoidance movement. Accordingly, Figure 7 The starting point of the obstacle fitting curve described in the text within the reference detection area is position point A1. Figure 7 The endpoint of the obstacle fitting curve described in the reference detection area is location point B1. Figure 8 The starting point of the obstacle fitting curve described in the text within the reference detection area is location point A3. Figure 8 The endpoint of the obstacle fitting curve described in the reference detection area is location point B2.
[0118] Preferably, the obstacle contour represented by the obstacle fitting curve is located in the positive direction of the robot's horizontal axis, and the opposite direction of the positive horizontal axis is configured as the target offset direction. The preset obstacle avoidance margin is set to be equal to the sum of the robot's radius and the preset obstacle avoidance distance, which is preferably 15mm. Here, the target offset direction is used to define the offset direction of the target point in the obstacle fitting curve in step S5. By translating the obstacle fitting curve or its points along the target offset direction using the preset obstacle avoidance margin, the robot's actual moving position can be controlled to maintain a certain distance from the obstacle fitting curve, and a forward-looking point in the robot coordinate system for actual robot movement can be obtained. This allows the robot to walk along the extension direction of the obstacle fitting curve without touching the obstacle.
[0119] As one example, Figure 7This is a schematic diagram of an obstacle fitting curve U1 fitted in one embodiment. The entire left contour of obstacle #3 is covered by the reference detection area EFGH. The coordinate offset of the look-ahead point A2 from the starting point A1 of the obstacle fitting curve in the X-axis direction is equal to the preset obstacle avoidance margin D. The obstacle fitting curve U1 is used to characterize the concave contour line of obstacle #3 bounded by the reference detection area EFGH. The starting point of the obstacle fitting curve U1 (equivalent to the starting point of the Bézier curve) and the lower endpoint of the concave contour line bounded by the reference detection area EFGH are both position points A1, and the ending point of the obstacle fitting curve U1 (equivalent to the ending point of the Bézier curve) and the upper endpoint of the concave contour line bounded by the reference detection area EFGH are both position points B1. The dashed curve extending from the look-ahead point A2 in the positive Y-axis direction is the actual walking trajectory of the robot, which walks along the obstacle fitting curve U1. Preferably, the dashed curve extending from the look-ahead point A2 in the positive Y-axis direction is parallel to the obstacle fitting curve U1.
[0120] As another embodiment Figure 8 This is a schematic diagram of an obstacle fitting curve U2 fitted in one embodiment. The outline on the left side of obstacle #2 is not completely covered by the reference detection area EFGH. The coordinate offset of the look-ahead point A5 and the position point A4 in the obstacle fitting curve in the X-axis direction is equal to the preset obstacle avoidance margin D. The obstacle fitting curve U2 is used to characterize the outwardly convex outline of obstacle #2 bounded by the reference detection area EFGH. The starting point of the obstacle fitting curve U2 (equivalent to the starting point of the Bézier curve) and the lower endpoint of the outwardly convex outline bounded by the reference detection area EFGH are both position point A3. The ending point of the obstacle fitting curve U2 (equivalent to the ending point of the Bézier curve) and the upper endpoint of the outwardly convex outline bounded by the reference detection area EFGH are both position point B2. The dashed curve extending from the look-ahead point A5 in the positive Y-axis direction is the actual trajectory of the robot, which moves along the obstacle fitting curve A4B2. Before the robot moves to the look-ahead point A5, the line connecting the robot's obstacle-around starting point O and the nearest obstacle contour point P6 is parallel to the wheel axle. However, the dashed curve extending from the look-ahead point A5 in the positive Y-axis direction is not necessarily parallel to the obstacle fitting curve U2.
[0121] As one embodiment, in step S5, the method of obtaining target points with the same ordinate as the adjacent positions of the obstacle-avoidance walking starting point in the positive longitudinal direction of the body, and then obtaining the look-ahead points by offsetting the coordinates of the target points, includes: calculating the ordinate of the adjacent positions of the obstacle-avoidance walking starting point in the positive longitudinal direction of the body, and setting the ordinate of the adjacent positions as the initial look-ahead ordinate; then substituting the initial look-ahead ordinate into the trajectory equation of the obstacle-avoidance fitting curve, calculating the abscissa of the points in the obstacle-avoidance fitting curve with the same ordinate as the initial look-ahead ordinate, wherein the points in the obstacle-avoidance fitting curve with the same ordinate as the initial look-ahead ordinate are marked as target points. For example, when obtaining the first target point, the first target point is located at... Figure 7 The middle point is A1, and the first target point is... Figure 8 The target point is point A4; then the target point is offset along the target offset direction by a preset obstacle avoidance distance to obtain the look-ahead point. Therefore, when obtaining the first look-ahead point, the first look-ahead point is... Figure 7 The middle point is A2, and the first lookahead point is... Figure 8 Point A5 is located in the obstacle fitting curve. The horizontal coordinate offset between the point whose ordinate is the starting forward-looking ordinate and the forward-looking point is equal to the preset obstacle avoidance distance. The robot then moves from the obstacle avoidance starting point to the forward-looking point to begin walking along the extension direction of the obstacle fitting curve and maintaining a certain distance from it. Generally, the robot moves from the obstacle avoidance starting point to the forward-looking point in a straight line according to the direction formed by the forward-looking point relative to the obstacle avoidance starting point, and the walking distance is equal to the straight-line distance between the obstacle avoidance starting point and the forward-looking point.
[0122] As one embodiment, the implementation method of step S6 includes: whenever the robot moves to a look-ahead point, the robot updates the current look-ahead point to the obstacle avoidance starting point, then executes step S5 to obtain the next look-ahead point in front of the robot, and then the robot moves to the next look-ahead point; then updates the next look-ahead point to the obstacle avoidance starting point, and then executes steps S5 to S6, and so on, until the robot moves to the preset obstacle avoidance endpoint. The preset obstacle avoidance endpoint can also be understood as the latest calculated look-ahead point, so as to enable the robot to walk along the extension direction of the obstacle fitting curve without touching the obstacle. The preset obstacle avoidance endpoint is obtained by offsetting the endpoint of the obstacle fitting curve along the target offset direction by the preset obstacle avoidance margin. Figure 7 The preset obstacle avoidance endpoint mentioned above can be obtained by translating the preset obstacle avoidance distance D from position point B1 along the negative X-axis, located at the uppermost endpoint of the dashed curve where A2 is located; Figure 8The preset obstacle avoidance endpoint mentioned above can be obtained by translating the preset obstacle avoidance distance D from position point B2 along the negative X-axis, located at the uppermost endpoint of the dashed curve where A5 is located. Therefore, in order to prevent the robot from colliding with obstacles during obstacle avoidance, this embodiment shifts the obstacle fitting curve towards the obstacle avoidance starting point by a distance greater than the robot's radius, obtaining a look-ahead point for the robot to bypass. The robot is then controlled to move from its current position to a look-ahead point in front of it, and sequentially tracks the points in front of the robot along the obstacle fitting curve. This enables the robot to perform curve fitting and node tracking based on the historical markers of the obstacle contour points, achieving collision-free obstacle avoidance or obstacle bypass during the tracking process.
[0123] In some embodiments, whenever step S4 fits an obstacle fitting curve, in step S6, the next look-ahead point can be obtained by executing only step S5. That is, the next look-ahead point is a target point with the same vertical coordinate in the obstacle fitting curve that is translated along the target offset direction. Then, the next look-ahead point is updated as the obstacle-avoidance walking starting point, and steps S5 to S6 are executed again. This process is iterated until the robot moves to the look-ahead point formed by translating the end point of the obstacle fitting curve fitted in step S4. The robot then completes the contour walking around the obstacle contour points defined by the reference detection area. This enables the robot to walk along the same obstacle fitting curve without touching the obstacle (keeping the actual moving position at a distance from the obstacle fitting curve). At the same time, the look-ahead points that the robot has moved through can also be connected in sequence to form a target obstacle-avoidance curve trajectory parallel to the obstacle fitting curve.
[0124] Based on the above embodiments, after the robot moves to the preset obstacle avoidance endpoint in step S6, it can be considered that after completing step S6, the reference detection area set by the robot covers a new ground area, for example... Figure 8 The reference detection area set by the robot will cover the outlines of other obstacles to the upper right of position point B2 (relative to...). Figure 4Regarding the detected obstacle contour point P10, there are pre-detected obstacle contour points, where position point B2 can be obstacle contour point P10. Other obstacle contour points to the upper right of position point B2 have not yet been fitted into obstacle fitting curves. In order to propel the robot to completely bypass the obstacle #2 on the right, step S4 is executed to perform Bézier curve fitting on the obstacle contour points framed in the new ground area to obtain a new obstacle fitting curve. Then, steps S5 and S6 are executed to enable the robot to walk along the extension direction of the new obstacle fitting curve without touching the obstacle. The ground area is parallel to the robot's travel plane. There may be overlapping areas between the ground areas covered by the reference detection area before and after the robot moves. However, since the robot has moved to the preset obstacle bypass endpoint, the reference detection area has moved to the right side of the endpoint B2 of the obstacle fitting curve. Therefore, in the ground area newly covered by the reference detection area, most of the framed obstacle contour points are obstacle contour points that have not been fitted in step S4. Therefore, after completing the obstacle fitting curve fitted in step S4 and reaching the preset obstacle-around endpoint, a new obstacle fitting curve will be fitted using step S4 again (the extension direction and curvature will change), and then the vehicle will walk along the extension direction of the new obstacle fitting curve.
[0125] Therefore, whenever step S4 fits an obstacle fitting curve, in step S6, the next look-ahead point can be obtained by executing only step S5. That is, the next look-ahead point is the target point with the same vertical coordinate in the obstacle fitting curve that is translated along the target offset direction. Then, the next look-ahead point is updated as the obstacle-avoidance walking starting point, and steps S5 to S6 are executed again. This process is iterated until the robot moves to the look-ahead point formed by translating the end point of the obstacle fitting curve fitted in step S4. The robot then completes the contour walking around the obstacle contour points defined by the reference detection area. This allows the robot to walk along the same obstacle fitting curve without touching the obstacle (keeping the actual movement position at a distance from the obstacle fitting curve). At the same time, the look-ahead points that the robot has moved through are connected in sequence to form a target obstacle-avoidance curve trajectory parallel to the obstacle fitting curve.
[0126] As another embodiment, the implementation method of step S6 includes: whenever the robot moves to a look-ahead point, the robot updates the current look-ahead point as the obstacle avoidance starting point, and then executes steps S4 to S5. Then, the next look-ahead point is obtained through the trajectory equation corresponding to the latest fitted obstacle curve, and the robot moves to the next look-ahead point; then the next look-ahead point is updated as the obstacle avoidance starting point, and steps S4 to S6 are executed again. This process is iterated until the robot moves to the preset obstacle avoidance endpoint, so that the robot can walk along the extension direction of the latest fitted obstacle curve without touching the obstacle. Moreover, the extension direction of the obstacle curve is changed while walking, so as to implement the corresponding detour strategy for different position features. This makes the robot more robust to the environment and can better improve the obstacle avoidance problem of laser navigation robots in the robot coordinate system. It can effectively deal with different situations that occur during the movement. The preset obstacle avoidance endpoint can also be understood as the latest calculated look-ahead point. For example, in order to avoid repeatedly following the outline of the same obstacle, the obstacle fitting curve fitted during the last execution of step S4 may be connected end to end with the obstacle fitting curve fitted during the first execution of step S4. Therefore, the endpoint of the obstacle fitting curve fitted during the last execution of step S4 is set as the preset obstacle avoidance endpoint.
[0127] In some embodiments, during the robot's movement, specifically after the robot moves to the preset obstacle avoidance endpoint in step S6, when the new ground area covered by the reference detection area set by the robot does not overlap with the ground area originally covered by the reference detection area, a Bezier curve is fitted in the new ground area according to step S4 to obtain a new obstacle fitting curve. Then, the starting point of the new obstacle fitting curve is connected to the ending point of the previously fitted obstacle fitting curve, and the connected obstacle fitting curve is offset by the preset obstacle avoidance margin according to the target offset direction to obtain a new target obstacle avoidance curve trajectory.
[0128] As one example, such as Figure 7As shown, the reference detection area EFGH has defined all obstacle contour points on the right side of obstacle #1. Point B1 is located on the boundary HG of the reference detection area EFGH. At this time, the starting point of the obstacle fitting curve U1 fitted by executing step S3 is position point A1, and the ending point of the obstacle fitting curve U1 fitted by executing step S3 is position point B1. Point B1 is located on the boundary HG of the reference detection area EFGH. In this embodiment, the vertical distance from position point A1 to the boundary EF of the reference detection area EFGH is set to the maximum target offset allowed in the positive direction of the vertical axis for the reference detection area EFGH to define all obstacle contour points (all discrete points distributed between position point A1 and position point B1) on the right side of obstacle #3. During robot movement, if the vertical offset of the reference detection area EFGH in the positive direction of the vertical axis does not exceed the maximum target offset, then the reference detection area EFGH will move as the robot moves. The obstacle outline points defined before and after the robot's movement (which could be moving past two adjacent look-ahead points on the vertical axis) remain unchanged. Simultaneously, the robot connects the look-ahead points it moved past in step S6 sequentially to form the same target obstacle-avoidance curve trajectory. Therefore, provided that the vertical coordinate offset of the reference detection area EFGH in the positive direction of the vertical axis does not exceed the maximum target offset, regardless of whether the robot executes step S4 once after moving each look-ahead point or repeats step S4 only after reaching a preset obstacle-avoidance endpoint, the obstacle fitting curve obtained in step S4 remains unchanged before and after the robot's movement. Figure 7 The target obstacle-avoidance curve trajectory A2B3 formed by connecting them sequentially is parallel to the obstacle fitting curve U1 obtained in step S4 before and after the robot moves.
[0129] Based on the above embodiments, if the vertical coordinate offset of the reference detection area EFGH in the positive direction of the vertical coordinate axis exceeds the maximum target offset, and the robot has already moved past the end point of the target obstacle-around curve trajectory, then the reference detection area EFGH has not defined all obstacle contour points on the right side contour of obstacle #1. The number of obstacle contour points currently defined by the reference detection area EFGH is relative to... Figure 1 If the number of obstacle contour points (all obstacle contour points on the right side contour of obstacle #1) defined by the reference detection area EFGH is reduced, then the number of control points required for the obstacle fitting curve fitted in the current execution step S3 may be reduced. When the reference detection area EFGH has defined all obstacle contour points on the right side contour of obstacle #1, the obstacle fitting curve fitted in step S3 is different from the obstacle fitting curve fitted in the current execution step S3.
[0130] If step S4 is repeated only after each predetermined obstacle avoidance endpoint is reached, then the predetermined obstacle avoidance endpoint is obtained by offsetting the endpoint of the obstacle fitting curve along the target offset direction by the predetermined obstacle avoidance margin, forming the endpoint of the target obstacle avoidance curve trajectory, corresponding to... Figure 7 In the process, the endpoint B1 of the obstacle fitting curve U1 is offset along the negative X-axis by the preset obstacle avoidance distance D, forming the endpoint B3 of the target obstacle avoidance curve trajectory. All points in the obstacle fitting curve are obtained by offsetting the preset obstacle avoidance distance along the target offset direction to form the points in the target obstacle avoidance curve trajectory. Therefore, the target obstacle avoidance curve trajectory can be planned in advance by applying offset calculations to the trajectory equation of the obstacle fitting curve, reducing the cost of spatial fitting calculations and improving the efficiency of robot obstacle avoidance.
[0131] It should be noted that the endpoint of the obstacle fitting curve is offset along the target offset direction by the preset obstacle avoidance margin to obtain the endpoint of the target obstacle avoidance curve trajectory; the starting point of the obstacle fitting curve is offset along the target offset direction by the preset obstacle avoidance margin to obtain the starting point of the target obstacle avoidance curve trajectory; the endpoint of the obstacle fitting curve and the endpoint of the target obstacle avoidance curve trajectory are both the endpoints where the corresponding curves terminate their extension within the reference detection area, and the endpoint where the target obstacle avoidance curve trajectory begins to extend is the starting point of the target obstacle avoidance curve trajectory, so that the extension direction of the target obstacle avoidance curve trajectory is from the starting point of the target obstacle avoidance curve trajectory to the endpoint of the target obstacle avoidance curve trajectory.
[0132] It should be noted that the difference between the ordinate of the point adjacent to the starting point of the obstacle avoidance movement on the positive longitudinal axis of the machine and the ordinate of the starting point of the obstacle avoidance movement is equal to 1. Therefore, the extension direction of the obstacle fitting curve is the direction in which the ordinate of the target point in the obstacle fitting curve increases, ensuring that the absolute value of the difference between the ordinates of the two forward-looking points obtained in step S6 is equal to 1. For example, Figure 7The difference between the ordinate of the forward-looking point A2 and the ordinate of the obstacle-avoidance walking starting point is equal to 1. In this embodiment, the adjacent positions of the obstacle-avoidance walking starting point include: positions where the absolute value of the difference between the abscissa and the ordinate of the obstacle-avoidance walking starting point is equal to 1, and the absolute value of the difference between the abscissa and the ordinate of the obstacle-avoidance walking starting point is equal to 1, denoted as adjacent corner points, of which there are four types, distributed at the upper left, lower left, upper right, and lower right corners of the obstacle-avoidance walking starting point. Positions where the absolute value of the difference between the abscissa and the ordinate of the obstacle-avoidance walking starting point is equal to 1, and the absolute value of the difference between the ordinate and the ordinate of the obstacle-avoidance walking starting point is equal to 0, denoted as lateral adjacent positions, of which there are two types, distributed on the left and right sides of the obstacle-avoidance walking starting point and the line connecting them is parallel to the positive direction of the transverse axis of the machine. Points whose absolute difference between their x-coordinate and the starting point of obstacle avoidance is 0, and whose absolute difference between their y-coordinate and the starting point of obstacle avoidance is 1, are denoted as longitudinally adjacent points. There are two types: those located above and below the starting point of obstacle avoidance, and those connected by a line parallel to the positive direction of the robot's longitudinal axis. Therefore, four adjacent corner points, two longitudinally adjacent points, and two laterally adjacent points surround a starting point of obstacle avoidance, forming an eight-neighborhood, equivalent to a nine-square grid layout. This helps the robot to walk a more continuous trajectory in steps S5 and S6. The positive direction of the robot's longitudinal axis is defined as the positive direction of the y-coordinate in a coordinate system with the robot's center as the origin. This can be further understood as the robot's movement direction being the positive direction of the y-coordinate in a coordinate system with the robot's center as the origin.
[0133] In summary, to address the grid positioning error generated when marking obstacle contour points on a grid map, this application first extracts the position coordinates of obstacle contour points within the detection area on one side of the robot and performs Bézier curve fitting. Then, under the premise of determining each obstacle contour point as a control point, an obstacle fitting curve extending forward along the positive longitudinal axis of the robot is fitted, eliminating the grid error present in the original grid map marking. During the fitting of the obstacle fitting curve, target points are inserted between adjacent control points to connect and form segments of the Bézier curve, filling in contour sampling points that might be lost when using grid map marking, thus smoothing the obstacle contour points. Next, based on the robot's body radius and obstacle avoidance distance requirements, coordinate offset calculations are performed on each point of the obstacle fitting curve to obtain the robot's collision-free obstacle avoidance trajectory position points. Forward-looking points for the robot to avoid obstacles are planned, ensuring that the robot maintains a certain margin from the contour of the obstacle it follows during movement, creating an adjustable space between the robot and the obstacle contour. This is particularly suitable for robots that adjust their posture based on the speed difference between the left and right wheel sets for obstacle avoidance. Based on this, whenever a new obstacle outline point is defined in the detection area, a new obstacle fitting curve is fitted in the new ground area (the semi-closed area enclosed by the line connecting the new control points) using the Bézier curve fitting method. Then, the look-ahead point is tracked and obtained. Compared with directly using grid coordinates for obstacle avoidance, it can walk a smoother obstacle-avoiding trajectory. The robot continuously relies on the fitted curve to reduce the error caused by grid resolution and safely bypasses the side obstacles.
[0134] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. References to memory, storage, databases, or other media used in the embodiments provided in this application can all include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable memory (PROM), electrically programmable memory (DPROM), electrically erasable programmable memory (DDPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory.
[0135] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. The above embodiments only illustrate several embodiments of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that for those skilled in the art, several modifications and improvements can be made without departing from the concept of this application, and these all fall within the protection scope of this application.
Claims
1. A robot motion control method based on line laser, characterized in that, The robot's front end is equipped with a cross-line laser module; The robot movement control method includes: Step S1: The robot controls the intersecting line laser module to emit two intersecting line laser beams in front of the robot. Step S2: During the robot's movement, the robot collects the obstacle contour points detected by the line laser in real time and obtains the position coordinates of the obstacle contour points; Step S3: When the robot moves to the point where the distance between the center of the robot body and the nearest obstacle outline reaches the preset obstacle avoidance trigger distance, the robot turns at a preset angle and then sets the robot's current position as the starting point for obstacle avoidance. Step S4: Set a reference detection area on the side of the robot that is close to the obstacle contour point, and then use the position coordinates of the obstacle contour point defined by the reference detection area to perform Bézier curve fitting to generate the obstacle fitting curve. Step S5: Based on the adjacent position points of the obstacle avoidance starting point in the positive direction of the body's longitudinal axis, obtain the target point with the same longitudinal coordinate as the adjacent position point from the obstacle fitting curve, and then obtain the look-ahead point by offsetting the coordinate of the target point; then the robot moves from the obstacle avoidance starting point to the look-ahead point. Step S6: Whenever the robot moves to a look-ahead point, update the look-ahead point to the obstacle avoidance starting point; then repeat steps S5 to S6, or repeat steps S4 to S6; until the robot moves to the preset obstacle avoidance endpoint. In step S3, when the robot moves to a distance between the center of the robot body and the nearest obstacle outline point that reaches the preset obstacle avoidance trigger distance, the preset angle is equal to the angle formed by the line connecting the center of the robot body and the nearest obstacle outline point on the side closer to the side obstacle with respect to the positive direction of the horizontal axis of the robot body; wherein, the nearest obstacle outline point is located in the side obstacle detected by the robot, and there is an overlapping area between the area covered by the side obstacle and the effective detection area.
2. The robot movement control method according to claim 1, characterized in that, The cross-line laser module includes two line laser emitters and one laser receiver. Two line laser emitters are mounted on the side of the robot, and the line lasers emitted by the two line laser emitters form an effective detection area in the robot's travel plane; with the robot's travel plane as a reference, the emission range of the two line laser emitters is to form a preset upward emission angle and a preset downward emission angle. The laser receiver is mounted on the side of the robot and is located slightly above the middle of the two line laser emitters. With the robot's travel plane as a reference, the receiving range of the laser receiver is both upward at a preset upward receiving angle and downward at a preset downward receiving angle. The laser receiver is used to collect the reflection points formed by the line laser on the obstacle and configure the reflection points as the obstacle contour points detected by the line laser emitted by the line laser emitter.
3. The robot movement control method according to claim 2, characterized in that, The robot includes a semi-circular head, a semi-circular body, and two symmetrically arranged wheels connected by an axle located at the boundary between the head and the body. The semi-circular head and body together form a circular body. The center of the axle is the center of the robot's body. The length of the axle is less than the diameter of the robot's body. The robot's direction of movement is forward, the positive direction of the robot's longitudinal axis is set as the robot's current direction of movement, and the positive direction of the robot's longitudinal axis is set perpendicular to the wheel axle. The positive direction of the robot's horizontal axis is defined as the direction towards the obstacle on the side of the robot and parallel to the wheel axle. The reference detection area is used to cover part or all of the outline of the obstacle on the side during the robot's movement.
4. The robot movement control method according to claim 3, characterized in that, The position coordinates of each collected obstacle contour point are set as local coordinates relative to the robot's current position point. The local coordinates are set in the robot's coordinate system, and the robot's current position point is set as the origin of the robot's coordinate system. When local coordinates are transformed to the global map coordinate system used to construct the raster map, the local coordinates are transformed into the global map coordinate system through rotation and translation to obtain the raster coordinates of the obstacle outline points; The rotation angle required for local coordinate rotation transformation is equal to the angle between the same attribute coordinate axis of the global map coordinate system and the robot coordinate system; the coordinate offset required for local coordinate translation transformation is the coordinate of the robot's current position point in the global map coordinate system; the positive direction of the vertical axis of the robot coordinate system is parallel to the positive direction of the robot's vertical axis.
5. The robot movement control method according to claim 3, characterized in that, During the robot's movement, the nearest obstacle contour point is the obstacle contour point that is closest to the center of the robot body, detected by the intersecting line laser module in the current direction of movement. The nearest obstacle contour point is pre-collected by the intersecting line laser module; or, the nearest obstacle contour point is collected in real time by the intersecting line laser module; wherein, the coordinates of the robot's current position point are represented using the coordinates of the robot's body center; The preset obstacle avoidance trigger distance is set to be equal to the sum of the robot's radius and the preset distance, so that when the robot moves to the point where the distance between the robot's center and the nearest obstacle outline point reaches the preset obstacle avoidance trigger distance, the shortest distance between the robot's edge and the obstacle outline point is equal to the preset distance.
6. The robot movement control method according to claim 5, characterized in that, In step S3, the specific method for the robot to turn at a preset angle includes: The robot's two wheels are controlled to generate a speed difference, driving the robot to rotate away from the side obstacle. When the robot rotates away from the side obstacle by the preset angle, the line connecting the robot's center and the outline point of the nearest obstacle is parallel to the positive direction of the robot's horizontal axis. Then, the position of the robot after turning is set as the starting point of the obstacle avoidance movement.
7. The robot movement control method according to claim 4, characterized in that, In step S4, a reference detection area is set on the side of the robot that is close to the outline point of the nearest obstacle to cover the outline of the side obstacle; There is an overlapping area or a gap between the reference detection area and the robot's body coverage area. The distance between the boundary point of the reference detection area that is farthest from the edge of the robot body on the side closest to the obstacle and the center of the robot body in the positive direction of the horizontal axis of the robot body is greater than or equal to the preset obstacle avoidance trigger distance. The reference detection area is set to cover the passable area between the aircraft body and the side obstacles; the straight-line distance covered by the reference detection area in the positive direction of the longitudinal axis of the aircraft body does not exceed the maximum detection distance of the line laser emitted by the line laser emitter. The area covered by the reference detection region outside the body is larger than the area covered by the reference detection region inside the body.
8. The robot movement control method according to claim 7, characterized in that, The method for setting the reference detection area includes: The upper left corner point is selected as the position point located at a first preset vertical distance from the center of the machine body in the positive direction of the longitudinal axis and at a first preset horizontal distance from the center of the machine body in the positive direction of the transverse axis. The lower left corner point is selected as a position point located at a second preset longitudinal distance from the center of the machine body in the opposite direction of the positive longitudinal axis of the machine body and at a first preset horizontal distance from the center of the machine body in the positive transverse axis of the machine body. The upper right corner point is selected as a position point located at a first preset longitudinal distance from the center of the machine body in the positive direction of the longitudinal axis of the machine body and at a second preset horizontal distance from the center of the machine body in the positive direction of the transverse axis of the machine body; The lower right corner point is selected as a position point located at a second preset vertical distance from the center of the machine body in the opposite direction of the positive longitudinal axis of the machine body and at a second preset horizontal distance from the center of the machine body in the positive transverse axis of the machine body. Then connect the lower left corner point to the upper left corner point, connect the upper left corner point to the upper right corner point, connect the upper right corner point to the lower right corner point, and connect the lower right corner point to the lower left corner point to obtain the reference detection area, making the reference detection area a rectangular area. The first preset lateral distance is set to be greater than half the length of the wheel axle and less than the radius of the machine body; The second preset horizontal distance is set to be greater than or equal to the preset obstacle avoidance trigger distance, but less than the maximum detection distance of the line laser emitted by the line laser emitter, so that the line connecting the upper right corner and the lower right corner is located outside the body; The first preset longitudinal distance is set to be greater than or equal to the body radius, but less than the maximum detection distance of the line laser emitted by the line laser emitter; The second preset longitudinal distance is set to be less than half the radius of the body or the length of the wheel axle.
9. The robot movement control method according to claim 7, characterized in that, From the area covered by the reference detection area in the grid map, the grid coordinates of the obstacle outline points are extracted, and then the extracted grid coordinates are converted from the global map coordinate system back to the robot coordinate system to obtain the local coordinates relative to the robot's current position point, and marked as the position coordinates of the obstacle outline points bounded by the reference detection area. Between the global map coordinate system and the robot coordinate system, the rotation transformation of the grid coordinates of obstacle contour points is the inverse transformation of the local coordinates, and the translation transformation of the grid coordinates of obstacle contour points is the inverse transformation of the local coordinates. In step S4, the reference detection area is configured to define the grid coordinates of obstacle outline points in real time during robot movement.
10. The robot movement control method according to claim 7, characterized in that, In step S4, the method for fitting a Bézier curve using the position coordinates of the obstacle contour points defined within the reference detection area includes: Along the positive longitudinal axis of the aircraft, the starting point and the ending point of the obstacle fitting curve are determined within the obstacle contour points defined in the reference detection area. Within the reference detection area, each obstacle contour point distributed along the positive longitudinal axis of the aircraft between the starting point and the ending point is sequentially marked as a control point required to fit the Bézier curve. The obstacle fitting curve is a Bézier curve. The number of control points is equal to the sum of the order of the Bézier curve and the value 1. The order of the Bézier curve is represented by n. Based on the starting point, the ending point, and the control points marked sequentially between the starting point and the ending point of the obstacle fitting curve, an obstacle fitting curve based on an n-order Bézier curve is generated so that relatively discrete obstacle contour points are fitted and connected into a relatively continuous contour line. The starting point and the ending point of the obstacle fitting curve are both control points. Correspondingly, the trajectory equation of the obstacle fitting curve is: ; in, The x-coordinate of a point in the fitted curve of the obstacle is given. Let be the ordinate of a point in the obstacle fitting curve, i represent the sequence number of the control points required to fit the obstacle fitting curve, and t is equal to the ratio between i and (n+1). The x-coordinate represents the starting point position of the obstacle fitting curve within the reference detection area. The ordinate represents the starting point of the obstacle fitting curve within the reference detection area; The x-coordinate represents the endpoint of the obstacle fitting curve within the reference detection area. The vertical coordinate represents the endpoint of the obstacle fitting curve within the reference detection area; in, Indicated as a reference detection area used to set up control points The x-coordinate of the obstacle outline point; Indicated as a reference detection area used to set up control points The ordinate of the obstacle outline points.
11. The robot movement control method according to claim 10, characterized in that, In the process of Bézier curve fitting, the number of numerical types of t is equal to the number of points interpolated by the fitted curve of the obstacle. The curvature change of the obstacle fitting curve when the relative positions of two adjacent control points change along the positive longitudinal axis of the machine body; the two adjacent control points use and It means that, among them, ; The trajectory equation of the obstacle fitting curve belongs to the Bézier curve formula.
12. The robot movement control method according to claim 11, characterized in that, The starting point of the obstacle fitting curve is the obstacle contour point closest to the boundary of the reference detection area in the opposite direction of the positive longitudinal axis of the body, or the boundary point of the reference detection area through which the outline of the obstacle represented by the obstacle fitting curve passes in the opposite direction of the positive longitudinal axis of the body, so that the starting point of the obstacle fitting curve is the obstacle contour point farthest from the starting point of the obstacle avoidance movement in the opposite direction of the positive longitudinal axis of the body. The endpoint of the obstacle fitting curve is the obstacle contour point closest to the boundary of the reference detection area in the positive direction of the longitudinal axis of the body, or the boundary point of the reference detection area through which the outline of the obstacle represented by the obstacle fitting curve passes along the positive direction of the longitudinal axis of the body, so that the starting point of the obstacle fitting curve is the obstacle contour point farthest from the starting point of the obstacle avoidance movement in the positive direction of the longitudinal axis of the body.
13. The robot movement control method according to claim 10, characterized in that, The obstacle fitting curve is required to represent the outline of the obstacle located in the positive direction of the robot's horizontal axis, with the opposite direction of the positive horizontal axis configured as the target offset direction. The preset obstacle avoidance distance is set to be equal to the sum of the aircraft radius and the preset obstacle avoidance distance.
14. The robot movement control method according to claim 13, characterized in that, In step S5, the method of obtaining a target point with the same ordinate as the adjacent position point on the positive longitudinal axis of the machine body based on the obstacle-avoiding walking starting point, and then obtaining the look-ahead point by offsetting the coordinate of the target point includes: Calculate the ordinate of the adjacent position points of the starting point of obstacle avoidance walking in the positive direction of the longitudinal axis of the body, and set the ordinate of the adjacent position points as the starting forward ordinate; Then, the initial forward ordinate is substituted into the trajectory equation of the obstacle fitting curve to calculate the abscissa of the point in the obstacle fitting curve whose ordinate is the same as the initial forward ordinate. The point in the obstacle fitting curve whose ordinate is the same as the initial forward ordinate is marked as the target point. The target point is then offset by a preset obstacle avoidance margin along the target offset direction to obtain the forward-looking point; The robot then moves from the obstacle avoidance starting point to the look-ahead point.
15. The robot movement control method according to claim 14, characterized in that, The implementation method of step S6 includes: Whenever the robot moves to a look-ahead point, it updates the current look-ahead point as the obstacle avoidance starting point, then executes step S5 to obtain the next look-ahead point in front of the robot, and then the robot moves to the next look-ahead point; then the next look-ahead point is updated as the obstacle avoidance starting point, and steps S5 to S6 are executed again, and so on, until the robot moves to the preset obstacle avoidance endpoint, wherein the preset obstacle avoidance endpoint is obtained by offsetting the endpoint of the obstacle fitting curve along the target offset direction by the preset obstacle avoidance margin.
16. The robot movement control method according to claim 14, characterized in that, The implementation method of step S6 includes: Whenever the robot moves to a look-ahead point, it updates the current look-ahead point to the obstacle avoidance starting point, and then executes steps S4 to S5 to obtain the next look-ahead point. The robot then moves to the next look-ahead point; then the next look-ahead point is updated to the obstacle avoidance starting point, and steps S4 to S6 are executed again. This process is repeated until the robot moves to the preset obstacle avoidance endpoint.
17. The robot movement control method according to claim 14, characterized in that, After the robot moves to the preset obstacle avoidance endpoint in step S6, the reference detection area set by the robot covers the new ground area. Then, by executing step S4, the outline points of the obstacles within the new ground area are fitted with Bezier curves to obtain a new obstacle fitting curve; then, steps S5 and S6 are executed. The ground area is parallel to the robot's travel plane.
18. The robot movement control method according to claim 14, characterized in that, The robot connects the look-ahead points it has moved through in step S6 in sequence to form the target obstacle-avoidance curve trajectory. If the obstacle outline points defined by the reference detection area do not change before and after the robot moves, the target obstacle avoidance curve trajectory is parallel to the obstacle fitting curve obtained in step S4 before and after the robot moves; wherein, the points in the obstacle fitting curve are offset along the target offset direction by the preset obstacle avoidance distance to obtain the points in the target obstacle avoidance curve trajectory.
19. The robot movement control method according to claim 14, characterized in that, The difference between the ordinate of the point adjacent to the starting point of the obstacle avoidance movement on the positive longitudinal axis of the body and the ordinate of the starting point of the obstacle avoidance movement is equal to the value 1, so that the absolute value of the difference between the ordinates of the two forward-looking points obtained in step S6 is equal to the value 1. The adjacent points to the starting point of the obstacle avoidance walk include: The location point whose absolute value of the difference between the x-coordinate of the obstacle avoidance walking point and the y-coordinate of the obstacle avoidance walking point is equal to 1, and whose absolute value of the difference between the y-coordinate of the obstacle avoidance walking point and the y-coordinate of the obstacle avoidance walking point is equal to 1. The location point whose absolute value of the difference between the x-coordinate of the obstacle avoidance walking point and the y-coordinate of the obstacle avoidance walking point is equal to 1, and whose absolute value of the difference between the y-coordinate of the obstacle avoidance walking point and the y-coordinate of the obstacle avoidance walking point is equal to 0. The location point whose absolute value of the difference between the x-coordinate of the obstacle avoidance walking point and the y-coordinate of the obstacle avoidance walking point is 0 and whose absolute value of the difference between the y-coordinate of the obstacle avoidance walking point and the y-coordinate of the obstacle avoidance walking point is 1. The positive direction of the vertical axis of the robot body is set as the positive direction of the vertical axis in a coordinate system with the center of the robot body as the origin.
Citation Information
Patent Citations
Robot autonomous navigation system based on double single-line laser radars
CN107167141A
Obstacle avoidance control method of D-type robot
CN118319194A