CN114378831A - Robot control method, device, robot and storage medium - Google Patents
Robot control method, device, robot and storage medium Download PDFInfo
- Publication number
- CN114378831A CN114378831A CN202210186460.2A CN202210186460A CN114378831A CN 114378831 A CN114378831 A CN 114378831A CN 202210186460 A CN202210186460 A CN 202210186460A CN 114378831 A CN114378831 A CN 114378831A
- Authority
- CN
- China
- Prior art keywords
- robot
- value
- road surface
- distance
- distance measuring
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 53
- 238000009434 installation Methods 0.000 claims abstract description 21
- 230000008569 process Effects 0.000 claims abstract description 11
- 238000005259 measurement Methods 0.000 claims description 25
- 230000036461 convulsion Effects 0.000 claims description 20
- 238000004364 calculation method Methods 0.000 claims description 14
- 230000001419 dependent effect Effects 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 7
- 238000012423 maintenance Methods 0.000 abstract description 10
- 230000006870 function Effects 0.000 description 21
- 230000015654 memory Effects 0.000 description 14
- 238000004891 communication Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 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
- 238000011217 control strategy Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005265 energy consumption Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000007429 general method 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
- 238000012545 processing Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000010408 sweeping Methods 0.000 description 1
Images
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 road surface in the moving direction of the robot according to a preset period and a preset angle to obtain the distance from a plurality of ranging points on the road surface to the ranging sensor; aiming at each distance measuring point, the road height of the distance measuring point is calculated according to the distance of the distance measuring point, the installation height of the distance measuring sensor and the preset angle, the jolt degree value of the road is calculated according to the road height, then the moving speed of the robot is adjusted according to the jolt degree value, the jolt degree value of the road is calculated by collecting the distance in real time through the distance measuring sensor, the jolt road and the maintenance map mark do not need to be marked on the map in advance manually, the manual marking cost and the maintenance cost are reduced, the jolt degree of the road can be monitored in real time to reduce the speed, and the influence of the jolt road on the running of the robot is reduced.
Description
Technical Field
The embodiment of the invention relates to the technical field of motion control of mobile robots, 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 especially, indoor mobile robots are widely applied to indoor work.
Although most areas of the ground in an indoor scene are flat, bumpy areas such as indoor speed bumps, building joints and gaps on the road surface exist in the driving process of the mobile robot due to the fact that the bumpy areas exist. If the mobile robot runs in a bumpy area at a high speed, the risk of damage to hardware of the mobile robot is increased, the service life of the robot is shortened, in order to reduce the risk caused by road bumping, the general method is to manually mark the bumpy area on a map, and when the mobile robot runs to the bumpy area, the mobile robot automatically decelerates and slowly runs through the bumpy area.
However, by manually marking the bumpy area on the map, on one hand, when the indoor environment is large and the bumpy area is large, manually marking the bumpy area consumes much time, which increases the deployment cost, and on the other hand, when the indoor environment changes, the mark of the bumpy area on the map needs to be manually updated, which increases the maintenance cost.
Disclosure of Invention
The embodiment of the invention provides a robot control method and device, electronic equipment and a storage medium, and aims to solve the problems that manual marking is time-consuming and maintenance cost is high due to the fact that bumpy areas are marked on a map manually in the prior art.
In a first aspect, an embodiment of the present invention provides a robot control method, applied to a robot with a ranging sensor, including:
in the moving process of the robot, controlling a ranging sensor to range a road surface in the moving direction of the robot according to a preset period and a preset angle to obtain the distance from a plurality of ranging points on the road surface to the ranging sensor;
for each distance measuring point, calculating the road surface height of the distance measuring point according to the distance of the distance measuring point, the installation height of the distance measuring 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 bumping degree value.
Optionally, the mounting height is a height from the ranging sensor to a wheel of the robot, and for each ranging point, calculating a road height of the ranging point according to a distance from the ranging point, the mounting height of the ranging sensor, and the preset angle includes:
calculating a first product of the distance of the ranging point and the cosine value of the preset angle for each ranging point;
and calculating a first absolute value of the difference value between the first product and the mounting height as the road surface height of the ranging point.
Optionally, the calculating a jerk value of the road surface according to the road surface height includes:
acquiring the road surface heights of a plurality of distance measuring 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 distance measuring points;
and calculating the bumpiness value of the road surface according to the second absolute value.
Optionally, the acquiring the road height of the plurality of distance measuring 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 measuring points in the preset distance of the moving direction of the robot at the current position.
Optionally, the calculating a jerk value 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 plurality of second absolute values;
if yes, determining the bumping 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 second absolute values and the preset threshold;
and calculating the ratio of the sum value and the second product as the value of the bumpiness of the road surface.
Optionally, the number of the distance measuring sensors is two or more, a jounce degree value is calculated by using the distance measured by each distance measuring sensor, and after calculating a ratio of the sum value to the second product as a jounce degree value of the road surface, the method further includes:
the maximum value of the two or more pitch values is determined as the final pitch value.
Optionally, the adjusting the moving speed of the robot according to the jerk 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, which is applied to a robot with a distance measuring sensor, and includes:
the distance measurement module is used for controlling a distance measurement 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 to obtain the distance from a plurality of distance measurement points on the road surface to the distance measurement 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 jolt degree value calculating module is used for calculating the jolt 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 bumping degree value.
Optionally, the mounting height is a height from the ranging sensor to a wheel of the robot, and the road height calculating module includes:
the first product calculation submodule is used for calculating a first product of the distance of the ranging point and the cosine value of the preset angle aiming at each ranging point;
and the road height calculation submodule is used for calculating a first absolute value of the difference value between the first product and the mounting height as the road height of the ranging point.
Optionally, the jounce level value calculating module comprises:
the road height acquisition submodule is used for acquiring the road heights of the plurality of distance measuring points in the moving direction of the robot;
the second absolute value operator module is used for calculating a second absolute value of the difference value of the road heights of two adjacent distance measuring points;
and the jolt degree value operator module is used for calculating the jolt degree value of the road surface according to the second absolute value.
Optionally, the road height obtaining sub-module includes:
the preset distance calculation unit is used for calculating the product of the installation height and the tangent value of the preset angle to obtain a preset distance;
and the road height acquisition unit is used for acquiring the road heights of a plurality of distance measurement points which are positioned in the preset distance of the current position of the robot and in the moving direction.
Optionally, the jounce level value operator module comprises:
a second absolute value determination unit configured to determine whether a second absolute value larger than a preset threshold exists in the plurality of second absolute values;
a first jounce degree value determining unit for determining that the jounce degree value is 1;
a sum value calculation unit for calculating a sum value of the plurality of 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 to the second product as a jounce degree value of the road surface.
Optionally, the number of the distance measuring sensors is two or more, a bumpiness degree value is calculated according to the distance measured by each distance measuring sensor, and the bumpiness degree value operator module further includes:
and the maximum bump degree value determining unit is used for determining the maximum value of more than two bump degree values as the final bump degree value.
Optionally, the speed adjustment module comprises:
the target moving speed searching submodule is used for searching a target moving speed matched with the bumping degree value in a preset bumping degree value-speed table;
and the moving speed control submodule is used for controlling the robot to move at the target moving speed.
Optionally, the speed adjustment module comprises:
the input submodule is used for inputting the bumping degree value into a preset function to obtain a target moving speed, 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 the moving speed control submodule 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;
a storage device to store 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 one of the first aspects of the invention.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and the computer program, 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 distance measuring sensor, and in the moving process of the robot, the distance measuring sensor is controlled to measure 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 distance measuring points on the road surface to the distance measuring sensor are obtained; aiming at each distance measuring point, the road height of the distance measuring point is calculated according to the distance of the distance measuring point, the installation height of the distance measuring sensor and the preset angle, the jolt degree value of the road is calculated according to the road height, then the moving speed of the robot is adjusted according to the jolt degree value, the jolt degree value of the road is calculated by collecting the distance in real time through the distance measuring sensor, manual marking of the jolt road on a map and maintenance of marks on the map are not needed, the manual marking cost and the maintenance cost are reduced, the jolt degree of the road can be monitored in real time to reduce the moving speed of the robot, and the influence of the jolt road on the robot is reduced.
Drawings
Fig. 1 is a flowchart illustrating steps of a robot control method according to an embodiment of the present invention;
fig. 2A is a flowchart illustrating steps of a robot control method according to a second embodiment of the present invention;
FIG. 2B is a schematic diagram of ranging from a ranging sensor on a robot in an embodiment of the present invention;
fig. 3 is a block diagram of a robot control apparatus 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 present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures. The embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Example one
Fig. 1 is a flowchart illustrating steps of a robot control method according to an embodiment of the present invention, where the robot control method according to an embodiment of the present invention is applicable to a situation of controlling a robot to move, and the method may be executed by a robot control device according to an embodiment of the present invention, where the robot control device may be implemented by hardware or software and integrated in 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 the road surface in the moving direction of the robot according to a preset period and a preset angle to obtain the distance from a plurality of distance measuring points on the road surface to the distance measuring sensor.
In the embodiment of the present invention, the robot may be a mobile robot, for example, a robot driven by wheels, tracks, and the like, 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 may also be an outdoor robot, for example, an unmanned sweeper, an unmanned delivery vehicle, and the like.
The distance measuring sensor can be a sensor for single-point distance measurement, namely, a sensor capable of measuring the distance from one point to the distance measuring sensor, for example, a photoelectric distance measuring sensor, such as an infrared distance measuring sensor, can also be a multipoint distance measuring sensor, namely, a sensor capable of measuring the distances from a plurality of distance measuring points to the distance measuring sensor simultaneously, for example, a millimeter wave radar distance measuring sensor, a laser radar distance measuring sensor and the like. 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.
According to the embodiment of the invention, when a robot moves, a distance measuring sensor is controlled to measure the distance of distance measuring points on a road surface according to a preset period and a preset angle, so that the distances from a plurality of distance measuring points on the road surface to the distance measuring sensor are obtained, 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 a photoelectric distance measuring sensor, the distance measuring sensor emits a single-beam-point light ray to the road surface in the moving direction of the robot at the preset period (such as 50ms) and at the preset angle, the point irradiated by the point light ray on the road surface is the distance measuring point, and the distance from the distance measuring point to the distance measuring sensor can be calculated by the light speed and the total time from the light ray emission to the light ray received and reflected by the distance measuring point.
And S102, calculating the road height of each ranging point according to the distance of each ranging point, the installation height of each ranging sensor and the preset angle.
In the embodiment of the invention, the ranging sensor is installed on the robot, the installation height of the ranging sensor can be the distance from the ranging sensor to the position where the wheels of the robot contact with the road surface, and the road surface height of the ranging point can be the absolute value of the difference between the vertical distance between the ranging point and the ranging sensor and the installation height. Alternatively, the product of the linear distance from the ranging point to the ranging sensor and the cosine value of the preset angle may 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 may be calculated as the road height.
And S103, calculating the bumpiness value of the road surface according to the height of the road surface.
In an alternative embodiment of the present invention, after the road heights of the plurality of distance measuring points are calculated, the road heights of the plurality of distance measuring points within a preset range in the traveling direction of the robot may be taken to calculate the road height value, for example, an absolute value of a difference between the road heights of two adjacent distance measuring points may be calculated, if any one of the absolute values is greater than a preset threshold, the road height value is determined to be 1, otherwise, a sum of the plurality of absolute values is calculated, a product of the number of the absolute values and the preset threshold is calculated, and a ratio of the sum to the product is further calculated as the road height value.
In another example, a mean value of absolute values may be directly calculated as the jounce value, or a median or a maximum of a plurality of absolute values may be taken as the jounce value, and the like.
And S104, adjusting the moving speed of the robot according to the bumping degree value.
The value of the degree of road surface jolt indicates the degree of road surface jolt, and the corresponding moving speed may be set according to the different degrees of road surface jolt.
The robot control method is applied to a robot provided with a distance measuring sensor, and in the moving process of the robot, the distance measuring sensor is controlled to measure 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 distance measuring points on the road surface to the distance measuring sensor are obtained; aiming at each distance measuring point, the road height of the distance measuring point is calculated according to the distance of the distance measuring point, the installation height of the distance measuring sensor and the preset angle, the jolt degree value of the road is calculated according to the road height, then the moving speed of the robot is adjusted according to the jolt degree value, the jolt degree value of the road is calculated by collecting the distance in real time through the distance measuring sensor, the jolt road and the maintenance map mark do not need to be marked on the map in advance manually, the manual marking cost and the maintenance cost are reduced, the jolt degree of the road can be monitored in real time to reduce the speed, and the influence of the jolt road on the running of the robot is reduced.
Example two
Fig. 2A is a flowchart of steps of a robot control method according to a second embodiment of the present invention, where the embodiment of the present invention is optimized based on the first embodiment, 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 to obtain the distance 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, the distance measuring sensor a is installed at the front end of the moving direction of the robot, the distance measuring sensor a is an electro-optical distance measuring sensor, that is, the distance measuring point is irradiated by emitting a single-beam spot light, and the distance measuring sensor a receives the reflected light from the distance measuring point to measure the distance, in one example, the number of the distance measuring sensors a may be one or more, and the number of the distance measuring sensors a is two, and the two distance measuring sensors a may be respectively installed at both sides of the robot, so that the distance measuring sensors a at both sides and the two front wheels of the robot are located on the same straight line in the vertical direction, and the distance from the distance measuring sensors a at both sides to the contact position of the front wheels and the road surface is h, that is, in addition, in order to enable the distance measuring sensors a to measure the distance of the point on the road surface, the preset angle between the light emitted by the distance measuring sensor A and the vertical direction is theta, and the preset angle theta can 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 on the road surface irradiated by the ranging light is a ranging point, as shown in fig. 2B, where 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, a distance d from a plurality of ranging points to the ranging sensor a may be obtained, where the principle of light ranging is the prior art, and is not described in detail herein.
S202, aiming at each ranging point, calculating a first product of the distance of the ranging point and a cosine value of a preset angle.
Illustratively, as shown in fig. 2B, in the vertical direction, the distance from the distance measurement point B to the distance measurement sensor a in the vertical direction is H, and the road surface height H of the distance measurement point B is HiI.e. the distance H from the distance measuring point B to the distance measuring sensor a in the vertical direction needs to be calculated first, as shown in fig. 2B, according to the trigonometric function relationship, H-d is a function ofcos θ, which is the product of the distance d of the ranging point B and the cosine value of the preset angle θ.
And S203, calculating a first absolute value of the difference value between the first product and the installation height as the road height of the ranging point.
I.e. for each distance measuring point i, the road height HiAnd | di × cos θ -h |, wherein di is a linear distance from the ranging point to the ranging sensor a, and h is a mounting height of the ranging sensor a.
And S204, acquiring the road surface heights of a plurality of distance measuring points in the moving direction of the robot.
In an optional embodiment of the present invention, the road surface height of the plurality of distance measuring points on the road surface may be used to calculate the road surface height value, and in one example, the road surface height of the plurality of distance measuring points within a preset distance in the moving direction of the robot may be obtained to calculate the road surface height value, and 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 height of the plurality of distance measuring points within the preset distance in the moving direction of the robot at the current position may be obtained.
As shown in fig. 2B, the tangent tan θ of the predetermined angle is SΔ/h,SΔH × tan θ, a predetermined distance SΔIs the distance from the ranging point B of the ranging sensor A to the current position of the robot (the front wheel of the robot) at the preset distance SΔA plurality of distance measuring points are arranged in the road surface, and each distance measuring point i has a road surface height HiThe robot can store the road height of a plurality of distance measuring points and the position data of each distance measuring point, and after the robot moves to a position, the preset distance S in the traveling direction of the robot is determined according to the position data of each distance measuring pointΔA plurality of distance measuring points are arranged in the road surface, and the road surface height H of the distance measuring points is readi。
In another example, the robot may further sort the distance measurement points according to their distance measurement precedence relationship to form a distance measurement point data sequence, where the distance measurement point data sequence is a road height sequence of the distance measurement points, and when the robot moves, the robot may slide in the road height sequence through a sliding window of a specified length by a preset step length, where a road height in the sliding window is a road height of the multiple distance measurement points in the moving direction of the robot.
And S205, calculating a second absolute value of the difference value of the road surface heights of the two adjacent distance measuring points.
Specifically, at the road surface heights of a plurality of distance measuring points, the absolute value of the difference between the road surface heights of two adjacent distance measuring points is calculated:
ΔHi=|Hi+1-Hi|
illustratively, the road surface height of the plurality of ranging points is: h8=0.0mm,H9=15mm,H10=25mm,H11=22mm,H1215mm, Δ H can be calculated8=|H9-H815mm, and so on,. DELTA.H9=10mm,ΔH10=3mm,ΔH11=7mm。
And S206, calculating the bumpiness value of the road surface according to the second absolute value.
In an optional 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, it is determined that the jerk value is 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 jerk 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 also be directly calculated as the jounce length value, or the maximum value and the median of the plurality of second absolute values are taken as the jounce length value, and the like.
In another alternative embodiment, the number of the distance measuring sensors on the robot is two or more, a pitch value is calculated according to the distance measured by each distance measuring sensor, and the maximum value of the two or more pitch values is determined as the final pitch value.
And S207, searching a target moving speed matched with the bumping degree value in a preset bumping degree value-speed table.
Specifically, the jerk value-speed table may be set by the following relation:
namely, 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 more than or equal to 0.1 and less than 0.4, the maximum value of the target moving speed is 0.7m/s, when the pitch value p is more than or equal to 0.4 and less than 1.0, the maximum value of the target moving speed is 0.3m/s, and when the pitch value p is more than or equal to 1.0, the robot is controlled to stop moving.
After the road surface bumping degree value is obtained through calculation, the bumping degree range to which the bumping degree value belongs can be searched in a preset bumping degree value-speed table, then the target moving speed corresponding to the bumping degree range is determined, and the target moving speed can be quickly determined to adjust the speed of the robot in time through the matching speed of table lookup and high response speed.
In another alternative embodiment, a function may be preset to calculate the target moving speed, the function having the jerk value as an argument and 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 equation, K is a coefficient, and C is a normal number, and it is understood from the above equation that the smaller the jerk value P, the larger the target moving speed V, whereas the larger the jerk value P, the smaller the target moving speed V, and when-K × P is equal to C, the target moving speed is 0.
In another example, the preset function is as follows:
V=K÷P-C
similarly, since 0 ≦ P ≦ 1, the smaller the jerk value P, the larger the target moving speed V, whereas the larger the jerk value P, the smaller the target moving speed V, and when K ÷ P ═ C, the target moving speed is 0.
The target moving speed corresponding to the bumping degree value is calculated through a preset function, the target moving speed and the bumping degree value are in a linear relation, the target moving speed corresponding to each bumping degree value can be calculated, and the moving speed of the robot can be accurately controlled according to the bumping degree.
Certainly, in practical applications, a person skilled in the art may also set other functions according to attributes of the robot, such as quality, power, and energy consumption control strategies, to calculate the target moving speed corresponding to the jerk value, and the embodiment of the present invention does not limit the preset function.
And S208, controlling the robot to move at the target moving speed.
After the target moving speed is determined, a control command can be generated to control a driving system of the robot to drive the robot to move at the target moving speed or 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 can be controlled to change the rotating speed of the motor so as to achieve the purpose of changing the moving speed.
After the distance from a plurality of distance measuring points to the distance measuring sensor is obtained by the distance measuring sensor, calculating the road height of the distance measuring points according to the distance of each distance measuring point, further acquiring the road heights of a plurality of distance measuring points in the moving direction of the robot, calculating a second absolute value of the difference value of the road heights of two adjacent distance measuring points, calculating the value of the degree of jolt of the road surface according to the second absolute value, searching the target moving speed matched with the value of the degree of jolt, the robot is controlled to move at the target moving speed, the distance is collected in real time through the distance measuring sensor to calculate the bumpiness degree value of the road surface, manual marking of the bumpiness road surface and maintenance of a map mark on the map are not needed, manual marking cost and maintenance cost are reduced, the bumpiness degree of the road surface can be monitored in real time to reduce speed, and the influence of the bumpiness road surface on the robot in driving is reduced.
Further, when the absolute value of the difference value of the road heights of any two adjacent distance measuring points is greater than a preset threshold value, the bumping degree value of the road is determined to be 1, the target moving speed is 0, namely, when the bumping degree value is greater than the preset threshold value, the robot is controlled to stop moving, and therefore the problem that the robot cannot pass through the road with the too large bumping degree is avoided.
Furthermore, the bumpiness degree value of the road surface is calculated through the absolute value of the difference value of the road surface heights of the two adjacent distance measuring points, the problem that the error of the bumpiness degree value is large due to distance measuring errors can be solved, the accuracy of the bumpiness degree value is improved, and therefore the moving speed of the robot is accurately controlled.
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 third embodiment of the present invention is applied to a robot equipped with a distance measuring sensor, and may specifically include the following modules:
the distance measurement module 301 is configured to control a distance measurement sensor to measure a distance of 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 distance measurement points on the road surface to the distance measurement sensor;
a road height calculating module 302, configured to calculate, for each distance measuring point, a road height of the distance measuring point according to the distance of the distance measuring point, the installation height of the distance measuring sensor, and the preset angle;
a bump degree value calculation module 303, configured to calculate a bump degree value of the road surface according to the road surface height;
a speed adjusting module 304, configured to adjust a moving speed of the robot according to the jerk value.
Optionally, the mounting height is a height from the ranging sensor to a wheel of the robot, and the road height calculating module 302 includes:
the first product calculation submodule is used for calculating a first product of the distance of the ranging point and the cosine value of the preset angle aiming at each ranging point;
and the road height calculation submodule is used for calculating a first absolute value of the difference value between the first product and the mounting height as the road height of the ranging point.
Optionally, the jounce level value calculating module 303 includes:
the road height acquisition submodule is used for acquiring the road heights of the plurality of distance measuring points in the moving direction of the robot;
the second absolute value operator module is used for calculating a second absolute value of the difference value of the road heights of two adjacent distance measuring points;
and the jolt degree value operator module is used for calculating the jolt degree value of the road surface according to the second absolute value.
Optionally, the road height obtaining sub-module includes:
the preset distance calculation unit is used for calculating the product of the installation height and the tangent value of the preset angle to obtain a preset distance;
and the road height acquisition unit is used for acquiring the road heights of a plurality of distance measurement points which are positioned in the preset distance of the current position of the robot and in the moving direction.
Optionally, the jounce level value operator module comprises:
a second absolute value determination unit configured to determine whether a second absolute value larger than a preset threshold exists in the plurality of second absolute values;
a first jounce degree value determining unit for determining that the jounce degree value is 1;
a sum value calculation unit for calculating a sum value of the plurality of 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 to the second product as a jounce degree value of the road surface.
Optionally, the number of the distance measuring sensors is two or more, a bumpiness degree value is calculated according to the distance measured by each distance measuring sensor, and the bumpiness degree value operator module further includes:
and the maximum bump degree value determining unit is used for determining the maximum value of more than two bump degree values as the final bump degree value.
Optionally, the speed adjusting module 304 includes:
the target moving speed searching submodule is used for searching a target moving speed matched with the bumping degree value in a preset bumping degree value-speed table;
and the moving speed control submodule is used for controlling the robot to move at the target moving speed.
Optionally, the speed adjusting module 304 includes:
the input submodule is used for inputting the bumping degree value into a preset function to obtain a target moving speed, 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 the moving speed control submodule 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 corresponding functions and beneficial effects of the execution method.
Example four
Referring to fig. 4, a schematic diagram of a robot according to an example of the present invention is shown. As shown in fig. 4, the robot may include: a processor 401, a memory 402, a ranging sensor 403, an input device 404, an output device 405, and a communication device 406. The number of the processors 401 in the robot may be one or more, and one processor 401 is taken as an example in fig. 4. The number of the memories 402 in the robot may be one or more, and one memory 402 is taken as an example in fig. 4. The processor 401, memory 402, ranging sensor 403, input device 404, output device 405, and communication device 406 of the robot may be connected by a bus or other means, as exemplified by the bus connection in fig. 4.
The memory 402 is used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the robot control method according to any embodiment of the present invention (for example, the distance measuring module 301, the road height calculating module 302, the jerk value calculating module 303, and the speed adjusting module 304 in the robot control device described above), and 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 and an application program required for at least one function; the storage data area may store data created according to use of the device, and the like. Further, the 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, the memory 402 may further include memory located remotely from the processor 401, which may be connected to the device over 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 an instruction of the processor 401 and send corresponding ranging data to the processor 401 or other devices.
The communication device 406 is used for establishing a communication connection with other devices, and may be a wired communication device and/or a wireless communication device.
The input device 404 may be used to receive input numeric or character information and generate key signal inputs relating to user settings and function controls of the apparatus. The output device 405 may include an audio device 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 actual conditions.
The processor 401 executes various functional applications of the device and data processing by running software programs, instructions, and modules stored in the memory 402, thereby implementing the robot control method described above.
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
Fifth, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, can implement the robot control method according to any embodiment of the present invention.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the method operations described above, and may also perform related operations in the robot control method provided by any embodiment of the present invention applied to the robot.
It should be noted that, as for the embodiments of the apparatus, the robot, and the storage medium, since they are basically similar to the embodiments of the method, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the embodiments of the method.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied 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 (RAM), a FLASH Memory (FLASH), a hard disk, or an optical disk of a computer, and includes several instructions for enabling a robot to execute the robot control method according to the embodiments of the present invention.
It should be noted that, in the embodiment of the robot control device, the included units and modules are only divided according to the functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (11)
1. A robot control method is applied to a robot provided with a distance measuring sensor, and comprises the following steps:
in the moving process of the robot, controlling a ranging sensor to range a road surface in the moving direction of the robot according to a preset period and a preset angle to obtain the distance from a plurality of ranging points on the road surface to the ranging sensor;
for each distance measuring point, calculating the road surface height of the distance measuring point according to the distance of the distance measuring point, the installation height of the distance measuring 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 bumping degree value.
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 from the distance of the ranging point, the installation height of the ranging sensor, and the preset angle for each ranging point comprises:
calculating a first product of the distance of the ranging point and the cosine value of the preset angle for each ranging point;
and calculating a first absolute value of the difference value 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 said calculating a jerk value of the road surface from the road surface height includes:
acquiring the road surface heights of a plurality of distance measuring 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 distance measuring points;
and calculating the bumpiness value of the road surface according to the second absolute value.
4. The robot control method according to claim 3, wherein the acquiring of the road surface heights of the plurality of distance measurement 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 measuring points in the preset distance of the moving direction of the robot at the current position.
5. The robot control method according to claim 3, wherein the calculating of the jerk value of the road surface from the second absolute value includes:
judging whether a second absolute value larger than a preset threshold exists in the plurality of second absolute values;
if yes, determining the bumping 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 second absolute values and the preset threshold;
and calculating the ratio of the sum value and the second product as the value of the bumpiness of the road surface.
6. The robot control method according to claim 5, wherein the number of the distance measuring sensors is two or more, a jerk value is calculated from the distance measured by each distance measuring sensor, and after calculating a ratio of the sum value and the second product as the jerk value of the road surface, the method further comprises:
the maximum value of the two or more pitch values is determined as the final pitch value.
7. A robot control method according to any of claims 1-6, wherein said adjusting the moving speed of the robot in accordance with 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.
8. A robot control method according to any of claims 1-6, wherein said adjusting the moving speed of the robot in accordance with 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.
9. A robot control device, applied to a robot having a distance measuring sensor mounted thereon, comprising:
the distance measurement module is used for controlling a distance measurement 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 to obtain the distance from a plurality of distance measurement points on the road surface to the distance measurement 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 jolt degree value calculating module is used for calculating the jolt 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 bumping degree value.
10. A robot, characterized in that the robot comprises:
one or more processors;
a storage device to store 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 one of claims 1-8.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the robot control method according to any one of claims 1-8.
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 true CN114378831A (en) | 2022-04-22 |
CN114378831B 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) |
Cited By (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 |
CN118443048A (en) * | 2024-06-07 | 2024-08-06 | 杭州安那其科技有限公司 | Travel 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 |
Cited By (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 |
CN118443048A (en) * | 2024-06-07 | 2024-08-06 | 杭州安那其科技有限公司 | Travel vehicle path planning system |
Also Published As
Publication number | Publication date |
---|---|
CN114378831B (en) | 2024-02-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106325270B (en) | Intelligent vehicle air navigation aid based on perception and from host computer location navigation | |
US11977161B2 (en) | Mobile robot and control method | |
CN109323696B (en) | Indoor positioning navigation system and method for unmanned forklift | |
CN108388245B (en) | AGV trolley indoor positioning navigation system and control method thereof | |
CN114378831A (en) | Robot control method, device, robot and storage medium | |
US8027515B2 (en) | System and method for real-time calculating location | |
JP2022165563A (en) | Autonomous travel inspection robot | |
CN112947441B (en) | Control method for automatic docking and charging of robot and charging seat | |
US11256917B2 (en) | Moving body for tracking and locating a target | |
CN115629619A (en) | Unmanned aerial vehicle power transmission line inspection system and method | |
CN113296116A (en) | Obstacle detection method, driving device, and storage medium | |
CN112051844A (en) | Self-moving robot and control method thereof | |
CN112947440B (en) | A charging seat search method for automatic charging of a robot | |
KR20230057273A (en) | System and method for simultaneous online lidar intensity calibration and road marking change detection | |
CN114489050A (en) | Obstacle avoidance route control method, device, equipment and storage medium for straight line driving | |
CN113672009A (en) | Intelligent dehumidification robot system and method for power distribution station room | |
CN117289300A (en) | Point cloud correction method, laser radar and robot | |
JP7396353B2 (en) | Map creation system, signal processing circuit, mobile object and map creation method | |
CN118565430A (en) | Intelligent measurement system for measuring elevation points on engineering working surfaces based on path planning | |
CN118603040A (en) | A robot system based on laser technology for millimeter-level elevation measurement | |
CN207233218U (en) | Parking lot empty parking space inspection device based on 2D laser radars | |
CN108801275B (en) | Indoor mobile robot fingerprint map establishing method based on wireless network and geomagnetic signals | |
CN111121625A (en) | Method for calibrating relative position of diagonally-arranged double laser radars | |
CN116795103A (en) | Robot movement control method, system and device and robot | |
CN115903797A (en) | Autonomous routing inspection method for multi-floor modeling of transformer substation |
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 |