Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Referring to fig. 1, a schematic structural diagram of an aircraft according to a preferred embodiment of the present invention is shown. The aircraft 100 of the present invention may be an unmanned aerial vehicle, such as a UAV (unmanned aerial vehicle). The aircraft 100 comprises an aircraft housing 140 and an obstacle avoidance device mounted on the aircraft housing 140. Preferably, the number of the obstacle avoidance devices is four, and the four obstacle avoidance devices are respectively and correspondingly arranged at four preset positions of the aircraft casing 140. Wherein the four preset positions are set according to the direction of movement of the aircraft 100. For example, the plane shown in fig. 1 is a top view of the aircraft 100, and in the plane shown in fig. 1, the aircraft 100 can move in four directions, namely, forward, backward, leftward and rightward, and the four preset positions are the upper side, the lower side, the left side and the right side of the housing 140, i.e., the A, B, C and the D positions in fig. 1.
The obstacle avoidance device includes a signal light emitting device 110, a signal light receiving device 120 and a signal processing device 130, and both the signal light emitting device 110 and the signal light receiving device 120 are coupled to the signal processing device 130.
The Signal Processing Device 130 is disposed in the aircraft casing, and the Signal Processing Device 130 may be a single chip microcomputer chip, a single chip microcomputer system, a Field Programmable Gate Array (FPGA) chip, a Digital Signal Processing (DSP) chip, or a control chip such as a Complex Programmable Logic Device (CPLD). Additionally, where ports or chips of the flight control system of the aircraft 100 are abundant, the signal processing device 130 may be a processor within the flight control system of the aircraft 100. Preferably, in the embodiment of the present invention, the signal processing device 130 is a single chip.
It should be noted that, in the embodiment of the present invention, the signal light emitting device 110 may be an infrared light emitting device, and the signal light receiving device 120 is an infrared light receiving device. Of course, the signal light emitting device and the signal light receiving device may also employ devices that detect optical signals of other wavelength bands, where the wavelength band of the signal light emitted by the signal light emitting device matches the wavelength band of the signal light received by the signal light receiving device.
The signal light emitting device 110 may include an infrared transmitting tube for transmitting an infrared light signal. The circuit principle of the signal light emitting device 110 is shown in fig. 2, and the signal light emitting device 110 includes: the infrared emitting diode comprises a first resistor R1, an infrared emitting tube D1, a first field effect tube Q1, a diac D3, a second diode D2 and a second resistor R2. One end of the first resistor R1 is connected to a power supply, the other end of the first resistor R1 is coupled to the anode of the infrared emitter tube D1, the cathode of the infrared emitter tube D1 is coupled to the drain of the first field effect tube Q1, and the gate of the first field effect tube Q1 is connected to a General Purpose Input/Output port (GPIO) of a single chip microcomputer, for example, an IR _ TX _3 pin of the single chip microcomputer. In the embodiment of the invention, one GPIO of the singlechip drives the infrared transmitting tube to work, a transmitting protocol adopts a Universal Asynchronous Receiver Transmitter (UART) protocol, the transmitting data width is 8bit, the data range is 0x 00-0 xFF, the drain electrode of a first field effect tube Q1 is coupled with the cathode of a second diode D2, the anode of the second diode D2 is coupled with the source electrode of the first field effect tube Q1, the source electrode of the first field effect tube Q1 is grounded, the grid electrode of the first field effect tube Q1 is respectively connected with the bidirectional breakdown diode D3 and a second resistor R2 in series and then is grounded, and the singlechip controls the first field effect tube Q1 to be switched on or switched off so as to control the infrared transmitting tube D1 to be switched on or switched off.
In the embodiment of the invention, the infrared emission tube D1 can select different emission angles according to the detection range, and the first field effect tube Q1 is a P-MOSFET.
In fig. 2, the voltage used by the infrared emission tube is 3.3V, the first resistor R1 is an adjustable resistor, the transmission power of the infrared emission tube D1 can be adjusted by adjusting the resistance of the first resistor R1, and the detection distance can be adjusted by adjusting the resistance of the first resistor R1. The resistance of the first resistor R1 changes, and the current driven by the ir transmitting tube D1 changes, and the power is equal to the product of the voltage and the current, so that the voltage is constant, the current determines the power, and the transmitting power determines the detecting distance.
The first resistor R1 may be packaged with 1206 to account for power consumption requirements. If the power of the infrared transmitting tube D1 is small, the first resistor R1 can be packaged by 0805, 0603 or 0402.
In addition, the schematic circuit diagram of the signal light emitting device 110 shown in fig. 2 may also be appropriately changed, as shown in fig. 3, the signal light emitting device 110 includes: a third resistor R3, a second field effect transistor Q2 and an infrared emission tube D1. One end of the third resistor R3 is connected with a power supply, and the other end is connected with the source electrode of the second field effect transistor Q2. The grid electrode of the second field effect transistor Q2 is connected with the universal asynchronous receiving and transmitting serial port of the singlechip, and the drain electrode is connected with the infrared transmitting tube D1 in series and then grounded.
The infrared emission tube D1, the third resistor R3 and the second field effect tube Q2 in fig. 3 are selected according to the corresponding embodiment in fig. 2. The second field effect transistor Q2 is an N-MOSFET. The third resistor R3 is also a variable resistor and performs the same function as the embodiment shown in fig. 2. In the embodiment of the present invention, the emission power of the infrared emission tube D1 is greater than or equal to the predetermined value, in the embodiment of the present invention, the predetermined value may be 150mW, and of course, the infrared emission tube D1 may also set different emission powers according to the detection distance.
Please refer to fig. 4, which is a block diagram of the signal light receiver 120. The signal light receiving device 120 includes a signal light receiving tube for converting the received signal light into an electrical signal and a processing module. When the selected signal light is infrared light, the signal light receiving tube is an infrared receiving tube, and the infrared receiving tube is used for converting the received infrared light signal into an electric signal. The processing module is used for converting the electric signal into an analog signal, amplifying the analog signal, filtering noise in the analog signal, converting the denoised analog signal into a digital signal and sending the digital signal to a signal processing device. Specifically, the infrared receiving tube includes an infrared photodiode D4 and a processing module, and the processing module includes: a transimpedance amplifier 201, a gain control circuit 202, a filter 203 and an analog-to-digital converter 204 coupled in sequence. The signal light receiving device 120 further includes a transistor Q3, an anode terminal of the infrared photodiode D4 is grounded, a cathode terminal of the infrared photodiode D4 is coupled to the transimpedance amplifier 201, the analog-to-digital converter 204 is coupled to a base of the transistor Q3, an emitter of the transistor Q3 is grounded, and a collector of the transistor Q3 is connected to a power supply through a pull-up resistor Rpu.
The infrared photodiode D4 is used to convert the received optical signal into an electrical signal when receiving the signal light. The transimpedance amplifier 201 is configured to convert the electrical signal into an analog signal, the gain control circuit 202 is configured to amplify the analog signal, the filter 203 is configured to filter noise in the analog signal, and the analog-to-digital converter 204 is configured to convert the denoised analog signal into a digital signal and send the digital signal to a signal processing device. And the collector of the triode Q3 is used as an output end for outputting the digital pulse signal, and the digital pulse signal is sent to the signal processing device. The amplitude of the signal output by the collector of the transistor Q3 is related to the voltage input to the pull-up resistor Rpu, and the duty cycle of the output signal is related to the data information of the signal received by the infrared photodiode D4.
Therefore, in the embodiment of the present invention, the infrared receiving tube is an integrated tube, and a processing module capable of implementing the above functions is integrated inside the infrared receiving tube. The infrared receiving tube in the invention can greatly reduce peripheral devices, and received signals can directly enter signal processing devices such as a singlechip and the like only through a simple hardware filter circuit and the like.
In the embodiment of the present invention, a specific circuit principle of the signal light receiving device 120 is shown in fig. 5, where the signal light receiving device 120 includes: in the embodiment of the present invention, an infrared photodiode D4 and a processing module are integrated in the infrared receiving tube U1, wherein the fourth resistor R4, the first capacitor C1, the second capacitor C2 and the infrared receiving tube U1 are integrated in the fourth resistor R4, the first capacitor C1, the second capacitor C2 and the infrared receiving tube U1. One end of the fourth resistor R4 is connected with a power supply, the other end of the fourth resistor R4 is respectively coupled with one end of the first capacitor C1, one end of the second capacitor C2 and a power supply end of the infrared receiving tube U1, the other end of the first capacitor C1 and the other end of the second capacitor C2 are both grounded, and the output end of the infrared receiving tube U1 is coupled with a UART serial port of a single chip microcomputer, such as a UART-RX port of the single chip microcomputer.
The infrared receiver U1 used in this example is modulated by 38Khz carrier wave, but may also use 36Khz, 40Khz, 56Khz, etc. related carrier waves, which are not necessarily described in this embodiment. It should be noted that if the carrier frequency of the infrared receiving tube U1 changes, the carrier signal emission of the corresponding infrared transmitting tube D1 should also change accordingly.
The four groups of obstacle avoidance devices in fig. 1 have the same electrical principle, and are sent to a single chip microcomputer for unified processing after passing through a processing circuit, four control signals of an infrared transmitting tube are respectively connected to four GPIOs (general purpose input/output) of the single chip microcomputer, and four receiving signals are uniformly connected to a UART-RX (receiving end of a universal asynchronous receiver transmitter) interface of the single chip microcomputer.
In order to effectively avoid the problem that the aircraft 100 is excessively heavy when the obstacle avoidance device is installed on the aircraft 100, the signal light emitting device 110 and the signal light receiving device 120 are installed on the aircraft housing. Therefore, a shell used for accommodating the signal light emitting device and the signal light receiving device in the existing signal light sensor is removed, and the defects that the existing signal light sensor is directly installed on an aircraft, the aircraft is too heavy, and the installation area is too large are effectively avoided.
As shown in fig. 6 and 7, the infrared emission tube D1 may be a straight type having a diameter of 3 mm. The direct-insertion type is that the infrared transmitting tube D1 is provided with a direct-insertion pin, and the direct-insertion pin is used as a wiring terminal of the infrared transmitting tube D1 to realize coupling with other electronic elements. The infrared receiving tube U1 may also be a straight type.
The pins of the infrared transmitting tube D1 and the infrared receiving tube U1 extend into the aircraft shell 140 and are welded on the aircraft control bottom plate. The signal processing device and other elements of the aircraft system are arranged on the aircraft control bottom plate, and the infrared transmitting and receiving control circuit is integrated on the aircraft control bottom plate. It should be noted that, according to the volume and functional requirements of the aircraft 100, the infrared transmitting tube D1 and the infrared receiving tube U1 may also be of other sizes. The infrared transmitting tube D1 and the infrared receiving tube U1 were selected according to the following conditions: the center frequencies of the infrared transmitting tube D1 and the infrared receiving tube U1 need to be kept consistent, for example, the frequency of the infrared wave emitted by the infrared transmitting tube D1 is 38Khz, and the receiving frequency of 38Khz must be selected by the infrared receiving tube U1; the infrared emission and reception wavelengths need to be kept consistent; the infrared receiving tube U1 needs to select an integrated tube with signal processing inside.
In the embodiment of the invention, the pins of the infrared transmitting tube D1 and the infrared receiving tube U1 can be properly bent to match the light path between the infrared transmitting tube D1 and the infrared receiving tube U1 with the moving direction of the aircraft. For example, the pins are soldered 90 ° bent to the aircraft housing 140.
In order to avoid measurement errors caused by infrared rays emitted by the infrared emission tube D1 directly entering the infrared receiving tube U1 without being reflected by an obstacle, in the embodiment of the present invention, the obstacle avoidance device may further include a member made of a non-light-transmitting material and disposed between the infrared emission tube D1 and the infrared receiving tube U1. As shown in fig. 8, the obstacle avoidance device further includes a light shield 180, the light shield 180 is made of a non-light-transmitting material, the specific material is determined by the type of the signal light, and the light shield 180 is disposed around the signal light receiving device 120. In the embodiment of the present invention, the signal light receiving device 120 includes an infrared receiving tube U1, the light shielding cover 180 is a rectangular body with an open end, and the infrared receiving tube U1 is accommodated in the light shielding cover 180. Infrared rays emitted by the infrared emitting tube D1 are reflected by the obstacle and then are emitted into the infrared receiving tube U1 through the opening of the light shield 180. The distance between the adjacent infrared receiving tube U1 and the infrared transmitting tube D1 can be adjusted between 5cm and 10cm, and the effect of too far distance is reduced.
Referring to fig. 6 to 8, preferably, an optical filter 160 for filtering light out of the frequency of the signal light output by the signal light emitting device 110 is disposed on the receiving optical path of the signal light receiving device 120, the center wavelength of the optical filter 160 matches the wavelength of the signal light emitted by the signal light emitting device 110, and the bandwidth of the optical filter 160 should satisfy a preset width, so as to filter light out of the signal light band emitted by the signal light emitting device 110 and reduce the interference of stray light. The preset width is set according to the wavelength of the signal light emitted from the signal light emitting device 110, so as to ensure that the signal light emitted from the signal light emitting device 110 is reflected by an obstacle and then emitted to the signal light receiving device 120, and then can be received by the signal light receiving device 120.
As shown in fig. 8, the optical filter 160 is installed at the opening of the light shield 180, and the distance between the optical filter 160 and the infrared receiving tube U1 is 1-2 mm. Therefore, the filter 160 allows the infrared receiving tube U1 to receive only the signal light satisfying the bandwidth of the filter 160, that is, only the light matching the wavelength of the infrared light emitted from the infrared emission tube D1, and to filter out other signal light, thereby reducing the interference of other stray light.
In the embodiment of the present invention, the emission wavelength of the infrared emission tube D1 is 940nm, and the optical filter 160 is a band-pass filter of 940 nm. Of course, the emission wavelength of the infrared emission tube D1 can be selected to be any wavelength between 940 and 950, but the corresponding infrared receiving tube U1 and the filter 160 are also adjusted to be the same wavelength.
In the embodiment of the present invention, in addition to increasing the anti-interference capability of the obstacle avoidance device through the light shield 180 and the optical filter 160, the signal processing device 130 also increases the anti-interference capability of the obstacle avoidance device through the soft processing on the signal light emitting device 110 and the signal light receiving device 120. The implementation mode is as follows:
the signal processing device 130 sets the data information of the signal light output by the signal light emitting device 110 according to a preset rule, and determines whether the similarity between the data information of the signal light received by the signal light receiving device 120 and the data information of the signal light output by the signal light emitting device 110 meets a first preset criterion, and if so, determines that an obstacle exists on a signal light propagation path of the signal light emitting device 110.
The similarity is a ratio of the same portion to all portions of the received signal light compared with the output signal light. The first preset criterion is an empirical value, and is set according to a specific application environment. The data information may include data content or baud rate, etc.
In the embodiment of the present invention, the signal processing device 130 is a single chip, and the above embodiments include two specific embodiments:
first, the data information includes data content. Infrared light, as a carrier wave, can carry signals of certain data content. The single chip microcomputer controls the data content carried by the infrared light emitted by the infrared emission tube D1 according to the data content modification rule. The single chip microcomputer judges whether the similarity between the data content of the infrared light received by the infrared receiving tube U1 and the data content of the infrared light emitted by the infrared emitting tube D1 meets a second preset standard.
The data content modification rule may be a preset data content change rule or an irregular change rule. The similarity is that the received data content is compared with the data content sent by the infrared transmitting tube D1 according to areas, and if the completely consistent areas exceed a certain number, the similarity indicates that the similarity between the data content of the infrared light received by the infrared receiving tube U1 and the data content of the infrared light sent by the infrared transmitting tube D1 meets a second preset standard.
For example, at a certain time, the data content carried by the infrared light emitted by the infrared emission tube D1 is controlled by the single chip microcomputer to be 0X55, and the corresponding binary system is 01010101. If the data content received by the infrared receiving tube U1 is 10101010, the data content is completely inconsistent with the data content carried by the infrared light emitted by the infrared emitting tube D1. It can be determined that the data content similarity between the infrared light received by the infrared receiving tube U1 and the infrared light emitted by the infrared emitting tube D1 does not satisfy the second preset criterion, and no obstacle exists on the propagation path of the infrared light emitted by the infrared emitting tube D1. If 01101010 is included in the data received by the infrared receiving tube U1, the upper 2 bits are consistent with the data content of the infrared light emitted by the infrared emitting tube D1, that is, the consecutive 2 bits are correct, and the similarity at this time is: 2 of the 8-bit numbers agree. If the second preset standard is that at least 5 bits of the 8 bits are consistent, the similarity between the data content of the infrared light received by the infrared receiving tube U1 and the data content of the infrared light emitted by the infrared emitting tube D1 at the time of 01101010 received at the moment meets the requirement of the second preset standard, and no obstacle exists on the propagation path of the infrared light emitted by the infrared emitting tube D1. The specific number of bits is the same as the determination condition, and the determination condition can be flexibly set according to different aircraft applications, for example, the determination condition can be set to be 0 bits when the aircraft is applied to outdoor flight. If the method is used only in a place where the indoor light is not strong, 8-phase is set as the determination condition. The stricter the filtering antijamming capability is, the stronger the antijamming capability is, the cost is that the obstacle detection is possibly lost, the less strict the filtering antijamming capability is, and the advantage is that the probability of losing the obstacle detection is small.
Second, the data information includes data content and baud rate. The single chip microcomputer sets the data content of the signal light output by the infrared transmitting tube D1 according to a data content modification rule, and sets the baud rate of the signal light output by the infrared transmitting tube D1 according to a data baud rate modification rule; and judging whether the baud rate of the signal light received by the infrared receiving tube U1 is consistent with the baud rate of the signal light output by the infrared transmitting tube D1, if so, judging whether the similarity between the data content of the signal light received by the infrared receiving tube U1 and the data content of the signal light output by the infrared transmitting tube D1 meets a second preset standard, and if so, judging that an obstacle exists on the signal light propagation path of the infrared transmitting tube D1.
For example, the single chip microcomputer sets a specific baud rate of 2400bps, modulates the sent data into 0x55 of one byte, then sets a PWM output mode for controlling the GPIO port of the infrared transmitting tube D1 to work at 38KHZ with a duty ratio of 50%, turns on the PWM output and allows a front obstacle to completely reflect the transmitted signal, the infrared receiving tube U1 generates an RX pin from a low level to the serial port of the single chip microcomputer, and if the PWM output of the GPIO is turned off and the GPIO is fixed to be a high level or the low level is unchanged, the infrared receiving tube U1 generates an RX pin from the high level to the serial port of the single chip microcomputer. According to the characteristic, a timer is set, the interrupt frequency of the timer is set to be 2400hz, the timer is started and the PWM output of the GPIO is started corresponding to the 2400bps baud rate, and the starting condition of the serial port is modulated.
The carrier frequency of the infrared receiving tube U1 determines the range in which the baud rate of the singlechip can be set, and the baud rate can be set arbitrarily in the range to serve as the modulation basis of the transmitting signal of the infrared transmitting tube D1. In actual application, in order to enhance the anti-interference effect, the infrared transmitting tube D1 can be randomly arranged in an available baud rate range, so that the transmitting signal of the infrared transmitting tube D1 is changed in real time according to different baud rates, and the anti-interference effect is enhanced. For example, the UART serial port baud rate of the singlechip is configured, and the baud rate is set from 200 to 4608000 according to a certain rule.
And the anti-interference can be enhanced by modulating different serial port format data by changing the on and off of the infrared transmitting tube D1. For example, setting the timer to temporarily turn off the PWM output of the GPIO when the next interrupt comes, and modulating a bit of transmission data 1; the timer interrupts the next time to temporarily start the PWM output of the GPIO, and one bit of sending data 0 is modulated. And repeating the operation steps of the two timers according to the data content required to be sent until the 9 th interruption comes, closing the timers, and closing the PWM output of the GPIO to modulate the termination condition of the serial port. For example, when the data content is 0X55, the serial port mode is 1-bit start bit, 8-bit data bit, no parity bit, 1-bit end bit, and a baud rate of 2400 bps.
After the infrared receiving tube U1 receives the infrared signal, the single chip microcomputer firstly judges whether the baud rate of the received signal is consistent with the baud rate of the infrared signal sent by the infrared transmitting tube D1, and if so, then judges whether the similarity of the data content of the received signal and the infrared signal sent by the infrared transmitting tube D1 meets a second preset standard. The above embodiment may be adopted to determine whether the similarity between the received signal and the data content of the infrared signal sent by the infrared transmitting tube D1 meets the second preset criterion, and is not described herein again.
Therefore, the baud rate of the signal transmitted by the infrared transmitting tube D1 and the carried data content are continuously changed, so that the transmitted signal is distinguished from surrounding noise, and the anti-interference capability of the obstacle avoidance device is improved.
The above is directed to the obstacle detection method in one direction, and the obstacle detection method in the other direction is basically the same as the above embodiment. Specifically, after the obstacle detection in one direction is completed, the upper computer is informed and switched to the GPIO connected with the transmitting tube in the other direction, and the obstacle detection in the other direction is continuously executed.
Only the baud rate, the bytes of the sending data and the data content need to be changed in real time, the interrupt frequency of the timer is set according to the baud rate, and the PWM output of the switch GPIO when the timer is interrupted is set according to the specific number of bytes of the sending data and the data content. Each direction may be set to the same baud rate or may be set to a different baud rate.
Referring to fig. 9, an obstacle avoidance method according to a preferred embodiment of the present invention is applied to the obstacle avoidance apparatus, and the method includes: step S101, step S102, step S103, and step S104. The specific steps are described in detail below.
Step S101: the obstacle avoidance device sets data information of the output signal light according to a preset rule.
Step S102: is the similarity between the data information of the received signal light and the data information of the output signal light satisfy a first preset criterion? If the similarity between the received signal light data information and the output signal light data information satisfies the first predetermined criterion, step S103 is executed. If the similarity between the received signal light data information and the output signal light data information does not satisfy the first predetermined criterion, step S104 is executed.
The similarity is a ratio of the same portion to all portions of the received signal light compared with the output signal light. The first preset criterion is an empirical value, and is set according to a specific application environment.
Step S103: and judging that an obstacle exists on a propagation path of the signal light output by the obstacle avoidance device.
If the obstacle exists, the method returns to the step S101, the obstacle avoidance device triggers the next emission of the signal light, and the next detection is carried out.
Step S104: and judging that no obstacle exists on the propagation path of the signal light output by the obstacle avoidance device.
If no obstacle exists, the next emission of the signal light is triggered, and the next detection is carried out.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the method described above may refer to the corresponding process in the foregoing apparatus, and is not described herein again.
Referring to fig. 10, an obstacle avoidance method according to a preferred embodiment of the present invention is applied to the obstacle avoidance apparatus, and the method includes: step S201, step S202, step S203, step S204, and step S205. The specific steps are described in detail below.
Step S201: and setting the data content of the output signal light according to the data content modification rule, and setting the baud rate of the output signal light according to the data baud rate modification rule.
Step S202: is the baud rate of the received signal light consistent with the baud rate of the output signal light? If the baud rate of the received signal light is the same as the baud rate of the output signal light, step S203 is executed. If the baud rate of the received signal light is not consistent with the baud rate of the output signal light, step S204 is executed.
Step S203: is the similarity of the data content of the received signal light and the data content of the output signal light satisfy a second preset criterion? If the similarity between the data content of the received signal light and the data content of the output signal light satisfies the second predetermined criterion, step S205 is executed. If the similarity between the data content of the received signal light and the data content of the output signal light does not satisfy the second preset criterion, step S204 is executed.
Step S204: and judging that no obstacle exists on the propagation path of the signal light output by the obstacle avoidance device.
If no obstacle exists, the method returns to step S201, and the obstacle avoidance device triggers the next emission of the signal light and performs the next detection.
Step S205: and judging that an obstacle exists on a propagation path of the signal light output by the obstacle avoidance device.
If an obstacle exists, the next emission of the signal light is triggered, and the next detection is performed.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the method described above may refer to the corresponding process in the foregoing apparatus, and is not described herein again.
It should be noted that the execution sequence of step S202 and step S203 is not limited to the embodiment shown in fig. 10. Whether the similarity between the data content of the received signal light and the data content of the output signal light meets the second preset standard or not can be judged. And if so, judging whether the baud rate of the received signal light is consistent with the baud rate of the output signal light. And if the similarity between the data content of the received signal light and the data content of the output signal light meets a second preset standard and the baud rate of the received signal light is consistent with the baud rate of the output signal light, judging that an obstacle exists on the propagation path of the signal light output by the obstacle avoidance device. And if the baud rate of the received signal light is not consistent with the baud rate of the output signal light, judging that no obstacle exists on the propagation path of the signal light output by the obstacle avoidance device.
In fig. 10, only step 203 may be executed, and the corresponding step 201 may be executed to set the data content of the signal light to be output according to the data content modification rule. For specific implementation, reference may be made to the foregoing embodiments, which are not described herein again.
In summary, compared with the defects of the aircraft that the weight of the aircraft is too large and the installation area of the infrared sensor is too large due to the fact that the existing infrared sensor comprising the housing for accommodating the infrared transmitting tube and the infrared receiving tube is directly installed on the aircraft housing, the embodiment of the invention omits the existing housing of the infrared sensor by welding the pins of the infrared transmitting tube D1 and the infrared receiving tube U1 on the control bottom plate of the aircraft 100, and reduces the weight, the volume and the installation area. For the selection of the infrared transmitting tube D1 and the infrared receiving tube U1, for example, the infrared receiving tube U1 is integrated with a processing module, so that the volume of a hardware circuit is greatly reduced. Therefore, the infrared obstacle avoidance device is applied to equipment with a very small size, such as a subminiature unmanned aerial vehicle and the like.
In the embodiment of the present invention, the infrared emission tube D1 is an infrared emission tube with high energy and high emission power, and the emission power is not less than 150mW, which can improve the detection distance. Because the energy is improved, the infrared ray emitted by the external light is prevented from being submerged to a certain extent, so that the infrared receiving tube U1 can easily receive the infrared ray emitted by the infrared emitting tube D1, and the anti-interference capability is correspondingly improved.
The optical filter 160 is arranged on the receiving light path of the infrared receiving tube U1, so that the anti-interference performance of the obstacle avoidance device provided by the embodiment of the invention is greatly improved, and the possibility of failure of the obstacle avoidance device under strong light is solved.
The white noise suppression of the obstacle avoidance device can be greatly improved by changing the baud rate of the signal output by the infrared transmitting tube D1 and the data content. Therefore, the obstacle avoidance device can judge whether the signal received by the current infrared receiving tube U1 is an interference signal or a useful signal, and the influence of white noise on the obstacle avoidance device and the obstacle avoidance method can be reduced.
The invention is applied to the unmanned aerial vehicle, can detect the obstacle within the range of 1m of radius by taking the unmanned aerial vehicle as the center, can detect the angle within +/-30 degrees of the horizontal direction, and can adjust the detection radius by adjusting the transmitting power. The unmanned aerial vehicle can normally complete the obstacle avoidance task under indoor normal light, and the obstacle avoidance device cannot be out of order even in an environment with too strong outdoor natural pipelines, so that the problem that the existing obstacle avoidance device, such as an infrared obstacle avoidance device, is out of order under strong light is solved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.