CN114378831B - Robot control method, device, robot and storage medium - Google Patents
Robot control method, device, robot and storage medium Download PDFInfo
- Publication number
- CN114378831B CN114378831B CN202210186460.2A CN202210186460A CN114378831B CN 114378831 B CN114378831 B CN 114378831B CN 202210186460 A CN202210186460 A CN 202210186460A CN 114378831 B CN114378831 B CN 114378831B
- Authority
- CN
- China
- Prior art keywords
- road surface
- robot
- value
- ranging
- calculating
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 49
- 238000009434 installation Methods 0.000 claims abstract description 21
- 230000008569 process Effects 0.000 claims abstract description 11
- 238000004364 calculation method Methods 0.000 claims description 20
- 230000036461 convulsion Effects 0.000 claims description 10
- 230000001419 dependent effect Effects 0.000 claims description 10
- 238000005259 measurement Methods 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 7
- 230000006870 function Effects 0.000 description 19
- 230000015654 memory Effects 0.000 description 14
- 238000004891 communication Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000012423 maintenance Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 241001417527 Pempheridae Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004140 cleaning Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005265 energy consumption Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000005693 optoelectronics Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000010408 sweeping Methods 0.000 description 1
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J9/00—Programme-controlled manipulators
- B25J9/16—Programme controls
- B25J9/1602—Programme controls characterised by the control system, structure, architecture
Landscapes
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Robotics (AREA)
- Mechanical Engineering (AREA)
- Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)
- Manipulator (AREA)
Abstract
The embodiment of the invention discloses a robot control method, a device, a robot and a storage medium, wherein the robot control method comprises the following steps: in the moving process of the robot, controlling a ranging sensor to range the distance of a road surface in the moving direction of the robot according to a preset period and a preset angle to obtain the distances from a plurality of ranging points on the road surface to the ranging sensor; for each ranging point, the road surface height of the ranging point is calculated according to the distance of the ranging point, the installation height of the ranging sensor and the preset angle, the bumping degree value of the road surface is calculated according to the road surface height, and then the moving speed of the robot is adjusted according to the bumping degree value.
Description
Technical Field
The embodiment of the invention relates to the technical field of mobile robot motion control, in particular to a robot control method, a device, a robot and a storage medium.
Background
With the vigorous development of mobile robot technology, more and more mobile robot products are born and gradually applied to various scenes, and particularly, indoor mobile robots are widely applied to indoor work.
Although most of the ground areas in the indoor scene are relatively flat, rugged areas still exist, so that jolts occur in the running process of the mobile robot, such as indoor deceleration strips, building joints, gaps on the road surface and the like. If the mobile robot runs in a bumpy area at a high speed, the risk of hardware damage of the mobile robot is increased, the service life of the mobile robot is reduced, and in order to reduce the risk caused by bumpy on a road surface, the common practice is to mark the bumpy area on a map manually, and the mobile robot automatically slows down and slowly passes through when running to the bumpy area.
However, by manually marking the bump area on the map, on one hand, when the indoor environment is large and the bump area is large, manually marking the bump area takes much time, increasing the deployment cost, and on the other hand, when the indoor environment changes, the mark of the bump area on the map needs to be manually updated, and the maintenance cost is high.
Disclosure of Invention
The embodiment of the invention provides a robot control method, a robot control device, electronic equipment and a storage medium, which are used for solving the problems of time consumption and high maintenance cost of manual marking caused by manually marking a bumpy area on a map in the prior art.
In a first aspect, an embodiment of the present invention provides a robot control method applied to a robot mounted with a ranging sensor, including:
in the moving process of the robot, controlling a ranging sensor to range the distance of a road surface in the moving direction of the robot according to a preset period and a preset angle to obtain the distances from a plurality of ranging points on the road surface to the ranging sensor;
for each ranging point, calculating the road surface height of the ranging point according to the distance of the ranging point, the installation height of the ranging sensor and the preset angle;
calculating the bumping degree value of the road surface according to the height of the road surface;
and adjusting the moving speed of the robot according to the jolt degree value.
Optionally, the mounting height is a height from the ranging sensor to a wheel of the robot, and the calculating, for each ranging point, a road surface height of the ranging point according to a distance of the ranging point, the mounting height of the ranging sensor, and the preset angle includes:
for each ranging point, calculating a first product of the distance of the ranging point and a cosine value of the preset angle;
and calculating a first absolute value of the difference between the first product and the mounting height as the road surface height of the ranging point.
Optionally, the calculating the value of the bumping degree of the road surface according to the height of the road surface includes:
acquiring road surface heights of a plurality of ranging points in the moving direction of the robot;
calculating a second absolute value of the difference value of the road surface heights of two adjacent ranging points;
and calculating the bumping degree value of the road surface according to the second absolute value.
Optionally, the acquiring the road surface heights of the plurality of ranging points in the moving direction of the robot includes:
calculating the product of the installation height and the tangent value of the preset angle to obtain a preset distance;
and acquiring the road surface heights of a plurality of distance measurement points positioned in the preset distance of the current position of the robot in the moving direction.
Optionally, the calculating the value of the degree of jolt of the road surface according to the second absolute value includes:
judging whether a second absolute value larger than a preset threshold exists in the second absolute values or not;
if yes, determining the jolting degree value to be 1;
if not, calculating the sum of a plurality of second absolute values;
calculating a second product of the number of the plurality of second absolute values and the preset threshold;
and calculating the ratio of the sum value to the second product as a jounce degree value of the road surface.
Optionally, the number of the distance measuring sensors is more than two, a jolting degree value is calculated through the distance measured by each distance measuring sensor, and after calculating the ratio of the sum value and the second product as the jolting degree value of the road surface, the method further includes:
the maximum value of the two or more jounce degree values is determined as the final jounce degree value.
Optionally, the adjusting the moving speed of the robot according to the jounce degree value includes:
searching a target moving speed matched with the bumping degree value in a preset bumping degree value-speed table;
and controlling the robot to move at the target moving speed.
Inputting the bumping degree value into a preset function to obtain a target moving speed, wherein the bumping degree value in the preset function is an independent variable, the target moving speed is a dependent variable, and the dependent variable is in negative correlation with the independent variable;
and controlling the robot to move at the target moving speed.
In a second aspect, an embodiment of the present invention provides a robot control device applied to a robot mounted with a ranging sensor, including:
the distance measuring module is used for controlling the distance measuring sensor to measure the distance of the road surface in the moving direction of the robot according to a preset period and a preset angle in the moving process of the robot, so as to obtain the distances from a plurality of distance measuring points on the road surface to the distance measuring sensor;
the road surface height calculation module is used for calculating the road surface height of each ranging point according to the distance of the ranging point, the installation height of the ranging sensor and the preset angle;
the bumpy degree value calculation module is used for calculating the bumpy degree value of the road surface according to the height of the road surface;
and the speed adjusting module is used for adjusting the moving speed of the robot according to the jolting degree value.
Optionally, the mounting height is a height from the ranging sensor to a wheel of the robot, and the road surface height calculating module includes:
a first product calculation sub-module, configured to calculate, for each ranging point, a first product of a distance of the ranging point and a cosine value of the preset angle;
and the road surface height calculation sub-module is used for calculating a first absolute value of the difference value between the first product and the installation height as the road surface height of the ranging point.
Optionally, the jounce degree value calculating module includes:
the road surface height acquisition sub-module is used for acquiring the road surface heights of a plurality of distance measurement points in the moving direction of the robot;
the second absolute value calculating sub-module is used for calculating a second absolute value of the difference value of the road surface heights of the two adjacent ranging points;
and the jolt degree value calculating sub-module is used for calculating the jolt degree value of the road surface according to the second absolute value.
Optionally, the road surface height obtaining submodule includes:
a preset distance calculating unit, configured to calculate a product of the installation height and a tangent value of the preset angle to obtain a preset distance;
and the road surface height acquisition unit is used for acquiring the road surface heights of a plurality of distance measurement points positioned in the preset distance of the current position of the robot in the moving direction.
Optionally, the jounce degree value calculating submodule includes:
a second absolute value judging unit configured to judge whether a second absolute value larger than a preset threshold exists among the plurality of second absolute values;
a first jounce degree value determination unit for determining that the jounce degree value is 1;
a sum value calculation unit configured to calculate a sum value of a plurality of the second absolute values;
a second product calculation unit configured to calculate a second product of the number of the plurality of second absolute values and the preset threshold;
and a second jounce degree value determining unit for calculating a ratio of the sum value and the second product as the jounce degree value of the road surface.
Optionally, the number of the ranging sensors is more than two, a jolt degree value is calculated through the distance measured by each ranging sensor, and the jolt degree value calculating submodule further includes:
and a maximum jerk level value determination unit configured to determine a maximum value of the two or more jerk level values as a final jerk level value.
Optionally, the speed adjustment module includes:
the target moving speed searching sub-module is used for searching the target moving speed matched with the jolting degree value in a preset jolting degree value-speed table;
and the moving speed control sub-module is used for controlling the robot to move at the target moving speed.
Optionally, the speed adjustment module includes:
the input submodule is used for inputting the jolting degree value into a preset function to obtain a target moving speed, wherein the jolting degree value in the preset function is an independent variable, the target moving speed is a dependent variable, and the dependent variable is in negative correlation with the independent variable;
and the moving speed control sub-module is used for controlling the robot to move at the target moving speed.
In a third aspect, an embodiment of the present invention provides a robot including:
one or more processors;
storage means for storing one or more computer programs,
the one or more computer programs, when executed by the one or more processors, cause the one or more processors to implement the robot control method of any of the first aspects of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the robot control method according to the first aspect of the present invention.
The robot control method is applied to a robot provided with a ranging sensor, and in the moving process of the robot, the ranging sensor is controlled to range the distance of a road surface in the moving direction of the robot according to a preset period and a preset angle, so that the distances from a plurality of ranging points on the road surface to the ranging sensor are obtained; for each ranging point, the road surface height of the ranging point is calculated according to the distance of the ranging point, the installation height of the ranging sensor and the preset angle, the bump degree value of the road surface is calculated according to the road surface height, then the moving speed of the robot is adjusted according to the bump degree value, and the bump degree value of the road surface is calculated by collecting the distance through the ranging sensor in real time without marking the bump road surface on a map and maintaining the mark on the map manually in advance, so that the manual marking cost and the maintenance cost are reduced, the bump degree of the road surface can be monitored in real time to reduce the moving speed of the robot, and the influence of the bump road on the running of the robot is reduced.
Drawings
Fig. 1 is a flowchart of steps of a robot control method according to an embodiment of the present invention;
fig. 2A is a flowchart of steps of a robot control method according to a second embodiment of the present invention;
FIG. 2B is a schematic diagram of ranging sensor ranging on a robot in an embodiment of the invention;
fig. 3 is a block diagram of a robot control device according to a third embodiment of the present invention;
fig. 4 is a block diagram of a robot according to a fourth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings. Embodiments and features of embodiments in this application may be combined with each other without conflict.
Example 1
Fig. 1 is a flowchart of steps of a robot control method according to an embodiment of the present invention, where the embodiment of the present invention is applicable to a situation where a robot is controlled to move, the method may be performed by a robot control device according to an embodiment of the present invention, and the robot control device may be implemented by hardware or software and integrated into a robot according to an embodiment of the present invention, and specifically, as shown in fig. 1, the robot control method according to an embodiment of the present invention may include the following steps:
s101, in the moving process of the robot, controlling a distance measuring sensor to measure the distance of a road surface in the moving direction of the robot according to a preset period and a preset angle, and obtaining the distances from a plurality of distance measuring points on the road surface to the distance measuring sensor.
In the embodiment of the invention, the robot may be a movable robot, for example, a robot driven by wheels, tracks and other devices, and the robot may be applied indoors, for example, a floor sweeping robot applied to indoor cleaning, a delivery robot applied to an office building or a hotel, and the like, and of course, may also be an outdoor robot, for example, an unmanned sweeper, an unmanned delivery truck, and the like.
The ranging sensor may be a single-point ranging sensor, i.e. a sensor capable of measuring the distance from one point to the ranging sensor, for example, an electro-optical ranging sensor, such as an infrared ranging sensor, or may be a multi-point ranging sensor, i.e. a sensor capable of measuring the distances from a plurality of ranging points to the ranging sensor at the same time, for example, a millimeter wave radar ranging sensor, a laser radar ranging sensor, etc. The ranging sensor may be installed on the robot such that the ranging sensor has an installation height with the ground and a preset angle with the vertical direction.
When the robot moves, the distance measuring sensor is controlled to measure the distance between a plurality of distance measuring points on the road surface and the distance measuring sensor according to the preset period and the preset angle, wherein the distance measuring points are points sensed by the distance measuring sensor on the road surface, the distance measuring sensor is taken as an example of an optoelectronic distance measuring sensor, the distance measuring sensor emits single-beam point light to the road surface in the moving direction of the robot according to the preset period (such as 50 ms) and the preset angle, the point irradiated to the road surface by the point light is the distance measuring point, and the distance between the distance measuring point and the distance measuring sensor can be calculated by the total duration from the light speed and the total duration from the emitted light to the light reflected by the received distance measuring point.
S102, for each ranging point, calculating the road surface height of the ranging point according to the distance of the ranging point, the installation height of the ranging sensor and the preset angle.
In the embodiment of the invention, the ranging sensor is mounted on the robot, the mounting height of the ranging sensor may be a distance from the ranging sensor to a place where the wheel of the robot contacts the road surface, and the road surface height of the ranging point may be an absolute value of a difference between a vertical distance between the ranging point and the ranging sensor and the mounting height. Alternatively, the product of the linear distance from the ranging point to the ranging sensor and the cosine value of the preset angle can be calculated to obtain the vertical distance between the ranging point and the ranging sensor, and then the absolute value of the difference between the vertical distance and the installation height is calculated to be the road surface height.
S103, calculating the bumping degree value of the road surface according to the height of the road surface.
In an alternative embodiment of the present invention, after calculating the road surface heights of the plurality of ranging points, the road surface height of the plurality of ranging points in the preset range in the traveling direction of the robot may be taken to calculate the road surface jolting degree value, and for example, the absolute value of the difference between the road surface heights of the front and rear two adjacent ranging points may be calculated, if any one of the absolute values is greater than the preset threshold, the road surface jolting degree value is determined to be 1, otherwise, the sum of the plurality of absolute values is calculated, and the product of the number of absolute values and the preset threshold is calculated, and the ratio of the sum and the product is further calculated as the jolting degree value.
In another example, the mean value of the absolute values may be directly calculated as the jolting degree value, or the median or the maximum value of the absolute values may be taken as the jolting degree value, which is not limited in the manner of calculating the jolting degree value of the road surface according to the embodiment of the present invention.
S104, adjusting the moving speed of the robot according to the jolt degree value.
The road surface jolting degree value represents the road surface jolting degree, and the corresponding moving speed can be set according to different jolting degrees of the road surface, in one example, a corresponding table of the jolting degree value and the moving speed can be preset, so that the moving speed matched with the jolting degree value can be searched from the corresponding table, and the moving speed is taken as the moving speed of the robot.
The robot control method is applied to a robot provided with a ranging sensor, and in the moving process of the robot, the ranging sensor is controlled to range the distance of a road surface in the moving direction of the robot according to a preset period and a preset angle, so that the distances from a plurality of ranging points on the road surface to the ranging sensor are obtained; for each ranging point, the road surface height of the ranging point is calculated according to the distance of the ranging point, the installation height of the ranging sensor and the preset angle, the bumping degree value of the road surface is calculated according to the road surface height, and then the moving speed of the robot is adjusted according to the bumping degree value.
Example two
Fig. 2A is a step flowchart of a robot control method according to a second embodiment of the present invention, where the optimization is performed based on the first embodiment of the present invention, and specifically, as shown in fig. 2A, the robot control method according to the embodiment of the present invention may include the following steps:
s201, in the moving process of the robot, controlling a distance measuring sensor to measure the distance of the road surface in the moving direction of the robot according to a preset period and a preset angle, and obtaining the distances from a plurality of distance measuring points on the road surface to the distance measuring sensor.
As shown in fig. 2B, the robot according to the embodiment of the present invention is driven by wheels to move, where the ranging sensors a are electro-optical ranging sensors, that is, the ranging points are irradiated by emitting a single beam of light and the ranging points are received to perform ranging, in one example, the number of the ranging sensors a may be one or more, and in another example, the number of the ranging sensors a is two, the two ranging sensors a may be respectively disposed at two sides of the robot, so that the ranging sensors a at two sides and two front wheels of the robot are located on the same straight line in the vertical direction, and at the same time, the distance from the ranging sensors a at two sides to the contact point of the front wheels with the road surface is h, that is, the mounting height is h, and in addition, in order to enable the ranging sensors a to perform ranging on the points on the road surface, the preset angle θ between the light emitted by the ranging sensors a and the vertical direction may be adjusted.
In one example, when the robot moves, the ranging sensor may be controlled to emit ranging light according to a period of 50ms, and a point where the ranging light irradiates on the road surface is a ranging point, as shown in fig. 2B, the ranging point is B, so as to obtain a linear distance d from the ranging point B to the ranging sensor a, and as the robot moves continuously, a distance d from a plurality of ranging points to the ranging sensor a may be obtained, where a light ranging principle is a prior art and is not described in detail herein.
S202, calculating a first product of the distance of each ranging point and a cosine value of a preset angle for each ranging point.
Illustratively, as shown in fig. 2B, in the vertical direction, the distance from the ranging point B to the ranging sensor a is H, and the road surface height H of the ranging point B is i The distance H from the ranging point B to the ranging sensor a in the vertical direction needs to be calculated first, as shown in fig. 2B, according to the trigonometric function relationship, h=d×cos θ, i.e. the product of the distance d from the ranging point B and the cosine value of the preset angle θ.
S203, calculating a first absolute value of a difference value between the first product and the installation height as the road surface height of the ranging point.
I.e. for each ranging point i, the road surface height H i = |di×cos θ -h|, where di is the linear distance from the ranging point to the ranging sensor a, and h is the mounting height of the ranging sensor a.
S204, acquiring road surface heights of a plurality of distance measurement points in the moving direction of the robot.
In an alternative embodiment of the present invention, the value of the degree of jolt of the road surface may be calculated by the road surface heights of a plurality of ranging points on the road surface, in an example, the road surface heights of a plurality of ranging points within a preset distance in the moving direction of the robot may be obtained to calculate the value of the degree of jolt of the road surface, specifically, the product of the installation height and the tangent value of the preset angle may be calculated to obtain the preset distance, and the road surface heights of a plurality of ranging points within the preset distance in the moving direction at the current position of the robot may be obtained.
As shown in fig. 2B, tangent tan θ=s of the preset angle Δ /h,S Δ =h×tan θ, preset distance S Δ For the distance from the distance measuring point B of the distance measuring sensor A to the current position of the robot (the front wheel of the robot), the distance S is preset Δ Within which are a plurality of ranging points, each ranging point i having a road surface height H i The robot can store the road surface heights of a plurality of ranging points and the position data of each ranging point, and after the robot moves to one position, the preset distance S in the running direction of the robot is determined according to the position data of each ranging point Δ A plurality of ranging points in the road surface height H of the plurality of ranging points is read i 。
In another example, the robot may further sort according to a ranging sequence of ranging points to form a ranging point data sequence, where the ranging point data sequence is a road surface height sequence of the ranging points, and when the robot moves, the robot may slide in the road surface height sequence through a sliding window with a specified length in a preset step length, and the road surface heights in the sliding window are the road surface heights of a plurality of ranging points in the moving direction of the robot.
S205, calculating a second absolute value of the difference value of the road surface heights of the two adjacent ranging points.
Specifically, at the road surface heights of the plurality of ranging points, the absolute value of the difference in road surface heights of the adjacent two ranging points is calculated:
ΔH i =|H i+1 -H i |
illustratively, the road surface heights of the plurality of ranging points are: h 8 =0.0mm,H 9 =15mm,H 10 =25mm,H 11 =22mm,H 12 =15 mm, Δh can be calculated 8 =|H 9 -H 8 |=15 mm, and so on, Δh 9 =10mm,ΔH 10 =3mm,ΔH 11 =7mm。
S206, calculating the bumping degree value of the road surface according to the second absolute value.
In an alternative embodiment of the present invention, it may be determined whether a second absolute value greater than a preset threshold exists in the plurality of second absolute values, if yes, the jolt degree value is determined to be 1, if not, a sum of the plurality of second absolute values is calculated, a second product of the number of the plurality of second absolute values and the preset threshold is calculated, and a ratio of the sum to the second product is calculated as a jolt degree value p of the road surface, which is specifically as follows:
in the above formula, the preset threshold is 20mm, and m is the number of ranging points.
It should be noted that, when the plurality of second absolute values are all smaller than the preset threshold, the average value of the plurality of second absolute values may be directly calculated as the jolt degree value, or the maximum value and the median of the plurality of second absolute values are taken as the jolt degree value, which is not limited in the manner of calculating the jolt degree value according to the embodiment of the present invention.
In another alternative embodiment, the distance measuring sensors on the robot are more than two, one jounce degree value is calculated through the distance measured by each distance measuring sensor, and the maximum value of the more than two jounce degree values is determined as the final jounce degree value.
S207, searching a target moving speed matched with the jolting degree value in a preset jolting degree value-speed table.
Specifically, the jounce degree value-speed table may be set by the following relation:
that is, when the pitch value p is less than 0.1, the maximum value of the target moving speed is 1.0m/s, when the pitch value p is 0.1 or more and less than 0.4, the maximum value of the target moving speed is 0.7m/s, when the pitch value p is 0.4 or more and less than 1.0, the maximum value of the target moving speed is 0.3m/s, and when the pitch value p is 1.0 or more, the robot is controlled to stop moving.
After the bumpy degree value of the road surface is obtained through calculation, a bumpy degree range to which the bumpy degree value belongs can be searched in a preset bumpy degree value-speed table, then the target moving speed corresponding to the bumpy degree range is determined, the matching speed is obtained through table lookup, the response speed is high, and the target moving speed can be rapidly determined to adjust the speed of the robot in time.
In another alternative embodiment, a function may be preset to calculate the target moving speed, the function taking the jounce degree value as an independent variable, the target moving speed as a dependent variable (function value), and in the function, the dependent variable is inversely related to the independent variable, and in one example, the preset function is as follows:
V=-K×P+C
in the above formula, K is a coefficient, and C is a positive constant in relation to the inherent properties such as the mass and the power of the robot, and it is known from the above formula that the smaller the pitch value P is, the larger the target moving speed V is, whereas the larger the pitch value P is, the smaller the target moving speed V is, and when-kxp=c, the target moving speed is 0.
In another example, the preset function is as follows:
V=K÷P-C
similarly, since 0.ltoreq.P.ltoreq.1, the smaller the jerk level value P, the greater the target moving speed V, whereas the greater the jerk level value P, the smaller the target moving speed V, and when K.ltoreq.P=C, the target moving speed is 0.
The target moving speed corresponding to the jolting degree value is calculated through a preset function, the target moving speed and the jolting degree value are in a linear relation, the target moving speed corresponding to each jolting degree value can be calculated, and the moving speed of the robot can be accurately controlled according to the jolting degree.
Of course, in practical application, a person skilled in the art may set other functions according to the quality, power, energy consumption control policy, etc. of the robot to calculate the target moving speed corresponding to the jolt degree value.
S208, controlling the robot to move at the target moving speed.
After determining the target moving speed, a control command may be generated to control the driving system of the robot to drive the robot to move at the target moving speed or to move at a speed less than the target moving speed, and for example, when the robot is driven by a motor, the input current of the motor may be controlled to change the rotation speed of the motor so as to achieve the purpose of changing the moving speed.
According to the embodiment of the invention, after the distance from a plurality of ranging points to the ranging sensor is obtained through the ranging sensor, the road surface heights of the ranging points are calculated according to the distance of each ranging point, the road surface heights of the ranging points in the moving direction of the robot are further obtained, the second absolute value of the difference value of the road surface heights of two adjacent ranging points is calculated, the bumpy degree value of the road surface is calculated according to the second absolute value, and the target moving speed matched with the bumpy degree value is searched for, so that the robot is controlled to move at the target moving speed, the effect of real-time acquisition of the distance through the ranging sensor is realized, the bumpy degree value of the road surface is calculated without manually marking the road surface on a map in advance and maintaining the map mark, the labor marking cost and the maintenance cost are reduced, the bumpy degree of the road surface is monitored in real time to reduce the influence of the bumpy road surface on the running of the robot.
Further, when the absolute value of the difference value of the road surface heights of any two adjacent ranging points is larger than a preset threshold value, the bumpy degree value of the road surface is determined to be 1, and when the target moving speed is 0, namely the bumpy degree value is larger than the preset threshold value, the robot is controlled to stop moving, so that the accident caused by the fact that the robot with overlarge bumpy degree on the road surface cannot pass through the road surface is avoided.
Furthermore, the bump degree value of the road surface is calculated through the absolute value of the difference value of the road surface heights of a plurality of two adjacent ranging points, so that the problem of large bump degree value error caused by a ranging error can be avoided, the accuracy of the bump degree value is improved, and the accurate control of the moving speed of the robot is realized.
Example III
Fig. 3 is a block diagram of a robot control device according to a third embodiment of the present invention, and as shown in fig. 3, the robot control device according to the embodiment of the present invention is applied to a robot with a ranging sensor, and may specifically include the following modules:
the ranging module 301 is configured to control a ranging sensor to range a road surface in a moving direction of the robot according to a preset period and a preset angle in a moving process of the robot, so as to obtain distances from a plurality of ranging points on the road surface to the ranging sensor;
a road surface height calculation module 302, configured to calculate, for each ranging point, a road surface height of the ranging point according to a distance of the ranging point, an installation height of the ranging sensor, and the preset angle;
a jounce degree value calculating module 303, configured to calculate a jounce degree value of the road surface according to the road surface height;
and the speed adjusting module 304 is configured to adjust the moving speed of the robot according to the jolt degree value.
Optionally, the mounting height is a height from the ranging sensor to a wheel of the robot, and the road surface height calculating module 302 includes:
a first product calculation sub-module, configured to calculate, for each ranging point, a first product of a distance of the ranging point and a cosine value of the preset angle;
and the road surface height calculation sub-module is used for calculating a first absolute value of the difference value between the first product and the installation height as the road surface height of the ranging point.
Optionally, the jounce degree value calculating module 303 includes:
the road surface height acquisition sub-module is used for acquiring the road surface heights of a plurality of distance measurement points in the moving direction of the robot;
the second absolute value calculating sub-module is used for calculating a second absolute value of the difference value of the road surface heights of the two adjacent ranging points;
and the jolt degree value calculating sub-module is used for calculating the jolt degree value of the road surface according to the second absolute value.
Optionally, the road surface height obtaining submodule includes:
a preset distance calculating unit, configured to calculate a product of the installation height and a tangent value of the preset angle to obtain a preset distance;
and the road surface height acquisition unit is used for acquiring the road surface heights of a plurality of distance measurement points positioned in the preset distance of the current position of the robot in the moving direction.
Optionally, the jounce degree value calculating submodule includes:
a second absolute value judging unit configured to judge whether a second absolute value larger than a preset threshold exists among the plurality of second absolute values;
a first jounce degree value determination unit for determining that the jounce degree value is 1;
a sum value calculation unit configured to calculate a sum value of a plurality of the second absolute values;
a second product calculation unit configured to calculate a second product of the number of the plurality of second absolute values and the preset threshold;
and a second jounce degree value determining unit for calculating a ratio of the sum value and the second product as the jounce degree value of the road surface.
Optionally, the number of the ranging sensors is more than two, a jolt degree value is calculated through the distance measured by each ranging sensor, and the jolt degree value calculating submodule further includes:
and a maximum jerk level value determination unit configured to determine a maximum value of the two or more jerk level values as a final jerk level value.
Optionally, the speed adjustment module 304 includes:
the target moving speed searching sub-module is used for searching the target moving speed matched with the jolting degree value in a preset jolting degree value-speed table;
and the moving speed control sub-module is used for controlling the robot to move at the target moving speed.
Optionally, the speed adjustment module 304 includes:
the input submodule is used for inputting the jolting degree value into a preset function to obtain a target moving speed, wherein the jolting degree value in the preset function is an independent variable, the target moving speed is a dependent variable, and the dependent variable is in negative correlation with the independent variable;
and the moving speed control sub-module is used for controlling the robot to move at the target moving speed.
The robot control device provided by the embodiment of the invention can execute the robot control method provided by the first embodiment and the second embodiment of the invention, and has the corresponding functions and beneficial effects of the execution method.
Example IV
Referring to fig. 4, a schematic structural view of a robot in one example of the invention is shown. As shown in fig. 4, the robot may include: a processor 401, a memory 402, a distance measuring sensor 403, an input device 404, an output device 405 and a communication device 406. The number of processors 401 in the robot may be one or more, one processor 401 being exemplified in fig. 4. The number of memories 402 in the robot may be one or more, one memory 402 being exemplified in fig. 4. The processor 401, memory 402, distance measuring sensor 403, input means 404, output means 405 and communication means 406 of the robot may be connected by a bus or other means, in fig. 4 by way of example.
The memory 402 is a computer readable storage medium, and may be used to store a software program, a computer executable program, and a module, and the program instructions/modules corresponding to the robot control method according to any embodiment of the present invention (for example, the ranging module 301, the road surface height calculation module 302, the jolt/degree value calculation module 303, and the speed adjustment module 304 in the robot control device described above), where the memory 402 may mainly include a storage program area and a storage data area, where the storage program area may store an operating device, at least one application program required for a function; the storage data area may store data created according to the use of the device, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 402 may further include memory located remotely from processor 401, which may be connected to the device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The ranging sensor 403 is an electro-optical ranging sensor, and the ranging sensor 403 is configured to perform ranging according to the instruction of the processor 401 and send corresponding ranging data to the processor 401 or other devices.
Communication means 406 for establishing a communication connection with other devices, which may be wired communication means and/or wireless communication means.
The input device 404 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the apparatus. The output device 405 may include an audio apparatus such as a speaker. It should be noted that the specific composition of the input device 404 and the output device 405 may be set according to the actual situation.
The processor 401 executes various functional applications of the apparatus and data processing, that is, implements the above-described robot control method, by running software programs, instructions, and modules stored in the memory 402.
Specifically, in the embodiment, when the processor 401 executes one or more programs stored in the memory 402, the steps of the robot control method provided in the embodiment of the present invention are specifically implemented.
Example five
The fifth embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which when executed by a processor, can implement the robot control method in any of the embodiments of the present invention.
Of course, the storage medium containing the computer executable instructions provided in the embodiments of the present invention is not limited to the method operations described above, and may also perform the related operations of the present invention applied to the robot control method provided in any embodiment on the robot.
It should be noted that, for the apparatus, robot, and storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and the relevant points are referred to in the description of the method embodiments.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., comprising several instructions for causing the robot to perform the robot control method according to the various embodiments of the present invention.
It should be noted that, in the embodiment of the robot control device, each unit and module included are only divided according to the functional logic, but not limited to the above-mentioned division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, and various modifications and variations may be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (9)
1. A robot control method applied to a robot equipped with a ranging sensor, comprising:
in the moving process of the robot, controlling a ranging sensor to range the distance of a road surface in the moving direction of the robot according to a preset period and a preset angle to obtain the distances from a plurality of ranging points on the road surface to the ranging sensor;
for each ranging point, calculating the road surface height of the ranging point according to the distance of the ranging point, the installation height of the ranging sensor and the preset angle;
calculating the bumping degree value of the road surface according to the height of the road surface;
adjusting the moving speed of the robot according to the jolt degree value;
wherein, calculate the jolt degree value of road surface according to the road surface height, include:
acquiring road surface heights of a plurality of ranging points in the moving direction of the robot;
calculating a second absolute value of the difference value of the road surface heights of two adjacent ranging points;
calculating a jolt degree value of the road surface according to the second absolute value;
the calculating the value of the bumping degree of the road surface according to the second absolute value comprises the following steps:
judging whether a second absolute value larger than a preset threshold exists in the second absolute values or not;
if yes, determining the jolting degree value to be 1;
if not, calculating the sum of a plurality of second absolute values;
calculating a second product of the number of the plurality of second absolute values and the preset threshold;
and calculating the ratio of the sum value to the second product as a jounce degree value of the road surface.
2. The robot control method according to claim 1, wherein the installation height is a height of the ranging sensor to a wheel of the robot, and the calculating the road surface height of the ranging point according to the distance of the ranging point, the installation height of the ranging sensor, and the preset angle for each of the ranging points comprises:
for each ranging point, calculating a first product of the distance of the ranging point and a cosine value of the preset angle;
and calculating a first absolute value of the difference between the first product and the mounting height as the road surface height of the ranging point.
3. The robot control method according to claim 1, wherein the acquiring the road surface heights of the plurality of ranging points in the moving direction of the robot includes:
calculating the product of the installation height and the tangent value of the preset angle to obtain a preset distance;
and acquiring the road surface heights of a plurality of distance measurement points positioned in the preset distance of the current position of the robot in the moving direction.
4. The robot control method according to claim 1, wherein the number of the ranging sensors is two or more, a jounce degree value is calculated from the distance measured by each ranging sensor, and after calculating the ratio of the sum value to the second product as the jounce degree value of the road surface, further comprising:
the maximum value of the two or more jounce degree values is determined as the final jounce degree value.
5. The robot control method according to any one of claims 1 to 4, characterized in that the adjusting the moving speed of the robot according to the jerk value comprises:
searching a target moving speed matched with the bumping degree value in a preset bumping degree value-speed table;
and controlling the robot to move at the target moving speed.
6. The robot control method according to any one of claims 1 to 4, characterized in that the adjusting the moving speed of the robot according to the jerk value comprises:
inputting the bumping degree value into a preset function to obtain a target moving speed, wherein the bumping degree value in the preset function is an independent variable, the target moving speed is a dependent variable, and the dependent variable is in negative correlation with the independent variable;
and controlling the robot to move at the target moving speed.
7. A robot control device applied to a robot equipped with a ranging sensor, comprising:
the distance measuring module is used for controlling the distance measuring sensor to measure the distance of the road surface in the moving direction of the robot according to a preset period and a preset angle in the moving process of the robot, so as to obtain the distances from a plurality of distance measuring points on the road surface to the distance measuring sensor;
the road surface height calculation module is used for calculating the road surface height of each ranging point according to the distance of the ranging point, the installation height of the ranging sensor and the preset angle;
the bumpy degree value calculation module is used for calculating the bumpy degree value of the road surface according to the height of the road surface;
the speed adjusting module is used for adjusting the moving speed of the robot according to the jolting degree value;
wherein, the jolting degree value calculating module comprises:
the road surface height acquisition sub-module is used for acquiring the road surface heights of a plurality of distance measurement points in the moving direction of the robot;
the second absolute value calculating sub-module is used for calculating a second absolute value of the difference value of the road surface heights of the two adjacent ranging points;
the jolt degree value calculation sub-module is used for calculating the jolt degree value of the road surface according to the second absolute value;
the jolt degree value calculation submodule further comprises:
a second absolute value judging unit configured to judge whether a second absolute value larger than a preset threshold exists among the plurality of second absolute values;
a first jounce degree value determination unit for determining that the jounce degree value is 1;
a sum value calculation unit configured to calculate a sum value of a plurality of the second absolute values;
a second product calculation unit configured to calculate a second product of the number of the plurality of second absolute values and the preset threshold;
and a second jounce degree value determining unit for calculating a ratio of the sum value and the second product as the jounce degree value of the road surface.
8. A robot, the robot comprising:
one or more processors;
storage means for storing one or more computer programs,
when executed by the one or more processors, causes the one or more processors to implement the robot control method of any of claims 1-6.
9. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the robot control method according to any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210186460.2A CN114378831B (en) | 2022-02-28 | 2022-02-28 | Robot control method, device, robot and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210186460.2A CN114378831B (en) | 2022-02-28 | 2022-02-28 | Robot control method, device, robot and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114378831A CN114378831A (en) | 2022-04-22 |
CN114378831B true CN114378831B (en) | 2024-02-23 |
Family
ID=81206102
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210186460.2A Active CN114378831B (en) | 2022-02-28 | 2022-02-28 | Robot control method, device, robot and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114378831B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116141306A (en) * | 2022-12-06 | 2023-05-23 | 深圳优地科技有限公司 | Robot control method, device, robot and storage medium |
CN118443048B (en) * | 2024-06-07 | 2024-11-12 | 杭州安那其科技有限公司 | A vehicle path planning system |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07229727A (en) * | 1994-02-22 | 1995-08-29 | Nikon Corp | Device for detecting road surface |
JPH1038562A (en) * | 1996-07-23 | 1998-02-13 | Mitsubishi Electric Corp | Obstacle detector for vehicle |
EP1873736A1 (en) * | 2006-06-30 | 2008-01-02 | Robert Bosch Gmbh | Method and system for aiding the driver of a motor vehicle in recognising road humps |
JP2010039839A (en) * | 2008-08-06 | 2010-02-18 | Ihi Corp | Mobile robot and travel speed control method for mobile robot |
CN101914889A (en) * | 2010-08-10 | 2010-12-15 | 武汉武大卓越科技有限责任公司 | Laser evenness measuring system and method based on acceleration compensation |
CN111290397A (en) * | 2020-03-12 | 2020-06-16 | 三一机器人科技有限公司 | Speed adjusting method and device, automatic navigation vehicle and storage medium |
CN112373469A (en) * | 2020-11-12 | 2021-02-19 | 浙江吉利控股集团有限公司 | Vehicle control method, control system and vehicle |
CN112826393A (en) * | 2020-12-30 | 2021-05-25 | 北京奇虎科技有限公司 | Sweeping robot operation management method, sweeping robot, equipment and storage medium |
-
2022
- 2022-02-28 CN CN202210186460.2A patent/CN114378831B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07229727A (en) * | 1994-02-22 | 1995-08-29 | Nikon Corp | Device for detecting road surface |
JPH1038562A (en) * | 1996-07-23 | 1998-02-13 | Mitsubishi Electric Corp | Obstacle detector for vehicle |
EP1873736A1 (en) * | 2006-06-30 | 2008-01-02 | Robert Bosch Gmbh | Method and system for aiding the driver of a motor vehicle in recognising road humps |
JP2010039839A (en) * | 2008-08-06 | 2010-02-18 | Ihi Corp | Mobile robot and travel speed control method for mobile robot |
CN101914889A (en) * | 2010-08-10 | 2010-12-15 | 武汉武大卓越科技有限责任公司 | Laser evenness measuring system and method based on acceleration compensation |
CN111290397A (en) * | 2020-03-12 | 2020-06-16 | 三一机器人科技有限公司 | Speed adjusting method and device, automatic navigation vehicle and storage medium |
CN112373469A (en) * | 2020-11-12 | 2021-02-19 | 浙江吉利控股集团有限公司 | Vehicle control method, control system and vehicle |
CN112826393A (en) * | 2020-12-30 | 2021-05-25 | 北京奇虎科技有限公司 | Sweeping robot operation management method, sweeping robot, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114378831A (en) | 2022-04-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114378831B (en) | Robot control method, device, robot and storage medium | |
KR102001422B1 (en) | Electrical vacuum cleaner | |
CN106325270B (en) | Intelligent vehicle air navigation aid based on perception and from host computer location navigation | |
JP7326630B2 (en) | MOBILE ROBOT CONTROL METHOD, APPARATUS, MOBILE ROBOT, AND STORAGE MEDIUM | |
CN110554696B (en) | Robot system, robot and robot navigation method based on laser radar | |
US11726191B2 (en) | Lidar intensity calibration | |
CN115629619A (en) | Unmanned aerial vehicle power transmission line inspection system and method | |
CN115047869B (en) | Method and device for determining motion parameters of autonomous mobile device | |
JP2022165563A (en) | Autonomous travel inspection robot | |
CN112051844A (en) | Self-moving robot and control method thereof | |
KR20230057273A (en) | System and method for simultaneous online lidar intensity calibration and road marking change detection | |
CN117289300A (en) | Point cloud correction method, laser radar and robot | |
CN113848933B (en) | All-dimensional obstacle avoidance method and device for cleaning robot | |
CN113440049A (en) | Cleaning robot and control method thereof | |
JP7396353B2 (en) | Map creation system, signal processing circuit, mobile object and map creation method | |
US20240036175A1 (en) | Single photon detection based light detection and range (lidar) for autonomous driving vehicles | |
CN114509769B (en) | High-precision automatic measurement device and method for interaction between laser radar and rangefinder | |
CN108519772B (en) | Positioning method and device for conveying equipment, conveying equipment and storage medium | |
CN117032237A (en) | Universal motion control method for omnidirectional chassis | |
JP6642026B2 (en) | Autonomous mobile control device | |
WO1995029380A1 (en) | Navigation system for fast automated vehicles and mobile robots | |
JP6267430B2 (en) | Mobile environment map generation control device, mobile body, and mobile environment map generation method | |
CN118161087A (en) | TOF optical system for sweeping robot and sweeping robot | |
JP3389956B2 (en) | Automatic guided vehicle | |
CN116945208A (en) | Robot system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |