Disclosure of Invention
In view of the above, the invention provides an unmanned aerial vehicle control method and an unmanned aerial vehicle remote controller, so that when a user rapidly dials a rocker of the unmanned aerial vehicle remote controller, the stability of the unmanned aerial vehicle is ensured, and the situation that the unmanned aerial vehicle is out of control is avoided as much as possible.
The technical scheme of the invention is realized as follows:
an unmanned aerial vehicle control method comprises the following steps that on a remote controller side:
acquiring the position information of an operation part of the unmanned aerial vehicle remote controller at the current moment and the previous moment;
determining a movement change value of the control part from the previous moment to the current moment according to the position information of the control part of the unmanned aerial vehicle remote controller at the current moment and the previous moment;
and when the movement change value of the control part is greater than the set change value threshold value, sending a safe attitude switching instruction to the unmanned aerial vehicle to instruct the unmanned aerial vehicle to switch to a safe flight attitude.
Optionally, the manipulation part is a rocker;
the control part position information of the unmanned aerial vehicle remote controller for acquiring the current moment and the previous moment comprises: acquiring the electric potentials of control signals output by rockers of the unmanned aerial vehicle remote controller at the current moment and the previous moment;
the determining of the movement change value of the control part from the previous moment to the current moment by the position information of the control part of the unmanned aerial vehicle remote controller at the current moment and the previous moment comprises the following steps: determining the potential change value of the control signal output by the rocker in the period from the previous moment to the current moment according to the potentials of the control signals output by the rocker of the unmanned aerial vehicle remote controller at the current moment and the previous moment;
when the control part moves the variation value and is greater than the variation value threshold value of setting for, send safe gesture switching instruction to unmanned aerial vehicle, in order to instruct unmanned aerial vehicle to switch to safe flight gesture, include: and when the potential change value of the control signal output by the rocker is greater than the potential change value threshold of the control signal output by the rocker, sending a safe attitude switching instruction to the unmanned aerial vehicle to indicate that the unmanned aerial vehicle is switched to a safe flight attitude.
Optionally, the manipulation part is a rocker;
the control part positional information of the unmanned aerial vehicle remote controller who obtains present moment and previous moment includes: the method comprises the steps that the rod amount of a rocker of the unmanned aerial vehicle remote controller at the current moment and the previous moment is obtained, wherein the rod amount is the angle relation between the position of the rocker and the reset position of the rocker, and the reset position is the position of the rocker under the action of the reset force of the rocker when the rocker is not acted by an external force;
the determining of the movement change value of the control part from the previous moment to the current moment by the position information of the control part of the unmanned aerial vehicle remote controller at the current moment and the previous moment comprises the following steps: determining the change value of the rod amount of the rocker of the unmanned aerial vehicle remote controller from the previous moment to the current moment according to the rod amounts of the rocker of the unmanned aerial vehicle remote controller at the current moment and the previous moment;
when the control part moves the variation value and is greater than the variation value threshold value of setting for, send safe gesture switching instruction to unmanned aerial vehicle, in order to instruct unmanned aerial vehicle to switch to safe flight gesture, include: and when the change value of the rod amount of the rocker is greater than the threshold value of the rod amount change value of the rocker, sending a safe attitude switching instruction to the unmanned aerial vehicle to indicate that the unmanned aerial vehicle is switched to a safe flight attitude.
Optionally, the method further comprises:
the amount of the stick is acquired using a hall sensor.
Optionally, the safe flight attitude comprises a hover state, a landing state, and a low speed hover state.
Optionally, before acquiring the position information of the manipulation part of the remote controller of the unmanned aerial vehicle at the current time and the previous time, the method further includes:
determining that the unmanned aerial vehicle is in a control section operation protection mode; wherein,
the operation protection mode of the control part indicates that only in the mode, when the movement change value of the control part is larger than the set change value threshold value, a safe attitude switching instruction is sent to the unmanned aerial vehicle, otherwise, when the movement change value of the control part is larger than the set change value threshold value, the safe attitude switching instruction is not sent to the unmanned aerial vehicle.
Optionally, when the movement variation value of the control part is greater than the set variation value threshold, a safe attitude switching instruction is sent to the unmanned aerial vehicle to instruct the unmanned aerial vehicle to switch to the safe flight attitude, and the method further includes, after the safe flight attitude is finished, continuing to execute the step of obtaining the position information of the control part of the unmanned aerial vehicle remote controller at the current moment and the previous moment and subsequent steps thereof.
An unmanned aerial vehicle remote control, comprising:
the control part position information acquisition module is used for acquiring control part position information of the unmanned aerial vehicle remote controller at the current moment and the previous moment;
the control part change value calculation module is connected with the rocker position information acquisition module, receives control part position information of the unmanned aerial vehicle remote controller at the current moment and the previous moment from the control part position information acquisition module, and determines a control part movement change value from the previous moment to the current moment;
and the judgment module is connected with the change value calculation module of the control part and used for judging whether the movement change value of the control part is greater than a set change value threshold value or not and sending a safe attitude switching instruction to the unmanned aerial vehicle when the movement change value of the control part is greater than the set change value threshold value so as to indicate that the unmanned aerial vehicle is switched to a safe flight attitude.
Optionally, the manipulation part is a rocker;
the control part position information acquisition module comprises a rocker control signal potential acquisition module, and the control part control signal potential acquisition module is electrically connected to a control signal output end of the rocker and is used for acquiring the potential of a control signal output by the rocker;
the rocker position information received by the control part change value calculation module is the potential of a control signal output by the rocker;
the movement change value of the control part is the potential change value of the control signal output by the rocker;
the change value threshold is the potential change value threshold of the control signal output by the rocker.
Optionally, the manipulation part is a rocker;
the control position information acquisition module comprises a Hall sensor, and the Hall sensor is used for acquiring the rod quantity of the rocker, wherein the rod quantity is the angular relation between the position of the rocker and the reset position of the rocker, and the reset position is the position of the rocker under the action of the reset force of the rocker when the rocker is not acted by an external force;
the rocker position information received by the control part change value calculation module is the rod amount of the rocker;
the movement change value of the control part is the change value of the rod amount of the rocker;
the change threshold is the rod amount change threshold of the rocker.
Optionally, the drone remote control further comprises:
the trigger module is electrically connected to the control part position information acquisition module and used for triggering the control part position information acquisition module to acquire the control part position information when the unmanned aerial vehicle is in a control part operation protection mode;
the operation protection mode of the control part indicates that only in the mode, when the movement change value of the control part is larger than the set change value threshold value, a safe posture switching instruction is sent to the unmanned aerial vehicle, otherwise, when the movement change value of the control part is larger than the set change value threshold value, the safe posture switching instruction is not sent to the unmanned aerial vehicle.
A non-transitory computer readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the steps in the drone control method of any one of the above.
An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the steps of the drone controlling method of any one of the above.
Because rocker rate of movement has reacted the speed that the user stirred the rocker, and at unmanned aerial vehicle's control process, when the speed that the user stirred the rocker was greater than certain speed, abrupt change will appear in unmanned aerial vehicle's gesture, and this kind of change will influence unmanned aerial vehicle's stability, appears dangerously even for unmanned aerial vehicle appears crashing. According to the scheme, the unmanned aerial vehicle control method and the unmanned aerial vehicle remote controller can determine the rocker movement change value between two adjacent moments by acquiring the rocker position information of the unmanned aerial vehicle remote controller at the two adjacent moments, and when the rocker movement change value is larger than the set change value threshold value, the unmanned aerial vehicle is switched to the safe flight attitude by sending the safe attitude switching instruction to the unmanned aerial vehicle, so that when the user toggles the rocker too fast and too greatly in the process of carrying out remote control operation on the unmanned aerial vehicle, the stable operation of the unmanned aerial vehicle is ensured, and the danger is reduced.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and examples.
As shown in fig. 1, the method for controlling an unmanned aerial vehicle according to the embodiment of the present invention includes the following steps performed on the remote controller side:
step 1, acquiring position information of an operation part of an unmanned aerial vehicle remote controller at the current moment and the previous moment;
step 2, determining a movement change value of the control part from the previous moment to the current moment according to the position information of the control part of the unmanned aerial vehicle remote controller at the current moment and the previous moment;
and 3, when the movement change value of the control part is larger than the set change value threshold value, sending a safe attitude switching instruction to the unmanned aerial vehicle so as to instruct the unmanned aerial vehicle to switch to a safe flight attitude.
The following describes the method for controlling an unmanned aerial vehicle according to an embodiment of the present invention, taking the control unit as a joystick as an example.
Regarding step 1, the rocker position information of the unmanned aerial vehicle remote controller can be acquired by adopting various means.
In alternative embodiments, the rocker position information may be represented by the potential of the control signal output by the rocker or by the amount of the rocker.
In an alternative embodiment, the rocker movement change value may be a rocker movement rate. In an alternative embodiment, the rate may not be calculated, for example, in the case of a certain period, it is also possible to directly compare the variation between two adjacent periods, and in this case, the variation value is not divided by the period to obtain the variation rate.
In an alternative embodiment that the rocker position information is represented by the potential of the control signal output by the rocker, the rocker movement change value is the potential change value of the control signal output by the rocker, and the change value threshold is the potential change value threshold of the control signal output by the rocker.
In an alternative embodiment where the rocker position information is represented by the potential of the control signal output by the rocker:
step 1 acquires the rocker position information of the remote controller of the unmanned aerial vehicle at the current moment and the previous moment, and comprises the following steps: acquiring the electric potentials of control signals output by rockers of the unmanned aerial vehicle remote controller at the current moment and the previous moment;
step 2 is by the rocker position information of unmanned aerial vehicle remote controller at present moment and previous moment, confirms the rocker removal change value during previous moment to present moment, includes: determining the potential change value of the control signal output by the rocker in the period from the previous moment to the current moment according to the potentials of the control signals output by the rocker of the unmanned aerial vehicle remote controller at the current moment and the previous moment;
step 3 when the rocker movement variation value is greater than the variation value threshold value of setting for, send safe gesture to unmanned aerial vehicle and switch the instruction to instruct unmanned aerial vehicle to switch to safe flight gesture, include: when the potential variation value of the control signal output by the rocker is larger than the potential variation value threshold value of the control signal output by the rocker, a safe attitude switching instruction is sent to the unmanned aerial vehicle to indicate the unmanned aerial vehicle to be switched to a safe flight attitude.
In an alternative embodiment where the rocker position information is represented by the potential of the control signal output by the rocker, the rocker movement change value is the rocker movement rate, which is: the potential change rate of the control signal output by the rocker from the previous moment to the current moment; the variance threshold is: and the potential change rate threshold of the control signal output by the rocker.
In an optional embodiment in which the rocker position information is represented by the potential of the control signal output by the rocker, the rocker movement change value may be represented by the potential change rate of the control signal output by the rocker, the change value threshold may be set for the potential change rate of the control signal output by the rocker, the change value threshold at this time may be referred to as a rate threshold, and the size of the specific potential change rate threshold may be set according to needs and experience. In this optional embodiment, the potential of the control signal output by the rocker may be collected at the previous time by a potential information collection module, and the potential of the control signal output by the rocker may be collected at the current time. How to acquire the electric potential of the control signal output by the rocker can be realized by adopting the prior art, and the details are not repeated here.
In an alternative embodiment, where the rocker position information is represented by the potential of the control signal output by the rocker, and the rocker movement change value is represented by the rate of change of the potential of the control signal output by the rocker:
step 1 acquires the rocker position information of the remote controller of the unmanned aerial vehicle at the current moment and the previous moment, and comprises the following steps: acquiring the electric potentials of control signals output by rockers of the unmanned aerial vehicle remote controller at the current moment and the previous moment;
step 2 is by the rocker position information of unmanned aerial vehicle remote controller at present moment and previous moment, confirms the rocker removal change value during previous moment to present moment, includes: determining the potential change rate of the control signal output by the rocker in the period from the previous moment to the current moment according to the potentials of the control signals output by the rocker of the unmanned aerial vehicle remote controller at the current moment and the previous moment;
step 3 when the rocker movement variation value is greater than the variation value threshold value of setting for, send safe gesture to unmanned aerial vehicle and switch the instruction to instruct unmanned aerial vehicle to switch to safe flight gesture, include: when the potential change rate of the control signal output by the rocker is greater than the potential change rate threshold of the control signal output by the rocker, a safe attitude switching instruction is sent to the unmanned aerial vehicle to indicate the unmanned aerial vehicle to be switched to a safe flight attitude.
In an optional embodiment in which the rocker position information is represented by the potential of the control signal output by the rocker, the rocker movement change value may be represented by the potential change amount of the control signal output by the rocker between two adjacent periods, the change value threshold may be set for the potential change amount of the control signal output by the rocker, the change value threshold at this time may be referred to as a change amount threshold, and the size of the specific potential change amount threshold may be set according to needs and experience. In this optional embodiment, the potential of the control signal output by the rocker may be collected at the previous time by a potential information collection module, and the potential of the control signal output by the rocker may be collected at the current time. How to acquire the electric potential of the control signal output by the rocker can be realized by adopting the prior art, and the details are not repeated here.
In an alternative embodiment, where the rocker position information is represented by the potential of the control signal output by the rocker, and the rocker movement change value is represented by the amount of change in the potential of the control signal output by the rocker:
step 1 acquires the rocker position information of the remote controller of the unmanned aerial vehicle at the current moment and the previous moment, and comprises the following steps: acquiring the electric potentials of control signals output by rockers of the unmanned aerial vehicle remote controller at the current moment and the previous moment;
step 2 is by the rocker position information of unmanned aerial vehicle remote controller at present moment and previous moment, confirms the rocker removal change value during previous moment to present moment, includes: determining the potential variation of the control signal output by the rocker of the unmanned aerial vehicle remote controller from the previous moment to the current moment according to the potentials of the control signal output by the rocker of the unmanned aerial vehicle remote controller at the current moment and the previous moment;
step 3 when the rocker movement variation value is greater than the variation value threshold value of setting for, send safe gesture to unmanned aerial vehicle and switch the instruction to instruct unmanned aerial vehicle to switch to safe flight gesture, include: when the potential variation of the control signal output by the rocker is greater than the potential variation threshold of the control signal output by the rocker, a safe attitude switching instruction is sent to the unmanned aerial vehicle to indicate that the unmanned aerial vehicle is switched to a safe flight attitude.
In an alternative embodiment, in which the rocker position information is represented by the lever amount of the rocker, the rocker movement change value is a change value of the lever amount of the rocker, and the change value threshold is a lever amount change value threshold of the rocker. The lever amount refers to an angle relation between the position of the rocker and the reset position of the rocker, and the reset position refers to the position of the rocker under the action of the reset force of the rocker when the rocker is not acted by an external force. In an alternative embodiment, the amount of the rocker may be obtained from the rocker by a hall sensor.
In an alternative embodiment, where the rocker position information is represented by the amount of the rocker:
step 1 acquires the rocker position information of the remote controller of the unmanned aerial vehicle at the current moment and the previous moment, and comprises the following steps: acquiring the rod amount of a rocker of the unmanned aerial vehicle remote controller at the current moment and the previous moment;
step 2 is by the rocker position information of unmanned aerial vehicle remote controller at present moment and previous moment, confirms the rocker removal change value during previous moment to present moment, includes: determining the change value of the rod amount of the rocker of the unmanned aerial vehicle remote controller from the previous moment to the current moment according to the rod amounts of the rocker of the unmanned aerial vehicle remote controller at the current moment and the previous moment;
step 3 when the rocker movement variation value is greater than the variation value threshold value of setting for, send safe gesture to unmanned aerial vehicle and switch the instruction to instruct unmanned aerial vehicle to switch to safe flight gesture, include: when the change value of the rod amount of the rocker is larger than the rod amount change value threshold value of the rocker, a safe attitude switching instruction is sent to the unmanned aerial vehicle to indicate that the unmanned aerial vehicle is switched to a safe flight attitude.
In an alternative implementation where the rocker position information is represented by the amount of the rocker, the rocker movement variation value is the rocker movement rate, which is: a rate of change of a lever amount of the rocker during a previous time to a current time; the variance threshold is: a rate of change threshold of a lever amount of the rocker lever.
In an alternative embodiment where the rocker position information is represented by the lever amount of the rocker and the rocker movement change value is represented by the rate of change of the lever amount of the rocker:
step 1 acquires the rocker position information of the remote controller of the unmanned aerial vehicle at the current moment and the previous moment, and comprises the following steps: acquiring the rod amount of a rocker of the unmanned aerial vehicle remote controller at the current moment and the previous moment;
step 2 is by the rocker position information of unmanned aerial vehicle remote controller at present moment and previous moment, confirms the rocker removal change value during previous moment to present moment, includes: determining the change rate of the rod amount of a rocker of the unmanned aerial vehicle remote controller from the previous moment to the current moment according to the rod amount of the rocker at the current moment and the previous moment;
step 3 when the rocker movement variation value is greater than the variation value threshold value of setting for, send safe gesture to unmanned aerial vehicle and switch the instruction to instruct unmanned aerial vehicle to switch to safe flight gesture, include: and when the change rate of the rod amount of the rocker is greater than the rod amount change rate threshold value of the rocker, sending a safe attitude switching instruction to the unmanned aerial vehicle to indicate the unmanned aerial vehicle to be switched to a safe flight attitude.
In embodiments where the rocker position information is represented by a lever amount of the rocker and the rocker movement change value is represented by a lever amount change rate of the rocker, the lever amount change rate threshold may be set for the lever amount change rate of the rocker. In this alternative embodiment, the remote control may acquire the stick amount using a hall sensor.
In this alternative embodiment, the lever amount of the rocker may be acquired at the previous time and the lever amount of the rocker may be acquired at the present time by the hall sensor. How to specifically acquire the lever amount of the rocker by using the hall sensor can be realized by adopting the prior art, and the details are not repeated here. The size of the specific stick rate threshold may be set as desired and empirically.
In an alternative implementation in which the rocker position information is represented by the lever amount of the rocker, the rocker movement change value may be represented by a change amount of the lever amount of the rocker between two adjacent cycles, i.e., a change amount of the lever amount of the rocker during a period from a previous time to a current time; the variance threshold is: and the rod amount of the rocker is changed by a threshold value.
In an alternative embodiment where the rocker position information is represented by the amount of the rocker and the rocker movement change value is represented by the amount of change in the amount of the rocker's lever:
step 1 acquires the rocker position information of the remote controller of the unmanned aerial vehicle at the current moment and the previous moment, and comprises the following steps: acquiring the rod amount of a rocker of the unmanned aerial vehicle remote controller at the current moment and the previous moment;
step 2 is by the rocker position information of unmanned aerial vehicle remote controller at present moment and previous moment, confirms the rocker removal change value during previous moment to present moment, includes: determining the rod amount variation of a rocker of an unmanned aerial vehicle remote controller from the previous moment to the current moment according to the rod amounts of the rocker at the current moment and the previous moment;
step 3 when the rocker movement variation value is greater than the variation value threshold value of setting for, send safe gesture to unmanned aerial vehicle and switch the instruction to instruct unmanned aerial vehicle to switch to safe flight gesture, include: when the rod amount variation of the rocker is larger than the rod amount variation threshold of the rocker, a safe attitude switching instruction is sent to the unmanned aerial vehicle to indicate that the unmanned aerial vehicle is switched to a safe flight attitude.
In an embodiment in which the rocker position information is represented by the amount of the rocker, and the rocker movement change value is represented by the amount of change in the amount of the rocker, the threshold amount of change in the amount of the rocker may be set for the amount of change in the amount of the rocker. In this alternative embodiment, the remote control may acquire the stick amount using a hall sensor.
In this alternative embodiment, the lever amount of the rocker may be acquired at the previous time and the lever amount of the rocker may be acquired at the present time by the hall sensor. How to specifically acquire the lever amount of the rocker by using the hall sensor can be realized by adopting the prior art, and the details are not repeated here. The magnitude of the specific stick amount variation threshold may be set as desired and empirically.
In an optional embodiment, if the rocker movement variation value is smaller than the set variation value threshold, the safety posture switching instruction is not sent to the unmanned aerial vehicle. Under this condition, the rocker movement variation value is less, can not cause unmanned aerial vehicle's out of control because the rocker speed is too fast or amplitude variation is too big, consequently in optional embodiment, under the condition that the rocker movement variation value is less than the variation threshold value of settlement, the remote controller can send the control command that receives (like the control command of operator through the input such as rocker, button of remote controller) to unmanned aerial vehicle's flight of control.
In the embodiment of the invention, the current time and the previous time are the time of two adjacent sampling periods in the rocker. The duration between the current time and the previous time is the duration of one sampling period, wherein the sampling period can be set according to actual requirements. Since the user is momentarily presented with a rapid toggle motion of the joystick, the duration of the sampling period is not necessarily set to be too long, and the sampling period may be set to be on the order of microseconds to milliseconds, for example, several microseconds to several hundred milliseconds.
The following takes two scenarios as an example to further explain the unmanned aerial vehicle control method of the embodiment of the invention.
Scene one
In scenario one, after step 3 is executed, the process of step 1 to step 3 is further included after the safe flight attitude is finished. The details are as follows.
At time T0, the stick amount is 1;
at time T1, executing a flow of the unmanned aerial vehicle control method of the embodiment of the present invention (where time T1 and time T0 are times of two adjacent sampling periods in the joystick), finding that the joystick amount is 10 and the speed change exceeds a threshold, sending a safety attitude switching instruction to the unmanned aerial vehicle by the remote controller, and switching the unmanned aerial vehicle to a safety flight attitude, where in an alternative embodiment, the safety flight attitude is, for example, a hovering attitude, the safety flight attitude lasts at least for a preset time and detects that the joystick returns to a reset position, the preset time may be set according to actual needs, for example, the preset time may be 1 second, 5 seconds, 10 seconds, and the like, and in other alternative embodiments, the safety flight attitude is, for example, landed on the ground;
at time T0' after the safe flight attitude ends, the amount of the rocker is 0 because the rocker has been restored to the reset position;
at a time T1 ', executing a flow of the unmanned aerial vehicle control method of the embodiment of the present invention once (where the time T1 ' and the time T0 ' are the time of two adjacent sampling periods in the joystick), if a joystick movement change value (for example, a joystick amount) from the time T0 ' to the time T1 ' is not greater than a set change value threshold, then not sending a safe attitude switching instruction to the unmanned aerial vehicle, sending a control instruction of the joystick to the unmanned aerial vehicle by the remote controller to control the flight of the unmanned aerial vehicle, and if the joystick movement change value (for example, the joystick amount) from the time T0 ' to the time T1 ' is greater than the set change value threshold, then sending a safe attitude switching instruction to the unmanned aerial vehicle by the remote controller, and switching the unmanned aerial vehicle to a safe flight attitude;
if the change value (such as the stick amount) of the movement of the rocker from the time T0 ' to the time T1 ' is not greater than the set change value threshold, the process of the unmanned aerial vehicle control method of the embodiment of the invention is continuously executed once at the time T2 ' (wherein the time T2 ' and the time T1 ' are the time of two adjacent sampling periods in the rocker), if the change value (such as the stick amount) of the movement of the rocker from the time T1 ' to the time T2 ' is not greater than the set change value threshold, a safe attitude switching command is not sent to the unmanned aerial vehicle, the remote controller sends the control command of the rocker to the unmanned aerial vehicle to control the flight of the unmanned aerial vehicle, and if the change value (such as the stick amount) of the movement of the rocker from the time T1 ' to the time T2 ' is greater than the set change value threshold, the remote controller sends the safe attitude switching command to the unmanned aerial vehicle to switch to the safe attitude.
Scene two
Unmanned aerial vehicle is flying, discovers at a certain moment that unmanned aerial vehicle will hit the barrier, at this moment to inexperienced operator, makes the rocker remove the variation value and be greater than the variation value threshold value of setting for unmanned aerial vehicle switches to safe flight gesture through stirring the rocker rapidly, and unmanned aerial vehicle hover, descend and belong to the action of carrying out in the safe flight gesture, consequently can avoid unmanned aerial vehicle to hit the barrier at safe flight gesture.
In an optional embodiment, regarding the determination of the rocker movement variation value from the previous time to the current time in step 2, and the comparison between the rocker movement variation value and the variation threshold value in step 3, a dedicated calculation judgment module may be adopted for implementation, and may also be implemented by a central processing unit in the drone remote controller.
Wherein, the rocker movement variation value is determined by the following process:
and subtracting the rocker position at the current moment from the rocker position at the previous moment to obtain the change distance (namely the change value) of the rocker positions at the current moment and the previous moment.
Further, in an alternative embodiment, if the rocker movement rate is to be obtained, then:
and dividing the change distance of the positions of the rocker at the current moment and the previous moment by the sampling period to obtain the movement rate of the rocker.
Further, in an alternative embodiment where the rocker position information is represented by the potential of the control signal output by the rocker, the rocker movement change value is determined by:
and subtracting the potential of the control signal output by the rocker at the current moment from the potential of the control signal output by the rocker at the previous moment to obtain the potential change difference value of the control signals output by the rockers at the current moment and the previous moment.
Further, in an alternative embodiment, if the rate of change of the potential of the control signal is to be obtained, then:
and dividing the potential change difference value of the control signals output by the rocker at the current moment and the previous moment by the sampling period to obtain the potential change rate of the control signals output by the rocker, wherein the movement rate of the rocker is represented by the potential change rate of the control signals output by the rocker.
Further, in an alternative embodiment where the rocker position information is represented by the amount of the rocker, the rocker movement variation value is determined by:
and subtracting the rod amount of the rocker at the current moment from the rod amount of the rocker at the previous moment to obtain the rod amount change difference (namely the change value) of the rocker at the current moment and the previous moment.
Further, in an alternative embodiment, if the rate of change of the lever amount of the rocker is to be obtained, then:
and dividing the rod quantity change difference value of the rocker at the current moment and the previous moment by the sampling period to obtain the rod quantity change rate of the rocker, wherein the movement rate of the rocker is represented by the rod quantity change rate of the rocker.
In an optional embodiment, the sending of the safety posture switching instruction to the drone in step 3 may be implemented by using an existing technology, for example, by using an existing drone remote control instruction mode, and details are not described here.
In an alternative embodiment, in relation to step 3, the drone switches to a safe flight attitude. The safe flight attitude may include, among other things, a hover state, a landing state, and a low-speed hover state. In other alternative embodiments, the safe flight attitude may not be limited to only the hovering state, the landing state, and the low-speed hovering state, but other states such as various states that enable the drone to fly smoothly may be used as the safe flight attitude of the drone. The unmanned aerial vehicle side switching safety flight attitude can be realized by the prior art, and the details are not repeated here.
In alternative embodiments, the drone may have multiple flight states, such as a manual control state, a smart flight state, and the like. The manual control state refers to the flight state of the unmanned aerial vehicle remotely and manually controlled by an operator through an unmanned aerial vehicle remote controller, and comprises actions of manually controlling take-off, landing, cruising, ascending, descending, advancing, retreating, hovering, accelerating, decelerating, swinging and the like of the unmanned aerial vehicle; the intelligent flight state means that the unmanned aerial vehicle automatically performs actions such as takeoff, landing, cruising, ascending, descending, advancing, retreating, hovering, accelerating, decelerating, swinging and the like according to a built-in control program.
The unmanned aerial vehicle control method of the embodiment of the invention also comprises the judgment of the flight state of the unmanned aerial vehicle, which is specifically as follows.
In an alternative embodiment, the drone control method is performed when the drone is in a control section operation protection mode (such as a joystick operation protection mode). Further, in an optional embodiment, before acquiring the rocker position information of the remote controller of the drone at the current time and the previous time in step 1, the drone control method may further include the following steps:
and determining whether the unmanned aerial vehicle is in a rocker operation protection mode, if so, sending a safety attitude switching instruction to the unmanned aerial vehicle when the rocker movement change value is larger than a set change value threshold, and otherwise, not sending the safety attitude switching instruction to the unmanned aerial vehicle when the rocker movement change value is larger than the set change value threshold.
The rocker operation protection mode indicates that the unmanned aerial vehicle control method provided by the embodiment of the invention is executed in the mode, the unmanned aerial vehicle control method provided by the embodiment of the invention is not executed in the rocker operation protection mode, the rocker movement change value from the previous moment to the current moment is determined through the unmanned aerial vehicle control method provided by the embodiment of the invention only in the rocker operation protection mode, and the subsequent related operation of indicating the unmanned aerial vehicle to switch to the safe flight attitude is executed when the rocker movement change value is greater than the set change value threshold, so that the unmanned aerial vehicle does not execute flight action according to the rocker movement change value greater than the change value threshold. The rocker operation protection mode can be started when the unmanned aerial vehicle is in an intelligent flight state, the intelligent flight state belongs to an auxiliary flight mode, and mainly aims at inexperienced operators, the rocker operation protection mode is enabled when the unmanned aerial vehicle is in the intelligent flight state, the unmanned aerial vehicle control method disclosed by the embodiment of the invention is executed under the condition, the situation that the unmanned aerial vehicle runs stably when the inexperienced operators stir rockers too fast and too large in the process of carrying out remote control operation on the unmanned aerial vehicle can be prevented, and the occurrence of danger is avoided. In an optional embodiment, when the unmanned aerial vehicle is in the manual control mode, the unmanned aerial vehicle control method of the embodiment of the present invention is not performed, because when the unmanned aerial vehicle is in the manual control mode, an operator may need to perform various special-effect flights on the unmanned aerial vehicle through a rocker, where there may be a rapid and large-amplitude toggling action for the rocker, and at this time, if the unmanned aerial vehicle control method of the embodiment of the present invention is adopted, the control on the unmanned aerial vehicle may be affected.
The embodiment of the invention also provides an unmanned aerial vehicle remote controller, as shown in fig. 2, the unmanned aerial vehicle remote controller comprises an operation part position information acquisition module 1, an operation part change value calculation module 2 and a judgment module 3. The control part position information acquisition module 1 is used for acquiring control part position information of the unmanned aerial vehicle remote controller at the current moment and the previous moment. The control part change value calculation module 2 is connected to the control part position information acquisition module 1 to receive the control part position information of the unmanned aerial vehicle remote controller at the current moment and the previous moment from the control part position information acquisition module 1, and to determine the control part movement change value from the previous moment to the current moment. The judgment module 3 is connected to the control part change value calculation module 2 and used for judging whether the control part movement change value is larger than a set change value threshold value or not and sending a safety attitude switching instruction to the unmanned aerial vehicle when the control part movement change value is larger than the set change value threshold value so as to instruct the unmanned aerial vehicle to switch to a safety flight attitude.
The following describes the remote controller of the unmanned aerial vehicle according to the embodiment of the present invention, taking the operation and control unit as a joystick.
In an alternative embodiment, the rocker position information may be represented by the electrical potential of the control signal output by the rocker, and the rocker position information may also be represented by the amount of the rocker.
Fig. 3 shows an optimized structure of the remote controller structure of the unmanned aerial vehicle shown in fig. 2. As shown in fig. 3, the control portion position information acquiring module 1 may include a joystick control signal potential acquiring module 11 and a hall sensor 12.
The rocker control signal potential acquisition module 11 is electrically connected to a control signal output end of the rocker and used for acquiring the potential of the control signal output by the rocker, the rocker position information received by the control part change value calculation module 2 is the potential of the control signal output by the rocker, the rocker movement change value is the potential change value of the control signal output by the rocker, and the change value threshold is the potential change value threshold of the control signal output by the rocker.
The hall sensor 12 is used for acquiring a lever amount of the rocker, wherein the lever amount is an angular relationship between a position of the rocker and a reset position of the rocker, and the reset position is a position of the rocker under the action of a reset force of the rocker when the rocker is not acted by an external force. The rocker position information received by the control part change value calculation module 2 is the rod amount of the rocker, the rocker movement change value is the change value of the rod amount of the rocker, and the change value threshold is the rod amount change value threshold of the rocker.
When the Hall sensor 12 is adopted, the Hall sensor 12 and the rocker adopt a non-contact connection relation, the magnet is installed on the rocker, the magnet can generate position change along with the rocking of the rocker, and the Hall sensor 12 can sense the rocking angle of the rocker through the position change of the magnet on the rocker. The working principle of the hall sensor belongs to the prior art, and is not described in detail here.
In an alternative embodiment, both the rocker control signal potential acquisition module 11 and the hall sensor 12 may alternatively be employed. The rocker position information acquiring module 1 may include one of the rocker control signal potential acquiring module 11 and the hall sensor 12, or may include both the rocker control signal potential acquiring module 11 and the hall sensor 12, and when the rocker position information is acquired, one of the rocker control signal potential acquiring module 11 and the hall sensor 12 may be selected for acquisition.
As shown in fig. 4, in another embodiment of the drone remote controller of the present invention, the drone remote controller further includes a trigger module 4. The trigger module 4 is connected in the acquisition module 1 of control portion positional information for when unmanned aerial vehicle is in the rocker operation protection mode trigger control portion positional information acquisition module 1 to the acquisition of the rocker positional information of unmanned aerial vehicle remote controller. The rocker operation protection mode indicates that the unmanned aerial vehicle control method provided by the embodiment of the invention is executed in the mode, the unmanned aerial vehicle control method provided by the embodiment of the invention is not executed in the rocker operation protection mode, the rocker movement change value from the previous moment to the current moment is determined through the unmanned aerial vehicle control method provided by the embodiment of the invention only in the rocker operation protection mode, and the subsequent related operation of indicating the unmanned aerial vehicle to switch to the safe flight attitude is executed when the rocker movement change value is greater than the set change value threshold, so that the unmanned aerial vehicle does not execute flight action according to the rocker movement change value greater than the change value threshold.
In alternative embodiments, the manipulation part change value calculation module 2 and the decision module 3 may be implemented by a dedicated calculation module (e.g., a microprocessor chip, a programmable gate array, etc.), or by a central processing unit in the drone remote controller.
In an alternative embodiment, the above-mentioned drone control method may be implemented by a program, which may be stored in a computer-readable storage medium, and when executed, the program may include the procedures of the above-mentioned drone control method in the respective embodiments. The storage medium is, for example, a magnetic disk, an optical disk, a hard disk drive, a flash Memory, a Read-only Memory (ROM), a Random Access Memory (RAM), or the like.
In addition, the unmanned aerial vehicle control method and the unmanned aerial vehicle remote controller can also be realized by combining special hardware, general hardware and software and the like. The dedicated hardware may include a field programmable gate array, an application specific integrated circuit, etc., and the general-purpose hardware may include a central processing unit, a microprocessor, a digital signal processor, etc.
Furthermore, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, which stores instructions that, when executed by a processor, cause the processor to execute the steps in the drone control method as described in the above embodiments.
An embodiment of the present invention further provides an electronic device for executing the method for controlling an unmanned aerial vehicle, where as shown in fig. 5, the electronic device includes: at least one processor 21 and a memory 22. The memory 22 is communicatively coupled to the at least one processor 21, for example, the memory 22 and the at least one processor 21 are coupled via a bus. The memory 22 stores instructions executable by the at least one processor 21 to cause the at least one processor 21 to perform the steps of the drone controlling method as described in the foregoing description.
Because rocker rate of movement has reacted the speed that the user stirred the rocker, and at unmanned aerial vehicle's control process, when the speed that the user stirred the rocker was greater than certain speed, abrupt change will appear in unmanned aerial vehicle's gesture, and this kind of change will influence unmanned aerial vehicle's stability, appears dangerously even for unmanned aerial vehicle appears crashing. According to the unmanned aerial vehicle control method and the unmanned aerial vehicle remote controller, rocker movement change values between two adjacent moments are determined by collecting rocker position information of the unmanned aerial vehicle remote controller at the two adjacent moments, and when the rocker movement change values are larger than a set change value threshold value, the unmanned aerial vehicle is switched to a safe flight attitude by sending a safe attitude switching instruction to the unmanned aerial vehicle, so that when a user toggles a rocker too fast and too large in the process of remotely controlling the unmanned aerial vehicle, stable operation of the unmanned aerial vehicle is ensured, and danger is reduced.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.