Disclosure of Invention
The invention aims to provide a constant-speed cruising control method, a constant-speed cruising control system, a constant-speed cruising control device, a storage medium and a riding mower, so that the riding mower can automatically keep straight running and realize constant-speed cruising in a mowing process.
In order to achieve the above object of the present invention, according to a first aspect of the present invention, there is provided a constant-speed-cruise control method of a lawn mower, applied to a riding lawn mower provided with a constant-speed-cruise speed setting module and a constant-speed-cruise switch module, the method comprising:
acquiring a constant-speed-cruise speed setting operation signal, a constant-speed-cruise switch operation signal and current state information of an operating mechanism of the riding mower, wherein the operating mechanism is used for receiving user operation to control the travelling speed and the travelling direction of the riding mower;
determining the current constant-speed-cruise linear speed of the riding mower based on the constant-speed-cruise speed setting operation signal;
judging whether the operating mechanism is in a zero position or not based on the current state information of the operating mechanism;
When the control mechanism of the riding mower is judged to be in a zero position, whether the constant-speed cruising is in a valid starting state is further judged based on the constant-speed cruising switch operation signal;
When the constant-speed cruising is in an effective starting state, updating the constant-speed cruising target speed of the riding mower based on the determined current constant-speed cruising line speed;
And controlling the riding mower to travel at a constant speed and a straight line along a target straight line according to the target course by using the updated constant-speed cruising target speed based on the pre-aiming following control technology.
Preferably, before updating the constant speed cruising target speed of the riding mower based on the determined current constant speed cruising linear speed, the method further comprises:
acquiring the current course and the current position coordinates of the riding mower;
judging whether the movement mode of the riding mower is switched from a non-constant speed cruising mode to a constant speed cruising mode based on the constant speed cruising switch operation signal;
And if the riding mower is switched from the non-constant speed cruising mode to the constant speed cruising mode, marking the current course as a target course, marking the current movement mode as the constant speed cruising mode, and determining an equation expression of the target straight line based on the current course and the current position coordinates.
Preferably, two GNSS antennas are symmetrically arranged on the left and right sides of the riding mower, and the obtaining the current heading and the current position coordinates of the riding mower includes:
Acquiring position coordinates of the two GNSS antennas;
Calculating the current heading of the riding mower based on the position coordinates of the two GNSS antennas;
And calculating the current position coordinates of the riding mower based on the position coordinates of the two GNSS antennas and the current heading.
Preferably, the method further comprises:
When it is determined that the steering mechanism of the riding mower is not in the zero position, marking the current steering mode of the riding mower as a manual steering mode, and updating the current linear speed of the riding mower based on the current state information of the steering mechanism.
Preferably, the steering mechanism includes a universal handle for controlling a travel speed and a travel direction of the riding mower;
Accordingly, the obtaining current state information of the steering mechanism of the riding mower includes:
Acquiring current position vector information of the universal handle in response to the operation of the universal handle, wherein the current position vector information comprises polar diameter information and polar angle information, the polar diameter information is used for representing the moving distance of the universal handle relative to an initial position, and the polar angle information is used for representing the rotating angle of the universal handle relative to a reference direction;
the determining whether the operating mechanism is in a zero position based on the current state information of the operating mechanism comprises:
Judging whether the universal handle is in a zero position according to the polar diameter information in the current position vector information of the universal handle, judging that the universal handle is in the zero position when the absolute value of the polar diameter of the universal handle is smaller than or equal to a preset distance, otherwise, judging that the universal handle is not in the zero position.
Preferably, the riding mower comprises a running gear and a running drive gear, wherein,
The walking mechanism comprises a driven universal wheel, a left driving wheel and a right driving wheel which are arranged at the bottom of the riding mower, wherein the walking driving mechanism comprises a left driving motor in driving connection with the left driving wheel and a right driving motor in driving connection with the right driving wheel;
correspondingly, the controlling the riding mower to travel at a constant speed and a straight line along a target straight line at an updated constant speed cruising target speed based on the pre-aiming following control technology comprises the following steps:
Calculating a lateral deviation, wherein the lateral deviation is a distance from a current position of the riding mower to the target straight line;
calculating an equation expression of a pretightening line, wherein the pretightening line is a line formed by connecting the current position of the riding mower to a pretightening point;
Calculating the course deviation between the current course of the riding mower and the pre-aiming straight line;
Calculating control amounts of the left driving wheel and the right driving wheel when the riding mower runs at a constant speed and a straight line along a target straight line at the constant speed cruising target speed according to a target course by adopting a preset PID control model based on the transverse deviation and the course deviation, wherein the control amounts comprise an angle deviation control amount and a transverse deviation control amount;
Calculating target rotational speeds of the left and right drive wheels based on the control amounts of the left and right drive wheels;
and controlling the output voltages of the left driving motor and the right driving motor according to the determined target rotating speeds of the left driving wheel and the right driving wheel, so that the riding mower can travel at a constant speed and a straight line along a target straight line at a constant speed and a cruise target speed according to a target course.
According to a second aspect of the present invention, there is provided a constant speed cruise control system for a riding mower having a constant speed cruise speed setting module and a constant speed cruise switch module disposed thereon, the system comprising:
An operation signal acquisition module, configured to acquire a constant-speed-cruise-speed setting operation signal, a constant-speed-cruise switch operation signal, and current state information of an operating mechanism of the riding mower, where the operating mechanism is configured to accept a user operation to control a traveling speed and a traveling direction of the riding mower;
the constant-speed cruising speed determining module is used for determining the current constant-speed cruising linear speed of the riding mower based on the constant-speed cruising speed setting operation signal;
The operating mechanism state judging module is used for judging whether the operating mechanism is in a zero position or not based on the current state information of the operating mechanism;
The constant-speed cruising starting state judging module is used for judging whether the constant-speed cruising is in an effective starting state or not further based on the constant-speed cruising switch operation signal when judging that the operating mechanism of the riding mower is at a zero position;
the constant-speed cruise target speed updating module is used for updating the constant-speed cruise target speed of the riding mower based on the determined constant-speed cruise line speed when the constant-speed cruise is in an effective starting state;
And the constant-speed cruising driving control module is used for controlling the riding mower to perform uniform-speed straight driving along a target straight line according to the target course at the updated constant-speed cruising target speed based on the pre-aiming following control technology.
Preferably, the system further comprises:
the course and position acquisition module is used for acquiring the current course and the current position coordinates of the riding mower before updating the constant-speed cruising target speed of the riding mower based on the determined current constant-speed cruising linear speed;
The constant-speed-cruise mode switching judging module is used for judging whether the movement mode of the riding mower is switched from a non-constant-speed-cruise mode to a constant-speed-cruise mode or not based on the constant-speed-cruise switch operation signal;
The first state processing module is used for marking the current heading as a target heading, marking the current movement mode as a constant speed cruising mode and determining an equation expression of the target straight line based on the current heading and the current position coordinates when the riding mower is switched from a non-constant speed cruising mode to a constant speed cruising mode.
Preferably, two GNSS antennas are symmetrically arranged on the left and right sides of the riding mower, and the course and position acquisition module is specifically used for when executing the acquisition of the current course and the current position coordinates of the riding mower:
Acquiring position coordinates of the two GNSS antennas;
Calculating the current heading of the riding mower based on the position coordinates of the two GNSS antennas;
And calculating the current position coordinates of the riding mower based on the position coordinates of the two GNSS antennas and the current heading.
Preferably, the system further comprises:
And the second state processing module is used for marking the current control mode of the riding mower as a manual driving mode when the control mechanism of the riding mower is not in a zero position, and updating the current linear speed of the riding mower based on the current state information of the control mechanism.
Preferably, the steering mechanism includes a universal handle for controlling a travel speed and a travel direction of the riding mower;
Accordingly, the obtaining current state information of the steering mechanism of the riding mower includes:
Acquiring current position vector information of the universal handle in response to the operation of the universal handle, wherein the current position vector information comprises polar diameter information and polar angle information, the polar diameter information is used for representing the moving distance of the universal handle relative to an initial position, and the polar angle information is used for representing the rotating angle of the universal handle relative to a reference direction;
the determining whether the operating mechanism is in a zero position based on the current state information of the operating mechanism comprises:
Judging whether the universal handle is in a zero position according to the polar diameter information in the current position vector information of the universal handle, judging that the universal handle is in the zero position when the absolute value of the polar diameter of the universal handle is smaller than or equal to a preset distance, otherwise, judging that the universal handle is not in the zero position.
Preferably, the riding mower comprises a running gear and a running drive gear, wherein,
The walking mechanism comprises a driven universal wheel, a left driving wheel and a right driving wheel which are arranged at the bottom of the riding mower, wherein the walking driving mechanism comprises a left driving motor in driving connection with the left driving wheel and a right driving motor in driving connection with the right driving wheel;
correspondingly, the controlling the riding mower to travel at a constant speed and a straight line along a target straight line at an updated constant speed cruising target speed based on the pre-aiming following control technology comprises the following steps:
Calculating a lateral deviation, wherein the lateral deviation is a distance from a current position of the riding mower to the target straight line;
calculating an equation expression of a pretightening line, wherein the pretightening line is a line formed by connecting the current position of the riding mower to a pretightening point;
Calculating the course deviation between the current course of the riding mower and the pre-aiming straight line;
Calculating control amounts of the left driving wheel and the right driving wheel when the riding mower runs at a constant speed and a straight line along a target straight line at the constant speed cruising target speed according to a target course by adopting a preset PID control model based on the transverse deviation and the course deviation, wherein the control amounts comprise an angle deviation control amount and a transverse deviation control amount;
Calculating target rotational speeds of the left and right drive wheels based on the control amounts of the left and right drive wheels;
and controlling the output voltages of the left driving motor and the right driving motor according to the determined target rotating speeds of the left driving wheel and the right driving wheel, so that the riding mower can travel at a constant speed and a straight line along a target straight line at a constant speed and a cruise target speed according to a target course.
According to a third aspect of the present invention, there is provided a constant speed cruise control device for a lawn mower, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing any one of the constant speed cruise control methods for a lawn mower described in the first aspect when executing the computer program.
According to a fourth aspect of the present invention, there is provided a computer readable storage medium storing a computer program which, when executed by a processor, implements any one of the mower cruise control methods described in the first aspect.
According to a fifth aspect of the present invention, there is provided a riding mower comprising a mower cruise control device according to the third aspect.
According to the technical scheme, the constant-speed-cruise control method, the system, the device, the storage medium and the riding mower are provided, by acquiring a constant-speed-cruise speed setting operation signal, a constant-speed-cruise switch operation signal and current state information of an operating mechanism of the riding mower, judging whether the operating mechanism is in a zero position according to the current state information of the operating mechanism, judging whether the constant-speed-cruise is in an effective starting state or not further based on the constant-speed-cruise switch operation signal under the condition that the operating mechanism is in the zero position, updating a constant-speed-cruise target speed of the riding mower based on the determined current constant-speed-cruise linear speed when the constant-speed-cruise is in the effective starting state, and controlling the riding mower to perform uniform linear running along a target straight line at the updated constant-speed-cruise target speed based on a pre-aiming following control technology, so that the riding mower can execute the constant-speed-cruise on the basis of automatically keeping the linear running.
According to the invention, through improving the motion control system architecture and the motion control strategy of the riding mower, the functions of linear maintenance and constant-speed cruising can be realized according to the needs in the running process of the riding mower, the problem that the lawn cutting texture is not attractive due to the fact that a user cannot drive at a constant speed in a linear manner in the operation process of manually controlling the riding mower is solved, meanwhile, the labor intensity of the user for operating the riding mower is reduced, the operation difficulty of the user is reduced, and the user experience is improved.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1, an embodiment of the present invention provides a constant speed cruise control method for a riding mower, where a constant speed cruise speed setting module and a constant speed cruise switch module are disposed, the method may include the steps of:
S1, acquiring a constant-speed cruising speed setting operation signal, a constant-speed cruising switch operation signal and current state information of an operating mechanism of the riding mower, wherein the operating mechanism is used for receiving user operation to control the travelling speed and the travelling direction of the riding mower;
During riding mowing, a user controls the travel speed and travel direction of the riding mower through the steering mechanism. Specifically, the operating mechanism may be a steering wheel, an accelerator pedal, a forward/reverse gear shift pedal, left and right operating handles, an accelerator pedal, or a single operating handle (universal handle).
When it is necessary to make the riding mower achieve constant-speed cruising in the process of automatically keeping straight running, it is necessary to first acquire a constant-speed cruising speed setting operation signal, a constant-speed cruising switch operation signal, and current state information of an operating mechanism of the riding mower so as to analyze the upcoming running state (straight running or turning) of the riding mower subsequently by the current state information of the operating mechanism, and determine whether to start constant-speed cruising and a target speed of constant-speed cruising by the constant-speed cruising speed setting operation signal and the constant-speed cruising switch operation signal.
Specifically, the current state information of the steering mechanism may be realized by a sensor mounted on the steering mechanism, for example, the current state information for the steering wheel may be obtained by detecting the steering wheel rotation angle by a rotary encoder mounted on the steering wheel, and the current state information for the accelerator pedal may be obtained by detecting the opening of the accelerator pedal by an accelerator opening sensor mounted on the accelerator pedal.
S2, determining the current constant-speed cruising linear speed of the riding mower based on the constant-speed cruising speed setting operation signal;
After the constant-speed-cruise-speed setting operation signal, the constant-speed-cruise-switch operation signal and the current state information of the operating mechanism of the riding mower are obtained, the current constant-speed cruising line speed of the riding mower needs to be determined according to the constant-speed-cruise-speed setting operation signal.
Specifically, the cruise control signal is triggered by a user operating a cruise control speed setting module on the riding mower. For example, the constant-speed-cruise-setting operation signal may be a signal triggered by a speed adjustment button (+, -) or a speed adjustment wheel on a display panel on the riding mower.
Specifically, when the constant-speed cruising speed setting module is a speed adjusting button (+, -), the button +increases the constant-speed cruising speed and the button-decreases the constant-speed cruising speed, and when the constant-speed cruising speed setting module is a speed adjusting roller, the roller is increased forwards and the roller is reduced backwards.
Further, the constant-speed-cruising operation signal is a signal indicating that a + or-signal is pressed if a button is provided, and an angle indicating that the wheel is rotated forward or backward if a wheel is provided;
when the constant-speed cruising line speed of the riding mower is determined based on the constant-speed cruising speed setting operation signal, the corresponding times of addition and subtraction are carried out on the basis of the default constant-speed cruising speed according to the acquired trigger times of the addition and subtraction speed signal (the system sets the speed value of the addition and subtraction corresponding to each time of the addition and subtraction speed signal as a fixed value), and the constant-speed cruising line speed can be obtained.
S3, judging whether the operating mechanism is in a zero position or not based on the current state information of the operating mechanism, and if so, executing S4;
After the current constant speed navigation line speed of the riding mower is obtained, judging whether the operating mechanism is in a zero position or not according to the current state information of the operating mechanism. By judging whether the operating mechanism is in the zero position or not, whether the user is operating the operating mechanism at the current moment can be known, so that under the condition that the user is not operating the operating mechanism at the current moment, a constant-speed straight-line running control strategy intervention flow is entered, and the collision between a signal of the user operating the operating mechanism and an automatic constant-speed straight-line running control signal is avoided.
S4, judging whether the constant-speed cruising is in a valid starting state or not based on the constant-speed cruising switch operation signal, and if so, executing S5;
When the control mechanism is judged to be in the zero position, the fact that no signal for controlling the speed and the direction of the mower through manual operation of a user is involved is indicated, and at the moment, whether the constant-speed cruising is in an effective starting state or not is further judged according to the constant-speed cruising switch operation signal. In the non-constant-speed-cruise mode, whether a constant-speed-cruise switch is pressed (i.e., triggered) is judged, if the constant-speed-cruise switch is pressed, the constant-speed-cruise is judged to be in a valid on state, and if the constant-speed-cruise button is not pressed (i.e., not triggered) in the constant-speed-cruise mode, if the constant-speed-cruise switch is not pressed, the constant-speed-cruise is judged to be in a valid on state.
S5, updating the constant-speed cruising target speed of the riding mower based on the determined current constant-speed cruising linear speed;
When the constant-speed cruising is judged to be in an effective starting state, a constant-speed straight-line driving control strategy is inserted, namely, a constant-speed cruising function is executed, and at the moment, the constant-speed cruising target speed of the riding mower needs to be updated according to the determined current constant-speed cruising linear speed, namely, the determined current constant-speed cruising linear speed is determined to be the constant-speed cruising target speed of the riding mower.
S6, controlling the riding mower to travel at a constant speed and a straight line along a target straight line according to the target course by using the updated constant-speed cruising target speed based on the pre-aiming following control technology.
After the constant-speed cruising target speed of the riding mower is obtained, finally, the riding mower is controlled to execute the constant-speed cruising function, and the constant-speed straight running state is automatically maintained, namely, the riding mower is controlled to perform constant-speed straight running along a target straight line at the updated constant-speed cruising target speed according to the target course according to the pre-aiming following control technology, so that the riding mower can automatically maintain constant-speed straight running in the mowing process.
In summary, the present embodiment provides a method for controlling a constant-speed cruise of a lawn mower, which includes the steps of firstly obtaining a constant-speed cruise speed setting operation signal, a constant-speed cruise switch operation signal and current state information of an operating mechanism of the lawn mower, then determining a current constant-speed cruise speed of the lawn mower based on the constant-speed cruise speed setting operation signal, then judging whether the operating mechanism is in a zero position according to the current state information of the operating mechanism, further judging whether the constant-speed cruise is in an effective starting state based on the constant-speed cruise switch operation signal when the operating mechanism is in the zero position, when the constant-speed cruise is judged to be in the effective starting state, then updating a constant-speed cruise target speed of the lawn mower based on the determined current constant-speed cruise speed setting operation signal, and finally controlling the lawn mower to perform uniform linear running along a target straight line based on the pre-aiming following control technology at the updated constant-speed cruise target speed, thereby realizing that the lawn mower performs constant-speed cruise on the basis of automatically keeping linear running.
According to the embodiment, through improving the motion control system architecture and the motion control strategy of the riding mower, the linear maintaining and constant-speed cruising functions of the riding mower can be realized according to the requirements in the running process, the problem that the lawn cutting texture is not attractive due to the fact that a user cannot manually control the riding mower to run at a uniform speed in the working process is solved, meanwhile, the labor intensity of the user for operating the riding mower is reduced, the operation difficulty of the user is reduced, and the user experience is improved.
In one embodiment, before updating the cruise control target speed of the riding mower based on the determined current cruise control linear speed, the method may further include:
Acquiring the current course and the current position coordinates of the riding mower;
judging whether the movement mode of the riding mower is switched from the non-constant speed cruising mode to the constant speed cruising mode based on the constant speed cruising switch operation signal;
if the riding mower is switched from the non-constant speed cruising mode to the constant speed cruising mode, the current heading is marked as a target heading, the current movement mode is marked as the constant speed cruising mode, and an equation expression of a target straight line is determined based on the current heading and the current position coordinates.
When executing the constant-speed straight-line running control strategy, whether the movement mode of the riding mower is switched from the non-constant-speed cruising mode to the constant-speed cruising mode can be judged first, if the movement mode of the riding mower is switched from the non-constant-speed cruising mode to the constant-speed cruising mode, the constant-speed straight-line running control period is just started, at the moment, the current course is required to be marked as the target course, the current movement mode is required to be marked as the constant-speed cruising mode, and the equation expression of the target straight line is determined based on the current course and the current position coordinates, namely the direction and the path of straight line running in the straight line running keeping period are required to be determined first.
It is understood that if the riding mower is not switched from the non-constant speed cruising mode to the constant speed cruising mode, that is, the movement mode at the previous time of the current movement mode of the riding mower is also the constant speed cruising mode, the step of marking the current heading as the target heading, marking the current movement mode as the constant speed cruising mode, and determining the equation expression of the target straight line based on the current heading and the current position coordinates is not performed, but the constant speed cruising is performed directly according to the heading and the path at the previous time to keep straight line running.
As shown in fig. 4, let the current heading of the riding mower be θ t(θt denote an included angle between the current traveling direction of the riding mower and the east coordinate X-axis, the target straight line be L target,(xt,yt) be the current position coordinate of the riding mower, and θ target be the target heading.
The current heading is marked as a target heading, namely, the target heading theta target=θt (the target heading theta target represents the included angle between the target straight line and the east coordinate X axis).
The process of determining the equation expression of the target straight line based on the current heading and the current position coordinates is as follows:
1. The general formula of the linear equation is ax+by+c=0, and the linear equation is calculated as parameters a, B, and C:
a, when B is not zero, i.e. A 2+B2 is not equal to 0, the slope of the straight line is
B, when b=0, there is no slope;
c, when parallel to the X axis, a=0, b+.0, c+.0;
d, when parallel to the Y axis, a+.0, b=0, c+.0;
e, a=0, b+.0, c=0 when coincident with X axis;
f, when coincident with the Y axis, a+.0, b=0, c=0;
g, when the origin is exceeded, c=0, a 2+B2 +.0;
h, a.b.noteq.0 when intersecting both X, Y axes.
2. In this embodiment, the linear equation is calculated by the current position coordinates (x t,yt) of the riding mower and the target heading θ target:
(1) When θ target =pi/2 or 3pi/2
A=-1
B=0
C=xt
(2) When θ target is not equal to pi/2 and θ target is not equal to 3 pi/2
A=tan(θtarget)
B=-1
C=-A×xt-B×yt
The current heading θ t and target heading θ target of the riding mower range from [0,2 pi ].
In one embodiment, as shown in fig. 3 and 4, two GNSS antennas (i.e., GNSS antenna 1 and GNSS antenna 2) are symmetrically disposed on the left and right sides of the riding mower, and acquiring the current heading and the current position coordinates of the riding mower includes:
acquiring position coordinates of two GNSS antennas;
calculating the current heading of the riding mower based on the position coordinates of the two GNSS antennas;
the current position coordinates of the riding mower are calculated based on the position coordinates of the two GNSS antennas and the current heading.
Note that, the coordinate system XOY shown in fig. 3 and 4 is a geodetic coordinate system with the GNSS base station as the origin, that is, the northeast coordinate system, the eastern coordinate X is the eastern position in the geographic coordinate system with the GNSS base station as the origin, the northbound coordinate Y is the northbound position in the geographic coordinate system with the GNSS base station as the origin, and the astronomical coordinate is the astronomical position in the geographic coordinate system with the GNSS base station as the origin. In fig. 3, B represents a wheel track, L represents a baseline length of an on-board GNSS (two GNSS antennas are symmetrically disposed on the left and right sides of the riding mower), H represents a distance from a center of the on-board GNSS to a center of the wheel track O C, and O C represents a center of the wheel track of the driving wheel of the riding mower, which is a calculation point when the riding mower calculates its own position in the XOY coordinate system, that is, coordinates of O C in the XOY coordinate system when the riding mower position is described.
Let the obtained position coordinates of the two GNSS antennas be (x 1,y1)、(x2,y2), the current heading of the riding mower be θ t, and the current position coordinates be (x t,yt), then there are:
The current heading theta t and the current position coordinate (x t,yt) of the riding mower can be calculated by the two formulas respectively.
In one embodiment, the method may further comprise:
When it is determined that the steering mechanism of the riding mower is not in the zero position, the current steering mode of the riding mower is marked as a manual steering mode, and the current linear speed of the riding mower is updated based on the current state information of the steering mechanism.
In this embodiment, if it is determined that the steering mechanism of the riding mower is not in the zero position, that is, it is determined that the user is manually operating the steering mechanism according to the user operation (current state information of the steering mechanism), it is indicated that the constant speed straight running control strategy is not required to be interposed at this time, the current steering mode of the riding mower is marked as the manual driving mode, and the current linear speed of the riding mower is updated based on the current state information of the steering mechanism, so that the riding mower runs according to the user operation.
Specifically, as shown in fig. 2, the current linear velocity v of the mower is calculated as follows:
V max is the maximum linear speed of mower
In one embodiment, the steering mechanism includes a universal handle for controlling the travel speed and travel direction of the riding mower;
As shown in fig. 2, the position of the universal handle in the polar coordinate system is shown schematically, the current position of the universal handle is h, for convenience in calculation, the maximum movement radius of the universal handle is 1024 unit lengths, θ h represents the angle of the universal handle deviating from the Y axis, and the calculation formula of θ h can be known according to the trigonometric function as follows:
Wherein X h and Y h are the X and Y coordinate values, respectively, of the current position of the gimbal handle.
Specifically, in the present embodiment, acquiring current state information of the steering mechanism of the riding mower includes:
in response to an operation for the gimbal handle, current position vector information of the gimbal handle is acquired, wherein the current position vector information includes polar diameter information for characterizing a moving distance of the gimbal handle relative to an initial position (origin of coordinates of a polar coordinate system of the gimbal handle) and polar angle information for characterizing a rotation angle of the gimbal handle relative to a reference direction (Y-axis direction of the polar coordinate system of the gimbal handle).
Specifically, the polar angle information (i.e., θ h) and the polar diameter information of the gimbal can be obtained by calculating the current position coordinate (x h,yh) of the gimbal.
Judging whether the operating mechanism is in a zero position based on the current state information of the operating mechanism comprises:
Judging whether the universal handle is in a zero position according to the pole diameter information in the current position vector information of the universal handle, judging that the universal handle is in the zero position when the absolute value of the pole diameter of the universal handle is smaller than or equal to a preset distance, and otherwise judging that the universal handle is not in the zero position.
It should be noted that the preset distance may be adjusted according to the actual situation.
Specifically, in this embodiment, since the absolute value of the polar diameter of the universal handle is related to the position coordinates of the universal handle, whether the universal handle is in the zero position or not can be determined according to the coordinates of the universal handle, and when |x h | <100 and |y h | <100, the universal handle is determined to be in the zero position, otherwise, the universal handle is determined not to be in the zero position.
In this embodiment, whether the manual operation mode is set is determined according to whether the universal handle is in the zero position, that is, whether the user's operation intention (whether the mower is to be controlled manually or automatically) is determined by detecting the user's operation condition, so that whether the constant-speed straight-line travel control strategy is interposed is determined according to the determined user intention.
In one embodiment, a riding lawn mower includes a travel mechanism and a travel drive mechanism.
The travelling mechanism of the riding mower in the application may be a rear-drive travelling mechanism or a front-drive travelling mechanism. For a riding mower adopting a rear-drive type travelling mechanism, a driven universal wheel is arranged at the front end of the bottom of the mower and is responsible for steering, a left driving wheel and a right driving wheel are symmetrically arranged at the left side and the right side of the rear end of the bottom of the mower and are responsible for driving the mower to travel, and for a riding mower adopting a front-drive type travelling mechanism, a driven universal wheel is arranged at the rear end of the bottom of the mower and is responsible for steering, and a left driving wheel and a right driving wheel are symmetrically arranged at the left side and the right side of the front end of the bottom of the mower and are responsible for driving the mower to travel. Specifically, the driven universal wheels responsible for steering can be arranged in the middle of one end of the bottom of the mower, and two driven universal wheels can be symmetrically arranged on the left side and the right side of one end of the bottom of the mower. In the embodiment, the riding mower structurally cancels the complex steering mechanism, the driving and reversing gear shifting mechanism and other parts, and can realize the motion control of the travelling speed, the travelling direction and the like of the riding mower by controlling the rotation speed difference and the rotation direction of the left driving wheel and the right driving wheel, thereby improving the operation convenience and greatly reducing the equipment cost.
As shown in fig. 3 and 4, the walking mechanism comprises a driven universal wheel, a left driving wheel and a right driving wheel which are arranged at the bottom of the riding mower, and the walking driving mechanism comprises a left driving motor in driving connection with the left driving wheel and a right driving motor in driving connection with the right driving wheel.
In fig. 4, (x t,yt) represents the position coordinate (i.e., the current position coordinate) of the mower at the time t, (x td,ytd) represents the pre-aiming point of the mower at the time t, S d represents the pre-aiming distance, Δd represents the lateral deviation of the mower current position from the target straight line, l preview represents the straight line from the current position to the pre-aiming point at the time t of the mower, θ target represents the target heading, θ t represents the heading at the time t of the mower, Δ θ represents the difference of the pre-aiming heading angles of the mower current heading angle, P f represents the foot of the mower current position on the target straight line, and P preview represents the pre-aiming point.
Correspondingly, controlling the riding mower to travel at a constant speed and a straight line along a target straight line at an updated constant speed cruising target speed based on the pre-aiming following control technology comprises the following steps:
1. Calculating a lateral deviation, Δd, which is the distance from the current mower position (x t,yt) to the target line L target, wherein,
2. Calculating an equation expression of a pretightening straight line, wherein the pretightening straight line L preview is a straight line formed by connecting the current position (x t,yt) of the riding mower to a pretightening point P preview(xpreview,ypreview);
The pre-aiming point is a foot-hanging point P f(xf,yf of the current position (x t,yt) of the mower on a target straight line L target, and a point calculated by adding a pre-aiming distance S d in the advancing direction of the target straight line;
the pretightening distance S d is related to the walking speed of the mower;
s d = mv, m represents a scaling factor (being a constant), v represents the mower travel speed.
A, finding a drop foot P f(xf,yf):
b, calculating the distance from the current position of the mower to the pre-aiming point:
c, calculating a pretightening point P preview(xpreview,ypreview):
xpreview=xt+S×cos(θtarget)
ypreview=xt+S×sin(θtarget)
Thus, the expression of the pretightening straight line L preview and the heading of the pretightening straight line can be calculated.
3. Calculating a heading deviation delta theta between a current heading theta t of the riding mower and a pre-aiming straight line L preview:
Δθ=θpreview-θt
4. Calculating control amounts of a left driving wheel and a right driving wheel when the riding mower runs at a constant speed and a straight line along a target straight line at a constant speed and a cruise target speed by adopting a preset PID control model based on the transverse deviation and the course deviation, wherein the control amounts comprise an angle deviation control amount and a transverse deviation control amount;
wherein:
angle_control, angle deviation control amount
KP angle P parameter of PID of angle deviation control amount
KI angle I parameter of PID of angle deviation control quantity
KD angle D parameter of PID for angle deviation control amount
Hori-control of lateral deviation control quantity
KP d P parameter of PID of angle deviation control amount
KI d I parameter of PID of angle deviation control quantity
KD d D parameter of PID for angle deviation control amount
5. Calculating target rotational speeds of the left and right driving wheels based on the control amounts of the left and right driving wheels;
speed_control_data=K×angle_control-hori_control
vleft=vcurrent+ackerman×speed_control_data
vrigth=vcurrent-(1-ackerman)×speed_control_data
Wherein the method comprises the steps of
V left is the left drive wheel speed
V right is the right drive wheel speed
K, weight of angle control quantity
Ackerman weight of left and right wheel speed control amount
6. And controlling the output voltages of the left driving motor and the right driving motor according to the determined target rotating speeds of the left driving wheel and the right driving wheel, so that the riding mower can travel at a constant speed and a constant speed along a target straight line at a target cruise speed.
As shown in fig. 5, the embodiment of the present invention further provides a constant-speed-cruise control system for a riding mower, where the riding mower is provided with a constant-speed-cruise speed setting module and a constant-speed-cruise switch module, and the system may include:
An operation signal acquisition module 201, configured to acquire a constant-speed-cruise-speed setting operation signal, a constant-speed-cruise switch operation signal, and current state information of an operating mechanism of the riding mower, where the operating mechanism is configured to accept a user operation to control a traveling speed and a traveling direction of the riding mower;
A constant speed cruise speed determination module 202 for determining the current constant speed cruise linear speed of the riding mower based on the constant speed cruise speed setting operation signal;
an operating mechanism state judging module 203, configured to judge whether the operating mechanism is in a zero position based on current state information of the operating mechanism;
The constant-speed-cruise on-state judging module 204 is configured to further judge whether the constant-speed-cruise is in an active on state based on the constant-speed-cruise switch operation signal when it is judged that the steering mechanism of the riding mower is at the zero position;
A constant-speed-cruise target speed updating module 205, configured to update the constant-speed-cruise target speed of the riding mower based on the determined current constant-speed-cruise linear speed when it is determined that the constant-speed-cruise is in a valid on state;
the cruise control module 206 is configured to control the riding mower to perform uniform linear travel along the target straight line at the updated cruise target speed according to the target heading based on the pre-aiming following control technique.
In one embodiment, the system may further comprise:
The course and position acquisition module is used for acquiring the current course and the current position coordinate of the riding mower before updating the constant-speed cruising target speed of the riding mower based on the determined current constant-speed cruising linear speed;
the constant-speed-cruise mode switching judging module is used for judging whether the movement mode of the riding mower is switched from the non-constant-speed-cruise mode to the constant-speed-cruise mode or not based on the constant-speed-cruise switch operation signal;
the first state processing module is used for marking the current heading as a target heading, marking the current movement mode as a constant speed cruising mode and determining an equation expression of a target straight line based on the current heading and the current position coordinates when the riding mower is switched from the non-constant speed cruising mode to the constant speed cruising mode.
In one embodiment, two GNSS antennas are symmetrically arranged on the left and right sides of the riding mower, and the course and position acquisition module is specifically used for when executing the acquisition of the current course and the current position coordinates of the riding mower:
acquiring position coordinates of two GNSS antennas;
calculating the current heading of the riding mower based on the position coordinates of the two GNSS antennas;
the current position coordinates of the riding mower are calculated based on the position coordinates of the two GNSS antennas and the current heading.
In one embodiment, the system may further comprise:
And the second state processing module is used for marking the current control mode of the riding mower as a manual driving mode when the control mechanism of the riding mower is not in a zero position, and updating the current linear speed of the riding mower based on the current state information of the control mechanism.
In one embodiment, the steering mechanism includes a universal handle for controlling the travel speed and travel direction of the riding mower;
accordingly, obtaining current state information of an operating mechanism of the riding mower includes:
Responding to the operation of the universal handle, acquiring current position vector information of the universal handle, wherein the current position vector information comprises polar diameter information and polar angle information, the polar diameter information is used for representing the moving distance of the universal handle relative to an initial position, and the polar angle information is used for representing the rotating angle of the universal handle relative to a reference direction;
judging whether the operating mechanism is in a zero position based on the current state information of the operating mechanism comprises:
Judging whether the universal handle is in a zero position according to the pole diameter information in the current position vector information of the universal handle, judging that the universal handle is in the zero position when the absolute value of the pole diameter of the universal handle is smaller than or equal to a preset distance, and otherwise judging that the universal handle is not in the zero position.
In one embodiment, a riding mower includes a travel mechanism and a travel drive mechanism, wherein,
The walking driving mechanism comprises a left driving motor in driving connection with the left driving wheel and a right driving motor in driving connection with the right driving wheel;
correspondingly, controlling the riding mower to travel at a constant speed and a straight line along a target straight line at an updated constant speed cruising target speed based on the pre-aiming following control technology comprises the following steps:
Calculating a lateral deviation, wherein the lateral deviation is a distance from a current position of the riding mower to a target straight line;
calculating an equation expression of a pretightening line, wherein the pretightening line is a line formed by connecting the current position of the riding mower to a pretightening point;
calculating the course deviation between the current course of the riding mower and the pre-aiming straight line;
calculating control amounts of a left driving wheel and a right driving wheel when the riding mower runs at a constant speed and a straight line along a target straight line at a constant speed and a cruise target speed by adopting a preset PID control model based on the transverse deviation and the course deviation, wherein the control amounts comprise an angle deviation control amount and a transverse deviation control amount;
Calculating target rotational speeds of the left and right driving wheels based on the control amounts of the left and right driving wheels;
and controlling the output voltages of the left driving motor and the right driving motor according to the determined target rotating speeds of the left driving wheel and the right driving wheel, so that the riding mower can travel at a constant speed and a constant speed along a target straight line at a target cruise speed.
The working principle and the beneficial effects of the mower cruise control system in the above embodiment are the same as those of the mower cruise control method in the above embodiment, and are not repeated here.
As shown in fig. 6, the embodiment of the present invention further provides a constant speed cruise control device 3 for a mower, which includes a memory 301, a processor 302, and a computer program 303 stored in the memory 301 and capable of running on the processor 302, wherein the constant speed cruise control method for a mower in any one of the embodiments is implemented when the processor 302 executes the computer program 303.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the constant-speed cruise control method of the mower in any embodiment is realized.
The embodiment of the invention also provides a riding mower, which comprises the mower constant-speed cruise control device.
In the embodiments provided in the present application, it should be understood that the disclosed method and system may be implemented in other manners. The system embodiments described above are merely illustrative, e.g., the division of modules is merely a logical division of functionality, and there may be additional divisions of actual implementation, e.g., multiple modules or components may be combined or integrated into another system, or some features may be omitted or not implemented. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or modules, whether electrically, mechanically, or otherwise.
In addition, each functional module in each embodiment of the invention can be integrated in one processor, or can be respectively and independently used as one device, or can be integrated in one device, or can be realized in a form of hardware or a form of hardware and a software functional unit.
It will be appreciated by those of ordinary skill in the art that implementing all or part of the steps of the above method embodiments may be accomplished by program instructions and associated hardware, and that the program instructions may be stored on a computer readable storage medium which, when executed, performs the steps comprising the above method embodiments, and that the storage medium may comprise a removable storage device, a read only memory (Reud Only Memory, ROM), a magnetic or optical disk, or any other medium capable of storing program code.
It should be appreciated that the use of "systems," "devices," "units," and/or "modules" in this disclosure is but one way to distinguish between different components, elements, parts, portions, or assemblies at different levels. However, if other words can achieve the same purpose, the word can be replaced by other expressions.
As used in the specification and in the claims, the terms "a," "an," "the," and/or "the" are not specific to a singular, but may include a plurality, unless the context clearly dictates otherwise. In general, the terms "comprises" and "comprising" merely indicate that the steps and elements are explicitly identified, and they do not constitute an exclusive list, as other steps or elements may be included in a method or apparatus. The inclusion of an element as defined by the phrase "comprising one does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises an element.
In the description of the embodiment of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B, and "and/or" herein is merely an association relationship describing an association object, which means that three relationships may exist, for example, a and/or B, and that three cases, i.e., a alone, a and B together, and B alone, exist. In addition, in the description of the embodiments of the present application, "plurality" means two or more than two.
The terms "first" and "second" are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature.
If a flowchart is used in the present application, the flowchart is used to describe the operations performed by a system according to an embodiment of the present application. It should be appreciated that the preceding or following operations are not necessarily performed in order precisely. Rather, the steps may be processed in reverse order or simultaneously. Also, other operations may be added to or removed from these processes.
The method, the system, the device, the storage medium and the riding mower for controlling the constant speed cruising of the mower provided by the invention are described in detail. The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.