Robot control method, robot control device, robot and storage medium
Through the strategy of visual positioning and straight-line driving, the problem of reduced positioning accuracy and low efficiency when the robot enters the elevator is solved, and unobstructed and efficient elevator entry is achieved.
Patent Information
- Application Number
- CN202210669376.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-14
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-06-14
AI Technical Summary
When the robot enters the elevator, due to the interference of people and objects in the elevator and the specular reflection of the laser radar, the positioning accuracy decreases, the efficiency of entering the elevator is low, or the problem of collision and scratching occurs.
The visual positioning method is used to divide the movement process of the robot into the elevator into two stages: first, it moves to the preset straight-line driving section, and then moves straight along the straight-line driving section towards the visual sign. It avoids obstacles and improves entry through the straight-line driving section. efficiency.
It realizes the robot's ability to enter the elevator without obstruction and efficiently, simplifies the control process, and improves the efficiency of entering the target space.
Smart Images

Figure CN115070758B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of robot technology, and in particular, relates to a robot control method, a robot control device, a robot and a computer-readable storage medium. Background Art
[0002] With the widespread use of robots, the robot's activity scene is no longer limited to a single floor. For example, after receiving a takeaway or express package, the delivery robot can take the elevator to the user's floor to save the user's time in picking up the takeaway or express package. For another example, in places such as hospitals or nursing homes, elevator passengers may need to use manned robots to move due to physical factors, so manned robots also need to enter and exit the elevator autonomously to meet the elevator passengers' elevator needs.
[0003] At present, robots usually use a combination of laser radar and odometer to enter the elevator. However, when the robot is large, the robot's positioning accuracy is reduced due to interference from people and objects in the elevator, as well as the mirror reflection caused by the laser emitted by the laser radar hitting the stainless steel mirror in the elevator. This greatly interferes with the robot's movement, ultimately resulting in: either the robot is slow when entering the elevator, which is inefficient; or the robot is bumped and scratched when entering the elevator; or the robot cannot enter the elevator at all. Summary of the invention
[0004] The present application provides a robot control method, a robot control device, a robot and a computer-readable storage medium, which can enable the robot to enter spaces such as elevators without hindrance and efficiently.
[0005] In a first aspect, the present application provides a robot control method, comprising:
[0006] When the robot needs to enter the target space, determine the initial visual pose and target point of the robot in the visual identification coordinate system, wherein there is a preset visual identification in the target space, the visual identification is opposite to the entrance and exit of the target space, the visual identification coordinate system is a two-dimensional coordinate system constructed with the point where the visual identification is projected onto the horizontal plane as the origin, the target point is outside the target space, the distance from the target point to the entrance and exit is the preset distance, and the target point is on the x-axis of the visual identification coordinate system, and the x-axis is perpendicular to the vertical plane where the visual identification is located;
[0007] According to the initial visual posture, the robot is controlled to move to the straight driving section, wherein the end point of the straight driving section closer to the entrance and exit is the target point, the length of the straight driving section is the preset length, and the straight driving section coincides with the x-axis;
[0008] After the robot moves to the straight driving section, the robot is controlled to move straight toward the visual mark into the target space.
[0009] In a second aspect, the present application provides a robot control device, comprising:
[0010] A determination module is used to determine the initial visual pose and target point of the robot in a visual identification coordinate system when the robot needs to enter a target space, wherein a preset visual identification exists in the target space, the visual identification is opposite to the entrance and exit of the target space, the visual identification coordinate system is a two-dimensional coordinate system constructed with the point where the visual identification is projected onto a horizontal plane as the origin, the target point is outside the target space, the distance from the target point to the entrance and exit is a preset distance, and the target point is on the x-axis of the visual identification coordinate system, and the x-axis is perpendicular to the vertical plane where the visual identification is located;
[0011] A first control module is used to control the robot to move to a straight driving section according to the initial visual posture, wherein the end point of the straight driving section closer to the entrance and exit is the target point, the length of the straight driving section is a preset length, and the straight driving section coincides with the x-axis;
[0012] The second control module is used to control the robot to move straight toward the visual mark into the target space after the robot moves to the straight driving section.
[0013] In a third aspect, the present application provides a robot comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method of the first aspect when executing the computer program.
[0014] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method of 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, it implements the steps of the method of the first aspect.
[0016] Compared with the prior art, the present application has the following beneficial effects: the present application realizes the movement control of the robot based on visual positioning, and divides the movement process of the robot entering the target space into two movement stages: the first movement stage is the stage in which the robot moves from its initial position to a preset straight driving section, and the second movement stage is the stage in which the robot moves in a straight line along the straight driving section toward the visual mark to enter the target space. The above two stages ensure that the robot is not scratched by obstacles near the entrance and exit of the target space when entering the target space (such as an elevator) through the straight driving section; and the control process is simple, which improves the efficiency of the robot entering the target space.
[0017] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 is an example diagram of an application scenario of the robot control method provided in an embodiment of the present application;
[0020] Figure 2 It is a schematic diagram of the implementation flow of the robot control method provided in the embodiment of the present application;
[0021] Figure 3 is an example diagram of a target point and a straight-line driving section provided in an embodiment of the present application;
[0022] Figure 4 is an example diagram of the angle range provided in the embodiments of the present application;
[0023] Figure 5 is an example diagram of an arc path provided in an embodiment of the present application;
[0024] Figure 6 is a structural block diagram of a robot control device provided in an embodiment of the present application;
[0025] Figure 7 It is a schematic diagram of the structure of the robot provided in the embodiment of the present application. DETAILED DESCRIPTION
[0026] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0027] In order to illustrate the technical solution proposed in this application, a specific embodiment is provided below for illustration.
[0028] The embodiment of the present application proposes a robot control method, which enables the robot to enter a specified target space unimpeded and efficiently. As an example only, the target space can be an elevator or a room, etc., and the specific type of the target space is not exemplified here. The robot control method can be applied to a robot, or a control device (such as a robot remote control server) that establishes a communication connection with the robot, etc., and the execution subject of the robot control method is not limited here.
[0029] The following is a detailed description of the robot control method by taking the robot as the executor and the elevator as the target space as an example.
[0030] The robot control method proposed in the embodiment of the present application is mainly implemented based on visual positioning. A camera for visual positioning is installed on the robot, and the camera is facing directly in front of the robot. In addition, a preset and calibrated visual mark can be posted in advance on the elevator wall in the elevator car that the robot may enter, and the posting height of the visual mark is the same as the installation height of the robot's camera; and, in order to facilitate the robot to see the visual mark in time outside the elevator, from a bird's-eye view, the visual mark is opposite to the entrance and exit of the elevator where it is located (that is, the elevator door), for example, the posting position of the visual mark can be directly opposite to the center of the entrance and exit of the elevator where it is located.
[0031] As an example only, the visual identifier may be a QR code or other preset pattern, which is not limited here.
[0032] See also Figure 1 , Figure 1 An example of an application scenario when the robot enters an elevator is given from a bird's-eye view. Since the robot moves only in two dimensions, and the visual identification and the robot's cameras are both installed vertically, and the visual identification and the robot's cameras are at the same height, the present application embodiment can simplify three-dimensional positioning to two-dimensional positioning. That is, in the present application embodiment, the z-axis direction may be ignored, and only the x-axis and y-axis directions may be considered to construct a visual identification coordinate system, specifically: the point where the center point of the visual identification is projected to the horizontal plane (equivalent to the ground) is taken as the origin, and the direction of the vertical plane where the visual identification is located to the entrance and exit is taken as the positive direction of the x-axis, and a two-dimensional right-handed coordinate system is constructed, which is the visual identification coordinate system. It can be understood that the plane where the x-axis and y-axis are located is parallel to the horizontal plane (equivalent to the ground). Figure 1 In the figure, the visual identification coordinate system is also exemplified, which will not be repeated here. It can be understood that the various parameters such as posture, position, angle, distance and length in the following text are all described based on the visual identification coordinate system unless otherwise specified.
[0033] Based on the above description, the robot control method proposed in the embodiment of the present application is explained below.
[0034] See also Figure 2 , the implementation process of the robot control method is described in detail as follows:
[0035] Step 201, when the robot needs to enter the target space, the initial visual posture and target point of the robot in the visual identification coordinate system are determined.
[0036] After receiving the elevator entry command, the robot can trigger the camera it carries to enter the working state. In the working state of the camera, the camera can acquire visual images according to the preset acquisition frequency, and transmit each frame of the acquired visual image to the robot's processor for processing. It can be understood that for each frame of the visual image, the robot can obtain the visual position of the robot indicated by the visual image in the visual identification coordinate system through the visual positioning algorithm, and the process is as follows:
[0037] The robot can detect whether there is information about the visual identifier in the visual image; that is, detect whether the visual identifier is captured in the visual image. If there is information about the visual identifier in the visual image, the robot can analyze and process the information about the visual identifier through the visual positioning algorithm to realize the positioning of the visual identifier by the robot, and obtain the visual pose of the visual identifier in the camera coordinate system of the camera, which is recorded as coordinate T cm The camera is fixedly mounted on the robot, that is, the position of the camera in the robot coordinate system can be calibrated in advance and recorded as coordinate T rc Based on this, the visual position of the visual marker in the robot coordinate system can be obtained as T rc *T cm . Because the visual pose of the visual identifier in the robot coordinate system is actually inverse to the visual pose of the robot in the visual identifier coordinate system, the visual pose of the visual identifier in the robot coordinate system can be transformed according to the coordinate transformation relationship between the robot coordinate system and the visual identifier coordinate system to obtain the visual pose of the robot in the visual identifier coordinate system. The visual pose of the robot in the visual identifier coordinate system is denoted as coordinate T mr , then the above conversion process can be expressed as: T mr =(T rc *T cm ) -1 Since the camera coordinate system and the robot coordinate system have a fixed transformation relationship, for the convenience of description, the embodiments of the present application are mainly described around the robot coordinate system and the visual identification coordinate system.
[0038] Specifically, the robot's visual posture in the visual identification coordinate system includes: position and deflection angle. As an example only, T mr The data format can be: (x, y, θ), where x is the horizontal coordinate of the robot in the visual identification coordinate system, and y is the vertical coordinate of the robot in the visual identification coordinate system. The two together express the position of the robot; θ is the deflection angle of the robot relative to the negative direction of the x-axis of the visual identification coordinate system, in radians, with a "+" sign for counterclockwise direction and a "-" sign for clockwise direction; generally speaking, the value range of θ is
[0039] To facilitate the robot's positioning, in the embodiment of the present application, the robot will first control itself in a non-moving state after receiving the elevator entry command. That is, the robot will determine its initial visual posture in the visual identification coordinate system in the non-moving state. It should be noted that there is a difference between the non-moving state and the non-motion state. The non-moving state means that the robot has not moved, and the non-motion state means that the robot is completely still, that is, the robot has not moved and has not rotated.
[0040] In one application scenario, the robot can perform visual positioning through any frame of visual image after receiving the elevator entry command and being in a non-displacement state. If the corresponding visual pose is calculated through the frame of visual image, the visual pose can be determined as the initial visual pose;
[0041] In another application scenario, the robot can continue to perform visual positioning through the latest visual images received within a preset time (e.g., 10 seconds) when it receives the elevator entry command and is in a non-displaced state, and count the number of frames of the solved visual posture. It can be understood that if some visual images do not have visual identification information, it can be known that the visual posture solved by these visual images is empty, and it will not be included in the statistical range of the number of frames of the visual posture. The robot can detect the number of frames of the visual posture obtained by counting within the preset time, and the detection results may be as follows:
[0042] If the number of visual pose frames obtained by statistics reaches N, that is, the robot has obtained at least N frames of visual pose within the preset time, it is considered that there are enough valid visual poses at present, and the robot can filter the at least N frames of visual poses, and the result of the filtering process is the initial visual pose. As an example only, the filtering process can adopt a weighted average processing method or a principal component analysis method, etc., which is not limited here.
[0043] If the robot still fails to obtain at least N frames of visual pose after the preset time, it is considered that the robot's initialization has failed and the robot's initial visual pose has not been determined. In this case, the robot can be controlled to output an initialization failure reminder message and directly end this control; or the robot can be controlled to move appropriately in the nearby range and / or the robot can be controlled to adjust its orientation and retry to determine the robot's initial visual pose.
[0044] In order to allow the robot to enter and exit the elevator without obstruction, the embodiment of the present application designs a target point outside the elevator, and designs a straight driving section based on the target point. The target point and the straight driving section have the following characteristics:
[0045] For the target point, the target point is outside the elevator (i.e., the target space). From a bird's-eye view: the distance from the target point to the entrance and exit of the elevator (i.e., the target space) is the preset distance a, and the target point is on the x-axis of the visual identification coordinate system. When the posting position of the visual identification is directly opposite to the center of the entrance and exit, the target point can be considered as a point on the perpendicular midline of the entrance and exit. The reason for designing this target point is to reserve enough space for the robot to enter the elevator.
[0046] For a straight-line section, both endpoints of the straight-line section are outside the elevator (i.e., the target space), where the endpoint closer to the entrance and exit is the target point, and the length of the straight-line section is a preset length h. From a bird's-eye view, the straight-line section coincides with the x-axis of the visual identification coordinate system. The reason for designing the straight-line section is that after the robot reaches the straight-line section, it is convenient for the robot to enter the elevator along the straight-line section.
[0047] The target point is a fixed point relative to the visual marker. Based on this, after determining its initial visual pose, the robot can determine the coordinates of the target point in the visual marker coordinate system according to the characteristics of the target point described above. At this point, the robot knows the coordinates of the target point in the visual marker coordinate system and its own initial visual pose in the visual marker coordinate system.
[0048] See also Figure 3 , Figure 3 Examples of target points and straight-line driving sections are given from a bird's-eye view. Figure 3 In the figure, P1 is the target point, and P1P2 is the straight driving section. P1P2 coincides with the x-axis of the visual identification coordinate system, and the length of P1P2 is h, and the distance between P1 and the entrance and exit is a.
[0049] Step 202: Control the robot to move to a straight driving section according to the initial visual posture.
[0050] After the target point is determined, the straight-line section can also be determined immediately. This stage is the first extreme movement of the robot, and the robot's goal is to move to the straight-line section. That is, the robot uses the position indicated by its initial visual posture as the starting position, and any point on the straight-line section as the target position to control its own movement.
[0051] In one application scenario, the robot can control itself to move in a straight line to the straight driving section according to its initial visual posture. As an example only, the robot can adjust the deflection angle (i.e., direction) indicated by its initial visual posture so that the adjusted robot faces any point on the straight driving section and moves in a straight line to the point until it reaches the point.
[0052] In another application scenario, in order to ensure that the visual identifier remains within the field of view of the robot's camera during movement and to ensure smooth movement of the robot, the robot can control its own arc movement to the straight driving section according to its initial visual posture. It can be understood that arc movement means that the robot plans an arc path and moves along the arc path. In order to minimize the frequent adjustment of the robot's direction, the embodiment of the present application expects that when the robot moves to the straight driving section along the arc path, it can face the visual identifier. Based on this, the arc path planned by the robot should meet the following requirements: the arc path is tangent to the straight driving section. The initial arc path planning process is explained below:
[0053] A1. Calculate the robot's angular range based on the position indicated by the initial visual pose and the two end points of the straight-line driving section.
[0054] The robot's angle range refers to the range of possible deflection angles that the robot can use to achieve arc movement. It is understandable that each point on the straight driving section can form an arc path with the robot's initial position. In order to control the robot to move along the arc path, when the robot starts to move, its orientation at the initial position (equivalent to the direction of the robot's linear velocity) should also be adjusted to be tangent to the arc path. Mathematical knowledge shows that when planning an arc path based on the robot's initial position and point P2, the robot's deflection angle should be adjusted to the corresponding first angle, which is Indicated by; when planning the arc path based on the robot's initial position and point P1, the robot's deflection angle should be adjusted to the corresponding second angle, represented by β, then: It should be the maximum possible deflection angle when the robot moves from an arc to a straight section, and β should be the minimum possible deflection angle when the robot moves from an arc to a straight section. Figure 4 , Figure 4An example of the angle range when the robot is on the side above the x-axis of the visual identification coordinate system (i.e., the ordinate is a positive value) is given as follows:
[0055] A new two-dimensional coordinate system is constructed with point P1 as the origin. The x-axis of the two-dimensional coordinate system coincides with the x-axis of the visual identification coordinate system, and the y-axis of the two-dimensional coordinate system is parallel to the y-axis of the visual identification coordinate system. The angle range to be solved by the robot is [θ min ,θ max ],but:
[0056]
[0057] Among them, x is the horizontal coordinate of the robot's initial position (that is, the position indicated by the robot's initial visual posture) in the new two-dimensional coordinate system, y is the vertical coordinate of the initial position in the new two-dimensional coordinate system, and h is the preset length of the straight driving section.
[0058] It can be understood that the new two-dimensional coordinate system is introduced here only for the convenience of describing the calculation process of the angle range. The new two-dimensional coordinate system can be understood as: the origin of the visual identification coordinate system is translated to point P1; that is, in terms of calculation ideas, there is no difference between the new two-dimensional coordinate system and the visual identification coordinate system. Similarly, when the robot is on the side below the x-axis (that is, the ordinate is a negative value), the same calculation idea can be used for calculation, but it is necessary to pay attention to the signs of each parameter.
[0059] When the robot is on the x-axis, the robot can directly adjust its deflection angle to 0 so that it can face the visual mark and move directly in a straight line.
[0060] A2. Determine the target angle within the angle range.
[0061] The robot can determine any angle within the angle range as the target angle, which will not be described in detail here. After determining the target angle, the robot can control itself to adjust its deflection angle to the target angle to prepare for subsequent arc movement.
[0062] A3. Calculate the arc path based on the target angle and the position indicated by the initial visual pose.
[0063] It can be understood that a target angle uniquely corresponds to a point on a straight driving section, and also uniquely corresponds to an arc path. Figure 5 , Figure 5 An example of this arc path is given and detailed as follows:
[0064] Assume that the coordinates of the point on the arc path in the visual identification coordinate system are (x, y); after the robot adjusts its deflection angle to the target angle, its visual posture in the visual identification coordinate system is (x r ,y r ,θ); the coordinates of the center of the arc path in the visual identification coordinate system are (x t ,y t ); the radius of the arc is R. The known arc equation is:
[0065] (xx t ) 2 +(yy t ) 2 =R 2
[0066] R=|y t |
[0067] Expand the above arc equation and set R = |y t After substituting into the arc equation, we get:
[0068] (xx t ) 2 +y 2 -2y t y=0
[0069] Also, since (x r ,y r ,θ) is also on the arc path, and the (x r ,y r ,θ) into the arc equation, we can get
[0070]
[0071]
[0072] At this point, the radius R of the arc path has been solved; and because the robot is currently located on the arc path, and the straight-line section is tangent to the arc path, the corresponding arc path can be determined based on the above conditions. The robot can then move to the straight-line section according to the calculated arc path. Specifically, the differential speed model of the robot shows Wherein, v is the linear velocity of the robot when it moves along the circular path, and w is the angular velocity of the robot when it moves along the circular path. It can be understood that, under the premise of knowing R, as long as the linear velocity and angular velocity of the robot satisfy this formula, the robot can be guaranteed to move along the determined circular path. The robot can design reasonable v and w according to its actual current performance and / or current state, and the values of v and w are not limited here.
[0073] In some embodiments, in actual application scenarios, when the robot controls itself to move along an arc path, it is inevitably affected by various factors and there will be movement errors, and the errors may increase over time. Based on this, the robot introduces a feedback adjustment mechanism, so that when it is necessary, it can update the arc path according to the latest current visual posture in the process of controlling itself to move along the arc path. This process is specifically as follows:
[0074] B1. Determine the current visual pose and historical visual pose of the robot in the visual identification coordinate system, and determine the current odometer pose and historical odometer pose of the robot through the odometer of the robot.
[0075] During the movement, the robot can continuously determine the corresponding visual pose according to the visual image collected by the camera, which is recorded as (T1, T2, T3, ...); and at the same time when the robot determines the visual pose, the corresponding odometer pose can also be obtained through its odometer, which is recorded as (O1, O2, O3, ...). Specifically, the current visual pose is the visual pose determined by the robot based on the latest visual image during the movement; the historical visual pose is the visual pose determined by the robot based on a frame of visual image before the latest visual image during the movement. Similarly, the current odometer pose is the odometer pose determined by the robot based on the latest odometer data during the movement; the historical odometer pose is the odometer pose determined by the robot based on a frame of odometer data before the latest odometer data during the movement.
[0076] For ease of description, the current visual pose is recorded as T n , then the historical visual pose can be T n-k ; Similarly, the current odometer position is recorded as O n , then the historical odometer pose can be O n-k .
[0077] B2. Determine whether the robot has a sudden change in posture based on the current visual posture, historical visual posture, current odometer posture and historical odometer posture.
[0078] Generally speaking, the odometer has a relatively high accuracy in a short time range, so the robot can use the odometer pose to verify the visual pose. Specifically, the robot can calculate the visual pose difference based on the current visual pose and the historical visual pose. Similarly, the robot can also calculate the odometer pose difference based on the current odometer pose and the historical odometer pose. Just as an example, let the visual pose difference be ΔT and the odometer pose difference be ΔO, then ΔT = |T n -T n-k |, ΔO=|O n -O n-k|; or, ΔT = T n *T n-k -1 , ΔO=O n *O n-k -1 Finally, the calculated visual pose difference ΔT and odometer pose difference ΔO are compared. If the difference between the visual pose difference ΔT and the odometer pose difference ΔO is less than the preset difference threshold (for example, the distance difference between ΔO and ΔT is less than the preset first threshold, and the angle difference between ΔO and ΔT is less than the preset second threshold), it means that the robot has not experienced a sudden change in pose, and the robot can continue to move along the current arc path; on the contrary, if the difference between the visual pose difference and the odometer pose difference is not less than the difference threshold (for example, the distance difference between ΔO and ΔT is not less than the first threshold, and / or the angle difference between ΔO and ΔT is not less than the second threshold), it is considered that the robot has experienced a sudden change in pose.
[0079] B3. When the robot's posture suddenly changes, the arc path is updated according to the current visual posture.
[0080] It can be understood that a sudden change in the robot's posture indicates that the robot is likely to have deviated from its original arc path. To eliminate the deviation, the robot can determine a new arc path based on the current visual posture, and the new arc path is the updated arc path. Specifically, the process of determining the arc path has been described in step A3 above. It only needs to replace the target angle with the deflection angle indicated by the current visual posture, and replace the position indicated by the initial visual posture with the position indicated by the current visual posture to solve the new arc path, which will not be repeated here.
[0081] B4. Control the robot to continue moving along the updated arc path and return to execute step B1 until the robot moves to the straight driving section.
[0082] The robot can judge whether it has moved to the straight driving section according to the ordinate in its current visual posture. The specific judgment standard is: when the ordinate in the current visual posture is 0, it is determined that it has moved to the straight driving section.
[0083] Step 203: After the robot moves to the straight driving section, the robot is controlled to move straight toward the visual mark into the target space.
[0084] In the application scenario where the robot moves in a straight line to a straight driving section, after the robot moves to the straight driving section, it can first stop moving, and then adjust its deflection angle to 0 so that it can face the visual mark directly. After the deflection angle is adjusted to 0 degrees, the robot is controlled to move forward in a straight line and enter the target space.
[0085] In the application scenario where the robot moves from an arc to a straight section, since the arc path is tangent to the straight section (that is, the x-axis of the visual marker coordinate system), the robot usually faces the visual marker at the moment it moves to the straight section. Based on this, in this application scenario, the robot can immediately switch from arc movement to straight movement when it moves to the straight section, achieving a smooth switch between the arc movement of the previous stage and the straight movement of the current stage.
[0086] In some embodiments, when the robot moves to a straight-line driving section, the position indicated by the robot's visual posture in the visual identification coordinate system at this time (specifically the horizontal coordinate, which can be recorded as x0) can be used to determine the distance L allowed for the robot to move in a straight line toward the visual identification. In a typical application scenario, from a bird's-eye view, the robot expects that after entering the elevator, the distance between its final stop and the visual identification is in the range of [0.3m, 0.5m], then the value range of L can be [x0-0.5m, x0-0.3m]. Of course, the value of L is also related to the size of the robot and the size of the elevator car, and can be modified according to actual conditions, as long as the tail of the robot can be fully entered into the elevator and the robot does not collide with the elevator wall where the visual identification is located.
[0087] It can be understood that after the robot takes the elevator to the designated floor and the elevator door opens, the robot can exit the elevator by simply moving directly backward in a straight line.
[0088] As can be seen from the above, in the embodiment of the present application, the movement control of the robot is realized based on visual positioning, and the movement process of the robot entering the target space is divided into two movement stages: the first movement stage is the stage in which the robot moves from its initial position to the preset straight driving section, and the second movement stage is the stage in which the robot moves in a straight line along the straight driving section toward the visual mark to enter the target space. The above two stages ensure that the robot is not scratched by obstacles near the entrance and exit of the target space when entering the target space (such as an elevator) through the straight driving section; and the control process is simple, which improves the efficiency of the robot entering the target space.
[0089] Corresponding to the robot control method provided above, the present application embodiment also provides a robot control device. Figure 6 As shown, the robot control device 600 includes:
[0090] Determination module 601, used for determining the initial visual pose and target point of the robot in the visual identification coordinate system when the robot needs to enter the target space, wherein there is a preset visual identification in the target space, the visual identification is opposite to the entrance and exit of the target space, the visual identification coordinate system is a two-dimensional coordinate system constructed with the point where the visual identification is projected onto the horizontal plane as the origin, the target point is outside the target space, the distance from the target point to the entrance and exit is a preset distance, and the target point is on the x-axis of the visual identification coordinate system, and the x-axis is perpendicular to the vertical plane where the visual identification is located;
[0091] The first control module 602 is used to control the robot to move to a straight driving section according to the initial visual posture, wherein the end point of the straight driving section closer to the entrance and exit is the target point, the length of the straight driving section is a preset length, and the straight driving section coincides with the x-axis;
[0092] The second control module 603 is used to control the robot to move straight toward the visual mark into the target space after the robot moves to the straight driving section.
[0093] In some embodiments, the first control module 602 is specifically used to control the robot to move in an arc to a straight driving section according to the initial visual posture; or, according to the initial visual posture, control the robot to move in a straight line to a straight driving section.
[0094] In some embodiments, the first control module 602 includes:
[0095] An angle range calculation unit, used to calculate the angle range of the robot according to the position indicated by the initial visual posture and the two end points of the straight driving section;
[0096] A target angle determination unit, used to determine a target angle within an angle range;
[0097] An arc path calculation unit, used to calculate an arc path according to the target angle and the position indicated by the initial visual posture;
[0098] The arc movement control unit is used to control the robot to move along an arc path to a straight driving section.
[0099] In some embodiments, the arc movement control unit includes:
[0100] A posture determination subunit, used to determine the current visual posture and historical visual posture of the robot in the visual identification coordinate system in the process of controlling the robot to move along the arc path, and to determine the current odometer posture and historical odometer posture of the robot through the odometer of the robot;
[0101] The mutation judgment subunit is used to judge whether the robot has a posture mutation according to the current visual posture, the historical visual posture, the current odometer posture and the historical odometer posture;
[0102] The path update subunit is used to update the arc path according to the current visual posture when the robot has a sudden change in posture;
[0103] The mobile control subunit is used to control the robot to continue moving according to the updated arc path, so that the posture determination subunit continues to operate according to the updated arc path until the robot moves to the straight driving section.
[0104] In some embodiments, the mutation determination subunit comprises:
[0105] A first difference calculation subunit, used for calculating the visual pose difference according to the current visual pose and the historical visual pose;
[0106] A second difference calculation subunit is used to calculate the odometer posture difference according to the current odometer posture and the historical odometer posture;
[0107] The pose difference comparison subunit is used to compare the visual pose difference and the odometer pose difference;
[0108] The posture mutation judgment subunit is used to judge whether the robot has a posture mutation based on the comparison results.
[0109] In some embodiments, the process of determining the visual pose of the robot in the visual identification coordinate system includes: visually locating the visual identification through a camera carried by the robot to determine the visual pose of the visual identification in the robot coordinate system; transforming the visual pose of the visual identification in the robot coordinate system according to the coordinate transformation relationship between the robot coordinate system and the visual identification coordinate system to obtain the visual pose of the robot in the visual identification coordinate system.
[0110] In some embodiments, the determination module 601 includes:
[0111] A detection unit, used to detect whether at least N frames of visual poses of the robot in the visual identification coordinate system have been obtained within a preset time length, wherein the robot has not moved within the preset time length;
[0112] The filtering unit is used to filter the at least N frames of visual poses to obtain an initial visual pose when at least N frames of visual poses have been obtained within a preset time length.
[0113] As can be seen from the above, in the embodiment of the present application, the movement control of the robot is realized based on visual positioning, and the movement process of the robot entering the target space is divided into two movement stages: the first movement stage is the stage in which the robot moves from its initial position to the preset straight driving section, and the second movement stage is the stage in which the robot moves in a straight line along the straight driving section toward the visual mark to enter the target space. The above two stages ensure that the robot is not scratched by obstacles near the entrance and exit of the target space when entering the target space (such as an elevator) through the straight driving section; and the control process is simple, which improves the efficiency of the robot entering the target space.
[0114] Corresponding to the robot control method provided above, the present application embodiment also provides a robot. Figure 7 The robot 7 in the embodiment of the present application includes: a memory 701, one or more processors 702 ( Figure 7 Only one is shown in the figure) and a computer program stored in the memory 701 and executable on the processor. Among them: the memory 701 is used to store software programs and units, and the processor 702 executes various functional applications and data processing by running the software programs and units stored in the memory 701 to obtain the resources corresponding to the above-mentioned preset events. Specifically, the processor 702 implements the following steps when running the above-mentioned computer program stored in the memory 701:
[0115] When the robot needs to enter the target space, determine the initial visual pose and target point of the robot in the visual identification coordinate system, wherein there is a preset visual identification in the target space, the visual identification is opposite to the entrance and exit of the target space, the visual identification coordinate system is a two-dimensional coordinate system constructed with the point where the visual identification is projected onto the horizontal plane as the origin, the target point is outside the target space, the distance from the target point to the entrance and exit is the preset distance, and the target point is on the x-axis of the visual identification coordinate system, and the x-axis is perpendicular to the vertical plane where the visual identification is located;
[0116] According to the initial visual posture, the robot is controlled to move to the straight driving section, wherein the end point of the straight driving section closer to the entrance and exit is the target point, the length of the straight driving section is the preset length, and the straight driving section coincides with the x-axis;
[0117] After the robot moves to the straight driving section, the robot is controlled to move straight toward the visual mark into the target space.
[0118] Assuming that the above is the first possible implementation, in a second possible implementation provided on the basis of the first possible implementation, controlling the robot to move to a straight driving section according to the initial visual posture includes:
[0119] According to the initial visual posture, the robot is controlled to move in an arc to the straight driving section; or, according to the initial visual posture, the robot is controlled to move in a straight line to the straight driving section.
[0120] In a third possible implementation provided on the basis of the second possible implementation, according to the initial visual posture, controlling the robot to move in an arc to a straight driving section includes:
[0121] Calculate the robot's angular range based on the position indicated by the initial visual pose and the two end points of the straight-line driving section;
[0122] Within the angle range, determine the target angle;
[0123] Calculate the arc path based on the target angle and the position indicated by the initial visual pose;
[0124] Control the robot to move along the circular path to the straight driving section.
[0125] In a fourth possible implementation provided on the basis of the third possible implementation, controlling the robot to move to a straight driving section along an arc path includes:
[0126] In the process of controlling the robot to move along the circular path, determining the current visual pose and the historical visual pose of the robot in the visual identification coordinate system, and determining the current odometer pose and the historical odometer pose of the robot through the odometer of the robot;
[0127] Determine whether the robot has a sudden change in posture based on the current visual posture, historical visual posture, current odometer posture, and historical odometer posture;
[0128] When the robot's posture suddenly changes, the arc path is updated according to the current visual posture;
[0129] The robot is controlled to continue moving along the updated arc path, and returns to execute the steps of determining the current visual pose and the historical visual pose of the robot in the visual identification coordinate system, and determining the current odometer pose and the historical odometer pose of the robot through the odometer of the robot and subsequent steps until the robot moves to the straight driving section.
[0130] In a fifth possible implementation provided on the basis of the fourth possible implementation, judging whether the robot has a sudden change in posture according to the current visual posture, the historical visual posture, the current odometer posture and the historical odometer posture includes:
[0131] Calculate the visual pose difference based on the current visual pose and the historical visual pose;
[0132] Calculate the odometer posture difference based on the current odometer posture and the historical odometer posture;
[0133] Compare visual pose difference and odometer pose difference;
[0134] Determine whether the robot has a sudden posture change based on the comparison results.
[0135] In a sixth possible implementation provided on the basis of the first possible implementation, the process of determining the visual posture of the robot in the visual identification coordinate system includes:
[0136] The visual position of the visual mark in the robot coordinate system is determined by using the camera carried by the robot to visually locate the visual mark;
[0137] According to the coordinate transformation relationship between the robot coordinate system and the visual identification coordinate system, the visual pose of the visual identification in the robot coordinate system is transformed to obtain the visual pose of the robot in the visual identification coordinate system.
[0138] In a seventh possible implementation provided on the basis of the first possible implementation, determining an initial visual pose of the robot in a visual identification coordinate system includes:
[0139] Detecting whether at least N frames of visual poses of the robot in the visual identification coordinate system have been obtained within a preset time length, wherein the robot has not moved within the preset time length;
[0140] When at least N frames of visual poses have been obtained within a preset time length, filtering is performed on the at least N frames of visual poses to obtain an initial visual pose.
[0141] It should be understood that in the embodiment of the present application, the processor 702 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0142] The memory 701 may include a read-only memory and a random access memory, and provide instructions and data to the processor 702. A part or all of the memory 701 may also include a non-volatile random access memory. For example, the memory 701 may also store information of a device category.
[0143] As can be seen from the above, in the embodiment of the present application, the movement control of the robot is realized based on visual positioning, and the movement process of the robot entering the target space is divided into two movement stages: the first movement stage is the stage in which the robot moves from its initial position to the preset straight driving section, and the second movement stage is the stage in which the robot moves in a straight line along the straight driving section toward the visual mark to enter the target space. The above two stages ensure that the robot is not scratched by obstacles near the entrance and exit of the target space when entering the target space (such as an elevator) through the straight driving section; and the control process is simple, which improves the efficiency of the robot entering the target space.
[0144] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, 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. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0145] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0146] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of external device software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0147] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the above modules or units is only a logical function division. There may be other division methods in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0148] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0149] If the above-mentioned 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, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the associated hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The above-mentioned computer-readable storage medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, 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 contained in the above-mentioned 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, computer-readable storage media does not include electrical carrier signals and telecommunication signals.
[0150] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A robot control method, It is characterized in that include: When the robot needs to enter the target space, determine the initial visual posture and target point of the robot in the visual identification coordinate system, wherein there is a preset visual identification in the target space, the visual identification is opposite to the entrance and exit of the target space, the visual identification coordinate system is a two-dimensional coordinate system constructed with the point where the visual identification is projected onto the horizontal plane as the origin, the target point is outside the target space, the distance from the target point to the entrance and exit is a preset distance, and the target point is on the x-axis of the visual identification coordinate system, and the x-axis is perpendicular to the vertical plane where the visual identification is located; According to the initial visual posture, control the robot to move to a straight driving section, wherein an end point of the straight driving section closer to the entrance and exit is the target point, a length of the straight driving section is a preset length, and the straight driving section coincides with the x-axis; After the robot moves to the straight driving section, the robot is controlled to move straight toward the visual mark into the target space.
2. The robot control method according to claim 1, It is characterized in that The step of controlling the robot to move to a straight-line driving section according to the initial visual posture comprises: According to the initial visual posture, the robot is controlled to move in an arc to the straight driving section; or, according to the initial visual posture, the robot is controlled to move in a straight line to the straight driving section.
3. The robot control method according to claim 2, It is characterized in that The step of controlling the robot to move in an arc to the straight driving section according to the initial visual posture comprises: Calculating the angular range of the robot according to the position indicated by the initial visual pose and the two end points of the straight driving section; Within the angle range, determining a target angle; Calculating an arc path according to the target angle and the position indicated by the initial visual posture; The robot is controlled to move to the straight driving section along the circular arc path.
4. The robot control method according to claim 3, It is characterized in that The controlling the robot to move to the straight driving section along the arc path comprises: In the process of controlling the robot to move along the circular arc path, determining the current visual pose and the historical visual pose of the robot in the visual identification coordinate system, and determining the current odometer pose and the historical odometer pose of the robot through the odometer of the robot; Determining whether a posture mutation occurs to the robot according to the current visual posture, the historical visual posture, the current odometer posture, and the historical odometer posture; When the robot has a sudden change in posture, updating the arc path according to the current visual posture; Control the robot to continue moving along the updated arc path, and return to execute the step and subsequent steps of determining the current visual pose and the historical visual pose of the robot in the visual identification coordinate system, and determining the current odometer pose and the historical odometer pose of the robot through the odometer of the robot, until the robot moves to the straight driving section.
5. The robot control method according to claim 4, It is characterized in that The determining whether the robot has a sudden posture change according to the current visual posture, the historical visual posture, the current odometer posture and the historical odometer posture comprises: Calculating a visual pose difference according to the current visual pose and the historical visual pose; Calculating an odometer posture difference according to the current odometer posture and the historical odometer posture; Comparing the visual pose difference and the odometer pose difference; It is determined whether the robot has a sudden posture change according to the comparison result.
6. The robot control method according to claim 1, It is characterized in that The process of determining the visual posture of the robot in the visual identification coordinate system includes: Performing visual positioning of the visual identifier by using a camera carried by the robot to determine the visual position and posture of the visual identifier in the robot coordinate system; According to the coordinate transformation relationship between the robot coordinate system and the visual identification coordinate system, the visual posture of the visual identification in the robot coordinate system is transformed to obtain the visual posture of the robot in the visual identification coordinate system.
7. The robot control method according to claim 1, It is characterized in that Determining the initial visual pose of the robot in a visual identification coordinate system includes: Detecting whether at least N frames of visual poses of the robot in the visual identification coordinate system have been obtained within a preset time length, wherein the robot has not moved within the preset time length; When the at least N frames of visual poses have been obtained within the preset time length, filtering is performed on the at least N frames of visual poses to obtain the initial visual pose.
8. A robot control device, It is characterized in that include: A determination module, used for determining the initial visual pose and target point of the robot in a visual identification coordinate system when the robot needs to enter a target space, wherein a preset visual identification exists in the target space, the visual identification is opposite to an entrance and exit of the target space, the visual identification coordinate system is a two-dimensional coordinate system constructed with a point where the visual identification is projected onto a horizontal plane as an origin, the target point is outside the target space, the distance from the target point to the entrance and exit is a preset distance, and the target point is on an x-axis of the visual identification coordinate system, and the x-axis is perpendicular to a vertical plane where the visual identification is located; A first control module is used to control the robot to move to a straight driving section according to the initial visual posture, wherein the end point of the straight driving section closer to the entrance and exit is the target point, the length of the straight driving section is a preset length, and the straight driving section coincides with the x-axis; The second control module is used to control the robot to move straight toward the visual mark into the target space after the robot moves to the straight driving section.
9. A robot comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
