Mobile control method of self-moving device, self-moving device and readable storage medium
By obtaining and adjusting the movement parameters of the courtyard robot in real time, and according to the preset strategies of different environments, the problem of mobile components being easily damaged in complex environments in the prior art is solved, and the equipment is effectively moved for a long time and the protection of walking components in complex environments is realized.
Patent Information
- Application Number
- CN202311540546.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-16
- Publication Date
- 2025-04-25
AI Technical Summary
In complex environments, existing courtyard robot mobile parts are prone to wear or damage caused by excessive instantaneous current or long-term high current load, which cannot achieve long-term effective movement control, affecting working efficiency.
By obtaining the mobile parameters in real time in the mobile device and adjusting them according to the preset control strategies of different mobile environments, the target mobile parameters are obtained to control the movement of the device in a complex environment.
It realizes long-term effective movement control from mobile devices in complex and harsh environments, ensures normal power output of the device, improves work efficiency, and protects walking components.
Smart Images

Figure CN119882712A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of self-moving equipment control, and in particular to a self-moving equipment movement control method, a self-moving equipment and a readable storage medium. Background Art
[0002] The garden robot can complete various tasks autonomously according to the automatic plan. The most important part is the moving part of the garden robot, because the moving part needs to ensure that the garden robot can work in a complex ground environment and in different working states, such as how the garden robot can walk normally on the snow or in a snowy environment. In some garden machines, the moving part can be a crawler or a walking wheel and a walking motor connected to them;
[0003] However, the existing control methods for moving parts are very likely to cause the walking motor to wear out quickly or even be directly damaged due to excessive instantaneous current or long-term high current load state, which makes it difficult to achieve long-term effective and reasonable movement control of the garden robot.
[0004] Therefore, those skilled in the art are in urgent need of finding a mobile control method that can enable a garden robot to adapt to complex environments. Summary of the invention
[0005] Based on this, it is necessary to provide a self-moving device movement control method, a self-moving device and a readable storage medium to address the above-mentioned technical problems, so as to solve the problems in the prior art of damaging the walking motor in the garden robot and being unable to achieve long-term effective and reasonable movement control of the garden robot, thereby affecting the work efficiency of the garden robot.
[0006] A method for controlling movement of a mobile device, the method comprising:
[0007] When the self-moving device is moving, the controller obtains the moving parameters of the self-moving device in real time;
[0008] The controller adjusts the movement parameters according to preset control strategies under different movement environments to obtain target movement parameters;
[0009] The controller controls the self-mobile device to move in different mobile environments according to the target mobile parameter.
[0010] A self-moving device comprises left and right wheels, a travel motor connected to the left and right wheels, and a controller, wherein the controller is used to control the left and right wheels and the travel motor to implement the steps of the self-moving device movement control method.
[0011] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned self-mobile device movement control method are implemented.
[0012] The self-moving device movement control method provided by the present invention includes: when the self-moving device is moving, the controller obtains the movement parameters of the self-moving device in real time; the controller adjusts the movement parameters according to the preset control strategy under different moving environments to obtain the target movement parameters; the controller controls the self-moving device to move in different moving environments according to the target movement parameters. In the present invention, after obtaining the current movement parameters of the self-moving device, the previous movement parameters can be adjusted according to the preset control strategy under different environments, so that the self-moving device can effectively ensure the normal movement power output of the self-moving device for a long time in a complex and harsh working environment, and can ensure the working efficiency of the self-moving device in completing the work task, and can protect the walking parts in the self-moving device on the other hand. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0014] Figure 1 It is a flowchart of a method for controlling movement of a mobile device in one embodiment of the present invention.
[0015] Figure 2 It is a schematic block diagram of a self-moving device in one embodiment of the present invention. DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0017] The present invention proposes to realize the control of the movement of a self-moving device; the hardware structure includes a controller + a full-bridge DC motor drive circuit + an encoder + a DC brushed motor (traveling motor); the controller controls the conduction state of four switch field effect transistors (MOSFETs) in the full-bridge DC motor drive circuit to change the forward and reverse directions of the traveling motor and adjust the traveling speed of the traveling motor, and at the same time, the braking and dynamic braking functions of the traveling motor can be realized.
[0018] like Figure 1 As shown, a method for controlling movement of a self-moving device provided by an embodiment of the present invention is applied to a controller in the self-moving device, wherein the controller can also be understood as an MCU (Microcontroller Unit), and the method comprises the following steps:
[0019] S10, when the self-moving device is moving, the controller obtains the moving parameters of the self-moving device in real time.
[0020] Understandably, the functions performed by the self-moving device in different application scenarios will be different. In the snow-clearing scenario, the self-moving device is a snowplow, and the function it performs is the snow-clearing function. In the grass-cutting scenario, the self-moving device is a grass-cutting function. In the leaf-blowing scenario, the self-moving device is a leaf-blowing machine, and the function it performs is the leaf-blowing function. The self-moving device can be divided into a body and a front, and the body can be a universal body. When performing different functions, the front of the body can be replaced. When the self-moving device is moving, it will also include corresponding cleaning work, such as the snow-clearing, grass-cutting and leaf-blowing work mentioned above. The moving parameters are the current moving speed and moving direction of the self-moving device, wherein the moving speed and direction are data obtained by converting an encoder connected to the controller, wherein the encoder includes but is not limited to a photoelectric encoder, a magnetic induction encoder and a capacitive encoder. In this embodiment, a bidirectional photoelectric encoder may be preferably used.
[0021] In this embodiment, the movement parameters are acquired in real time during the movement of the self-moving device, so as to realize real-time adjustment later.
[0022] In one embodiment, the step S10, wherein the controller obtains the movement parameters of the self-moving device in real time, includes:
[0023] The controller obtains a movement signal of an encoder in the self-moving device.
[0024] The controller converts the movement signal into the movement parameter.
[0025] It can be understood that the encoder is installed on the synchronous shaft of the travel motor, so when the travel motor drives the track or travel wheel connected thereto, the encoder can obtain a moving signal, such as the forward and reverse direction rotation of the travel motor and the number of rotations. It is further explained that the forward use of the encoder is to obtain the movement parameters of the machine through the encoder, and the reverse use of the encoder is to obtain the movement signal of the encoder through the movement parameters of the machine; the movement parameters can be the movement speed and movement direction of the self-moving device, such as the movement speed can be obtained by obtaining the number of rotation pulses and pulse time in the movement signal as mentioned above (the rotation of the encoder is equivalent to the rotation of the motor), and the movement direction can be obtained by obtaining the forward and reverse directions (such as determining the forward and reverse directions by the front and back order of the two channel signals) in the movement signal as mentioned above. In addition, the movement parameters can also be the travel motor output power or the travel motor output current or the travel motor output voltage corresponding to the movement speed and movement direction, wherein the encoder and the travel motor are coaxially installed. After the encoder collects the parameters, the travel motor connected to the encoder will also have corresponding parameters. At this time, the controller can obtain the parameters on the travel motor;
[0026] In this embodiment, the encoder can convert the rotation parameters of the travel motor in the self-moving device into the current movement parameters of the self-moving device, and there is an associated data conversion relationship.
[0027] S20, the controller adjusts the movement parameters according to preset control strategies under different movement environments to obtain target movement parameters.
[0028] Understandably, the mobile environment refers to the environment in which the self-moving device is located, which may be a scene where the machine is subjected to large load resistance, such as snow accumulation in the snow, rushing over a slope, high-voltage working environment, harsh working environment, etc., which may affect the normal operation of the machine or damage the performance of the travel motor; the preset control strategy is the response measure determined by the controller after monitoring the self-moving device in different mobile environments, wherein a mobile environment includes at least one preset control strategy, and when the mobile environment is changed, the corresponding preset control strategy will also be changed; the target mobile parameter is a new working parameter obtained after conversion through the preset control strategy, and the working parameter is a parameter that enables the machine to work normally, which may be the rated output power of the travel motor;
[0029] The preset control strategy in this embodiment can be changed according to different mobile environments to dynamically obtain the target movement parameters under different mobile environments.
[0030] In one embodiment, in step S20, the controller adjusts the movement parameters according to preset control strategies in different movement environments to obtain target movement parameters, including:
[0031] The controller obtains the control parameters sent by the host computer.
[0032] The controller obtains the rotation value of the encoder in the self-moving device in real time according to the control parameter.
[0033] The controller performs adjustments according to a preset control algorithm and the rotation value to obtain the target movement parameter.
[0034] It can be understood that the controller can be installed in the body of the self-moving device, and it can communicate with the host computer through a communication module installed on the body. The connection method can be through a 4G module or a Bluetooth module, which is not limited here. Therefore, after the connection is completed, the controller can obtain the control parameters sent by the host computer; the control parameters are the linear speed and angular velocity of the left and right wheels sent by the user or pre-specified; the rotation value is the number of revolutions of the encoder, such as the content of the encoder mentioned above, the forward use of the encoder is to obtain the target movement parameter through the rotation value; the preset control algorithm refers to a PID control algorithm based on a PID control model. Specifically, the PID control algorithm can be dynamically adjusted based on the walking motor output power corresponding to the current rotation value and the expected walking motor output power, and finally obtain the target movement parameter suitable for the machine.
[0035] In one embodiment, the controller acquires the rotation value of the encoder in the self-moving device in real time according to the control parameter, including:
[0036] The controller converts the control parameters into rotation speeds of the left and right wheels in the self-moving device according to a preset machine motion model;
[0037] The controller converts the rotation speed into expected parameters of an encoder in the self-moving device according to a preset physical motion model.
[0038] The controller obtains actual parameters in a preset time period according to the expected parameters, and obtains the rotation value of the encoder in the self-moving device according to the actual parameters.
[0039] Understandably, the preset machine motion model refers to a model in which the self-mobile device converts the issued control parameters into the rotation speed of the left and right wheels, that is, the encoder is controlled to rotate according to the issued control parameters, specifically: one rotation of the travel motor means one rotation of the encoder, and the movement position of the external crawler or travel wheel when the encoder rotates one circle = the circumference of the crawler wheel or travel wheel when the travel motor rotates one circle * the speed ratio of the reduction gearbox. Therefore, the movement position of the external crawler or travel wheel when the encoder rotates one circle can be used to obtain the rotation speed of the left and right wheels within a certain period of time. Similarly, after obtaining the issued control parameters, the encoder can also determine the rotation value of the encoder in advance by reverse use, and finally determine the rotation speed of the left and right wheels by the rotation value; preset physical motion model The model refers to the same rules as the preset machine motion model. For example, the moving position of the external crawler or walking wheel when the encoder rotates one circle = the circumference of the crawler wheel or walking wheel when the walking motor rotates one circle * the speed ratio of the reduction box. Therefore, the physical model is the entire walking module composed of the crawler or walking wheel + walking motor + encoder, but its main feature is that the encoder is used in reverse, and the expected parameters of the encoder are deduced through the speed value; the expected parameters are the N encoder signal values that the PID control model wants to achieve in each preset time period; the actual parameters refer to the encoder signal values obtained according to each preset time period, and the state closest to the target is that the actual parameters obtained in a preset time period are equal to the expected parameters, so the actual parameters are finally used as the rotation values of the encoder.
[0040] It should be noted that the control logic of the rotation speed of the left and right wheels during walking is controlled by a PID control model. Specifically, assuming that the starting point (current point) is A, the target point is B, the point of the self-moving device is C, the projection point of point C on the straight line AB is C', the target point is D (D is on the straight line AB, and the distance C' is adjustable from 0.2m to 1m), the orientation angle of the self-moving device is phi, and the theta value controlled by pid is the angle between the orientation of the self-moving device and the target straight line CD, that is, the deviation value of the self-moving device: theta = A (current machine heading angle) - B{CD}; angular velocity w: rev = Kp*theta+Ki*integral (integral of the deviation value)+Kd*derivative (differential of the deviation value); linear velocity v: vel = preset maximum velocity * sqrt{1-(rev / preset maximum angular velocity)^{2}}; wherein Kp, Ki and Kd are all parameters; the rotation speeds of the left and right wheels can be calculated by v, w and wheelbase d: right wheel speed vr = v+w*d / 2; left wheel speed vl = vw*d / 2.
[0041] In one embodiment, the controller acquires actual parameters in a preset time period according to the expected parameters, and obtains the rotation value of the encoder in the self-moving device according to the actual parameters, including:
[0042] The controller determines whether actual parameters of the encoder in the self-moving device meet the expected parameters for a preset time period.
[0043] If not, the controller controls the travel motor in the self-moving device to increase the output power to increase the actual parameters of the encoder until it is determined that the actual parameters of the next preset time period meet the expected parameters, and the actual parameters are used as the rotation values of the encoder in the self-moving device.
[0044] Understandably, the controller will obtain the actual parameters in the encoder according to a preset time period, but the actual parameters obtained in one of the preset time periods may not be ideal values. At this time, the controller will compare the number of actual parameters in a preset time period with the number of expected parameters, and determine whether they meet the requirements through the comparison result. If they do not meet the requirements, it means that the output power of the travel motor in the self-mobile device is not an ideal value. After the output power of the travel motor is increased, the actual parameters that meet the expected number of parameters can be obtained in any next preset time period through the reverse use of the encoder.
[0045] This embodiment judges the number of actual parameters currently in the encoder to determine whether the output power of the current travel motor of the mobile device is in an insufficient working state. In the insufficient working state, the output power of the travel motor can be adjusted in real time to ensure that the mobile device can stably perform mobile work in different working environments.
[0046] In one embodiment, in step S20, the controller adjusts the movement parameters according to preset control strategies in different movement environments to obtain target movement parameters, including:
[0047] The controller obtains environmental parameters in the self-moving device, and determines that the self-moving device is in a preset working environment according to the environmental parameters;
[0048] The controller limits the movement parameter according to the restriction parameter corresponding to the preset working environment to obtain the target movement parameter.
[0049] Understandably, the environmental parameters refer to the parameters corresponding to the environment in which the current mobile device is located. For example, in a high-voltage working environment or a harsh working environment, after the current parameters in the walking motor or the snow rolling motor are collected by the current sampling current connected to the controller, the collected current parameters are compared with the normal current parameters to determine the environmental parameters of the current mobile device. In one embodiment, the environmental parameters in the current self-moving device can also be determined by a sensor connected to the controller, such as the visual sensors installed in multiple directions of the self-moving device can be used to determine the environmental parameters in the current self-moving device, such as whether there is too much snow on the road, whether there is a slope, a high-voltage working environment, a harsh working environment, etc. In addition, the above-mentioned visual sensor can also be replaced by the current feedback of the millimeter-wave radar or laser radar or the snow bucket motor (the larger the snow rolling current, the more snow). It can also be a combination of the above-mentioned multiple components to achieve the work of determining the environmental parameters of the current mobile device. The restriction parameters include a first restriction parameter and a second restriction parameter. The first restriction parameter and the second restriction parameter are mainly manifested as limiting the parameters of the walking motor in different working environments. After the restriction is completed, the target movement parameter obtained is a valid and reasonable value or is within a valid and reasonable value range.
[0050] The controller in this embodiment limits the movement parameters according to the restriction parameters corresponding to the preset working environment, that is, it limits the final output power of the walking motor by executing the power limitation strategy. In general, while ensuring normal working, it can avoid overheating of the walking motor or frequent high current loss of the walking motor.
[0051] In one embodiment, the restriction parameter includes a first restriction parameter and a second restriction parameter, and the controller restricts the movement parameter according to the restriction parameter corresponding to the preset working environment to obtain the target movement parameter, including:
[0052] The controller obtains a first restriction parameter corresponding to the preset working environment, and when it is determined that the movement parameter exceeds the first restriction parameter, determines the target movement parameter according to the first restriction parameter.
[0053] Understandably, the first limiting parameter refers to the rated output power of the walking motor corresponding to the output of the rated current when the walking motor is completely blocked, which is obtained in advance through testing (it can be any value of the full power output of the walking motor), wherein the first limiting parameter can also be the output current of the walking motor or the output voltage of the walking motor, and finally the current or voltage is converted into the rated output power of the walking motor. When the current movement parameter exceeds the first limiting parameter, the controller determines that the current movement parameter does not meet the working parameters in the preset working environment; when the first limiting parameter is the rated output power of the walking motor corresponding to the output of the rated current, the movement parameter can be the current output power of the walking motor, or it can be the above-mentioned moving speed or moving direction or the output voltage of the walking motor or the output current of the walking motor (it only needs to convert the above-mentioned parameters into the current output power of the walking motor);
[0054] Specifically, the output power of the walking motor is controlled to be P based on the first limiting parameter, wherein P is limited within the first limiting parameter, which can be 50% of the full power value of the walking motor;
[0055] This embodiment is a static adjustment method, which can limit the travel motor according to the first limiting parameter, and can ensure that the travel motor will not be damaged due to overcurrent or overload under rated output conditions.
[0056] Or / and, the controller determines a second restriction parameter corresponding to the preset working environment, and when it is determined that the movement parameter exceeds the second restriction parameter, dynamically adjusts the movement parameter through a preset parameter restriction model and the second restriction parameter to obtain the adjusted target movement parameter.
[0057] Understandably, the second limiting parameter refers to the rated current output in the walking motor, wherein, when the current moving parameter exceeds the second limiting parameter, the controller determines that the current moving parameter does not meet the working parameter in the preset working environment; when the second limiting parameter is the rated current output in the walking motor, the moving parameter may be the current walking motor output current, or the above-mentioned moving speed or moving direction or walking motor output power or walking motor output voltage (it is only necessary to convert the above-mentioned parameters into the current walking motor output power);
[0058] Specifically, after adding current loop PID modulation to the PID control model, when the output current of the walking motor exceeds the rated current of the walking motor, the adjustment process of the current limiting PID control model will be triggered, and the current output current of the walking motor will be passed into the PID control model as the feedback value. The target current is the rated current, and the output power of the walking motor is dynamically adjusted;
[0059] This embodiment can ensure that the output power of the walking motor can reach the rated output power allowed by the walking motor in complex scenarios, and at the same time ensure that the walking motor will not be damaged due to excessive current caused by excessive output power.
[0060] It should be noted that, when it is monitored that the above-mentioned moving parameters have returned to the parameters under normal working conditions, the restrictions can be lifted, and the obtained target moving parameters are the parameters after the restrictions are lifted. At this time, the output power of the walking motor corresponding to the target moving parameters is a fixed value; when it is monitored that the above-mentioned moving parameters have not returned to the parameters under normal working conditions, the obtained target moving parameters are the parameters after the restrictions. At this time, the output power of the walking motor corresponding to the target moving parameters is a dynamic value.
[0061] S30, the controller controls the self-moving device to move in different mobile environments according to the target movement parameter.
[0062] It is understandable that after the target movement parameters are determined in real time, the self-moving device needs to move based on the parameters; in addition, during the movement process, the mobile environment in which the self-moving device is located will continue to change or repeat. At this time, the self-moving device will re-process according to steps S10 to S30. It can be seen that this embodiment is a dynamic and real-time adjustment process.
[0063] In one embodiment, the step S30, wherein the controller controls the mobile device to move in different mobile environments according to the target movement parameter, includes:
[0064] When the controller determines that the self-moving device is in a preset working state according to the target moving parameter, the controller controls the moving speed of the self-moving device in different moving environments under the target moving parameter to obtain the target moving speed.
[0065] The controller controls the mobile device to move in different mobile environments according to the target moving speed.
[0066] Understandably, the preset working state means that the parameters in the walking motor are restricted; the moving speed refers to the working speed of the self-moving device when it is working, and the speed is adjusted under the target moving parameter. When the target moving parameter is the output power of the walking motor, the current walking motor will have a moving speed; the target speed is the ideal speed of the self-moving device in the current moving environment. The target speed is to maintain the running posture of the self-moving device, and maintain the original posture of the self-moving device or work according to the original expected control route through a reasonable speed regulation strategy, so as to avoid the situation where the self-moving device has an abnormal posture or walks on an unexpected route due to the limitation of the walking motor;
[0067] This embodiment can determine whether the travel motor in the current mobile device is in a restricted working state. Without changing the rated output power of the current travel motor, the speed of the travel motor can be reduced and the output torque of the motor can be increased, thereby overcoming the current harsh walking conditions (such as whether there is too much snow on the road, or moving environments such as rushing over slopes and bumps).
[0068] In one embodiment, controlling the moving speed of the mobile device in different moving environments under the target moving parameters to obtain the target moving speed includes:
[0069] The controller obtains the maximum wheel speed corresponding to the target movement parameter in different movement environments.
[0070] The controller performs clipping processing on the control parameters sent by the host computer according to a preset proportional clipping algorithm and the maximum wheel speed to obtain the target moving speed.
[0071] Understandably, the target movement parameter may be a parameter after the travel motor is limited. When the target movement parameter is the rated output power of the travel motor, at this power, the left and right wheels of the self-moving device will have a maximum wheel speed. The preset proportional clipping algorithm is to obtain the ratio between two data, and adjust other data according to this ratio. The data in the ratio may be data of the same dimension, or data with a conversion relationship.
[0072] Specifically, after obtaining the maximum wheel speed, the control parameters sent by the upper computer are obtained, and the magnitude relationship between the moving speeds of the left and right wheels and the maximum wheel speed in the control parameters is determined. Then, when the moving speed of one wheel is greater than the maximum wheel speed and the moving speed of one wheel is less than the maximum wheel speed, the two ratios of the moving speeds of the left and right wheels in the control parameters are determined based on the maximum wheel speed. Based on the maximum wheel speed, the moving speed of the wheel less than the maximum wheel speed is proportionally adjusted to obtain a new target moving speed; wherein the new target moving speed includes the moving speeds of the left and right wheels;
[0073] For example, the rated power in the target movement parameters is now limited to 55%. At this time, the maximum speed of the left and right wheels can only reach 0.4m / s, while the linear speed and angular speed in the control parameters sent by the host computer are 0.5m / s and 0.2m / s, respectively. The left wheel speed calculated by the sent control parameters is
[0074] 0.3m / s, the right wheel speed is 0.7m / s. At this time, the mobile device can't run 0.7m / s (less than 0.4m / s). The left wheel speed is controlled to 0.17m / s through the preset proportional clipping algorithm (after the right wheel speed drops from 0.7m / s to 0.4m / s, the ratio is 4:7. The left wheel speed is calculated at the ratio of 4:7 to get 0.17m / s). The right wheel speed is controlled to 0.4m / s;
[0075] This embodiment is a static adjustment method for moving speed. In this process, the target moving parameter is a fixed value, which achieves the effect of reducing speed while maintaining walking posture.
[0076] In one embodiment, controlling the moving speed of the mobile device in different moving environments under the target moving parameters to obtain the target moving speed includes:
[0077] The controller obtains the maximum wheel speed corresponding to the target movement parameter in different movement environments.
[0078] The controller uses the maximum wheel speed as a target expected speed value.
[0079] The controller dynamically adjusts the cropping ratio in the preset proportional cropping algorithm according to the current moving speed, and dynamically crops the current moving speed according to the preset proportional cropping algorithm with the adjusted cropping ratio and the target expected speed to obtain the target moving speed.
[0080] Understandably, the principle of obtaining the maximum wheel speed is consistent with the above steps; the target expected speed value is the value used in the PID control model, which is consistent with the target movement parameter and is in a dynamic state; the current movement speed is also a dynamic process, and the dynamic change of the movement speed will also lead to changes in the cutting ratio;
[0081] Specifically, in the PID control model, the difference between the current moving speed and the target expected speed can determine the clipping ratio (that is, the current moving speed of one of the wheels is adjusted to a ratio formed after the target expected speed, and the moving speed of the other wheel needs to adjust the speed value according to the ratio). After determining the clipping ratio, the moving speed of the current wheel is adjusted according to the clipping ratio to obtain the adjusted target moving speed; wherein, the specific adjustment implementation example can refer to the above content, and the difference between this embodiment and the above is that the maximum wheel speed in this embodiment is a dynamically changing value, and the corresponding walking motor rated power is also a dynamically changing value, so the final target moving speed is also a dynamically changing value;
[0082] This embodiment is a dynamic adjustment method for moving speed. In this process, the target moving parameter is a dynamic value, so that the speed reduction effect is optimal while maintaining the walking posture effect.
[0083] In one embodiment, the preset control strategy in the method also includes: after the controller detects abnormal information, starting the preset protection strategy; wherein the preset protection strategy includes timely controlling the self-moving equipment to stop and perform emergency braking for protection after relevant abnormal information is detected, such as the collision switch / emergency stop switch is triggered, the current is too high, the motor is blocked, and other abnormal information.
[0084] In one embodiment, the preset control strategy in the method also includes: the controller monitors the current state and the drive operation state in the walking motor within a preset monitoring time. When the current state and the drive operation state do not conform to the preset normal state, it is determined that the walking motor is blocked, and the self-moving device is controlled to stop walking; wherein, in order to prevent the walking motor in the machine from being blocked, the serial port will be continuously used to monitor the current state and the motor drive operation state. If a stable and large current appears within a certain time window during the motor drive operation, and the position of the self-moving device does not basically change, it is considered that the walking motor is blocked and the self-moving device is controlled to stop walking; in addition, the complete blocking of the walking motor can be confirmed by the encoder value.
[0085] The present invention provides a mobile control method for a self-moving device. After obtaining the current mobile parameters of the self-moving device, the previous mobile parameters can be adjusted according to preset control strategies under different environments, so that the self-moving device can, in a complex and harsh working environment, on the one hand, effectively ensure the normal mobile power output of the self-moving device for a long time and ensure the working efficiency of the self-moving device in completing work tasks, and on the other hand, protect the walking parts in the self-moving device; a peripheral processing model or a control strategy is added to the PID control model to realize more reasonable control processing in different working environments, thereby improving the coping ability of the self-moving device in different working environments.
[0086] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0087] like Figure 2 As shown, in one embodiment, the present invention further provides a self-moving device, including left and right wheels, a travel motor connected to the left and right wheels, and a controller, wherein the controller is used to control the left and right wheels and the travel motor to perform the steps of the self-moving device movement control method. The self-moving device may be a garden robot such as a snow blower, a lawn mower, a leaf blower, etc. In one embodiment, the front and body of the self-moving device are in a detachable state.
[0088] The execution function of the controller corresponds one-to-one to the mobile device movement control method in the above embodiment. For the specific definition of the controller, please refer to the definition of the mobile device movement control method in the above text, which will not be repeated here. Each submodule in the above controller can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above submodules can be embedded in or independent of the processor in the controller in hardware form, or can be stored in the memory in the controller in software form, so that the processor can call and execute the operations corresponding to each of the above submodules.
[0089] In one embodiment, the present invention also provides one or more readable storage media storing computer-readable instructions, and the readable storage media provided in this embodiment include non-volatile readable storage media and volatile readable storage media; computer-readable instructions are stored on the readable storage medium, and when the computer-readable instructions are executed by one or more processors, the one or more processors implement the steps of the self-mobile device movement control method described in the above embodiment.
[0090] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they may include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0091] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above.
[0092] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for controlling movement of a self-moving device, characterized in that: The method is applied to a controller of a self-moving device, and comprises: When the self-moving device is moving, the controller obtains the moving parameters of the self-moving device in real time; The controller adjusts the movement parameters according to preset control strategies under different movement environments to obtain target movement parameters; The controller controls the self-mobile device to move in different mobile environments according to the target mobile parameter.
2. The method for controlling movement of a self-moving device according to claim 1, characterized in that: The controller acquires the movement parameters of the self-moving device in real time, including: The controller obtains a movement signal of an encoder in the self-moving device; The controller converts the movement signal into the movement parameter.
3. The method for controlling movement of a self-moving device according to claim 1, characterized in that: The controller adjusts the movement parameters according to the preset control strategies under different movement environments to obtain target movement parameters, including: The controller obtains the control parameters sent by the host computer; The controller acquires the rotation value of the encoder in the self-moving device in real time according to the control parameter; The controller performs adjustments according to a preset control algorithm and the rotation value to obtain the target movement parameter.
4. The method for controlling movement of a self-moving device according to claim 3, characterized in that: The controller acquires the rotation value of the encoder in the self-moving device in real time according to the control parameter, including: The controller converts the control parameters into rotation speeds of the left and right wheels in the self-moving device according to a preset machine motion model; The controller converts the rotation speed into expected parameters of an encoder in the self-moving device according to a preset physical motion model; The controller obtains actual parameters in a preset time period according to the expected parameters, and obtains the rotation value of the encoder in the self-moving device according to the actual parameters.
5. The method for controlling movement of a self-moving device as claimed in claim 4, characterized in that: The controller acquires actual parameters in a preset time period according to the expected parameters, and obtains the rotation value of the encoder in the self-moving device according to the actual parameters, including: The controller determines whether actual parameters of the encoder in the self-moving device meet the expected parameters for a preset time period; If not, the controller controls the travel motor in the self-moving device to increase the output power to increase the actual parameters of the encoder until it is determined that the actual parameters of the next preset time period meet the expected parameters, and the actual parameters are used as the rotation values of the encoder in the self-moving device.
6. The method for controlling movement of a self-moving device according to any one of claims 1 to 5, characterized in that: The controller adjusts the movement parameters according to the preset control strategies under different movement environments to obtain target movement parameters, including: The controller obtains environmental parameters in the self-moving device, and determines that the self-moving device is in a preset working environment according to the environmental parameters; The controller limits the movement parameter according to the restriction parameter corresponding to the preset working environment to obtain the target movement parameter.
7. The method for controlling movement of a self-moving device according to claim 6, characterized in that: The restriction parameters include a first restriction parameter and a second restriction parameter; the controller restricts the movement parameters according to the restriction parameters corresponding to the preset working environment to obtain the target movement parameters, including: The controller obtains a first restriction parameter corresponding to the preset working environment, and when determining that the movement parameter exceeds the first restriction parameter, determines the target movement parameter according to the first restriction parameter; Or / and, the controller determines a second restriction parameter corresponding to the preset working environment, and when it is determined that the movement parameter exceeds the second restriction parameter, dynamically adjusts the movement parameter through a preset parameter restriction model and the second restriction parameter to obtain the adjusted target movement parameter.
8. The method for controlling movement of a self-moving device according to claim 1, characterized in that: The controller controls the mobile device to move in different mobile environments according to the target mobile parameter, including: When the controller determines that the self-moving device is in a preset working state according to the target moving parameter, the controller controls the moving speed of the self-moving device in different moving environments under the target moving parameter to obtain the target moving speed; The controller controls the mobile device to move in different mobile environments according to the target moving speed.
9. The method for controlling movement of a self-moving device as claimed in claim 8, characterized in that: The step of controlling the moving speed of the mobile device in different moving environments under the target moving parameters to obtain the target moving speed includes: The controller obtains the maximum wheel speed corresponding to the target movement parameters in different movement environments; The controller performs clipping processing on the control parameters sent by the host computer according to a preset proportional clipping algorithm and the maximum wheel speed to obtain the target moving speed.
10. The method for controlling movement of a self-moving device according to claim 8 or 9, characterized in that: The step of controlling the moving speed of the mobile device in different moving environments under the target moving parameters to obtain the target moving speed includes: The controller obtains the maximum wheel speed corresponding to the target movement parameters in different movement environments; The controller uses the maximum wheel speed as a target expected speed value; The controller dynamically adjusts the cropping ratio in the preset proportional cropping algorithm according to the current moving speed, and dynamically crops the current moving speed according to the preset proportional cropping algorithm with the adjusted cropping ratio and the target expected speed to obtain the target moving speed.
11. A self-propelled device, characterized in that: It includes left and right wheels, a walking motor connected to the left and right wheels, and a controller, and the controller is used to implement the steps of the self-moving device movement control method as described in any one of claims 1 to 10.
12. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for controlling movement of a mobile device as claimed in any one of claims 1 to 10 are implemented.