Robot control method, device, computer storage medium and robot
By obtaining the remote control command speed and the virtual thrust of obstacles, the safe movement speed is determined and the robot movement is controlled, which solves the problem of manual remote control robots being prone to collision and improves safety and flexibility.
Patent Information
- Application Number
- CN202110688563.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-21
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-06-21
AI Technical Summary
Manual remote control robots are prone to collisions and safety accidents, and existing technology cannot effectively solve this problem.
By obtaining the robot's remote control command speed and the virtual thrust of the obstacle on the robot, the safe movement speed is determined based on the virtual thrust, current movement speed and preset deceleration parameters, and the robot is controlled to move at a safe speed to avoid collisions.
It effectively avoids the collision between the robot and obstacles, improves the safety of the remote control robot during movement, reduces the risk of accidents, and makes the robot movement more flexible and reliable.
Smart Images

Figure CN115509217B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robots, and in particular to a robot control method, a robot control device, a computer storage medium and a robot. Background Art
[0002] Currently, mobile robots or AGVs have the function of manual remote control. Manual control of robots may have some safety hazards, such as untimely braking, inaccurate remote control prediction, and lack of concentration of the controller, which may cause the robot or AGV to collide with obstacles and cause safety accidents.
[0003] With regard to the problem in the prior art that manual remote-controlled robots are prone to collisions and thus cause safety accidents, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a robot control method, device, computer storage medium and robot, so as to at least solve the technical problem in the prior art that manually remote-controlled robots are prone to collision and cause safety accidents.
[0005] According to one aspect of an embodiment of the present application, a robot control method is provided, including: obtaining the remote control command speed of the robot and the virtual thrust of the obstacle on the robot; when the remote control command speed and the virtual thrust are both not zero, determining the safe movement speed based on the virtual thrust, the current actual movement speed of the robot and a preset deceleration parameter; and controlling the robot to move at the safe movement speed.
[0006] According to another aspect of an embodiment of the present application, a robot control method is also provided, including: obtaining the remote control command speed of the robot in multiple directions and the virtual thrust of obstacles on the robot in multiple directions; when the target remote control command speed in the first direction and the target virtual thrust in the first direction are both not 0, decelerating the robot in the first direction, wherein the first direction is any one of the multiple directions.
[0007] According to another aspect of an embodiment of the present application, a robot control device is also provided, including: an acquisition module, used to obtain the remote control command speed of the robot and the virtual thrust of the obstacle on the robot; a determination module, used to determine the safe movement speed based on the virtual thrust, the current actual movement speed of the robot and the preset deceleration parameters when the remote control command speed and the virtual thrust are not 0; and a control module, used to control the robot to move at the safe movement speed.
[0008] According to another aspect of an embodiment of the present application, a computer storage medium is further provided, wherein the computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.
[0009] According to another aspect of an embodiment of the present application, there is further provided a robot, comprising: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.
[0010] In an embodiment of the present invention, the remote control command speed of the robot and the virtual thrust of the obstacle on the robot are obtained; when the remote control command speed and the virtual thrust are not 0, the safe movement speed is determined based on the virtual thrust, the current actual movement speed of the robot and the preset deceleration parameter; the robot is controlled to move at the safe movement speed. The above scheme detects the remote control command speed and the virtual thrust of the obstacle on the robot during the movement of the robot, so that when the remote control command speed and the virtual thrust of the obstacle on the robot are not 0, the safe movement speed is determined to decelerate the robot and avoid collision between the robot and the obstacle, thereby solving the technical problem in the prior art that manual remote control robots are prone to collisions and cause safety accidents. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0012] Figure 1 is a flow chart of a robot control method according to an embodiment of the present application;
[0013] Figure 2 is a schematic diagram of performing obstacle avoidance control on a robot according to an embodiment of the present application;
[0014] Figure 3 is a schematic diagram of controlling the linear speed of a robot according to an embodiment of the present application;
[0015] Figure 4 It is a process of performing obstacle avoidance control on a robot according to an embodiment of the present application;
[0016] Figure 5 is a schematic diagram of a voxel grid according to an embodiment of the present application;
[0017] Figure 6 is a flow chart of another robot control method according to an embodiment of the present application;
[0018] Figure 7 is a schematic diagram of a control device of a robot according to an embodiment of the present application;
[0019] Figure 8It is a schematic diagram of another robot control device according to an embodiment of the present application. DETAILED DESCRIPTION
[0020] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0022] Example 1
[0023] According to an embodiment of the present application, an embodiment of a robot control method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0024] Figure 1 is a flow chart of a robot control method according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0025] Step S102, obtaining the remote control command speed of the robot and the virtual thrust of the obstacle on the robot.
[0026] Specifically, the robot may be a robot with a manual remote control function or an AGV (Automated Guided Vehicle). The remote control command speed is the control speed sent to the robot by the robot's remote control, and the robot's remote control may be any device used to control the robot.
[0027] In the above scheme, the environment around the robot is understood as an abstract artificial force field. When the remote control command speed of the robot is not 0, the surrounding obstacles generate virtual thrust to the robot.
[0028] The virtual thrust of the obstacle on the robot is related to the distance between the obstacle and the robot. A safety distance can be set. When the distance between the obstacle and the robot is greater than the safety distance, the virtual thrust of the obstacle on the robot is determined to be 0. When the distance between the obstacle and the robot is less than or equal to the safety distance, the obstacle is determined to generate a certain virtual thrust on the robot.
[0029] Step S104, when the remote control command speed and the virtual thrust are not 0, determine the safe motion speed based on the virtual thrust, the current actual motion speed of the robot and the preset deceleration parameter.
[0030] When the remote control command speed and virtual thrust are not 0, it means that an obstacle has appeared within the safety range centered on the robot, and the robot is still moving according to the remote control command speed, that is, the robot is at risk of colliding with the obstacle. Therefore, in this case, the movement of the robot needs to be adjusted.
[0031] In the above scheme, the safe movement speed is determined based on the virtual thrust, the current actual movement speed of the robot and the preset deceleration parameter. The deceleration control can be performed based on the current actual movement speed of the robot, and the greater the virtual thrust, the closer the obstacle is to the robot. For example, the safe movement speed can be obtained by subtracting the product of the virtual thrust and the preset deceleration parameter from the actual movement speed of the robot.
[0032] Step S106, controlling the robot to move at a safe movement speed.
[0033] Since the robot will continuously detect its remote control command speed and the virtual thrust of the obstacle on the robot, before the robot's speed decreases to 0, it will continuously calculate the safe movement speed and control the robot to move at the safe movement speed, so the actual movement speed of the robot will continue to decrease until it decreases to 0. Therefore, in the above steps, the robot is controlled to move at the safe movement speed determined in step S104, so that the robot can stop moving before colliding with the obstacle.
[0034] In an optional embodiment, taking a two-wheel differential robot as an example, the speed of the two-wheel differential robot includes a linear speed v and an angular speed w. Figure 2 is a schematic diagram of an obstacle avoidance control for a robot according to an embodiment of the present application, combined with Figure 2 As shown, get the robot's remote control command speed (v m , wm ), at the remote control command speed (v m , w m ) and virtual thrust (F x ,F y ) are not 0, based on the virtual thrust (F x ,F y ), the robot's current actual movement speed (v c , w c ) and the preset deceleration parameters to determine the safe motion speed (v s , w s ), where v represents linear velocity, ω represents angular velocity, (F x ,F y ) represent the components of the virtual thrust on the x-axis and y-axis of the robot coordinate system respectively.
[0035] It should be noted that after the robot is controlled to reduce its speed to 0, if the obstacle is removed or a remote control command is sent to the robot to move in another direction (for example, in the opposite direction of the obstacle), the robot will start moving again.
[0036] The robot in this application does not have a target point itself, and the movement direction of the robot is the temporary direction of the controller. However, there will still be obstacles in the process of the robot's movement. Since human control will have reaction time, if the control is not timely, it will collide with obstacles. The above embodiment of the present application obtains the remote control command speed of the robot and the virtual thrust of the obstacle on the robot; when the remote control command speed and the virtual thrust are not 0, the safe movement speed is determined based on the virtual thrust, the current actual movement speed of the robot and the preset deceleration parameters; the robot is controlled to move at the safe movement speed. The above scheme detects the remote control command speed and the virtual thrust of the obstacle on the robot during the movement of the robot, so that when the remote control command speed and the virtual thrust of the obstacle on the robot are not 0, the safe movement speed is determined to decelerate the robot and avoid collision between the robot and obstacles, thereby solving the technical problem in the prior art that manual remote control robots are prone to collisions and cause safety accidents.
[0037] As an optional embodiment, the safe movement speed is determined based on the virtual thrust, the robot's current actual movement speed and the preset deceleration parameter, including: step S1041, obtaining the product of the virtual thrust, the deceleration parameter and the preset time difference; step S1042, determining that the difference between the robot's current actual movement speed and the product is the safe movement speed.
[0038] In an optional embodiment, the safe motion speed can be determined by the following formula: Vs=Vc-△t·F·α, wherein Vs represents the safe motion speed, Vc is the current actual motion speed of the robot, △t is the preset time difference, F is the virtual thrust, and α is the deceleration parameter.
[0039] As an optional embodiment, the robot is a two-wheel differential robot, the remote control command speed includes the remote control command linear speed and the remote control command angular speed, the actual movement speed includes: the actual movement linear speed and the actual movement angular speed, the virtual thrust is synthesized by a first virtual thrust in a first direction and a second virtual thrust in a second direction, wherein the first direction is the direction of the robot, the second direction is perpendicular to the first direction, and the safe movement speed includes: the safe movement linear speed and the safe movement angular speed.
[0040] For a two-wheel differential robot, all its speed parameters may include linear velocity and angular velocity, and the virtual thrust of the obstacle on the robot may also be divided into a first direction and a second direction to obtain component forces in two directions.
[0041] Specifically, the first direction and the second direction may be directions in the robot coordinate system. In the robot coordinate system, the position of the robot is the coordinate origin, the direction facing the robot is the positive direction of the x-axis, the other direction perpendicular to the x-axis is the y-axis, and the left side of the robot is the positive direction of the y-axis. That is, the first direction may be the x-axis direction in the robot coordinate system, and the second direction may be the y-axis direction in the robot coordinate system.
[0042] As an optional embodiment, when the remote control command speed and the virtual thrust are not 0, the safe motion speed is determined based on the virtual thrust, the current actual motion speed of the robot and the preset deceleration parameter, including:
[0043] When the remote control command linear velocity and the first virtual thrust are both not 0, the safe motion linear velocity is determined based on the first virtual thrust, the robot's current actual motion linear velocity and the preset deceleration parameter; and when the remote control command angular velocity and the second virtual thrust are both not 0, the safe motion angular velocity is determined based on the second virtual thrust, the robot's current actual motion angular velocity and the preset deceleration parameter.
[0044] In the above scheme, whether the robot has a collision risk in each direction is controlled separately. If the remote control command linear speed and the first virtual thrust are not 0, it is determined that the robot has a collision risk in the first direction, and the safe movement speed in the first direction is determined, that is, the safe movement linear speed; in this case, the robot's safe movement angular velocity is irrelevant to the control in this direction.
[0045] If the remote control command angular velocity and the second virtual thrust are both not 0, it is determined that the robot is at risk of collision in the second direction, and the safe movement speed in the second direction is determined, that is, the safe movement angular velocity. Similarly, in this case, the robot's safe linear speed is irrelevant to control in this direction.
[0046] The safe motion linear velocity and safe motion angular velocity may be determined in the manner as shown in the above steps S041 and S1042. For example, when the remote control command linear velocity and the first virtual thrust are both not 0, the product of the first virtual thrust, the deceleration parameter and the preset time difference is obtained, and the difference between the current actual motion linear velocity of the robot and the product is determined to be the safe motion linear velocity, that is, v s =v c -ΔtF x α, where v S Used to indicate safe linear velocity, v C It is used to indicate the actual linear velocity of motion, Δt is used to indicate the preset time difference, F x It is used to represent the first virtual thrust, and α is used to represent the deceleration parameter. Figure 3 is a schematic diagram of controlling the linear speed of a robot according to an embodiment of the present application, combined with Figure 3 As shown, in F x and v m When it is not 0, determine v s =v c -ΔtF x α, otherwise determine v S Equal to v m .
[0047] When the remote control command angular velocity and the second virtual thrust are not 0, the product of the second virtual thrust, the deceleration parameter and the preset time difference is obtained; and the difference between the current actual motion angular velocity of the robot and the product is determined to be the safe motion angular velocity. That is, ω S =ω C -ΔtF y α, where ω S Used to indicate the safe linear velocity of motion, ω C It is used to indicate the actual linear velocity of motion, Δt is used to indicate the preset time difference, F y It is used to represent the first virtual thrust, and α is used to represent the deceleration parameter.
[0048] The above scheme enables the robot to autonomously decelerate in the direction of the obstacle when encountering an obstacle while in remote control state without affecting movement in other directions, making the robot more flexible and reliable in remote control state.
[0049] As an optional embodiment, obtaining the virtual thrust of an obstacle on the robot includes: obtaining initial two-dimensional point cloud data within a preset obstacle avoidance range through a sensor, wherein the preset obstacle avoidance range is determined with the robot as the center; performing voxel filtering on the initial two-dimensional point cloud data to obtain filtered target two-dimensional point cloud data; obtaining the thrust field of each point in the target two-dimensional point cloud data on the robot; determining the unit virtual thrust of each point on the robot based on the thrust field of each point on the robot; and determining the virtual thrust of the obstacle within the preset obstacle avoidance range on the robot based on the unit virtual thrust.
[0050] Specifically, the above-mentioned sensors may be ultrasonic sensors, collision switches, laser radars, binocular cameras, etc. These sensors may be set on the robot or in the environment where the robot moves. In an optional embodiment, the data collected by multiple sensors may be fused to obtain three-dimensional point cloud data around the robot, and then the three-dimensional point cloud data may be mapped to a plane to obtain the above-mentioned initial two-dimensional point cloud data.
[0051] The above-mentioned voxel filtering is used to reduce the amount of data during operation, thereby reducing the data processing pressure of the robot.
[0052] Figure 4 A process for controlling the robot to avoid obstacles according to an embodiment of the present application is combined with Figure 4 As shown, data is collected through the robot's obstacle avoidance sensor, data is fused for the data collected by multiple sensors, and the thrust of all obstacles is calculated, that is, the virtual thrust of the above obstacles on the robot. The remote control command speed is received, and the safe movement speed is calculated according to steps S102 to S106, and the robot is safely controlled by the safe movement speed (the robot is controlled to move at the safe movement speed). In the process of safely controlling the robot, it is determined whether to end the control of the robot. If the judgment result is yes, the control of the robot is ended, otherwise it returns to continue to collect data through the obstacle avoidance sensor.
[0053] The following describes in detail how to perform voxel filtering, how to calculate the thrust field, and how to determine the unit virtual recommendation for each point.
[0054] As an optional embodiment, voxel filtering is performed on the initial two-dimensional point cloud data to obtain filtered target two-dimensional point cloud data, including: rasterizing the preset obstacle avoidance range according to the preset grid size so that the initial point cloud in the initial two-dimensional point cloud data falls into the grid; obtaining multiple initial point clouds falling into the same grid, determining a target point cloud based on the coordinates of the multiple initial point clouds, and representing the multiple initial point clouds falling into the same grid through the target point cloud; determining that the target point cloud corresponding to each grid constitutes the target two-dimensional point cloud data.
[0055] In an optional embodiment, the data collected by all sensors are converted to the robot body coordinates and vertically projected onto a 2D plane to generate a 2D point cloud. These 2D point cloud data are the above-mentioned initial 2D point cloud data. Then, voxel filtering is performed on the initial 2D point cloud data.
[0056] First, with the robot as the center, determine an obstacle avoidance range Q (the above preset obstacle avoidance range can be a square with the robot as the center and a side length of 2Q), grid size r, and rasterize the area around the robot, such as Figure 5 shown.
[0057] The grid divides the initial two-dimensional point cloud data into different voxel grids, and then uses the centroid of all points in the voxel grid to represent the environmental data of the grid. For a two-dimensional voxel containing N points, the formula for the target point representing the environmental data after processing by the voxel filter is: Among them, (x, y) is the coordinate of the target point in the robot coordinate system, (x i ,y i ) is used to represent the coordinates of the i-th point in the same grid in the robot coordinate system.
[0058] The above scheme of this application will Perform voxel filtering and finally get Ct. The voxel filtering is as follows Figure 5 As shown. The grid size of the voxel filter is r, and the range is Q. r and Q can be adjusted according to the requirements. The larger Q is, the greater the safety distance of the robot is. The larger r is, the smaller the control accuracy is. The smaller r is, the greater the calculation amount is.
[0059] As an optional embodiment, the thrust field of each point in the target two-dimensional point cloud data to the robot is obtained, including: determining the maximum distance of the thrust field according to a preset obstacle avoidance range; when the target distance between the target point and the robot is greater than the maximum distance, determining the thrust field to be 0, wherein the target point is each point in the target two-dimensional point cloud data; when the target distance between the target point and the robot is less than or equal to the maximum distance, obtaining the first square value of the target distance, the second square value of the ratio of the maximum distance to the unit distance, and the difference between four times the target distance and 3, obtaining the ratio between the second square value and the difference, and determining the difference between the first square value and the ratio as the thrust field of the target point to the robot, wherein the unit distance is used to represent the size of the grid.
[0060] In an optional embodiment, the thrust field of the obstacle on the robot can be calculated by the following formula:
[0061]
[0062] Among them, point q represents the above-mentioned target point, U(q) represents the thrust field of the target point on the robot, Q represents the above-mentioned maximum distance, in this example, 2Q is the side length of the preset obstacle avoidance range, D(q) represents the target distance between the target point and the robot, and r is the above-mentioned unit distance, that is, the grid resolution.
[0063] As an optional embodiment, the unit virtual thrust of each point on the robot is determined based on the thrust field of each point on the robot, including: obtaining a preset thrust field coefficient; determining the product of the thrust field of each point on the robot and the thrust field coefficient as the unit virtual thrust of each point on the robot.
[0064] In an optional embodiment, the unit virtual thrust can be calculated by the following formula:
[0065]
[0066] Among them, F q is the unit virtual thrust at point q, and η is used to represent the above-mentioned thrust field coefficient.
[0067] As an optional embodiment, determining the virtual thrust of an obstacle within a preset obstacle avoidance range on the robot based on the unit virtual thrust includes: obtaining the sum of the unit virtual thrusts corresponding to each point within the preset obstacle avoidance range; and determining the sum as the virtual thrust of the obstacle within the preset obstacle avoidance range on the robot.
[0068] The above scheme converts all sensor data at time t Fusion into C t Then, calculate C t The magnitude and direction of the thrust of the obstacles in the robot determine the magnitude and direction of the robot's deceleration, which is explained in detail below.
[0069] As an optional embodiment, obtaining the sum of the unit virtual thrust corresponding to each point within a preset obstacle avoidance range includes: obtaining a first component of the unit virtual thrust corresponding to each point in a first direction and a second component of the unit virtual thrust in a second direction, wherein the first direction is the orientation of the robot and the second direction is perpendicular to the first direction; obtaining the sum of the first component of the force for each point within the preset obstacle avoidance range; and obtaining the sum of the second component of the force for each point within the preset obstacle avoidance range.
[0070] In an optional embodiment, the first direction is the x direction in the robot coordinate system, the second direction is the y direction in the robot coordinate system, and the unit virtual thrust at point q is F q , represents the first component of force at point q, represents the second component of the force at point q, i represents the i-th point in the preset obstacle avoidance range, (q x ,q y) represents the coordinates of point q in the robot coordinate system, F x ,F y It represents the thrust of all obstacles around the robot on the x and y axes at the current moment. The sum of the unit virtual thrust can be calculated by the following formula.
[0071]
[0072]
[0073] Example 2
[0074] In order to prevent the potential safety hazards caused by manually controlling a mobile robot or AGV, the following two solutions are also provided: Solution 1, when encountering an obstacle, the robot stops suddenly and then is manually moved to an obstacle-free area; Solution 2, when encountering an obstacle, the robot automatically retreats to an obstacle-free area. The drawback of the above-mentioned solution 1 is that the control is not flexible and the robot needs to be moved manually; the drawback of solution 2 is that the control effect is not good and more potential safety hazards may be caused during the robot's automatic retreat. In order to solve these problems, the present invention also provides an embodiment of a robot control method, Figure 6 is a flow chart of another robot control method according to an embodiment of the present application, such as Figure 6 As shown, the method comprises the following steps:
[0075] Step S602, obtaining the remote control command speed of the robot in multiple directions and the virtual thrust of the obstacle on the robot in multiple directions.
[0076] Specifically, the robot may be a robot with a manual remote control function or an AGV (Automated Guided Vehicle). The remote control command speed is the control speed sent to the robot by the robot's remote control, and the robot's remote control may be any device used to control the robot.
[0077] In an optional embodiment, when the robot is a two-wheel differential robot, the above multiple directions may include the x direction and the y direction in the robot coordinate system, the speed parameter in the x direction is the linear speed, and the speed parameter in the y direction is the angular speed. For other robots, there may be other corresponding multiple directions.
[0078] In the above scheme, the environment around the robot is understood as an abstract artificial force field, and the virtual thrust of the obstacle on the robot includes component forces in multiple directions, that is, the virtual thrust in the above multiple directions.
[0079] Step S604 performs deceleration control on the robot in the first direction when both the target remote control command speed in the first direction and the target virtual thrust in the first direction are not 0, wherein the first direction is any one of the multiple directions.
[0080] The first direction is a direction in which both the remote control command speed and the virtual thrust are not 0 among the multiple directions. When a certain direction satisfies the above conditions, the speed of the direction is decelerated.
[0081] In an optional embodiment, still taking the above-mentioned two-wheel differential robot as an example, if the target remote control command speed in the x-axis direction in the robot coordinate system and the target virtual thrust in the same direction are both not 0, the speed in the x-axis direction, that is, the linear speed, is decelerated; if the target remote control command speed in the y-axis direction in the robot coordinate system and the target virtual thrust in the same direction are both not 0, the speed in the y-axis direction, that is, the angular velocity, is decelerated.
[0082] It can be seen that the above embodiment of the present application obtains the remote control command speed of the robot in multiple directions and the virtual thrust of the obstacle on the robot in multiple directions; when the target remote control command speed in the first direction and the target virtual thrust in the first direction are not 0, the robot is decelerated in the first direction, wherein the first direction is any one of the multiple directions. In the process of remote control of the robot, the above scheme controls the robot to decelerate in the direction where it is subject to the virtual thrust of the obstacle, but continues to remotely control the movement in the direction where it is not subject to the virtual thrust of the obstacle, thereby not only solving the technical problem in the prior art that the manually remote-controlled robot is prone to collision and cause safety accidents, but also makes the robot more flexible and reliable in the remote control state.
[0083] As an optional embodiment, deceleration control is performed on the robot in a first direction, including: obtaining the robot's current target actual motion speed in the first direction and a preset deceleration parameter; obtaining the product of the target virtual thrust, the deceleration parameter and a preset time difference; and determining that the difference between the robot's current target actual motion speed and the product is the robot's target safe motion speed in the first direction.
[0084] In an optional embodiment, the first direction is determined to be the x direction of the robot, and the s =v c -ΔtF x α determines the complete moving speed of the above target, where v S Used to indicate the target safe motion speed, v C It is used to indicate the actual moving speed of the target, Δt is used to indicate the preset time difference, and F x It is used to represent the target virtual thrust, and α is used to represent the deceleration parameter.
[0085] It should be noted that, in the absence of conflict, the method in this embodiment may also include other method steps in Embodiment 1, which will not be described in detail here.
[0086] Example 3
[0087] The present invention provides an embodiment of a control device for a robot, Figure 7 is a schematic diagram of a robot control device according to an embodiment of the present application, such as Figure 7 As shown, the device comprises:
[0088] An acquisition module 70 is used to acquire the remote control command speed of the robot and the virtual thrust of the obstacle on the robot;
[0089] A determination module 72, configured to determine a safe motion speed based on the virtual thrust, the current actual motion speed of the robot and a preset deceleration parameter when both the remote control command speed and the virtual thrust are not zero;
[0090] The control module 74 is used to control the robot to move at a safe movement speed.
[0091] As an optional embodiment, the determination module includes: a first acquisition submodule, used to obtain the product of the virtual thrust, the deceleration parameter and the preset time difference; a first determination submodule, used to determine that the difference between the robot's current actual movement speed and the product is the safe movement speed.
[0092] As an optional embodiment, the robot is a two-wheel differential robot, the remote control command speed includes the remote control command linear speed and the remote control command angular speed, the actual movement speed includes: the actual movement linear speed and the actual movement angular speed, the virtual thrust is synthesized by a first virtual thrust in a first direction and a second virtual thrust in a second direction, wherein the first direction is the direction of the robot, the second direction is perpendicular to the first direction, and the safe movement speed includes: the safe movement linear speed and the safe movement angular speed.
[0093] As an optional embodiment, when the remote control command speed and the virtual thrust are both not zero, the determination module includes: a second determination submodule, used to determine the safe motion linear speed based on the first virtual thrust, the robot's current actual motion linear speed and a preset deceleration parameter when the remote control command linear speed and the first virtual thrust are both not zero; and a third determination submodule, used to determine the safe motion angular speed based on the second virtual thrust, the robot's current actual motion angular speed and a preset deceleration parameter when the remote control command angular speed and the second virtual thrust are both not zero.
[0094] As an optional embodiment, the acquisition module includes: a second acquisition submodule, used to acquire initial two-dimensional point cloud data within a preset obstacle avoidance range through a sensor, wherein the preset obstacle avoidance range is determined with the robot as the center; a filtering submodule, used to perform voxel filtering on the initial two-dimensional point cloud data to obtain filtered target two-dimensional point cloud data; a third acquisition submodule, used to acquire the thrust field of each point in the target two-dimensional point cloud data to the robot; a fourth determination submodule, used to determine the unit virtual thrust of each point to the robot based on the thrust field of each point to the robot; and a fifth determination submodule, used to determine the virtual thrust of obstacles within the preset obstacle avoidance range on the robot based on the unit virtual thrust.
[0095] As an optional embodiment, the filtering submodule includes: a rasterization processing unit, used to rasterize the preset obstacle avoidance range according to a preset grid size so that the initial point cloud in the initial two-dimensional point cloud data falls into the grid; a representation unit, used to obtain multiple initial point clouds falling into the same grid, determine a target point cloud based on the coordinates of the multiple initial point clouds, and represent the multiple initial point clouds falling into the same grid through the target point cloud; a sixth determination submodule, used to determine that the target point cloud corresponding to each grid constitutes the target two-dimensional point cloud data.
[0096] As an optional embodiment, the third acquisition submodule includes: a first determination unit, used to determine the maximum distance of the thrust field according to a preset obstacle avoidance range; a second determination unit, used to determine that the thrust field is 0 when the target distance between the target point and the robot is greater than the maximum distance, wherein the target point is each point in the target two-dimensional point cloud data; a third determination unit, used to obtain a first square value of the target distance, a second square value of the ratio of the maximum distance to the unit distance, and a difference between four times the target distance and 3 when the target distance between the target point and the robot is less than or equal to the maximum distance, obtain the ratio between the second square value and the difference, and determine the difference between the first square value and the ratio as the thrust field of the target point to the robot, wherein the unit distance is used to represent the size of the grid.
[0097] As an optional embodiment, the fourth determination submodule includes: a first acquisition unit, used to acquire a preset thrust field coefficient; a fourth determination unit, used to determine that the product of the thrust field of each point to the robot and the thrust field coefficient is the unit virtual thrust of each point to the robot.
[0098] As an optional embodiment, the fifth determination submodule includes: a second acquisition unit, used to obtain the sum of the unit virtual thrusts corresponding to each point within the preset obstacle avoidance range; and a fifth determination unit, used to determine that the sum is the virtual thrust of the obstacles within the preset obstacle avoidance range on the robot.
[0099] As an optional embodiment, the second acquisition unit includes: a first acquisition sub-unit, used to obtain a first component force in a first direction and a second component force in a second direction of the unit virtual thrust corresponding to each point, wherein the first direction is the orientation of the robot and the second direction is perpendicular to the first direction; a second acquisition sub-unit, used to obtain the sum of the first component force of each point within a preset obstacle avoidance range; and a third acquisition sub-unit, used to obtain the sum of the second component force of each point within the preset obstacle avoidance range.
[0100] Example 4
[0101] The present invention provides another embodiment of a control device for a robot. Figure 8 is a schematic diagram of another robot control device according to an embodiment of the present application, such as Figure 8 As shown, the device comprises:
[0102] An acquisition module 82 is used to acquire the remote control command speed of the robot in multiple directions and the virtual thrust of the obstacle on the robot in multiple directions;
[0103] The control module 84 is used to control the robot to decelerate in the first direction when the target remote control command speed in the first direction and the target virtual thrust in the first direction are not 0, wherein the first direction is any one of multiple directions.
[0104] As an optional embodiment, the control module includes: a first acquisition submodule, used to obtain the robot's current target actual movement speed in the first direction and a preset deceleration parameter; a second acquisition submodule, used to obtain the product of the target virtual thrust, the deceleration parameter and the preset time difference; and a determination submodule, used to determine that the difference between the robot's current target actual movement speed and the product is the robot's target safe movement speed in the first direction.
[0105] Example 5
[0106] The present invention provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the method steps described in Example 1.
[0107] Example 6
[0108] The present invention provides a robot, comprising: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps described in Example 1.
[0109] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0110] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0111] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0112] The units described 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 units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0113] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0114] If the 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 technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0115] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A robot control method, characterized in that: include: Acquire the remote control command speed of the robot and the virtual thrust of the obstacle on the robot, wherein the virtual thrust is generated by the obstacle on the robot when the remote control command speed of the robot is not 0; When both the remote control command speed and the virtual thrust are not 0, determining a safe motion speed based on the virtual thrust, the current actual motion speed of the robot and a preset deceleration parameter; Controlling the robot to move at the safe movement speed, wherein after the speed of the robot is reduced to 0, the robot is controlled to restart movement after the obstacle is removed or an updated remote control command is sent to the robot; Among them, obtaining the virtual thrust of the obstacle on the robot includes: obtaining initial two-dimensional point cloud data within a preset obstacle avoidance range through a sensor, wherein the preset obstacle avoidance range is determined with the robot as the center; performing voxel filtering on the initial two-dimensional point cloud data to obtain filtered target two-dimensional point cloud data; obtaining the thrust field of each point in the target two-dimensional point cloud data on the robot; determining the unit virtual thrust of each point on the robot based on the thrust field of each point on the robot; and determining the virtual thrust of the obstacle within the preset obstacle avoidance range on the robot based on the unit virtual thrust.
2. The method according to claim 1, characterized in that Determining a safe motion speed based on the virtual thrust, the current actual motion speed of the robot and a preset deceleration parameter includes: Obtaining the product of the virtual thrust, the deceleration parameter and a preset time difference; The difference between the current actual movement speed of the robot and the product is determined as the safe movement speed.
3. The method according to claim 1, characterized in that The robot is a two-wheel differential robot, the remote control command speed includes the remote control command linear speed and the remote control command angular speed, the actual movement speed includes: the actual movement linear speed and the actual movement angular speed, the virtual thrust is synthesized by a first virtual thrust in a first direction and a second virtual thrust in a second direction, wherein the first direction is the orientation of the robot, the second direction is perpendicular to the first direction, and the safe movement speed includes: a safe movement linear speed and a safe movement angular speed.
4. The method according to claim 3, characterized in that In the case that both the remote control command speed and the virtual thrust are not 0, determining the safe motion speed based on the virtual thrust, the current actual motion speed of the robot and a preset deceleration parameter, including: In a case where both the remote control command linear velocity and the first virtual thrust are not 0, determining the safe motion linear velocity based on the first virtual thrust, the current actual motion linear velocity of the robot and a preset deceleration parameter; and When both the remote control command angular velocity and the second virtual thrust are not 0, the safe motion angular velocity is determined based on the second virtual thrust, the current actual motion angular velocity of the robot and a preset deceleration parameter.
5. The method according to claim 1, characterized in that Performing voxel filtering on the initial two-dimensional point cloud data to obtain filtered target two-dimensional point cloud data includes: The preset obstacle avoidance range is rasterized according to a preset grid size so that the initial point cloud in the initial two-dimensional point cloud data falls within the grid; Acquire multiple initial point clouds falling into the same grid, determine a target point cloud based on the coordinates of the multiple initial point clouds, and represent the multiple initial point clouds falling into the same grid through the target point cloud; It is determined that the target point cloud corresponding to each grid constitutes the target two-dimensional point cloud data.
6. The method according to claim 5, characterized in that Acquiring a thrust field of each point in the target two-dimensional point cloud data on the robot, comprising: Determining the maximum distance of the thrust field according to the preset obstacle avoidance range; In a case where a target distance between a target point and the robot is greater than the maximum distance, determining the thrust field to be 0, wherein the target point is each point in the target two-dimensional point cloud data; When the target distance between the target point and the robot is less than or equal to the maximum distance, obtain a first square value of the target distance, a second square value of the ratio of the maximum distance to the unit distance, and a difference between four times the target distance and 3, obtain a ratio between the second square value and the difference, and determine the difference between the first square value and the ratio as the thrust field of the target point on the robot, wherein the unit distance is used to represent the size of the grid.
7. The method according to claim 1, characterized in that Determining a unit virtual thrust of each point on the robot based on the thrust field of each point on the robot includes: Get the preset thrust field coefficient; The product of the thrust field of each point on the robot and the thrust field coefficient is determined as the unit virtual thrust of each point on the robot.
8. The method according to claim 1, characterized in that Determining the virtual thrust of the obstacle within the preset obstacle avoidance range on the robot based on the unit virtual thrust includes: Obtaining a sum of unit virtual thrusts corresponding to each point in the preset obstacle avoidance range; The sum is determined to be a virtual thrust of the obstacle within the preset obstacle avoidance range on the robot.
9. The method according to claim 8, characterized in that Obtaining the sum of the unit virtual thrust corresponding to each point in the preset obstacle avoidance range, including: Obtaining a first component force in a first direction and a second component force in a second direction of the unit virtual thrust corresponding to each point, wherein the first direction is the orientation of the robot, and the second direction is perpendicular to the first direction; Obtaining the sum of the first component force at each point in the preset obstacle avoidance range; and The sum of the second component forces at each point in the preset obstacle avoidance range is obtained.
10. A robot control method, characterized in that: include: Acquire the remote control command speed of the robot in multiple directions and the virtual thrust of the obstacle on the robot in the multiple directions, wherein the virtual thrust is generated by the obstacle on the robot when the remote control command speed of the robot is not 0; When both the target remote control command speed in the first direction and the target virtual thrust in the first direction are not 0, decelerating the robot in the first direction, wherein the first direction is any one of the multiple directions, and after the speed of the robot is reduced to 0, when the obstacle is removed or an updated remote control command is sent to the robot, controlling the robot to restart the movement; Among them, obtaining the virtual thrust of the obstacle on the robot includes: obtaining initial two-dimensional point cloud data within a preset obstacle avoidance range through a sensor, wherein the preset obstacle avoidance range is determined with the robot as the center; performing voxel filtering on the initial two-dimensional point cloud data to obtain filtered target two-dimensional point cloud data; obtaining the thrust field of each point in the target two-dimensional point cloud data on the robot; determining the unit virtual thrust of each point on the robot based on the thrust field of each point on the robot; and determining the virtual thrust of the obstacle within the preset obstacle avoidance range on the robot based on the unit virtual thrust.
11. The method according to claim 10, characterized in that The robot is decelerated and controlled in a first direction, comprising: Obtaining the current target actual motion speed of the robot in the first direction and a preset deceleration parameter; Obtaining the product of the target virtual thrust, the deceleration parameter and a preset time difference; The difference between the current target actual movement speed of the robot and the product is determined as the target safe movement speed of the robot in the first direction.
12. A robot control device, characterized in that: include: an acquisition module, used to acquire the remote control command speed of the robot and the virtual thrust of the obstacle on the robot, wherein the virtual thrust is generated by the obstacle on the robot when the remote control command speed of the robot is not 0; A determination module, configured to determine a safe motion speed based on the virtual thrust, the current actual motion speed of the robot and a preset deceleration parameter when both the remote control command speed and the virtual thrust are not zero; A control module, used to control the robot to move at the safe movement speed, wherein after the speed of the robot is reduced to 0, the robot is controlled to restart the movement after the obstacle is removed or an updated remote control command is sent to the robot; The acquisition module includes: a second acquisition submodule, used to acquire initial two-dimensional point cloud data within a preset obstacle avoidance range through a sensor, wherein the preset obstacle avoidance range is determined with the robot as the center; a filtering submodule, used to perform voxel filtering on the initial two-dimensional point cloud data to obtain filtered target two-dimensional point cloud data; a third acquisition submodule, used to acquire the thrust field of each point in the target two-dimensional point cloud data on the robot; a fourth determination submodule, used to determine the unit virtual thrust of each point on the robot based on the thrust field of each point on the robot; and a fifth determination submodule, used to determine the virtual thrust of obstacles within the preset obstacle avoidance range on the robot based on the unit virtual thrust.
13. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, which are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 10 .
14. A robot, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 10.
