CN-121411413-B - Robot movement control method based on line laser
Abstract
The application discloses a robot movement control method based on line laser, which comprises the steps that a robot controls a cross line laser module to emit line laser to the front of the robot, the robot collects obstacle contour points detected by the line laser in real time, the robot sets a reference detection area, then utilizes the obstacle contour points framed by the reference detection area to conduct Bezier curve fitting to generate an obstacle fitting curve, a target point is obtained from the obstacle fitting curve, a prospective point is obtained by conducting coordinate offset on the target point and then is moved to the prospective point, and every time the robot moves to one prospective point, the next prospective point is obtained based on the obstacle fitting curve until the robot moves to a preset obstacle surrounding end point, so that the robot walks along the extending direction of the obstacle fitting curve on the premise of not touching an obstacle.
Inventors
- CHEN ZEXIN
- CHEN ZHUOBIAO
- ZHOU HEWEN
- YANG WU
- XIAO GANGJUN
- JIANG XINQIAO
Assignees
- 珠海一微科技股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20240717
Claims (19)
- 1. The robot movement control method based on the line laser is characterized in that the front end of the robot is provided with a cross line laser module; The robot movement control method comprises the following steps: S1, a robot controls a cross line laser module to emit two crossed line lasers to the front of the robot; step S2, in the moving process of the robot, the robot acquires the outline points of the obstacle detected by the line laser in real time and acquires the position coordinates of the outline points of the obstacle; s3, when the robot moves to the position that the distance between the center of the robot body and the nearest obstacle outline point reaches the preset obstacle avoidance triggering distance, the robot turns according to a preset angle, and then the current position point of the robot is set as an obstacle avoidance walking starting point; S4, setting a reference detection area on one side of the robot, which is close to the outline points of the obstacle, and performing Bezier curve fitting by using position coordinates of the outline points of the obstacle framed by the reference detection area to generate an obstacle fitting curve; S5, based on adjacent position points of the obstacle-detouring walking starting point in the forward direction of the longitudinal axis of the machine body, acquiring a target point with the same ordinate as that of the adjacent position points from an obstacle fitting curve, and acquiring a prospective point by carrying out coordinate offset on the target point; Step S6, each time the robot moves to one of the forward looking points, the forward looking point is updated to be the obstacle-detouring walking starting point, and then the steps S5 to S6 are repeatedly executed, or the steps S4 to S6 are repeatedly executed until the robot moves to a preset obstacle-detouring end point; In the step S3, when the distance between the center of the robot body and the contour point of the nearest obstacle reaches the preset obstacle avoidance triggering distance, the preset angle is equal to an included angle formed by a connecting line of the center of the robot body and the contour point of the nearest obstacle in a positive direction of a transverse axis of the robot body at one side close to the side obstacle, wherein the contour point of the nearest obstacle is located in the side obstacle detected by the robot, and an overlapping area exists between an area covered by the side obstacle and an effective detection area.
- 2. The robot movement control method of claim 1, wherein the cross-line laser module comprises two line laser transmitters and one laser receiver; The two line laser transmitters are arranged on the side face of the robot, and line lasers emitted by the two line laser transmitters form an effective detection area in the advancing plane of the robot; The laser receiver is arranged on the side face of the robot and is positioned at the upper middle position of the two line laser transmitters, the receiving range of the laser receiver is a preset upward receiving oblique angle and a preset downward receiving oblique angle which are formed upward and downward by taking the advancing plane of the robot as a reference, and the laser receiver is used for collecting reflection points formed by line laser on an obstacle and configuring the reflection points as outline points of the obstacle detected by the line laser transmitted by the line laser transmitters.
- 3. The method for controlling the movement of the robot according to claim 2, wherein the robot comprises a semicircular machine head, a semicircular machine body and two symmetrically arranged wheels, wherein the two symmetrically arranged wheels are connected through an axle, and the axle is arranged at the boundary between the machine head and the machine body; the moving direction of the robot points to the front of the robot, the positive direction of the longitudinal axis of the machine body is set as the current moving direction of the robot, and the positive direction of the longitudinal axis of the machine body is perpendicular to the wheel axle; The reference detection area is used for covering part of or all of the outline of the side obstacle in the moving process of the robot by taking the direction of the side obstacle facing the robot and parallel to the wheel axle as the positive direction of the transverse axis of the machine body.
- 4. A robot movement control method according to claim 3, wherein the position coordinates of each of the acquired obstacle contour points are local coordinates set to be formed with respect to a current position point of the robot, which is set in the robot coordinate system, and the current position point of the robot is set as an origin of the robot coordinate system; When converting the local coordinates to a global map coordinate system for constructing a grid map, converting the local coordinates to the global map coordinate system through rotation transformation and translation transformation to obtain grid coordinates of the barrier contour points; The rotation angle required by the local coordinate rotation transformation is equal to an included angle formed by the same attribute coordinate axis between the global map coordinate system and the robot coordinate system, the coordinate offset required by the local coordinate translation transformation is the coordinate of the current position point of the robot in the global map coordinate system, and the positive direction of the ordinate axis of the robot coordinate system is parallel to the positive direction of the longitudinal axis of the machine body.
- 5. The robot movement control method according to claim 3, wherein the nearest obstacle contour point is an obstacle contour point nearest to a center of the body detected by the cross line laser module in a current movement direction of the robot during movement of the robot; the nearest obstacle contour point is acquired in advance by the cross line laser module, or the nearest obstacle contour point is acquired in real time by the cross line laser module, wherein the coordinates of the current position point of the robot are represented by the coordinates of the center of the robot body; The preset obstacle avoidance triggering distance is set to be equal to the sum of the radius of the machine body and the preset distance, so that when the distance between the center of the machine body and the nearest obstacle contour point of the robot reaches the preset obstacle avoidance triggering distance, the shortest distance between the edge of the machine body and the obstacle contour point is equal to the preset distance.
- 6. The method according to claim 5, wherein in the step S3, the specific method for turning the robot according to the preset angle includes: and controlling wheels on two sides of the robot to generate rotation speed difference, driving the robot to rotate towards one side far away from the side obstacle, when the robot rotates towards one side far away from the side obstacle by a preset angle, enabling a connecting line between the center of the robot body and the profile point of the nearest obstacle to be parallel to the positive direction of the transverse axis of the robot body, and setting a position point of the robot after turning as the obstacle-detouring walking starting point.
- 7. The robot movement control method according to claim 4, characterized in that in the step S4, a reference detection area for covering the outline of the side obstacle is provided on a side of the robot close to the nearest obstacle outline point; An overlapping area or a space exists between the reference detection area and the robot body coverage area, and the distance between the boundary point farthest from the edge of the robot body close to one side of the obstacle in the reference detection area and the center of the robot body in the positive direction of the transverse axis of the robot body is greater than or equal to the preset obstacle avoidance triggering distance; the reference detection area is arranged to cover a passable area between the machine body and the side obstacle, and the linear distance covered by the reference detection area in the forward direction of the longitudinal axis of the machine body is the maximum detection distance of the line laser emitted by the line laser emitter; the area of the reference detection area covered outside the machine body is larger than that of the reference detection area covered inside the machine body.
- 8. The robot movement control method according to claim 7, wherein the reference detection area setting method includes: Selecting a position point which is a first preset longitudinal distance away from the center of the machine body in the positive direction of the longitudinal axis of the machine body and a first preset transverse distance away from the center of the machine body in the positive direction of the transverse axis of the machine body as an upper left corner point; Selecting a position point which is a second preset longitudinal distance away from the center of the machine body in the direction opposite to the positive direction of the longitudinal axis of the machine body and a first preset transverse distance away from the center of the machine body in the positive direction of the transverse axis of the machine body as a lower left corner point; selecting a position point which is a first preset longitudinal distance away from the center of the machine body in the positive direction of the longitudinal axis of the machine body and a second preset transverse distance away from the center of the machine body in the positive direction of the transverse axis of the machine body as an upper right corner point; selecting a position point which is a second preset longitudinal distance away from the center of the machine body in the direction opposite to the positive direction of the longitudinal axis of the machine body and a second preset transverse distance away from the center of the machine body in the positive direction of the transverse axis of the machine body as a lower right corner point; Then connecting a lower left corner point with an upper left corner point, connecting the upper left corner point with an upper right corner point, connecting the upper right corner point with a lower right corner point, and connecting the lower right corner point with the lower left corner point to obtain the reference detection area, so that the reference detection area becomes a rectangular area; Wherein the first preset transverse distance is set to be more than half of the length of the wheel axle and less than the radius of the machine body; The second preset transverse distance is set to be larger than or equal to the preset obstacle avoidance triggering distance and smaller than the maximum detection distance of the line laser emitted by the line laser emitter, so that the connecting line of the upper right corner point and the lower right corner point is positioned outside the machine body; the first preset longitudinal distance is set to be larger than or equal to the radius of the machine body, but smaller 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 machine body or the length of the wheel axle.
- 9. The robot movement control method according to claim 7, wherein grid coordinates of the obstacle contour points are extracted from the reference detection area within the area covered in the grid map, and the extracted grid coordinates are converted from the global map coordinate system back to the robot coordinate system to obtain local coordinates formed with respect to the current position points of the robot, and the local coordinates are marked as the position coordinates of the obstacle contour points framed by the reference detection area; between the global map coordinate system and the robot coordinate system, the rotational transformation of the grid coordinates of the obstacle contour points is an inverse transformation of the rotational transformation of the local coordinates, and the translational transformation of the grid coordinates of the obstacle contour points is an inverse transformation of the translational transformation of the local coordinates; Wherein the reference detection area is configured in step S4 to frame grid coordinates of the obstacle contour points in real time during the movement of the robot.
- 10. The robot movement control method according to claim 7, wherein in the step S4, the method of performing bezier curve fitting using the position coordinates of the obstacle contour points defined in the inner frame of the reference detection area includes: Determining a starting point of an obstacle fitting curve and an ending point of the obstacle fitting curve in an obstacle contour point fixed in an inner frame of a reference detection area along the positive direction of the longitudinal axis of the machine body, and sequentially marking all the obstacle contour points distributed between the starting point and the ending point along the positive direction of the longitudinal axis of the machine body as control points required by fitting a Bezier curve in the reference detection area, wherein the obstacle fitting curve belongs to the Bezier curve, the number of the control points is equal to the sum of the number of the Bezier curve and a numerical value 1, and the number of the Bezier curve is represented by n; Generating an obstacle fit curve based on an n-order Bezier curve according to the starting point of the obstacle fit curve, the ending point of the obstacle fit curve and control points marked in sequence between the starting point of the obstacle fit curve and the ending point of the obstacle fit curve, so that relatively discrete obstacle contour points are fitted and connected into a contour line formed by relatively continuous points, wherein the starting point of the obstacle fit curve and the ending point of the obstacle fit curve belong to the control points; Correspondingly, the trajectory equation of the obstacle fitting curve is: ; Wherein, the Fitting the abscissa of the points in the curve to the obstacle, For the ordinate of points in the obstacle fit curve, i represents the rank number of control points required to fit the obstacle fit curve, and t is equal to the ratio between i and (n+1); an abscissa representing a starting point position of the obstacle fit curve within the reference detection area, An ordinate representing a starting point position of the obstacle fitted curve in the reference detection area; an abscissa representing the end position of the obstacle fit curve within the reference detection zone, An ordinate representing the end position of the obstacle fitted curve in the reference detection area; Wherein, the Represented as control points for setting within a reference detection area Is the abscissa of the obstacle contour point; Represented as control points for setting within a reference detection area Is defined by the vertical coordinates of the obstacle contour points.
- 11. The robot movement control method according to claim 10, wherein in the bezier curve fitting process, the number of numerical categories of t is equal to the number of points inserted to fit the obstacle fitting curve; in the forward direction of the longitudinal axis of the machine body, when the relative positions of two adjacent control points are changed, the curvature of the obstacle fitting curve is changed, wherein the two adjacent control points are used And The representation, wherein, ; The trajectory equation of the obstacle fitting curve belongs to Bezier curve formulas.
- 12. The robot movement control method according to claim 11, wherein the start point of the obstacle-fitted curve is an obstacle contour point nearest to a boundary of a reference detection area in a direction opposite to the direction of the machine body longitudinal axis positive direction, or a boundary point of a reference detection area through which the contour of the obstacle represented by the obstacle-fitted curve passes in a direction opposite to the direction of the machine body longitudinal axis positive direction, such that the start point of the obstacle-fitted curve is an obstacle contour point farthest relative to the obstacle-detouring start point in the direction opposite to the direction of the machine body longitudinal axis positive direction; The end point of the obstacle fitting curve is an obstacle contour point nearest to the boundary of the reference detection area in the positive direction of the longitudinal axis of the machine body, or a boundary point of the reference detection area, through which the contour of the obstacle represented by the obstacle fitting curve passes along the positive direction of the longitudinal axis of the machine body, so that the starting point of the obstacle fitting curve is an obstacle contour point farthest relative to the obstacle-detouring starting point in the positive direction of the longitudinal axis of the machine body.
- 13. The robot movement control method according to claim 10, wherein the contour of the obstacle to be characterized by the obstacle fitting curve is located in a forward direction of a body transverse axis of the robot, and a direction opposite to the forward direction of the body transverse axis is configured as a target offset direction; the preset obstacle avoidance margin is set to be equal to the sum of the radius of the machine body and the preset obstacle avoidance distance.
- 14. The method according to claim 13, wherein in the step S5, the method for acquiring the prospective point by performing coordinate offset on the target point based on the neighboring position point of the obstacle-detouring starting point in the forward direction of the longitudinal axis of the machine body, the target point having the same ordinate as the ordinate of the neighboring position point is acquired from the obstacle-fitted curve, and the prospective point is acquired by performing coordinate offset on the target point comprises: calculating the ordinate of an adjacent position point of the obstacle-detouring walking starting point in the positive direction of the longitudinal axis of the machine body, and setting the ordinate of the adjacent position point as the initial forward-looking ordinate; substituting the initial prospective ordinate into a track equation of the obstacle fitting curve, and calculating the abscissa of a point with the same ordinate as the initial prospective ordinate in the obstacle fitting curve, wherein the point with the same ordinate as the initial prospective ordinate in the obstacle fitting curve is marked as a target point; shifting the target point along the target shifting direction by a preset obstacle avoidance margin to obtain the prospective point; the robot then moves from the obstacle-detouring walking start point to the look-ahead point.
- 15. The method of claim 14, wherein the implementation method of step S6 includes: Every time the robot moves to a forward looking point, the robot updates the forward looking point at the present position to the obstacle-surrounding walking starting point, then the step S5 is executed to obtain the next forward looking point in front of the robot, then the robot moves to the next forward looking point, then the next forward looking point is updated to the obstacle-surrounding walking starting point, then the steps S5 to S6 are executed, and the iteration is executed until the robot moves to a preset obstacle-surrounding end point, wherein the preset obstacle-surrounding end point is obtained by shifting the end point of the obstacle fitting curve by the preset obstacle-surrounding edge distance along the target shifting direction.
- 16. The method of claim 14, wherein the implementation method of step S6 includes: Every time the robot moves to a forward looking point, the robot updates the forward looking point to the obstacle detouring walking starting point, then executes the steps S4 to S5 to obtain the next forward looking point, then the robot moves to the next forward looking point, then updates the next forward looking point to the obstacle detouring walking starting point, then executes the steps S4 to S6, and iterates until the robot moves to the preset obstacle detouring end point.
- 17. The method according to claim 14, wherein after the robot moves to the preset obstacle detouring end point in the step S6, the reference detection area set by the robot is covered to a new ground area, and then the step S4 is performed to perform a bezier curve fitting on the framed obstacle contour points in the new ground area to obtain a new obstacle fitting curve; Wherein the ground area is parallel to the plane of travel of the robot.
- 18. The robot movement control method according to claim 14, wherein the robot sequentially connects the prospective points which have been moved one after another in step S6 into a target obstacle detouring curve trajectory; and if the reference detection area does not change at the obstacle outline points framed before and after the movement of the robot, the target obstacle-detouring curve track is parallel to the obstacle-detouring curve obtained in the step S4 before and after the movement of the robot, wherein the points in the obstacle-detouring curve offset the preset obstacle-detouring margin along the target offset direction to obtain the points in the target obstacle-detouring curve track.
- 19. The robot movement control method according to claim 14, wherein a difference between an ordinate of an adjacent position point of the obstacle-detouring starting point in the forward direction of the longitudinal axis of the machine body and an ordinate of the obstacle-detouring starting point is equal to a value 1, such that an absolute value of the difference between the ordinate of two forward-looking points sequentially obtained in step S6 is equal to the value 1; The adjacent position points of the obstacle-detouring walking starting point comprise: A position point where the absolute value of the difference from the abscissa of the obstacle-detouring travel starting point is equal to 1 and the absolute value of the difference from the ordinate of the obstacle-detouring travel starting point is equal to 1; a position point where the absolute value of the difference from the abscissa of the obstacle-detouring travel starting point is equal to 1 and the absolute value of the difference from the ordinate of the obstacle-detouring travel starting point is equal to 0; A position point where the absolute value of the difference from the abscissa of the obstacle-detouring travel starting point is equal to 0 and the absolute value of the difference from the ordinate of the obstacle-detouring travel starting point is equal to 1; wherein the machine body longitudinal axis positive direction is an ordinate axis positive direction in a coordinate system set with the machine body center of the robot as an origin.
Description
Robot movement control method based on line laser Technical Field The invention relates to the field of robots, in particular to a robot movement control method based on line laser. Background With the continuous development of artificial intelligence, electronic communication technology and the like, robots are becoming an emerging technical field of research and are widely applied to various industries such as civil use. While the robot is advancing, the robot often encounters some obstacles, such as some fixed posts, some obstacles that the temporarily stored robot is difficult to cross, and so on. When the robot moves from one position to another, collision with these obstacles must be avoided, and thus a detour is required. How to enable the robot to walk along the outline of the obstacle automatically without collision and smoothly, wherein the important precondition is to determine the outline position coordinates of the obstacle in advance and plan out a track with stronger continuity. Disclosure of Invention The application discloses a robot movement control method based on line laser, which comprises the following specific technical scheme: A robot movement control method based on line laser comprises the steps of S1, emitting two beams of intersected line laser to the front of the robot by the robot control line laser module, S2, collecting obstacle contour points detected by the line laser in real time and obtaining position coordinates of the obstacle contour points by the robot in the moving process of the robot, S3, turning by the robot according to a preset angle when the distance between the center of a robot body and the nearest obstacle contour point reaches a preset obstacle avoidance triggering distance, setting the current position point of the robot to be a walking starting point, S4, setting a reference detection area on one side of the robot close to the obstacle contour point, conducting Bezier curve fitting by utilizing the position coordinates of the obstacle contour points defined by the reference detection area, S5, obtaining the same longitudinal coordinates as the longitudinal coordinates of the adjacent position points on the basis of obstacle walking in the positive direction of the robot body, conducting the obstacle curve fitting, conducting the walking around the same way from the longitudinal coordinates of the obstacle contour points to the obstacle contour points, and conducting the step S6 or conducting the walking around the robot repeatedly from the step S4 to the previous starting point by means of moving around the previous starting point to the previous starting point, and repeating the step 6. The cross line laser module comprises two line laser transmitters and a laser receiver, wherein the two line laser transmitters are arranged on the side face of the robot, line lasers emitted by the two line laser transmitters form an effective detection area in the advancing plane of the robot, the advancing plane of the robot is used as a reference, the emitting ranges of the two line laser transmitters are upward to form preset upward emitting oblique angles and downward to form preset downward emitting oblique angles, the laser receiver is arranged on the side face of the robot and is positioned at the middle upper position of the two line laser transmitters, the receiving ranges of the laser receiver are upward to form preset upward receiving oblique angles and downward to form preset downward receiving oblique angles, and the laser receiver is used for collecting reflecting points formed by the line lasers on an obstacle and is configured to be outline points of the obstacle detected by the line lasers emitted by the line laser transmitters. The robot comprises a semicircular machine head, a semicircular machine body and two symmetrically arranged wheels, wherein the two symmetrically arranged wheels are connected through a wheel shaft, the wheel shaft is arranged at the boundary of the machine head and the machine body, the semicircular machine head and the semicircular machine body form a circular machine body, the center of the wheel shaft is the machine body center of the robot, the length of the wheel shaft is smaller than the diameter of the machine body, the moving direction of the robot points to the front of the robot, the positive direction of the longitudinal axis of the machine body is the current moving direction of the robot, the positive direction of the longitudinal axis of the machine body is perpendicular to the positive direction of the wheel shaft, the direction which faces to the side obstacle of the robot and is parallel to the wheel shaft is taken as the positive direction of the transverse axis of the machine body, and the reference detection area is used for covering part or all of the outline of the side obstacle in the moving process of the robot. Further, the position coordinates of each acquired obstacle contour point are local coordinat