A control method, a control device, a robot, and a storage medium
By dividing the robot movement control into two sub-stages: rough real-time position and accurate real-time position, switching translation and rotational movement control, the problem of difficult to balance control efficiency and accuracy in the existing technology is solved, and efficient and accurate completion of robot movement tasks is achieved.
Patent Information
- Application Number
- CN202211127939.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-16
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2042-09-16
AI Technical Summary
The prior art is difficult to achieve a balance between control efficiency and control accuracy in robot movement control, resulting in the robot repeatedly moving near the target point or unable to meet the high-precision requirements.
In the control of the robot based on the global planner and local planner, it is divided into two sub-stages: rough real-time position and accurate real-time position, and the translation and rotation movement control are performed respectively, and the control mode is switched using preset position conditions and distance conditions.
It achieves efficient completion of robot movement tasks, balances control efficiency and control accuracy, and ensures that the robot can accurately reach the target point and completes the precise orientation during teaching.
Smart Images

Figure CN115502972B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of robots, and particularly relates to a control method, a control device, a robot, and a computer-readable storage medium. Background Art
[0002] The movement control of a robot is currently usually achieved based on a global planner and a local planner. In the existing local planner, when reaching the target point of the final navigation, the tolerance error range of the robot's pose can be configured, including the distance error range and the orientation error range. It can be understood that the movement effect of the robot depends to a large extent on the setting of these two error ranges: if these two error ranges are set too small, the robot may repeatedly move when trying to reach the error range near the target point; if these two error ranges are set too large, the robot may not meet the high-precision index requirements in the actual application scenario.
[0003] In summary, the current movement control of the robot based on the global planner and the local planner is difficult to achieve the balance between control efficiency and control precision. Summary of the Invention
[0004] This application provides a control method, a control device, a robot, and a computer-readable storage medium, which can achieve the balance between control efficiency and control precision when controlling the movement of the robot.
[0005] In a first aspect, this application provides a control method, which is applied to a robot. The control method includes:
[0006] During the process of the robot moving towards the target point based on the control of the global planner and the local planner, if the rough real-time pose of the robot meets the preset pose condition, control the robot to perform translational movement, where the pose condition is set according to the preset rough target pose, and the rough target pose is: the rough target pose when the robot is taught at the target point;
[0007] During the process of the robot performing translational movement, if the precise real-time pose of the robot meets the preset distance condition, control the robot to change from translational movement to rotational movement, where the distance condition is set according to the calculated precise target pose, and the precise target pose is: the precise target pose when the robot is taught at the target point;
[0008] During the process of the robot performing rotational movement, if the precise real-time pose of the robot meets the preset first orientation condition, determine that the robot has completed the movement task, where the first orientation condition is set according to the precise target pose.
[0009] In a second aspect, this application provides a control device, which is applied to a robot. The control device includes:
[0010] The first control module is used to control the robot to move translationally when the rough real-time pose of the robot satisfies a preset pose condition during the process of the robot moving towards the target point based on the control of the global planner and the local planner. The pose condition is set according to a preset rough target pose, and the rough target pose is the rough target pose when the robot is taught at the target point.
[0011] The second control module is used to control the robot to change from translational movement to rotational movement when the precise real-time pose of the robot satisfies a preset distance condition during the translational movement of the robot. The distance condition is set according to the calculated precise target pose, and the precise target pose is the precise target pose when the robot is taught at the target point.
[0012] The determination module is used to determine that the robot has completed the movement task when the precise real-time pose of the robot satisfies a preset first orientation condition during the rotational movement of the robot. The first orientation condition is set according to the precise target pose.
[0013] In a third aspect, the present application provides a robot, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method according to the first aspect are implemented.
[0014] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the method according to the first aspect are implemented.
[0015] In a fifth aspect, the present application provides a computer program product, which includes a computer program. When the computer program is executed by one or more processors, the steps of the method according to the first aspect are implemented.
[0016] The beneficial effects of the present application compared with the prior art are as follows: The solution of the present application takes into account the existing problems of the global planner and local planner of the robot and only relies on them for preliminary movement control. Once the robot detects that it is relatively close to the rough target pose during teaching, it will enter a relatively more precise control stage. This relatively more precise control stage can be initially divided into two different sub-stages, namely: the translational control sub-stage and the rotational control sub-stage. It should be noted that during the translational control sub-stage and the rotational control sub-stage, the robot will be controlled based on its own precise real-time pose and precise target pose. It can be understood that during the translational control sub-stage, the robot only performs translation and its orientation does not change, which can make the robot gradually approach the target point; when the robot is already at the target point, the robot enters the rotational control sub-stage and only rotates, and its position does not change, which can make the robot reach the precise orientation during teaching at this target point. Through the above process, it can help the robot complete its movement task earlier and achieve a balance between control efficiency and control accuracy.
[0017] It can be understood that the beneficial effects of the second to fifth aspects above can be referred to the relevant descriptions in the first aspect above and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings in the following descriptions are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0019] Figure 1 is a schematic flowchart of the implementation process of the control method provided by the embodiment of the present application;
[0020] Figure 2 is a structural block diagram of the control device provided by the embodiment of the present application;
[0021] Figure 3 is a schematic structural diagram of the robot provided by the embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0022] In the following description, specific details such as specific system structures and technologies are proposed for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, the detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.
[0023] To illustrate the technical solution proposed in this application, the following will be described through specific embodiments.
[0024] Please refer to Figure 1 , the following will explain the control method proposed in the embodiments of this application. Please refer to Figure 1 , the implementation process of this control method is described in detail as follows:
[0025] Step 101, during the process of the robot moving towards the target point based on the control of the global planner and the local planner, if the rough real-time pose of the robot meets the preset pose condition, then control the robot to move translationally.
[0026] The robot can reach a given point in advance according to the user's needs, either by the user actively placing it or other means for teaching operations. As the name implies, during the teaching operation, the pose (i.e., position and orientation) of the robot is the target pose, that is, the pose expected by the user for subsequent movement tasks. Based on this, to ensure the smooth execution of subsequent movement tasks, when the robot is performing a teaching operation, after receiving a pose recording instruction, it can obtain its own pose and record it. Only as an example, this pose recording instruction can be sent by the user to the client through the client connected to the robot, and there is no limitation here. Considering that there are jumps in the positioning error when the robot's positioning system performs real-time positioning, it is considered that the pose recorded this time is relatively rough, and this pose can be denoted as the rough target pose. That is, the rough target pose is: the rough target pose of the robot during teaching at the target point.
[0027] In addition, when the robot is performing a teaching operation, after receiving a pose recording instruction, the robot can also obtain the point cloud data of its surrounding environment through the detection device carried by itself. Only as an example, this detection device can be a 3D lidar, etc., and the embodiments of this application do not limit the specific type of this detection device. For the convenience of subsequent description, this point cloud data can be denoted as the teaching point cloud data. This teaching point cloud data can be used in the subsequent solution of the accurate target pose. It should be noted that since the robot often performs teaching operations in a stationary state, after obtaining the teaching point cloud data, the robot can omit the operation of point cloud distortion removal.
[0028] Based on the rough target pose recorded during teaching, the robot can preset a pose condition in its local planner; that is, this pose condition is set according to the rough target pose. After the robot receives the start instruction for the movement task, its global planner and local planner are triggered and started, thereby realizing the initial movement control of the robot until the pose condition is met. The specific process is briefly described as follows:
[0029] The global planner is responsible for planning the global path and guiding the movement trend of the local planner at the same time. Under the guidance of the global path, the local planner conducts real-time high-frequency trajectory planning and issues speed control commands to the chassis of the robot. Among them, the chassis can specifically be an omnidirectional mobile chassis, and the chassis uses a P controller. It can be understood that the global path output by the global planner is the input of the local planner, and the local planner is responsible for controlling specific operations such as the startup, stop, dynamic obstacle avoidance and obstacle bypassing of the robot under the guidance of the global path. During the process of the robot moving towards the target point based on the control of the global planner and the local planner, the robot maintains real-time positioning of itself through the positioning system. As described above, there are fluctuations in the positioning error in the real-time positioning of the positioning system, so the result of the real-time positioning of the robot during this process can be recorded as the rough real-time pose. When the rough real-time pose of the robot meets the pose conditions of the local planner, the robot can stop the work of the global planner and the local planner and enter the precise control stage. Among them, the pose conditions include: the conditions set based on the distance error, and the conditions set based on the orientation error.
[0030] Only as an example, the pose conditions can be: the distance error between the position indicated by the rough real-time pose and the position indicated by the rough target pose is within 15 centimeters, and the orientation error between the orientation indicated by the rough real-time pose and the orientation indicated by the rough target pose is within 30°. Of course, the specific values of the pose conditions can also be set according to the actual situation requirements, and no limitation is made here.
[0031] For the precise control stage, the embodiment of the present application can divide it into two sub-stages, namely the translation control sub-stage and the rotation control sub-stage. Specifically, the translation control sub-stage is in the front and the rotation control sub-stage is in the back. Then, after the rough real-time pose of the robot meets the pose conditions, the robot can immediately enter the translation control sub-stage.
[0032] During the translation control sub-stage, the robot does not change its orientation. That is to say, during the translation control sub-stage, from the perspective of control, the translational movement of the robot is specifically a linear translational movement. Of course, considering factors such as friction, the actual performance of the robot in the real application scenario may not be an absolute linear translational movement, but an approximate linear translational movement, which will not be elaborated here.
[0033] Step 102, during the translational movement of the robot, if the precise real-time pose of the robot meets the preset distance condition, then control the robot to change from translational movement to rotational movement.
[0034] As described above, the robot enters the precise control phase when its rough real-time pose approaches the rough target pose; that is, within the precise control phase, the robot is already relatively close to the rough target pose during teaching. Based on this, to ensure that the robot can complete the movement task precisely and efficiently, it can change or optimize its real-time positioning method after entering the precise control phase to obtain a more precise real-time pose. For the sake of distinction, the result of the robot's real-time positioning in this process can be denoted as the precise real-time pose.
[0035] Based on the obtained precise real-time pose, combined with the taught point cloud data and the currently collected point cloud data, the robot can calculate the precise target pose. It can be understood that the precise target pose refers to the precise target pose of the robot during teaching at the target point. That is, although both the precise target pose and the rough target pose proposed above are the target poses of the robot during teaching at the target point, there is a difference in their precision. Specifically, the precise target pose has a relatively higher precision.
[0036] During the translational control sub-phase, at the beginning, the robot has not yet obtained the precise target pose, and it can only approach the rough target pose according to the indication of the rough target pose; once the robot obtains the precise target pose, it can immediately abandon the rough target pose and instead approach the precise target pose according to the indication of the precise target pose. During the process of approaching the precise target pose, if the precise real-time pose of the robot meets the preset distance condition, it is considered that the robot has reached the position of the target point, and the robot can be controlled to enter the rotational control sub-phase, that is, control the robot to change from translational movement to rotational movement. It should be noted that since the precise target pose has been calculated at this time, the distance condition here can be specifically set according to the precise target pose.
[0037] Only as an example, the distance condition can be that the distance error between the position indicated by the precise real-time pose and the position indicated by the precise target pose is within 1 centimeter.
[0038] It can be understood that compared with the pose condition in step 101, the position condition in this step is a further constraint on the distance error, and its purpose is to enable the robot to restore the position during teaching with high precision.
[0039] Step 103, during the rotational movement of the robot, if the precise real-time pose of the robot meets the preset first orientation condition, it is determined that the robot has completed the movement task.
[0040] During the rotation control sub-phase, the robot only changes its orientation and does not change its position. Since the precise target pose is known, the robot only needs to change its own orientation according to the precise target pose so that its orientation can approach the orientation indicated by the precise target pose. When the precise real-time pose of the robot meets the preset first orientation condition, the robot can stop controlling itself, that is, stop rotating. At this point, the robot has completed its movement task. It should be noted that since the precise target pose has been calculated when the robot executes this step, the first orientation condition here can also be specifically set according to the precise target pose.
[0041] Only by way of example, the first orientation condition can be that the orientation error between the orientation indicated by the precise real-time pose and the orientation indicated by the precise target pose is within 0.5°.
[0042] It can be understood that compared with the pose condition in step 101, the first orientation condition in this step is a further constraint on the orientation error, and its purpose is to enable the robot to restore the orientation during teaching with high precision.
[0043] In some embodiments, the precise control phase can also be divided into three sub-phases, namely: the first rotation control sub-phase, the translation control sub-phase, and the second rotation control sub-phase. Specifically, the first rotation control sub-phase comes first and the second rotation control sub-phase comes last. That is, the robot can first perform a small amount of rotation control before entering the translation control sub-phase so that its orientation is closer to the orientation indicated by the rough target pose compared to the orientation at the end of the preliminary control phase; then, enter the translation control sub-phase so that its position can approach the position indicated by the precise target pose, and finally achieve approximate coincidence of the positions; finally, enter the rotation control sub-phase again so that its orientation can approach the orientation indicated by the precise target pose, and finally achieve approximate coincidence of the orientations.
[0044] Based on the above description, when the rough real-time pose of the robot meets the pose condition, before controlling the robot to move translationally, the control method proposed in the embodiments of the present application may further include: controlling the robot to rotate and move. That is, first enter the first rotation control sub-phase of the precise control phase.
[0045] After entering the precise control stage, the positioning result obtained by the robot is already the precise real-time pose. And, as described above, the precise target pose is calculated based on the precise real-time pose, in combination with the taught point cloud data and the currently acquired point cloud data. Since the first rotation control sub-stage is only a small-range rotation control with a short control duration, it is very likely that the robot has not yet calculated the precise target pose within this first rotation control sub-stage. Based on this, the operation of controlling the robot to move translationally in step 101 can be specifically triggered through the following process: During the rotational movement of the robot, if the precise real-time pose of the robot meets the preset second orientation condition, then control the robot to enter the translational control sub-stage, that is, control the robot to change from rotational movement to translational movement. It should be noted that considering that within the first rotation control sub-stage, the robot is very likely not to have calculated the precise target pose yet, the second orientation condition can be specifically set according to the rough target pose.
[0046] Only as an example, the second orientation condition can be: the orientation error between the orientation indicated by the precise real-time pose and the orientation indicated by the rough target pose is within 5°.
[0047] In some embodiments, the precise real-time pose can be specifically calculated based on the chassis data of the robot, and the process can be specifically as follows:
[0048] When entering the precise control stage, record the first pose transformation matrix T_map_to_baselink_init of the robot at this time. Among them, the first pose transformation matrix T_map_to_baselink_init is specifically: in the initial state of the precise control stage, the pose transformation matrix from the chassis center joint coordinate system to the map coordinate system; that is, the initial global pose transformation matrix of the robot in the map coordinate system.
[0049] When entering the precise control stage, record the second pose transformation matrix T_odom_to_baselink_init of the robot's odometer at this time. Among them, the second pose transformation matrix T_odom_to_baselink_init is specifically: in the initial state of the precise control stage, the pose transformation matrix from the chassis center joint coordinate system to the chassis odometer coordinate system; that is, the initial pose transformation matrix of the chassis odometer.
[0050] During the precise control phase, the robot can obtain the third pose transformation matrix T_odom_to_baselink_current in real time. Among them, the third pose transformation matrix T_odom_to_baselink_current is specifically: during the operation of the precise control phase, the real-time pose transformation matrix from the chassis center joint coordinate system to the chassis odometer coordinate system; that is, the real-time pose transformation matrix of the chassis odometer.
[0051] Based on the above first pose transformation matrix, second pose transformation matrix, and third pose transformation matrix, the fourth pose transformation matrix T_map_to_baselink_current of the robot can be calculated. The fourth pose transformation matrix T_map_to_baselink_current is specifically: during the operation of the precise control phase, the real-time pose transformation matrix from the chassis center joint coordinate system to the map coordinate system; that is, the real-time global pose transformation matrix of the robot in the map coordinate system. Specifically, the calculation process is as follows:
[0052] T_map_to_baselink_current =
[0053] T_map_to_baselink_init * T_odom_to_baselink_init.inverse() * T_odom_to_baselink_current
[0054] Among them, the inverse() function represents the inverse of the matrix.
[0055] It can be understood that the fourth pose transformation matrix T_map_to_baselink_current can be used to provide the precise real-time pose of the robot.
[0056] In some embodiments, whether the robot directly enters the translation control sub-phase after the initial control phase or the robot transfers from the first rotation control sub-phase to the translation control sub-phase, the process of controlling the robot to translate (or controlling the robot to change from rotational movement to translational movement) specifically may include:
[0057] A1. Control the robot to translate towards the target point according to the preset rough target pose.
[0058] As described above, in this translation control sub-phase, the robot has not yet calculated the precise target pose at the beginning, so it can only control the robot to translate towards the target point according to the preset rough target pose.
[0059] A2. During the process of controlling the robot to translate towards the target point according to the rough target pose, the precise target pose is calculated based on the precise real-time pose of the robot and the preset taught point cloud data.
[0060] During the process of controlling the robot to translate towards the target point according to the rough target pose, the robot can calculate the precise target pose through the combination of the precise real-time pose and the point cloud data. The process is detailed as follows:
[0061] First, the robot acquires the current point cloud data. Among them, the acquisition timing can be: when entering the translation control sub-phase (that is, when the first rotation control sub-phase ends, or when the preliminary control phase ends).
[0062] Then, the robot performs point cloud registration on the current point cloud data and the taught point cloud data to obtain the fifth pose transformation matrix T_lidar_to_lidargoal, that is, the pose transformation matrix of point cloud matching. Only as an example, the robot can adopt the Coherent Point Drift (CPD) algorithm, and this operation of point cloud registration can be run in a newly created independent thread.
[0063] Finally, the precise target pose is calculated based on the precise real-time pose of the robot and the result of point cloud registration. Among them, the result of point cloud registration is the fifth pose transformation matrix T_lidar_to_lidargoal. In addition, the robot can also obtain the precise real-time pose of the robot at this time, that is, the global pose transformation matrix T_map_to_baselink of the robot in the map coordinate system. The calculation process of this global pose transformation matrix T_map_to_baselink has been introduced above and will not be elaborated here. In addition, since the positional relationship between the radar of the robot and the chassis of the robot is known, the sixth pose transformation matrix T_baselink_to_lidar is also known to the robot. Based on this, the seventh pose matrix T_map_to_goal, that is, the global transformation matrix of the target point obtained through point cloud registration, can be calculated by the following formula:
[0064] T_map_to_goal =
[0065] T_map_to_baselink * T_baselink_to_lidar * T_lidar_to_lidargoal * T_baselink_to_lidar.inverse()
[0066] Among them, the inverse() function represents the inverse of the matrix.
[0067] It can be understood that the seventh pose matrix T_map_to_goal can be used to provide the accurate target pose during robot teaching.
[0068] It should be noted that each pose transformation matrix T_a_to_b shown above represents the pose of the b coordinate system in the a coordinate system, that is, the pose transformation matrix for transforming the b coordinate system to the a coordinate system.
[0069] A3. After calculating the accurate target pose, control the robot to move translationally towards the target point according to the accurate target pose.
[0070] After the robot obtains the accurate target pose, it no longer controls its own translational movement according to the rough target pose, but controls its own translational movement according to the accurate target pose. It can be understood that when the accurate target pose is obtained, the robot should be in the translational control sub-stage, and this translational control sub-stage should not have ended yet. Specifically, the robot can preset a status flag bit. When the point cloud matching has not produced a result, the status flag bit is the preset first value, and the robot uses the rough target pose for translational control according to this status flag bit; when the point cloud matching has produced a result, the robot changes the status flag bit from the preset first value to the preset second value, and the robot uses the accurate target pose for translational control according to this status flag bit. Through this status flag bit, the robot can move towards the position of the rough target point in advance, so that the control time can be saved.
[0071] In some embodiments, whether it is the accurate target pose or the rough target pose, the robot can control its own translational movement towards the target point by sending a speed control command to the chassis. For the convenience of description, the pose expected by the robot during translational movement is denoted as the target pose, then the process of translational movement specifically includes:
[0072] B1. Calculate the real-time distance error between the target point and the robot according to the accurate real-time pose of the robot and the target pose.
[0073] Specifically, the calculation formula for the real-time distance error is as follows:
[0074]
[0075] Among them, dis_error is the real-time distance error; goal_pose.x is the abscissa indicated by the target pose; goal_pose.y is the ordinate indicated by the target pose; robot_pose.x is the abscissa indicated by the accurate real-time pose of the robot; robot_pose.y is the abscissa indicated by the accurate real-time pose of the robot.
[0076] B2. Calculate the first real-time angle error between the specified orientation and the robot's orientation based on the precise real-time pose and target pose of the robot.
[0077] The specified orientation refers to the direction from the position indicated by the precise real-time pose of the robot to the position indicated by the target pose. Specifically, the calculation formula for the specified orientation is as follows:
[0078] theta_target = arctan(goal_pose.y - robot_pose.y, goal_pose.x - robot_pose.x)
[0079] where theta_target is the angle corresponding to the specified orientation.
[0080] Specifically, the calculation formula for the first real-time angle error is as follows:
[0081] theta_error = normalize_angle(theta_target - robot_pose.theta)
[0082] where theta_error is the first real-time angle error; normalize_angle() is the angle normalization function; robot_pose.theta is the angle corresponding to the orientation indicated by the precise real-time pose of the robot.
[0083] B3. Generate the first control command based on the real-time distance error and the first real-time angle error.
[0084] The first control command includes: the first linear velocity control parameter, the second linear velocity control parameter, and the first angular velocity control parameter. Specifically, the generated first control command can be as follows:
[0085]
[0086] where p_linear is the P controller parameter for translational control; cmd.linear.x is the first linear velocity control parameter, referring to the linear velocity control parameter of the robot in the x-axis direction during the translational control sub-phase; cmd.linear.y is the second linear velocity control parameter, referring to the linear velocity control parameter of the robot in the y-axis direction during the translational control sub-phase; cmd.angular.z is the first angular velocity control parameter, that is, the angular velocity control parameter of the robot during the translational control sub-phase.
[0087] B4. Control the robot to translate towards the target point according to the first control command.
[0088] The robot can send the first control instruction to the P controller of the robot's chassis. After receiving the first control instruction, the P controller can parse the first control instruction, obtain the control parameters carried by the first control instruction, and perform translational control on the robot according to the control parameters, so that the robot can move translationally towards the target point.
[0089] It should be noted that the concepts of the above coordinates, coordinate axes and angles are all described based on the map coordinate system.
[0090] It can be understood that during the process of controlling the robot to move translationally towards the target point according to the rough target pose, the target pose specifically refers to: the rough target pose. During the process of controlling the robot to move translationally towards the target point according to the precise target pose, the target pose specifically refers to: the precise target pose.
[0091] In some embodiments, whether it is the precise target pose or the rough target pose, the robot can control itself to rotate in place through a speed control instruction. For the convenience of description, the desired pose when the robot rotates is denoted as the target pose, and the process of rotational movement specifically includes:
[0092] C1. Calculate the second real-time angle error between the target orientation and the robot's orientation according to the precise real-time pose and the target pose of the robot.
[0093] The target orientation refers to: the orientation indicated by the target pose.
[0094] Specifically, the calculation formula of the second real-time angle error is as follows:
[0095] goal_theta_error=normalize_angle(goal_pose.theta-robot_pose.theta)
[0096] Where goal_theta_error is the second real-time angle error; goal_pose.theta is the angle corresponding to the target orientation, and the other parameters have been defined above and will not be elaborated here.
[0097] C2. Generate a second control instruction according to the second real-time angle error.
[0098] The second control instruction includes: a third linear velocity control parameter, a fourth linear velocity control parameter and a second angular velocity control parameter. Specifically, the generated second control instruction can be as follows:
[0099]
[0100] Among them, p_angular is the P controller parameter for translational control; cmd.linear.x is the third linear velocity control parameter, referring to the rotational control sub-phase, which is the linear velocity control parameter of the robot in the x-axis direction; cmd.linear.y is the fourth linear velocity control parameter, referring to the rotational control sub-phase, which is the linear velocity control parameter of the robot in the y-axis direction; cmd.angular.z is the second angular velocity control parameter, that is, the angular velocity control parameter of the robot in the rotational control sub-phase.
[0101] C3. Control the robot to rotate and move according to the second control instruction.
[0102] The robot can send the second control instruction to the P controller of the robot's chassis. After receiving the second control instruction, the P controller can parse the second control instruction, obtain each control parameter carried by the second control instruction, and perform rotational control on the robot according to each control parameter, so that the robot can rotate in place.
[0103] It should be noted that the concepts of the above coordinates, coordinate axes, and angles are all described based on the map coordinate system.
[0104] It can be understood that when there are only two sub-phases divided in the precise control phase, the robot has one and only one rotational control sub-phase; within this one rotational control sub-phase, the target pose specifically refers to: the precise target pose. When there are three sub-phases divided in the precise control phase, the robot has two rotational control sub-phases: if the robot is in the first rotational control sub-phase, the target pose specifically refers to: the rough target pose; if the robot is in the second rotational control sub-phase, the target pose specifically refers to: the precise target pose.
[0105] As can be seen from the above, in the embodiments of the present application, considering the current problems existing in the global planner and local planner of the robot, only rely on them for preliminary movement control. Once the robot detects that it is relatively close to the rough target pose during teaching, it will enter a relatively more precise control stage. This relatively more precise control stage can be initially divided into two different sub-stages, namely: the translation control sub-stage and the rotation control sub-stage. It should be particularly noted that during the translation control sub-stage and the rotation control sub-stage, the robot will be controlled based on its own precise real-time pose and precise target pose. It can be understood that during the translation control sub-stage, the robot only performs translation and its orientation does not change, which can make the robot gradually approach the target point; when the robot is already at the target point, the robot enters the rotation control sub-stage and only rotates, and its position does not change, which can make the robot reach the precise orientation during teaching at this target point. Through the above process, it can help the robot complete its movement task earlier and achieve the balance of control efficiency and control accuracy.
[0106] Corresponding to the control method provided above, the embodiments of the present application also provide a control device. As Figure 2 shown, the control device 2 includes:
[0107] A first control module 201, configured to control the robot to perform translational movement if the rough real-time pose of the robot satisfies a preset pose condition during the process of the robot moving towards the target point based on the control of the global planner and the local planner, where the pose condition is set according to a preset rough target pose, and the rough target pose is: the rough target pose of the robot when teaching at the target point;
[0108] A second control module 202, configured to control the robot to change from translational movement to rotational movement if the precise real-time pose of the robot satisfies a preset distance condition during the translational movement of the robot, where the distance condition is set according to the calculated precise target pose, and the precise target pose is: the precise target pose of the robot when teaching at the target point;
[0109] A determination module 203, configured to determine that the robot has completed the movement task if the precise real-time pose of the robot satisfies a preset first orientation condition during the rotational movement of the robot, where the first orientation condition is set according to the precise target pose.
[0110] In some embodiments, the control device 2 further includes:
[0111] A third control module, configured to control the robot to perform rotational movement before controlling the robot to perform translational movement when the rough real-time pose of the robot satisfies the pose condition;
[0112] The first control module 201 is specifically configured to control the robot to change from rotational movement to translational movement if the accurate real-time pose of the robot satisfies a preset second orientation condition during the process of the third control module controlling the robot to rotate and move, where the second orientation condition is set according to the rough target pose.
[0113] In some embodiments, the first control module 201 includes:
[0114] The first control sub-module is configured to control the robot to translate towards the target point according to the preset rough target pose;
[0115] The first calculation sub-module is configured to calculate the accurate target pose according to the accurate real-time pose of the robot and the preset taught point cloud data during the process of controlling the robot to translate towards the target point according to the rough target pose;
[0116] The second control sub-module is configured to control the robot to translate towards the target point according to the accurate target pose after the accurate target pose is calculated.
[0117] In some embodiments, the first calculation sub-module includes:
[0118] The point cloud acquisition unit is configured to acquire the current point cloud data;
[0119] The point cloud registration unit is configured to perform point cloud registration on the current point cloud data and the taught point cloud data;
[0120] The first calculation unit is configured to calculate the accurate target pose according to the result of the point cloud registration and the accurate real-time pose of the robot.
[0121] In some embodiments, the second control sub-module includes:
[0122] The second calculation unit is configured to calculate the real-time distance error between the target point and the robot according to the accurate real-time pose of the robot and the accurate target pose;
[0123] The third calculation unit is configured to calculate the first real-time angle error between the specified orientation and the orientation of the robot according to the accurate real-time pose of the robot and the accurate target pose, where the specified orientation is: the direction from the position indicated by the accurate real-time pose of the robot to the position indicated by the accurate target pose;
[0124] The generation unit is configured to generate a first control instruction according to the real-time distance error and the first real-time angle error;
[0125] The control unit is configured to control the robot to translate towards the target point according to the first control instruction.
[0126] In some embodiments, the second control module 202 includes:
[0127] A second calculation sub-module, configured to calculate a second real-time angle error between the target orientation and the robot's orientation according to the accurate real-time pose and the accurate target pose of the robot, where the target orientation is the orientation indicated by the accurate target pose;
[0128] A generation sub-module, configured to generate a second control instruction according to the second real-time angle error;
[0129] A third control sub-module, configured to control the robot to change from translational movement to rotational movement according to the second control instruction.
[0130] In some embodiments, the accurate real-time pose of the robot is calculated according to the chassis data of the robot.
[0131] As can be seen from the above, in the embodiments of the present application, considering the current problems existing in the global planner and the local planner of the robot, only rely on them for preliminary movement control. Once the robot detects that it is relatively close to the rough target pose during teaching, it will enter a relatively more accurate control stage. This relatively more accurate control stage can be initially divided into two different sub-stages, namely: a translational control sub-stage and a rotational control sub-stage. It should be particularly noted that during the translational control sub-stage and the rotational control sub-stage, the robot will be controlled based on its own accurate real-time pose and accurate target pose. It can be understood that during the translational control sub-stage, the robot only performs translation and its orientation does not change, which can make the robot gradually approach the target point; when the robot is already at the target point, the robot enters the rotational control sub-stage and only rotates, and its position does not change, which can make the robot reach the accurate orientation during teaching at this target point. Through the above process, it can help the robot complete its movement task earlier and achieve a balance between control efficiency and control accuracy.
[0132] Corresponding to the control method provided above, an embodiment of the present application also provides a robot. Please refer to Figure 3 , the robot 3 in the embodiment of the present application includes: a memory 301, one or more processors 302 ( Figure 3 only one is shown in the figure) and a computer program stored on the memory 301 and executable on the processor. Wherein: the memory 301 is used to store software programs and units, and the processor 302 executes various functional applications and data processing by running the software programs and units stored in the memory 301 to obtain the resources corresponding to the above preset events. Specifically, when the processor 302 runs the above computer program stored in the memory 301, the following steps are implemented:
[0133] When the robot moves towards the target point under the control of the global planner and the local planner, if the rough real-time pose of the robot meets the preset pose condition, the robot is controlled to move translationally, where the pose condition is set according to the preset rough target pose, and the rough target pose is: the rough target pose when the robot is taught at the target point;
[0134] When the robot is moving translationally, if the precise real-time pose of the robot meets the preset distance condition, the robot is controlled to change from translational movement to rotational movement, where the distance condition is set according to the calculated precise target pose, and the precise target pose is: the precise target pose when the robot is taught at the target point;
[0135] When the robot is moving rotationally, if the precise real-time pose of the robot meets the preset first orientation condition, it is determined that the robot has completed the movement task, where the first orientation condition is set according to the precise target pose.
[0136] Assuming the above is the first possible implementation manner, then in the second possible implementation manner provided based on the first possible implementation manner, when the rough real-time pose of the robot meets the pose condition, before controlling the robot to move translationally, the control method further includes:
[0137] Controlling the robot to move rotationally;
[0138] Correspondingly, controlling the robot to move translationally includes:
[0139] When the robot is moving rotationally, if the precise real-time pose of the robot meets the preset second orientation condition, the robot is controlled to change from rotational movement to translational movement, where the second orientation condition is set according to the rough target pose.
[0140] In the third possible implementation manner provided based on the first possible implementation manner above, or based on the second possible implementation manner above, controlling the robot to move translationally includes:
[0141] Controlling the robot to move translationally towards the target point according to the preset rough target pose;
[0142] During the process of controlling the robot to move translationally towards the target point according to the rough target pose, calculate the precise target pose according to the precise real-time pose of the robot and the preset taught point cloud data;
[0143] After obtaining the precise target pose by calculation, control the robot to move translationally towards the target point according to the precise target pose.
[0144] In a fourth possible implementation provided based on the above third possible implementation, calculating a precise target pose according to the precise real-time pose of the robot and the preset taught point cloud data includes:
[0145] Collect the current point cloud data;
[0146] Perform point cloud registration on the current point cloud data and the taught point cloud data;
[0147] Calculate the precise target pose according to the result of the point cloud registration and the precise real-time pose of the robot.
[0148] In a fifth possible implementation provided based on the above three possible implementations, controlling the robot to translate towards the target point includes:
[0149] Calculate the real-time distance error between the target point and the robot according to the precise real-time pose of the robot and the precise target pose;
[0150] Calculate the first real-time angle error between the specified orientation and the orientation of the robot according to the precise real-time pose of the robot and the precise target pose, where the specified orientation is: the direction from the position indicated by the precise real-time pose of the robot to the position indicated by the precise target pose;
[0151] Generate a first control command according to the real-time distance error and the first real-time angle error;
[0152] Control the robot to translate towards the target point according to the first control command.
[0153] In a sixth possible implementation provided based on the above first possible implementation or the above second possible implementation, controlling the robot to change from translational movement to rotational movement includes:
[0154] Calculate the second real-time angle error between the target orientation and the orientation of the robot according to the precise real-time pose of the robot and the precise target pose, where the target orientation is: the orientation indicated by the precise target pose;
[0155] Generate a second control command according to the second real-time angle error;
[0156] Control the robot to change from translational movement to rotational movement according to the second control command.
[0157] In a seventh possible implementation provided based on the above first possible implementation or the above second possible implementation, the precise real-time pose of the robot is calculated according to the chassis data of the robot.
[0158] It should be understood that in the embodiments of the present application, the so-called processor 302 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0159] The memory 301 may include a read-only memory and a random access memory, and provide instructions and data to the processor 302. A part or all of the memory 301 may further include a non-volatile random access memory. For example, the memory 301 may also store information about the device category.
[0160] As can be seen from the above, in the embodiments of the present application, considering the current problems of the global planner and the local planner of the robot, only rely on them for preliminary movement control. Once the robot monitors that it has become relatively close to the rough target pose during teaching, it will enter a relatively more precise control stage. The relatively more precise control stage can be initially divided into two different sub-stages, namely: the translation control sub-stage and the rotation control sub-stage. It should be particularly noted that during the translation control sub-stage and the rotation control sub-stage, the robot will be controlled based on its own precise real-time pose and precise target pose. It can be understood that during the translation control sub-stage, the robot only performs translation and its orientation does not change, which can make the robot gradually approach the target point; when the robot is already at the target point, the robot enters the rotation control sub-stage and only performs rotation, and its position does not change, which can make the robot reach the precise orientation during teaching at this target point. Through the above process, it can help the robot complete its movement task early and achieve a balance between control efficiency and control accuracy.
[0161] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules according to needs, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of the functional units and modules are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above-mentioned system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here.
[0162] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0163] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of external device software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0164] In the embodiments provided in this application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the system embodiments described above are only illustrative. For example, the above-mentioned division of modules or units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling, direct coupling or communication connection can be through some interfaces. The indirect coupling or communication connection of devices or units can be in electrical, mechanical or other forms.
[0165] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0166] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above method embodiments of this application, it can also be completed by a computer program instructing the associated hardware. The above computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above various method embodiments can be implemented. Among them, the above computer program includes computer program code, and the above computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The above computer-readable storage medium can include: any entity or device that can carry the above computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer-readable memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the above computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.
[0167] The above embodiments are only used to illustrate the technical solutions of this application, rather than to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of this application, and should all be included in the protection scope of this application.
Claims
1. A control method, characterized in that, the control method is applied to a robot, and the control method includes: during the process that the robot moves towards a target point based on the control of a global planner and a local planner, if the rough real-time pose of the robot meets a preset pose condition, then control the robot to move translationally, wherein the pose condition is set according to a preset rough target pose, and the rough target pose is: the rough target pose when the robot is taught at the target point; during the process that the robot moves translationally, if the precise real-time pose of the robot meets a preset distance condition, then control the robot to change from translational movement to rotational movement, wherein the distance condition is set according to a calculated precise target pose, and the precise target pose is: the precise target pose when the robot is taught at the target point; during the process that the robot moves rotationally, if the precise real-time pose of the robot meets a preset first orientation condition, then determine that the robot has completed the movement task, wherein the first orientation condition is set according to the precise target pose; The controlling the robot to move translationally includes: controlling the robot to move translationally towards the target point according to the preset rough target pose; during the process of controlling the robot to move translationally towards the target point according to the rough target pose, calculate the precise target pose according to the precise real-time pose of the robot and the preset taught point cloud data; after calculating the precise target pose, calculate the real-time distance error between the target point and the robot according to the precise real-time pose of the robot and the precise target pose; calculate the first real-time angle error between a specified orientation and the orientation of the robot according to the precise real-time pose of the robot and the precise target pose, and the specified orientation is: the direction from the position indicated by the precise real-time pose of the robot to the position indicated by the precise target pose; generate a first control instruction according to the real-time distance error and the first real-time angle error; control the robot to move translationally towards the target point according to the first control instruction.
2. The control method according to claim 1, characterized in that, when the rough real-time pose of the robot meets the pose condition, before controlling the robot to move translationally, the control method further includes: controlling the robot to move rotationally; correspondingly, the controlling the robot to move translationally includes: during the process that the robot moves rotationally, if the precise real-time pose of the robot meets a preset second orientation condition, then control the robot to change from rotational movement to translational movement, wherein the second orientation condition is set according to the rough target pose.
3. The control method according to claim 1, characterized in that, the calculating the precise target pose according to the precise real-time pose of the robot and the preset taught point cloud data includes: acquire the current point cloud data; perform point cloud registration on the current point cloud data and the taught point cloud data; Calculate the precise target pose based on the precise real-time pose of the robot and the result of the point cloud registration.
4. The control method according to claim 1 or 2, wherein, the control for changing the translational movement of the robot to rotational movement includes: calculating a second real-time angle error between the target orientation and the orientation of the robot according to the precise real-time pose of the robot and the precise target pose, where the target orientation is the orientation indicated by the precise target pose; generating a second control instruction according to the second real-time angle error; controlling the robot to change from translational movement to rotational movement according to the second control instruction.
5. The control method according to claim 1 or 2, wherein, the precise real-time pose of the robot is calculated based on the chassis data of the robot.
6. A control device, wherein, the control device is applied to a robot, and the control device includes: a first control module, configured to control the robot to perform translational movement during the process of the robot moving towards a target point based on the control of a global planner and a local planner, if the rough real-time pose of the robot meets a preset pose condition, where the pose condition is set according to a preset rough target pose, and the rough target pose is the rough target pose when the robot is taught at the target point; a second control module, configured to control the robot to change from translational movement to rotational movement during the process of the robot performing translational movement, if the precise real-time pose of the robot meets a preset distance condition, where the distance condition is set according to the calculated precise target pose, and the precise target pose is the precise target pose when the robot is taught at the target point; a determination module, configured to determine that the robot has completed the movement task during the process of the robot performing rotational movement, if the precise real-time pose of the robot meets a preset first orientation condition, where the first orientation condition is set according to the precise target pose; wherein, the first control module includes: a first control sub-module, configured to control the robot to perform translational movement towards the target point according to a preset rough target pose; a first calculation sub-module, configured to calculate a precise target pose according to the precise real-time pose of the robot and preset teaching point cloud data during the process of controlling the robot to perform translational movement towards the target point according to the rough target pose; a second control sub-module, configured to control the robot to perform translational movement towards the target point according to the precise target pose after calculating the precise target pose; wherein, the second control sub-module includes: a second calculation unit, configured to calculate a real-time distance error between the target point and the robot according to the precise real-time pose of the robot and the precise target pose. A third calculation unit, configured to calculate a first real-time angular error between a specified orientation and the orientation of the robot according to the precise real-time pose of the robot and the precise target pose, where the specified orientation is: the direction from the position indicated by the precise real-time pose of the robot to the position indicated by the precise target pose; A generation unit, configured to generate a first control instruction according to the real-time distance error and the first real-time angular error; A control unit, configured to control the robot to perform a translational movement towards the target point according to the first control instruction.
7. A robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, when the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium storing a computer program, wherein, when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Control system used for autonomous mobile robot platform and control method and device thereof
CN106383517A
Pose positioning method and device, computer equipment and storage medium
CN115035190A