WO2019140655A1 - Position-limit angle calibration method and terminal device - Google Patents

Position-limit angle calibration method and terminal device Download PDF

Info

Publication number
WO2019140655A1
WO2019140655A1 PCT/CN2018/073499 CN2018073499W WO2019140655A1 WO 2019140655 A1 WO2019140655 A1 WO 2019140655A1 CN 2018073499 W CN2018073499 W CN 2018073499W WO 2019140655 A1 WO2019140655 A1 WO 2019140655A1
Authority
WO
WIPO (PCT)
Prior art keywords
angle
joint
pan
tilt
joint angle
Prior art date
Application number
PCT/CN2018/073499
Other languages
French (fr)
Chinese (zh)
Inventor
王映知
刘帅
林光远
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to CN201880010922.7A priority Critical patent/CN110268357A/en
Priority to PCT/CN2018/073499 priority patent/WO2019140655A1/en
Publication of WO2019140655A1 publication Critical patent/WO2019140655A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/08Control of attitude, i.e. control of roll, pitch, or yaw
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D3/00Control of position or direction

Definitions

  • the present application relates to the field of calibration technologies, and in particular, to a method for limiting a limit angle and a terminal device.
  • the PTZ as a supporting device for mounting and fixing cameras has also developed rapidly. Due to structural reasons, the cloud platform inevitably has mechanical limits.
  • the gimbal has mechanical limits on the pitch axis, the yaw axis, and the roll axis.
  • the pitch axis controls the pitch of the gimbal
  • the yaw axis controls the yaw of the gimbal
  • the roll axis controls the roll of the gimbal.
  • the gimbal has upper and lower limits on the pitch axis.
  • the limit indicates the maximum range of rotation in which the pan/tilt head rotates in a certain direction from a position parallel to a carrier (such as a drone) that carries the gimbal. Taking the schematic diagram of the lower limit position of the gimbal shown in FIG.
  • the pan-tilt 1 is mounted on the drone 2, and the lower limit angle of the pan/tilt 1 at the pitch axis (ie, the pitch angle) is 110 degrees, the pan-tilt is Starting at position 3 parallel to the drone, it begins to rotate downwards, up to position 4.
  • the embodiment of the invention provides a limit angle calibration method and a terminal device, which can calibrate the actual mechanical limit angle of the pan/tilt.
  • an embodiment of the present invention provides a method for calibrating a limit angle, which is applied to a terminal device for calibrating a limit angle of a pan/tilt.
  • the method includes:
  • the embodiment of the present invention provides a terminal device, where the terminal device is connected to the cloud station by using a wired or wireless method, where the terminal device includes: a memory and a processor, where
  • a memory for storing program instructions
  • the processor calling program instructions to:
  • the embodiment of the present invention controls the first joint angle of the joint in the preset time period by controlling one joint of the gimbal to rotate in the first direction; and controlling the joint of the gimbal to rotate in the first direction;
  • the difference between the maximum joint angle and the minimum joint angle in the set of joint angles is less than the first preset threshold, and the mechanical limit angle of the gimbal in the first direction is determined according to the joint angle in the first joint angle set.
  • the mechanical limit angle of the gimbal in the first direction ie, the actual mechanical limit angle of the first direction
  • the actual mechanical limit angle of the gimbal can be calibrated.
  • FIG. 1 is a schematic diagram of a lower limit position of a pan/tilt according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a system architecture provided by an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart diagram of a method for calibrating a limit angle according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a cloud platform according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart diagram of another method for limiting a limit angle according to an embodiment of the present disclosure
  • FIG. 6 is a schematic flowchart diagram of still another method for limiting a limit angle according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
  • FIG. 2 shows a system architecture provided by an embodiment of the present invention.
  • the communication system of this embodiment includes a drone 21 and a control terminal 22.
  • the drone 21 includes a flight body, a pan/tilt head 23, and an imaging device.
  • the flying body may include a plurality of rotors and a rotor motor that drives the rotor to rotate, thereby providing the power required for the drone 21 to fly.
  • the imaging device is mounted on the flying body through the pan/tilt head 23.
  • the camera device is used for image or video shooting during the flight of the drone 21, and may include, but is not limited to, a multi-spectral imager, a hyperspectral imager, a visible light camera, and an infrared camera.
  • the pan/tilt head 23 can be a multi-axis rotation and stabilization system, and can include a plurality of rotating shafts and a pan/tilt motor.
  • the pan/tilt motor can compensate the shooting angle of the camera by adjusting the rotation angle of the rotating shaft, and can prevent or reduce the shake of the camera by setting an appropriate buffer mechanism.
  • the imaging device can be mounted on the flying body directly or by other means, which is not limited in the embodiment of the present invention.
  • the control terminal 22 is configured to control the pan/tilt head 23.
  • the control terminal 22 can control the pan/tilt head 23 to rotate in a certain direction.
  • the control terminal 22 can be one or more of a mobile phone, a tablet, a remote control, or other wearable device such as a watch or a wristband.
  • FIG. 3 is a schematic flowchart diagram of a method for calibrating a limit angle according to an embodiment of the present invention.
  • the limit angle calibration method may include parts 301 to 303. among them,
  • the terminal device controls one joint of the pan/tilt to rotate in a first direction.
  • the terminal device may be a drone or a control terminal.
  • the terminal device is a UAV
  • the UAV can be connected to the PTZ through a connection device or other means.
  • the connection manner between the UAV and the PTZ is not limited in the embodiment of the present invention.
  • the control terminal can be connected to the cloud platform through a wireless or wired connection.
  • the gimbal can include multiple joints. Take the structural diagram of the pan/tilt head shown in FIG. 4 as an example.
  • the pan head 41 has three joints, wherein the first joint 42 can control the pan head 41 to rotate up and down, and the angle at which the first joint 42 rotates (ie, the joint angle) is called a pitch angle.
  • the second joint 43 can control the pan head 41 to rotate left and right, and the angle at which the second joint 43 rotates (ie, the joint angle) is referred to as a yaw angle.
  • the third joint (not shown) can control the pan head 41 to roll around, and the angle at which the third joint rotates (ie, the joint angle) is called a roll angle.
  • the camera 44 on the pan/tilt head 41 can control the image of the angle of view corresponding to the preset angle.
  • the terminal device can control the multiple joints of the pan/tilt to rotate at the same time.
  • the embodiment of the present invention controls the rotation of one joint of the pan/tilt head by the terminal device for the sake of example only, and does not constitute a limitation of the present invention.
  • the first direction may be the upper limit direction of the pitch axis, the lower limit direction of the pitch axis, the yaw left limit direction of the yaw axis, the yaw right limit direction of the yaw axis, and the roll left limit direction of the roll axis, roll
  • the first direction is not limited in the embodiment of the present invention. That is, the same rotation axis (such as pitch axis, yaw axis, roll axis, etc.) can have mechanical limit in the opposite directions.
  • the terminal device can control the gimbal to enter the joint angle mode, and control one joint of the gimbal (ie, the joint to be calibrated) to rotate in the first direction when the gimbal is in the joint angle mode.
  • the gimbal is in the joint angle mode, and other joints other than the joint to be calibrated can be fixed, so that when the joint to be calibrated is rotated, other joints are not rotated together with the joint to be calibrated due to the stabilization mode and the like. It can prevent the other joints from rotating together with the joint to be calibrated, and the calibration result of the mechanical limit angle of the joint to be calibrated is affected, which is beneficial to improve the accuracy of the calibration result.
  • the terminal device may control one joint of the pan/tilt to rotate in a first direction according to a preset angle, where the preset angle is greater than a default mechanical limit angle of the gimbal in the first direction.
  • the default mechanical limit angle of the gimbal in the first direction is a pre-planned mechanical limit angle that needs to be produced when the gimbal is produced.
  • the default mechanical limit angle indicates the maximum range that can be rotated in advance when the pan/tilt is rotated in the first direction.
  • the default mechanical limit angle can be stored in the pan/tilt when the gimbal is shipped from the factory.
  • there is generally a certain error between the actual mechanical limit angle of the produced pan/tilt and the default mechanical limit angle there is generally a certain error between the actual mechanical limit angle of the produced pan/tilt and the default mechanical limit angle. That is, the actual mechanical limit angle may be greater than the default mechanical limit angle, or the actual mechanical limit angle may be less than the default mechanical limit angle.
  • the terminal device may preset a preset angle greater than the default mechanical limit angle, and control the pan/tilt according to the preset.
  • the angle is rotated in the first direction.
  • the preset preset angle is less than or equal to the default mechanical limit angle, so that the maximum rotation range of the pan/tilt is the rotation range corresponding to the preset angle.
  • the result is that the detected mechanical limit angle is smaller than the actual mechanical limit angle, which is beneficial to improve the accuracy of the calibration result.
  • the factory plans to produce a set of pitch axes with an upper limit angle of 30 degrees (ie, the default mechanical limit angle).
  • the mechanical limit angle ie the actual mechanical limit angle
  • the terminal device sets the preset angle to 30 degrees, that is, the pitch axis of the pan/tilt is rotated up to the position corresponding to 30 degrees, the pan/tilt is considered to reach the limit, and 30 degrees is determined to be detected.
  • the upper limit angle of the gimbal will result in inaccurate calibration results.
  • the preset angle may be determined based on a default mechanical limit angle and a maximum error angle (ie, the maximum error caused during manufacturing). For example, when the maximum error angle is +3 degrees and the default mechanical limit angle is 30 degrees, the preset angle can be set to an angle of 33 degrees or more. Among them, the maximum error angle may be an empirical value obtained by statistical data. It should be noted that the preset angle may be set by default by the terminal device, or may be determined by the terminal device according to a setting operation input by the user.
  • the terminal device controls the first joint angle set of the joint in the preset time period during the process of controlling the joint of the pan/tilt to rotate in the first direction.
  • the terminal device controls the joint of the gimbal to rotate in the first direction, the current joint angle of the joint can be acquired, and the joint angle is recorded.
  • all joint angles stored in the terminal device ie, the first joint angle set
  • the terminal device may record the joint angle of the joint at a preset time interval.
  • the terminal device can randomly record the joint angle of the joint, which is not limited by the embodiment of the present invention.
  • the terminal device controls the first joint of the gimbal to rotate in the first direction when the starting time is 00:00 (minutes/second). At this time, the joint angle of the first joint is 2 degrees. The terminal device acquires the joint angle of the first joint every 0.2 s. If the first joint rotates at a constant speed, the first joint angle set obtained by the terminal device is within a preset time period of 1 s of 00:00 to 00:01. ⁇ 2°, 4°, 6°, 8°, 10° ⁇ .
  • the terminal device can judge that the first joint is in a normal rotation state, that is, the first joint does not reach the limit position. Because when the first joint reaches the limit (that is, the first joint hits the upper limit), a slight jitter occurs, that is, the joint angle of the first joint has a small up and down float for a period of time. That is, the terminal device can determine whether the first joint has reached the limit by the change of the joint angle in the first joint angle set. For example, under the same conditions as the previous example, the first joint angle set acquired by the terminal device is ⁇ 10°, 10.5°, 10.8°, 10.3 in a preset time period of 1 s of 00:01 to 00:02.
  • the terminal device can determine that the joint has reached the limit.
  • the definition of the small range at this time can be completed by the first preset threshold. For example, when the first preset threshold is greater than 0.8°, the angle change (0.8°) of the joint angle in the preset time period is less than the first preset threshold, so that the joint angle can be considered to be within the preset time period.
  • the change is a small change, thinking that the joint has reached the limit.
  • the preset time period may be set by the terminal device by default, or may be determined by the terminal device according to the operation input by the user.
  • the above-mentioned preset time period is 1 s only for the sake of example and does not constitute a limitation of the present invention. In other possible embodiments, the preset time period may also be 0.5 s, 2 s or other values.
  • the terminal device determines, according to the joint angle in the first joint angle set, the pan/tilt in the first direction. Mechanical limit angle.
  • the maximum joint angle and the minimum joint angle in the first joint angle set may also be acquired. If the difference between the maximum joint angle and the minimum joint angle is less than the first preset threshold, it indicates that the joint value of the joint angle of the joint in the preset time period is in a small range (ie, the first preset threshold) Within the change, the terminal device can determine that the joint has reached the limit. Further, the terminal device may determine the mechanical limit angle of the gimbal in the first direction according to the joint angle in the first joint angle set.
  • the terminal device can determine that the joint has reached the limit.
  • the first preset threshold may be set by default by the terminal device, or may be determined by the terminal device according to the operation input by the user, which is not limited by the embodiment of the present invention. It should be noted that the first preset thresholds of different joints of the gimbal may be the same or different, which is not limited by the embodiment of the present invention.
  • the minimum joint angle in the first joint angle set may be determined as the mechanical limit angle of the gimbal in the first direction.
  • the terminal device may determine an arithmetic mean of all joint angles in the first set of joint angles as a mechanical limit angle of the gimbal in the first direction.
  • the terminal device may determine an arithmetic mean of the maximum joint angle and the minimum joint angle in the first joint angle set as the mechanical limit angle of the pan/tilt in the first direction.
  • the terminal device may determine the mechanical limit angle of the pan/tilt in the first direction by using an angle obtained by performing least squares on the acquired angle data. This embodiment of the present invention does not limit this.
  • the terminal device can determine that the joint has not reached the limit.
  • the terminal device may continue to perform steps 301-303.
  • the mechanical limit angle of the gimbal in the first direction can be determined according to the joint angle in the first joint angle set. (ie the actual mechanical limit angle in the first direction), that is, the actual mechanical limit angle of the gimbal can be calibrated.
  • the terminal device may also store the mechanical limit angle of the pan/tilt in the first direction.
  • the terminal device may include a storage medium, and after determining, by the terminal device, the mechanical limit angle of the pan/tilt in the first direction, the mechanical limit angle of the pan/tilt in the first direction may be stored in the storage medium.
  • the storage medium may include a nonvolatile memory such as a flash memory, a solid state hard disk, or the like.
  • the storage medium may also include volatile memory, such as random access memory.
  • the storage medium may also include a combination of the above types of memories. The specific type of the storage medium is not limited in the embodiment of the present invention.
  • the terminal device may determine an avoidance angle of the evasive limit algorithm according to a mechanical limit angle of the gimbal in the first direction.
  • the comparison of the evasive angle setting causes the pan/tilt to hit the limit, resulting in a wide range of jitter of the picture, which reduces the quality of the captured image.
  • the avoidance angle in the evasive limit algorithm is used to stop the joint from rotating in the first direction when the joint of the gimbal rotates to the evasive angle in the first direction, so as to prevent the pontoon from hitting the limit.
  • the situation of the bit which in turn improves the quality of the captured image. For example, when the mechanical limit of the upper limit of the pitch axis is 30 degrees, and the terminal device sets the avoidance angle of the upper limit of the pitch axis to 29 degrees, the pan/tilt will automatically stop continuing to rotate upward when it is rotated upward to 29 degrees. To avoid the pan/tilt hitting the limit.
  • the circumvention angle of the evasive limit algorithm can be determined according to the actual mechanical limit angle after each pan/tilt calibration, which can better solve the problem.
  • the problem of the actual mechanical limit angle of the same batch of pan/tilt caused by problems such as manufacturing. That is, in the prior art, the avoidance angles of the same batch of pan/tilt are set to be the same (that is, for some pan/tilt, the avoidance angle may be too large or too small), and the cloud with a small mechanical limit angle may be caused.
  • the table is too large due to the avoidance angle, and the image jitter caused by the impact limit. Or, the gimbal with a large mechanical limit angle is too small to set the avoidance angle, and the viewing angle change caused by the prematurely triggering the avoidance limit algorithm cannot satisfy the shooting requirement.
  • the terminal device may determine whether the mechanical limit angle of the pan-tilt in the first direction is within a preset angle range; if yes, perform a mechanical limit angle according to the pan-tilt in the first direction to determine the avoidance The step of avoiding the angle of the limit algorithm.
  • the terminal device can obtain the mechanical limit angle obtained by the last calibration when the PTZ is powered on, and make a reasonable judgment on the mechanical limit angle (ie, determine the mechanical limit angle) Whether it is within the preset angle range, or whether the angle error is less than the second preset threshold). And when the mechanical limit angle is reasonable, the avoidance angle of the avoidance limit algorithm is determined according to the mechanical limit angle.
  • the mechanical limit angle change caused by the impact of the gimbal during this time may be caused by transportation or improper use, and the terminal device incorrectly calibrates the gimbal before the impact.
  • the resulting mechanical limit angle is determined as the mechanical limit angle after impact.
  • the mechanical limit angle of the gimbal before calibration is 110 degrees.
  • the mechanical limit angle of the gimbal becomes 105 degrees. If the terminal device sets the avoidance angle to 109 degrees according to the previously calibrated mechanical limit angle (110 degrees), the pan/tilt will hit the mechanical limit when it is rotated to 105 degrees. Therefore, each time the PTZ is powered on, the mechanical limit angle is judged rationally, which can improve the reliability of the gimbal.
  • the terminal before the terminal device controls a joint of the pan-tilt to rotate in the first direction, the terminal can also receive the limit angle calibration operation of the user, and control the pan-tilt to enter the limit angle calibration mode; In the angle calibration mode, a step of controlling a joint of the pan/tilt to rotate in the first direction is performed.
  • the terminal device can open the function of calibrating the mechanical limit angle of the pan/tilt to the user.
  • a calibration button can be set on the terminal device, and when the terminal device detects that the user presses the calibration button (ie, the limit angle calibration operation), the pan/tilt can be controlled to enter the limit angle calibration mode.
  • the limit angle calibration mode may be the joint angle mode.
  • the user can also calibrate the mechanical limit angle of the gimbal.
  • the calibration process is simple and convenient, and the mechanical limit angle of the pan/tilt can be calibrated frequently, so that the error between the mechanical limit angle stored in the terminal device and the actual mechanical limit angle is smaller.
  • the terminal device sets the evasive angle according to the stored mechanical limit angle, the possibility that the pan/tilt hits the mechanical limit is reduced, which is beneficial to improving the reliability of the pan/tilt.
  • the user can also calibrate the mechanical limit angle of the rotating shaft of the pan/tilt by manually dialing the rotating shaft of the pan/tilt.
  • FIG. 5 is a schematic flowchart diagram of another method for limiting a limit angle according to an embodiment of the present invention.
  • the limit angle calibration method may include sections 501 to 506. among them,
  • the terminal device controls a joint of the pan/tilt to rotate in a first direction.
  • the terminal device controls the first joint angle set of the joint in the preset time period during the process of controlling the joint of the pan/tilt to rotate in the first direction.
  • steps 501 and 502 can be respectively referred to the specific descriptions in steps 301 and 302 in FIG. 3, and details are not described herein.
  • the terminal device determines the target joint angle according to the joint angle in the first joint angle set.
  • the terminal device determines the target joint angle before determining the mechanical limit angle of the gimbal in the first direction. Once again, it is judged whether the target joint angle is reasonable or not to determine whether to update the mechanical limit angle of the gimbal in the first direction. In this way, the accuracy of the calibration results can be further improved.
  • the minimum joint angle in the first joint angle set may be determined as the target joint angle of the gimbal in the first direction.
  • the terminal device may determine an arithmetic mean of all joint angles in the first set of joint angles as a target joint angle of the gimbal in the first direction.
  • the terminal device may determine an arithmetic mean of the maximum joint angle and the minimum joint angle in the first joint angle set as the target joint angle of the pan/tilt in the first direction.
  • the terminal device may further determine the target joint angle of the pan/tilt in the first direction by using an angle obtained by performing least squares on the acquired angle data. This embodiment of the present invention does not limit this.
  • the terminal device determines whether the target joint angle is within a preset angle range.
  • the terminal device determines whether the target joint angle is within a preset angle range, and is used to determine whether the obtained target joint angle is reasonable.
  • the error caused by problems such as manufacturing is not so great, that is, the difference between the obtained target joint angle and the default mechanical limit angle should be within a certain range.
  • the default mechanical limit angle is 110 degrees and the maximum production error is 3 degrees
  • a reasonable target joint angle can be within [107°, 113°] (ie, the preset angle range). If the obtained target joint angle is within the preset angle range, the obtained target joint angle is reasonable. If the obtained target joint angle is not within the preset angle range, the obtained target joint angle is unreasonable. The reason for the unreasonable reason may be that the joint is stuck during the rotation, or there is a problem such as a hand file during the rotation, which is not limited by the embodiment of the present invention.
  • the terminal device determines the target joint angle as a mechanical limit angle of the pan/tilt in the first direction.
  • the terminal device can determine the target joint angle as the mechanical limit angle of the gimbal in the first direction. .
  • the mechanical limit angle of the gimbal in the first direction is calibrated to the target joint angle. The accuracy of the calibration results can be improved by means of reasonable judgment.
  • the terminal device maintains the mechanical limit angle of the first direction that has been set unchanged.
  • the terminal device can maintain the mechanical limit angle of the first direction that has been set unchanged.
  • the terminal device can set the mechanical limit angle of the first direction to a preset initial value.
  • the preset initial value may be a default mechanical limit angle, a null value or other values, which is not limited in the embodiment of the present invention.
  • steps 504 and 505 may be replaced by the following steps: the terminal device acquires the angle error, and the angle error is the target joint angle and the pan/tilt The absolute value of the difference between the default mechanical limit angles in the first direction; if the angle error is less than the second predetermined threshold, the terminal device may determine the target joint angle as the mechanical limit angle of the pan/tilt in the first direction .
  • the second preset threshold is the absolute value of the maximum error generated by the gimbal during the manufacturing process.
  • the angular error is the absolute value of the difference between the target joint angle and the default mechanical limit angle of the gimbal in the first direction, that is, the angular error is the absolute value of the detected actual production error of the gimbal. If the angle error is less than the second preset threshold, it indicates that the obtained target joint angle is within a reasonable error range, that is, the probability of occurrence of an error during the calibration process is low, and the reliability of the calibration result is high. Therefore, the terminal device can determine the target joint angle as the mechanical limit angle of the pan/tilt in the first direction.
  • the pan/tilt has a default mechanical limit angle of 110 degrees in the first direction and the second preset threshold is 3 degrees. If the obtained target joint angle is 109 degrees, that is, the angle error (1 degree) is less than the second preset threshold (3 degrees), the mechanical limit angle of the gimbal in the first direction can be determined to be 109 degrees.
  • the step 506 may be replaced by the following steps: if the angle error is greater than or equal to the second preset threshold, the terminal device may maintain the mechanical limit angle of the first direction that has been set. constant.
  • the angle error is greater than or equal to the second preset threshold, it indicates that the obtained target joint angle is not within a reasonable error range, that is, the probability of occurrence of an error during the calibration process is high, and the reliability of the calibration result is low. Therefore, the terminal device can ignore the obtained target joint angle and maintain the mechanical limit angle of the first direction that has been set unchanged. In order to avoid determining the unreasonable target joint angle as the mechanical limit angle of the gimbal in the first direction, it is beneficial to improve the accuracy of the calibration result.
  • the target joint angle can be determined according to the joint angle in the first joint angle set, and the target joint angle is reasonable.
  • sexual judgment when the target joint angle is reasonable, the target joint angle is determined as the mechanical limit angle of the gimbal in the first direction, and the actual mechanical limit angle of the gimbal can be more accurately calibrated.
  • FIG. 6 is a schematic flowchart diagram of still another method for limiting a limit angle according to an embodiment of the present invention.
  • the limit angle calibration method may include parts 601 to 606. among them,
  • the terminal device controls a joint of the pan/tilt to rotate in a first direction.
  • the terminal device controls the first joint angle set of the joint in the preset time period during the process of controlling the joint of the pan/tilt to rotate in the first direction.
  • the terminal device determines, according to the joint angle in the first joint angle set, the pan/tilt in the first direction. Mechanical limit angle.
  • steps 601, 602, and 603 may be specifically described in steps 301, 302, and 303 in FIG. 3, and details are not described herein.
  • the terminal device controls the joint of the pan/tilt to rotate in a second direction, where the second direction is a reverse direction of the first direction.
  • the terminal device first controls the joint of the pan-tilt to rotate in a first direction, and when the pan-tilt reaches the mechanical limit in the first direction, that is, the mechanical limit angle of the pan-tilt in the first direction is calibrated. Upon completion, the terminal device can store the mechanical limit angle of the direction obtained by calibration. And controlling the pan/tilt to automatically rotate in the opposite direction of the first direction (ie, the second direction), that is, calibrating the mechanical limit angle of the gimbal in the second direction.
  • the mechanical limit angles of the pan/tilt in two different directions on one rotating axis are calibrated, it is necessary to re-control the mechanism of the pan/tilt to the other direction when the calibration in one of the directions is completed.
  • the limit angle is calibrated. That is, the mechanical limit angles of the two different directions of the pan/tilt on one rotating axis can be automatically and once-timely calibrated, which is beneficial to improve calibration efficiency and user experience.
  • the terminal device controls the second joint angle set of the joint in the preset time period during the process of controlling the joint of the pan/tilt to rotate in the second direction.
  • the joint angle included in the second joint angle set is the joint angle obtained during the rotation of the joint of the gimbal in the second direction.
  • the terminal device determines, according to the joint angle in the second joint angle set, the pan/tilt in the second direction. Mechanical limit angle.
  • steps 604, 605, and 606 may be specifically described in steps 301, 302, and 303 of FIG. 3, except for the change of the rotation direction, and details are not described herein.
  • steps 601-603 may be performed first, and then steps 604-606 may be performed. Steps 604-606 may also be performed first, and then steps 601-603 are performed. This embodiment of the present invention does not limit this.
  • FIG. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
  • the terminal device includes a memory 701 and a processor 702.
  • the memory 701 and the processor 702 can be connected through a bus 703.
  • the terminal device can be connected to the cloud platform by wire or wirelessly (not shown).
  • the memory 701 may include a volatile memory such as a random-access memory (RAM); the memory 701 may also include a non-volatile memory such as a flash memory (flash) Memory), solid state drive (SSD), etc.; memory 701 may also include a combination of the above types of memory.
  • RAM random-access memory
  • flash flash memory
  • SSD solid state drive
  • Processor 702 can include a central processing unit (CPU). Processor 702 can also further include a hardware chip.
  • the hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or the like.
  • the PLD may be a field-programmable gate array (FPGA), a general array logic (GAL), or the like. among them:
  • a memory 701 configured to store program instructions
  • the processor 702 calls the program instructions to:
  • the processor 702 when the processor 702 is configured to control a joint of the pan/tilt to rotate in a first direction, the processor 702 is specifically configured to:
  • a joint controlling the gimbal rotates in a first direction according to a preset angle, and the preset angle is greater than a default mechanical limit angle of the gimbal in the first direction.
  • the processor 702 is configured to determine, according to the joint angle in the first set of joint angles, the mechanical limit angle of the gimbal in the first direction, specifically for:
  • the target joint angle is determined as the mechanical limit angle of the gimbal in the first direction.
  • the target joint angle is the smallest joint angle in the first set of joint angles, or the target joint angle is the average joint angle in the first set of joint angles.
  • the processor 702 is further configured to:
  • the target joint angle is determined as the mechanical limit angle of the gimbal in the first direction.
  • the processor 702 determines whether the target joint angle is within a preset angle range, the processor 702 is further configured to:
  • the mechanical limit angle of the first direction that has been set is maintained.
  • the processor 702 is further configured to:
  • the angular error being the absolute value of the difference between the target joint angle and the default mechanical limit angle of the gimbal in the first direction;
  • the target joint angle is determined as the mechanical limit angle of the gimbal in the first direction.
  • the processor 702 After the processor 702 acquires the angular error, it is further used to:
  • the terminal device may further include a storage medium 704.
  • the processor 702 is further configured to:
  • the mechanical limit angle of the pan/tilt in the first direction is stored in the storage medium 704.
  • Storage medium 704 can include volatile memory, such as random access memory; storage medium 704 can also include non-volatile memory, such as flash memory, solid state drive, and the like; storage medium 704 can also include a combination of the above-described types of memory.
  • the processor 702 is further configured to:
  • the mechanical limit angle of the pan/tilt in the first direction is stored in the memory 701.
  • the processor 702 is further configured to:
  • the avoidance angle of the avoidance limit algorithm is determined.
  • the processor 702 is further configured to:
  • the step of determining the avoidance angle of the avoidance limit algorithm according to the mechanical limit angle of the gimbal in the first direction is performed.
  • the processor 702 before the processor 702 controls a joint of the gimbal to rotate in the first direction, the processor 702 is further configured to:
  • a step of controlling a joint of the pan/tilt to rotate in the first direction is performed.
  • the processor 702 is further configured to:
  • the joint controlling the gimbal rotates in a second direction, and the second direction is a reverse direction of the first direction;
  • the processor 702 in the embodiment of the present invention may be implemented as described in the limiting angle calibration method provided in FIG. 3, FIG. 5 and FIG. 6 of the embodiment of the present invention, and details are not described herein.

Abstract

Provided are a position-limit angle calibration method and terminal device (22), said method comprising: controlling one joint (42, 43) of a pan/tilt/zoom (23, 41) to rotate in a first direction (301); during the process of controlling the joint (42, 43) of the pan/tilt/zoom (23, 41) to rotate in the first direction, obtaining a first joint angle set of the joint (42, 43) within a preset period of time (302); if the difference between the maximum joint angle and the minimum joint angle in the first joint angle set is smaller than a first preset threshold, then, according to the joint angle in the first joint angle set, determining the mechanical limit angle of the pan/tilt/zoom (23, 41) in the first direction (303). If the difference between the maximum joint angle and the minimum joint angle in the first joint angle set is smaller than a first preset threshold, then it is determined that the pan/tilt/zoom (23, 41) has hit the limit, and, according to the joint angle in the first joint angle set, the mechanical limit angle of the pan/tilt/zoom (23, 41) in the first direction is determined; that is, the actual mechanical limit angle of the pan/tilt/zoom (23, 41) can be calibrated.

Description

一种限位角度校准方法及终端设备Limit angle calibration method and terminal device 技术领域Technical field
本申请涉及校准技术领域,具体涉及一种限位角度校准方法及终端设备。The present application relates to the field of calibration technologies, and in particular, to a method for limiting a limit angle and a terminal device.
背景技术Background technique
随着人们对摄影体验的要求不断提高,云台作为安装、固定摄像机的支撑设备也得到了迅速发展。由于结构原因,云台不可避免地存在机械限位。As people's requirements for the photography experience continue to increase, the PTZ as a supporting device for mounting and fixing cameras has also developed rapidly. Due to structural reasons, the cloud platform inevitably has mechanical limits.
一般地,云台在pitch轴、yaw轴和roll轴上均存在机械限位。其中,pitch轴控制云台的俯仰,yaw轴控制云台的偏航,roll轴控制云台的横滚。例如,云台在pitch轴上具有上限位和下限位。限位表示云台从相对于搭载云台的载体(如无人机等)平行的位置开始,向某一个方向转动的最大转动范围。以图1所示云台的下限位的示意图为例,当云台1搭载于无人机2,且云台1在pitch轴(即俯仰角)的下限位角度为110度时,云台从相对于无人机平行的位置3开始向下转动,最多转动至位置4。Generally, the gimbal has mechanical limits on the pitch axis, the yaw axis, and the roll axis. Among them, the pitch axis controls the pitch of the gimbal, the yaw axis controls the yaw of the gimbal, and the roll axis controls the roll of the gimbal. For example, the gimbal has upper and lower limits on the pitch axis. The limit indicates the maximum range of rotation in which the pan/tilt head rotates in a certain direction from a position parallel to a carrier (such as a drone) that carries the gimbal. Taking the schematic diagram of the lower limit position of the gimbal shown in FIG. 1 as an example, when the pan/tilt 1 is mounted on the drone 2, and the lower limit angle of the pan/tilt 1 at the pitch axis (ie, the pitch angle) is 110 degrees, the pan-tilt is Starting at position 3 parallel to the drone, it begins to rotate downwards, up to position 4.
在量产过程中,由于生产制造等问题,导致实际生产出来的云台的实际机械限位角度与设计机械限位角度之间存在误差。在云台使用过程中,会因为这种误差的存在而导致云台撞上机械限位,从而导致云台搭载相机所拍摄画面的不稳定,影响实际使用效果。而现有的解决方式是通过回收存在撞上机械限位的云台,测量其实际的机械限位角度并将该角度应用到同一批次的所有云台。然而,这种解决方式不仅实现起来复杂,而且并不能完全解决云台撞上机械限位的问题。因此,如何校准云台的实际机械限位角度成为亟待解决的问题。In the mass production process, due to manufacturing and other problems, there is an error between the actual mechanical limit angle of the actual production of the gimbal and the design mechanical limit angle. During the use of the gimbal, the cloud platform will hit the mechanical limit due to the existence of such an error, which will result in instability of the picture taken by the camera on the gimbal, which will affect the actual use effect. The existing solution is to measure the actual mechanical limit angle by recycling the pan/tilt that has a mechanical limit, and apply the angle to all the pans in the same batch. However, this solution is not only complicated to implement, but also does not completely solve the problem that the platform hits the mechanical limit. Therefore, how to calibrate the actual mechanical limit angle of the gimbal becomes an urgent problem to be solved.
发明内容Summary of the invention
本发明实施例提供一种限位角度校准方法及终端设备,可以校准云台的实际机械限位角度。The embodiment of the invention provides a limit angle calibration method and a terminal device, which can calibrate the actual mechanical limit angle of the pan/tilt.
第一方面,本发明实施例提供了一种限位角度校准方法,应用于校准云台的限位角度的终端设备,该方法包括:In a first aspect, an embodiment of the present invention provides a method for calibrating a limit angle, which is applied to a terminal device for calibrating a limit angle of a pan/tilt. The method includes:
控制云台的一个关节向第一方向进行转动;Controlling a joint of the gimbal to rotate in a first direction;
控制云台的该关节向第一方向转动的过程中,获取预设时间段内该关节的 第一关节角集合;During the process of controlling the joint of the gimbal to rotate in the first direction, acquiring a first joint angle set of the joint within a preset time period;
若第一关节角集合中最大关节角和最小关节角之间的差值小于第一预设阈值,则根据第一关节角集合中的关节角,确定云台在第一方向的机械限位角度。If the difference between the maximum joint angle and the minimum joint angle in the first joint angle set is less than the first preset threshold, determining the mechanical limit angle of the gimbal in the first direction according to the joint angle in the first joint angle set .
第二方面,本发明实施例提供了一种终端设备,该终端设备通过有线或无线方式与云台连接,该终端设备包括:存储器和处理器,其中,In a second aspect, the embodiment of the present invention provides a terminal device, where the terminal device is connected to the cloud station by using a wired or wireless method, where the terminal device includes: a memory and a processor, where
存储器,用于存储程序指令;a memory for storing program instructions;
处理器,调用程序指令以用于:The processor, calling program instructions to:
控制云台的一个关节向第一方向进行转动;Controlling a joint of the gimbal to rotate in a first direction;
控制云台的该关节向第一方向转动的过程中,获取预设时间段内该关节的第一关节角集合;During the process of controlling the joint of the gimbal to rotate in the first direction, acquiring a first joint angle set of the joint within a preset time period;
若第一关节角集合中最大关节角和最小关节角之间的差值小于第一预设阈值,则根据第一关节角集合中的关节角,确定云台在第一方向的机械限位角度。If the difference between the maximum joint angle and the minimum joint angle in the first joint angle set is less than the first preset threshold, determining the mechanical limit angle of the gimbal in the first direction according to the joint angle in the first joint angle set .
本发明实施例通过控制云台的一个关节向第一方向进行转动;控制云台的该关节向第一方向转动的过程中,获取预设时间段内该关节的第一关节角集合;若第一关节角集合中最大关节角和最小关节角之间的差值小于第一预设阈值,则根据第一关节角集合中的关节角,确定云台在第一方向的机械限位角度。可以在检测到云台已撞到限位时,根据第一关节角集合中的关节角,确定云台在第一方向的机械限位角度(即第一方向的实际机械限位角度),即可以校准云台的实际机械限位角度。The embodiment of the present invention controls the first joint angle of the joint in the preset time period by controlling one joint of the gimbal to rotate in the first direction; and controlling the joint of the gimbal to rotate in the first direction; The difference between the maximum joint angle and the minimum joint angle in the set of joint angles is less than the first preset threshold, and the mechanical limit angle of the gimbal in the first direction is determined according to the joint angle in the first joint angle set. When it is detected that the gimbal has hit the limit position, the mechanical limit angle of the gimbal in the first direction (ie, the actual mechanical limit angle of the first direction) is determined according to the joint angle in the first joint angle set, that is, The actual mechanical limit angle of the gimbal can be calibrated.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings to be used in the embodiments will be briefly described below. Obviously, the drawings in the following description are only some of the present invention. For the embodiments, those skilled in the art can obtain other drawings according to the drawings without any creative work.
图1为本发明实施例提供的一种云台的下限位的示意图;1 is a schematic diagram of a lower limit position of a pan/tilt according to an embodiment of the present invention;
图2是本发明实施例提供的一种系统架构的示意图;2 is a schematic diagram of a system architecture provided by an embodiment of the present invention;
图3为本发明实施例提供的一种限位角度校准方法的流程示意图;FIG. 3 is a schematic flowchart diagram of a method for calibrating a limit angle according to an embodiment of the present invention;
图4为本发明实施例提供的一种云台的结构示意图;4 is a schematic structural diagram of a cloud platform according to an embodiment of the present invention;
图5为本发明实施例提供的另一种限位角度校准方法的流程示意图;FIG. 5 is a schematic flowchart diagram of another method for limiting a limit angle according to an embodiment of the present disclosure;
图6为本发明实施例提供的又一种限位角度校准方法的流程示意图;FIG. 6 is a schematic flowchart diagram of still another method for limiting a limit angle according to an embodiment of the present invention;
图7为本发明实施例提供的一种终端设备的结构示意图。FIG. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
为了清楚地描述本发明实施例的方案,下面结合附图2对本发明实施例可能应用的业务场景和系统架构进行说明。In order to clearly describe the solution of the embodiment of the present invention, the service scenario and system architecture that may be applied to the embodiment of the present invention are described below with reference to FIG.
图2示出了本发明实施例提供的一种系统架构。本实施例的通信系统包括无人机21和控制终端22。FIG. 2 shows a system architecture provided by an embodiment of the present invention. The communication system of this embodiment includes a drone 21 and a control terminal 22.
其中,无人机21包括飞行主体、云台23以及摄像装置。在本实施例中,飞行主体可包括多个旋翼以及驱动旋翼转动的旋翼电机,由此提供无人机21飞行所需动力。摄像装置通过云台23搭载于飞行主体上。摄像装置用于在无人机21的飞行过程中进行图像或视频拍摄,可包括但不限于多光谱成像仪、高光谱成像仪、可见光相机及红外相机等。云台23可以为多轴转动及增稳系统,可包括多个转动轴和云台电机。云台电机可通过调整转动轴的转动角度来对摄像装置的拍摄角度进行补偿,并可通过设置适当的缓冲机构来防止或减小摄像装置的抖动。当然,摄像装置可以直接或通过其他方式搭载于飞行主体上,本发明实施例对此不做限定。其中,该控制终端22用于对云台23进行控制。例如,控制终端22可以控制云台23向某一个方向进行转动。该控制终端22可以为手机、平板电脑、遥控器或其他穿戴式设备(如手表或手环等)中的一种或多种。The drone 21 includes a flight body, a pan/tilt head 23, and an imaging device. In the present embodiment, the flying body may include a plurality of rotors and a rotor motor that drives the rotor to rotate, thereby providing the power required for the drone 21 to fly. The imaging device is mounted on the flying body through the pan/tilt head 23. The camera device is used for image or video shooting during the flight of the drone 21, and may include, but is not limited to, a multi-spectral imager, a hyperspectral imager, a visible light camera, and an infrared camera. The pan/tilt head 23 can be a multi-axis rotation and stabilization system, and can include a plurality of rotating shafts and a pan/tilt motor. The pan/tilt motor can compensate the shooting angle of the camera by adjusting the rotation angle of the rotating shaft, and can prevent or reduce the shake of the camera by setting an appropriate buffer mechanism. Of course, the imaging device can be mounted on the flying body directly or by other means, which is not limited in the embodiment of the present invention. The control terminal 22 is configured to control the pan/tilt head 23. For example, the control terminal 22 can control the pan/tilt head 23 to rotate in a certain direction. The control terminal 22 can be one or more of a mobile phone, a tablet, a remote control, or other wearable device such as a watch or a wristband.
可以理解的是,本发明实施例描述的系统架构以及业务场景是为了更加清楚的说明本发明实施例的技术方案,并不构成对于本发明实施例提供的技术方 案的限定,本领域普通技术人员可知,随着系统架构的演变和新业务场景的出现,本发明实施例提供的技术方案对于类似的技术问题,同样适用。It is to be understood that the system architecture and the service scenario described in the embodiments of the present invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of the present invention, and are not limited to the technical solutions provided by the embodiments of the present invention. It can be seen that the technical solutions provided by the embodiments of the present invention are applicable to similar technical problems as the system architecture evolves and new service scenarios arise.
下面对本发明实施例提供的限位角度校准方法的具体流程进一步进行说明。The specific process of the limit angle calibration method provided by the embodiment of the present invention is further described below.
请参阅图3,图3是本发明实施例提供的一种限位角度校准方法的流程示意图。如图3所示,该限位角度校准方法可包括301~303部分。其中,Please refer to FIG. 3. FIG. 3 is a schematic flowchart diagram of a method for calibrating a limit angle according to an embodiment of the present invention. As shown in FIG. 3, the limit angle calibration method may include parts 301 to 303. among them,
301、终端设备控制云台的一个关节向第一方向进行转动。301. The terminal device controls one joint of the pan/tilt to rotate in a first direction.
其中,终端设备可以是无人机或者控制终端。当终端设备为无人机时,该无人机可以通过连接装置或其他方式与云台连接,本发明实施例对无人机和云台之间的连接方式不作限定。当终端设备为控制终端时,该控制终端可以通过无线或有线连接方式与云台连接。The terminal device may be a drone or a control terminal. When the terminal device is a UAV, the UAV can be connected to the PTZ through a connection device or other means. The connection manner between the UAV and the PTZ is not limited in the embodiment of the present invention. When the terminal device is a control terminal, the control terminal can be connected to the cloud platform through a wireless or wired connection.
云台可以包括多个关节。以图4所示的云台的结构示意图为例。云台41具有3个关节,其中,第一关节42可以控制云台41上下转动,第一关节42转动的角度(即关节角)称为俯仰角。第二关节43可以控制云台41左右转动,第二关节43转动的角度(即关节角)称为偏航角。第三关节(图未示)可以控制云台41左右翻滚,第三关节转动的角度(即关节角)称为横滚角。终端设备通过控制云台41的某一个关节转动到预设角度后,可以控制云台41上的摄像机44拍摄该预设角度对应的视角的图像。The gimbal can include multiple joints. Take the structural diagram of the pan/tilt head shown in FIG. 4 as an example. The pan head 41 has three joints, wherein the first joint 42 can control the pan head 41 to rotate up and down, and the angle at which the first joint 42 rotates (ie, the joint angle) is called a pitch angle. The second joint 43 can control the pan head 41 to rotate left and right, and the angle at which the second joint 43 rotates (ie, the joint angle) is referred to as a yaw angle. The third joint (not shown) can control the pan head 41 to roll around, and the angle at which the third joint rotates (ie, the joint angle) is called a roll angle. After the terminal device rotates a certain joint of the pan/tilt head 41 to a preset angle, the camera 44 on the pan/tilt head 41 can control the image of the angle of view corresponding to the preset angle.
需要说明的是,终端设备可以控制云台的多个关节同时转动,本发明实施例以终端设备控制云台的一个关节进行转动仅用于举例,并不构成对本发明的限定。It should be noted that the terminal device can control the multiple joints of the pan/tilt to rotate at the same time. The embodiment of the present invention controls the rotation of one joint of the pan/tilt head by the terminal device for the sake of example only, and does not constitute a limitation of the present invention.
第一方向可以是pitch轴的上限位方向,pitch轴的下限位方向,yaw轴的偏航左限位方向,yaw轴的偏航右限位方向,roll轴的横滚左限位方向,roll轴的横滚右限位方向,本发明实施例对第一方向不作限定。即同一个转动轴(如pitch轴、yaw轴、roll轴等)在相反的两个方向上均可以存在机械限位。The first direction may be the upper limit direction of the pitch axis, the lower limit direction of the pitch axis, the yaw left limit direction of the yaw axis, the yaw right limit direction of the yaw axis, and the roll left limit direction of the roll axis, roll The first direction is not limited in the embodiment of the present invention. That is, the same rotation axis (such as pitch axis, yaw axis, roll axis, etc.) can have mechanical limit in the opposite directions.
在一种实现方式中,终端设备可以控制云台进入关节角模式,并在云台处于关节角模式下,控制云台的一个关节(即待校准关节)向第一方向进行转动。其中,云台处于关节角模式下,可以固定除待校准关节以外的其他关节,使得在转动待校准关节时,其他关节不会因为增稳模式等原因与待校准关节一起转 动。即可以避免其他关节与待校准关节一起转动时,对待校准关节的机械限位角度的校准结果造成影响,有利于提高校准结果的准确度。In one implementation, the terminal device can control the gimbal to enter the joint angle mode, and control one joint of the gimbal (ie, the joint to be calibrated) to rotate in the first direction when the gimbal is in the joint angle mode. Among them, the gimbal is in the joint angle mode, and other joints other than the joint to be calibrated can be fixed, so that when the joint to be calibrated is rotated, other joints are not rotated together with the joint to be calibrated due to the stabilization mode and the like. It can prevent the other joints from rotating together with the joint to be calibrated, and the calibration result of the mechanical limit angle of the joint to be calibrated is affected, which is beneficial to improve the accuracy of the calibration result.
在一种实现方式中,终端设备可以控制云台的一个关节按照预设角度向第一方向进行转动,预设角度大于云台在第一方向的默认机械限位角度。In an implementation manner, the terminal device may control one joint of the pan/tilt to rotate in a first direction according to a preset angle, where the preset angle is greater than a default mechanical limit angle of the gimbal in the first direction.
在本发明实施例中,云台在第一方向的默认机械限位角度是在生产云台时,预先计划的、需要生产出的机械限位角度。该默认机械限位角度表示云台向第一方向转动时,预先计划的所能转动的最大范围。可选的,在云台出厂时,云台内可存储该默认机械限位角度。但是在实际情况中,生产出的云台的实际机械限位角度与默认机械限位角度之间一般存在一定误差。即实际机械限位角度有可能大于默认机械限位角度,或者,实际机械限位角度有可能小于默认机械限位角度。所以,为了检测出云台在第一方向上的实际最大转动范围(即实际机械限位角度),终端设备可以预先设置一个大于默认机械限位角度的预设角度,并控制云台按照预设角度向第一方向进行转动。通过这种方式,可以避免当实际机械限位角度大于默认机械限位角度时,设置的预设角度小于或等于默认机械限位角度,使得云台的最大转动范围为预设角度对应的转动范围,导致检测到的机械限位角度小于实际的机械限位角度的情况,即有利于提高校准结果的准确度。In the embodiment of the present invention, the default mechanical limit angle of the gimbal in the first direction is a pre-planned mechanical limit angle that needs to be produced when the gimbal is produced. The default mechanical limit angle indicates the maximum range that can be rotated in advance when the pan/tilt is rotated in the first direction. Optionally, the default mechanical limit angle can be stored in the pan/tilt when the gimbal is shipped from the factory. However, in actual situations, there is generally a certain error between the actual mechanical limit angle of the produced pan/tilt and the default mechanical limit angle. That is, the actual mechanical limit angle may be greater than the default mechanical limit angle, or the actual mechanical limit angle may be less than the default mechanical limit angle. Therefore, in order to detect the actual maximum rotation range of the pan/tilt in the first direction (ie, the actual mechanical limit angle), the terminal device may preset a preset angle greater than the default mechanical limit angle, and control the pan/tilt according to the preset. The angle is rotated in the first direction. In this way, when the actual mechanical limit angle is greater than the default mechanical limit angle, the preset preset angle is less than or equal to the default mechanical limit angle, so that the maximum rotation range of the pan/tilt is the rotation range corresponding to the preset angle. The result is that the detected mechanical limit angle is smaller than the actual mechanical limit angle, which is beneficial to improve the accuracy of the calibration result.
例如,工厂计划生产一批pitch轴的上限位角度为30度(即默认机械限位角度)的云台,当云台制造完成后,由于生产制造等问题造成的误差,实际制造出的云台的机械限位角度(即实际机械限位角度)为35度。在校准过程中,若终端设备将预设角度设置为30度,即云台的pitch轴最多向上转动至30度对应的位置时,即认为云台到达限位,并将30度确定为检测到的云台的上限位角度,会导致校准结果不准确。For example, the factory plans to produce a set of pitch axes with an upper limit angle of 30 degrees (ie, the default mechanical limit angle). When the PTZ is manufactured, the actual production of the PTZ will be caused by errors caused by manufacturing and other issues. The mechanical limit angle (ie the actual mechanical limit angle) is 35 degrees. During the calibration process, if the terminal device sets the preset angle to 30 degrees, that is, the pitch axis of the pan/tilt is rotated up to the position corresponding to 30 degrees, the pan/tilt is considered to reach the limit, and 30 degrees is determined to be detected. The upper limit angle of the gimbal will result in inaccurate calibration results.
在一种实现方式中,预设角度可以是根据默认机械限位角度和最大误差角度(即在生产制造过程中导致的最大误差)确定的。例如,当最大误差角度为+3度,默认机械限位角度为30度时,可以将预设角度设置为33度或者更大的角度。其中,最大误差角度可以是通过统计数据得到的经验值。需要说明的是,预设角度可以是终端设备默认设置的,也可以是终端设备根据用户输入的设置操作确定的。In one implementation, the preset angle may be determined based on a default mechanical limit angle and a maximum error angle (ie, the maximum error caused during manufacturing). For example, when the maximum error angle is +3 degrees and the default mechanical limit angle is 30 degrees, the preset angle can be set to an angle of 33 degrees or more. Among them, the maximum error angle may be an empirical value obtained by statistical data. It should be noted that the preset angle may be set by default by the terminal device, or may be determined by the terminal device according to a setting operation input by the user.
302、终端设备控制云台的该关节向第一方向转动的过程中,获取预设时间段内该关节的第一关节角集合。302. The terminal device controls the first joint angle set of the joint in the preset time period during the process of controlling the joint of the pan/tilt to rotate in the first direction.
具体的,终端设备控制云台的该关节向第一方向转动的过程中,可以获取该关节当前的关节角,并记录该关节角。经过预设时间后,终端设备中存储的所有关节角(即第一关节角集合)可以表示该关节在该预设时间内随时间变化的转动情况(如正常转动或到达限位等)。在一种实现方式中,终端设备可以预设时间间隔为周期,记录该关节的关节角。在另一种实现方式中,终端设备可以随机记录该关节的关节角,本发明实施例对此不作限定。Specifically, in the process that the terminal device controls the joint of the gimbal to rotate in the first direction, the current joint angle of the joint can be acquired, and the joint angle is recorded. After a preset time, all joint angles stored in the terminal device (ie, the first joint angle set) may indicate the rotation of the joint over time during the preset time (such as normal rotation or reaching a limit, etc.). In one implementation, the terminal device may record the joint angle of the joint at a preset time interval. In another implementation manner, the terminal device can randomly record the joint angle of the joint, which is not limited by the embodiment of the present invention.
例如,当预设时间间隔为0.2s,预设时间段为1s时,终端设备在起始时间为00:00(分/秒)时,控制云台的第一关节向第一方向进行转动,此时第一关节的关节角为2度。每隔0.2s,终端设备获取一次第一关节的关节角,若第一关节匀速转动,在00:00~00:01的1s的预设时间段内,终端设备获得的第一关节角集合为{2°,4°,6°,8°,10°}。通过该第一关节角集合中的关节角,终端设备可以判断第一关节处于正常转动状态,即第一关节未到达限位。因为当第一关节到达限位时(即第一关节撞上限位部),会产生轻微的抖动,即第一关节的关节角在一段时间内会存在较小的上下浮动。即终端设备可以通过第一关节角集合中的关节角的变化情况,判断第一关节是否到达限位。例如,在与前一例子相同的条件下,在00:01~00:02的1s的预设时间段内,终端设备获取的第一关节角集合为{10°,10.5°,10.8°,10.3°,10.2°}时,即关节角在一个很小的范围内(最小值10°~最大值10.8°)变化时,终端设备可以确定该关节已到达限位。而此时很小的范围的界定,可以通过第一预设阈值来完成。例如,当第一预设阈值大于0.8°时,此时关节角在预设时间段内的角度变化(0.8°)小于第一预设阈值,因此可以认为此时关节角在预设时间段内的变化是一个很小的变化,从而认为该关节已经达到限位。For example, when the preset time interval is 0.2 s and the preset time period is 1 s, the terminal device controls the first joint of the gimbal to rotate in the first direction when the starting time is 00:00 (minutes/second). At this time, the joint angle of the first joint is 2 degrees. The terminal device acquires the joint angle of the first joint every 0.2 s. If the first joint rotates at a constant speed, the first joint angle set obtained by the terminal device is within a preset time period of 1 s of 00:00 to 00:01. {2°, 4°, 6°, 8°, 10°}. Through the joint angle in the first joint angle set, the terminal device can judge that the first joint is in a normal rotation state, that is, the first joint does not reach the limit position. Because when the first joint reaches the limit (that is, the first joint hits the upper limit), a slight jitter occurs, that is, the joint angle of the first joint has a small up and down float for a period of time. That is, the terminal device can determine whether the first joint has reached the limit by the change of the joint angle in the first joint angle set. For example, under the same conditions as the previous example, the first joint angle set acquired by the terminal device is {10°, 10.5°, 10.8°, 10.3 in a preset time period of 1 s of 00:01 to 00:02. °, 10.2 °}, that is, when the joint angle changes within a small range (minimum 10° to maximum 10.8°), the terminal device can determine that the joint has reached the limit. The definition of the small range at this time can be completed by the first preset threshold. For example, when the first preset threshold is greater than 0.8°, the angle change (0.8°) of the joint angle in the preset time period is less than the first preset threshold, so that the joint angle can be considered to be within the preset time period. The change is a small change, thinking that the joint has reached the limit.
需要说明的是,预设时间段可以是终端设备默认设置的,也可以是终端设备根据用户输入的操作确定的。上述预设时间段为1s仅用于举例,并不构成对本发明的限定。在其他可行的实施例中,预设时间段还可以是0.5s、2s或其他数值。It should be noted that the preset time period may be set by the terminal device by default, or may be determined by the terminal device according to the operation input by the user. The above-mentioned preset time period is 1 s only for the sake of example and does not constitute a limitation of the present invention. In other possible embodiments, the preset time period may also be 0.5 s, 2 s or other values.
303、若第一关节角集合中最大关节角和最小关节角之间的差值小于第一 预设阈值,则终端设备根据第一关节角集合中的关节角,确定云台在第一方向的机械限位角度。303. If the difference between the maximum joint angle and the minimum joint angle in the first joint angle set is less than the first preset threshold, the terminal device determines, according to the joint angle in the first joint angle set, the pan/tilt in the first direction. Mechanical limit angle.
具体的,终端设备获取预设时间段内该关节的第一关节角集合之后,还可以获取该第一关节角集合中的最大关节角和最小关节角。若最大关节角和最小关节角之间的差值小于第一预设阈值,即表明该关节在预设时间段内的关节角的反馈值在一个很小的范围(即第一预设阈值)内变化,则终端设备可以判断该关节到达限位。进一步的,终端设备可以根据第一关节角集合中的关节角,确定云台在第一方向的机械限位角度。Specifically, after the terminal device acquires the first joint angle set of the joint within the preset time period, the maximum joint angle and the minimum joint angle in the first joint angle set may also be acquired. If the difference between the maximum joint angle and the minimum joint angle is less than the first preset threshold, it indicates that the joint value of the joint angle of the joint in the preset time period is in a small range (ie, the first preset threshold) Within the change, the terminal device can determine that the joint has reached the limit. Further, the terminal device may determine the mechanical limit angle of the gimbal in the first direction according to the joint angle in the first joint angle set.
例如,当第一预设阈值为2度时,若终端设备获取的第一关节角集合为{109°,110°,109°,109.5°,110°},即最大关节角(110°)和最小关节角(109°)之间的差值(1°)小于第一预设阈值(2°)。终端设备可以确定该关节已到达限位。For example, when the first preset threshold is 2 degrees, if the first joint angle set acquired by the terminal device is {109°, 110°, 109°, 109.5°, 110°}, that is, the maximum joint angle (110°) and The difference (1°) between the minimum joint angles (109°) is less than the first preset threshold (2°). The terminal device can determine that the joint has reached the limit.
需要说明的是,第一预设阈值可以是终端设备默认设置的,也可以是终端设备根据用户输入的操作确定的,本发明实施例对此不作限定。还需要说明的是,云台的不同关节的第一预设阈值可以相同,也可以不同,本发明实施例对此不作限定。It should be noted that the first preset threshold may be set by default by the terminal device, or may be determined by the terminal device according to the operation input by the user, which is not limited by the embodiment of the present invention. It should be noted that the first preset thresholds of different joints of the gimbal may be the same or different, which is not limited by the embodiment of the present invention.
在一种实现方式中,终端设备判断云台到达限位后,可以将第一关节角集合中的最小关节角确定为云台在第一方向的机械限位角度。在另一种实现方式中,终端设备可以将第一关节角集合中的所有关节角的算术平均数,确定为云台在第一方向的机械限位角度。在又一种实现方式中,终端设备可以将第一关节角集合中的最大关节角和最小关节角的算术平均数,确定为云台在第一方向的机械限位角度。在又一种实现方式中,终端设备还可以通过对所采集角度数据进行最小二乘所得到的角度,确定为云台在第一方向的机械限位角度。本发明实施例对此不作限定。In an implementation manner, after determining, by the terminal device, that the gimbal reaches the limit, the minimum joint angle in the first joint angle set may be determined as the mechanical limit angle of the gimbal in the first direction. In another implementation, the terminal device may determine an arithmetic mean of all joint angles in the first set of joint angles as a mechanical limit angle of the gimbal in the first direction. In still another implementation, the terminal device may determine an arithmetic mean of the maximum joint angle and the minimum joint angle in the first joint angle set as the mechanical limit angle of the pan/tilt in the first direction. In another implementation manner, the terminal device may determine the mechanical limit angle of the pan/tilt in the first direction by using an angle obtained by performing least squares on the acquired angle data. This embodiment of the present invention does not limit this.
在一种实现方式中,若第一关节角集合中的最大关节角和最小关节角之间的差值大于或等于第一预设阈值,则终端设备可以判断该关节未到达限位。终端设备可以继续执行步骤301~303。In one implementation, if the difference between the maximum joint angle and the minimum joint angle in the first set of joint angles is greater than or equal to the first predetermined threshold, the terminal device can determine that the joint has not reached the limit. The terminal device may continue to perform steps 301-303.
可见,通过实施图3所描述的限位角度校准方法,可以在检测到云台撞到限位时,根据第一关节角集合中的关节角,确定云台在第一方向的机械限位角 度(即第一方向的实际机械限位角度),即可以校准云台的实际机械限位角度。It can be seen that by implementing the limit angle calibration method described in FIG. 3, when the pan/tilt hits the limit position, the mechanical limit angle of the gimbal in the first direction can be determined according to the joint angle in the first joint angle set. (ie the actual mechanical limit angle in the first direction), that is, the actual mechanical limit angle of the gimbal can be calibrated.
在一种实现方式中,终端设备确定云台在第一方向的机械限位角度之后,还可以存储云台在第一方向的机械限位角度。可选的,终端设备可以包括存储介质,终端设备确定云台在第一方向的机械限位角度之后,可以向该存储介质中存储云台在第一方向的机械限位角度。其中,存储介质可以包括非易失性存储器,例如快闪存储器(Flash Memory),固态硬盘等。可选的,存储介质也可以包括易失性存储器,例如随机存取存储器。可选的,存储介质还可以包括上述种类的存储器的组合。本发明实施例对该存储介质的具体类型不作限定。In an implementation manner, after determining, by the terminal device, the mechanical limit angle of the pan/tilt in the first direction, the terminal device may also store the mechanical limit angle of the pan/tilt in the first direction. Optionally, the terminal device may include a storage medium, and after determining, by the terminal device, the mechanical limit angle of the pan/tilt in the first direction, the mechanical limit angle of the pan/tilt in the first direction may be stored in the storage medium. The storage medium may include a nonvolatile memory such as a flash memory, a solid state hard disk, or the like. Alternatively, the storage medium may also include volatile memory, such as random access memory. Alternatively, the storage medium may also include a combination of the above types of memories. The specific type of the storage medium is not limited in the embodiment of the present invention.
在一种实现方式中,终端设备可以根据云台在第一方向的机械限位角度,确定规避限位算法的规避角度。在实际情况下,规避角度设置的比较大会导致云台撞到限位,从而造成画面的大范围抖动,使得拍摄的图像质量降低。In an implementation manner, the terminal device may determine an avoidance angle of the evasive limit algorithm according to a mechanical limit angle of the gimbal in the first direction. In the actual situation, the comparison of the evasive angle setting causes the pan/tilt to hit the limit, resulting in a wide range of jitter of the picture, which reduces the quality of the captured image.
本发明实施例中,规避限位算法中的规避角度用于在云台的关节向第一方向旋转到该规避角度时,使得该关节停止向第一方向继续转动,以避免云台撞到限位的情况,进而提高拍摄的图像质量。例如,当pitch轴的上限位的机械限位为30度,且终端设备将pitch轴的上限位的规避角度设置为29度时,云台在向上旋转到29度时,会自动停止继续向上旋转,以避免云台撞到限位。In the embodiment of the present invention, the avoidance angle in the evasive limit algorithm is used to stop the joint from rotating in the first direction when the joint of the gimbal rotates to the evasive angle in the first direction, so as to prevent the pontoon from hitting the limit. The situation of the bit, which in turn improves the quality of the captured image. For example, when the mechanical limit of the upper limit of the pitch axis is 30 degrees, and the terminal device sets the avoidance angle of the upper limit of the pitch axis to 29 degrees, the pan/tilt will automatically stop continuing to rotate upward when it is rotated upward to 29 degrees. To avoid the pan/tilt hitting the limit.
在本发明实施例中,通过对每台云台的机械限位角度进行校准,可以根据每台云台校准后的实际机械限位角度去决定规避限位算法的规避角度,能更好的解决因生产制造等问题造成的同一批次的云台的实际机械限位角度不同的问题。即解决现有技术中将同一批次的云台的规避角度设置为相同(即针对某些云台,规避角度有可能过大或者过小),有可能造成本身机械限位角度较小的云台由于规避角度设置的过大,而撞击限位导致的画面抖动问题。或者,本身机械限位角度较大的云台由于规避角度设置的过小,而过早地触发规避限位算法而造成的视角变化、不能满足拍摄需求的问题。In the embodiment of the present invention, by calibrating the mechanical limit angle of each pan/tilt, the circumvention angle of the evasive limit algorithm can be determined according to the actual mechanical limit angle after each pan/tilt calibration, which can better solve the problem. The problem of the actual mechanical limit angle of the same batch of pan/tilt caused by problems such as manufacturing. That is, in the prior art, the avoidance angles of the same batch of pan/tilt are set to be the same (that is, for some pan/tilt, the avoidance angle may be too large or too small), and the cloud with a small mechanical limit angle may be caused. The table is too large due to the avoidance angle, and the image jitter caused by the impact limit. Or, the gimbal with a large mechanical limit angle is too small to set the avoidance angle, and the viewing angle change caused by the prematurely triggering the avoidance limit algorithm cannot satisfy the shooting requirement.
在一种实现方式中,终端设备可以判断云台在第一方向的机械限位角度是否在预设角度范围之内;若是,则执行根据云台在第一方向的机械限位角度,确定规避限位算法的规避角度的步骤。In an implementation manner, the terminal device may determine whether the mechanical limit angle of the pan-tilt in the first direction is within a preset angle range; if yes, perform a mechanical limit angle according to the pan-tilt in the first direction to determine the avoidance The step of avoiding the angle of the limit algorithm.
在本发明实施例中,终端设备在云台每次上电时,都可以获取上一次校准得到的机械限位角度,并对该机械限位角度进行合理性判断(即判断该机械限 位角度是否在预设角度范围之内,或者判断角度误差是否小于第二预设阈值)。并在该机械限位角度合理的情况下,才根据该机械限位角度确定规避限位算法的规避角度。In the embodiment of the present invention, the terminal device can obtain the mechanical limit angle obtained by the last calibration when the PTZ is powered on, and make a reasonable judgment on the mechanical limit angle (ie, determine the mechanical limit angle) Whether it is within the preset angle range, or whether the angle error is less than the second preset threshold). And when the mechanical limit angle is reasonable, the avoidance angle of the avoidance limit algorithm is determined according to the mechanical limit angle.
通过这种方式,可以避免长时间未使用云台,云台在该时间内可能由于运输或者使用不当等原因产生撞击所导致的机械限位角度改变,而终端设备误将云台在撞击前校准得到的机械限位角度确定为撞击后的机械限位角度的情况。例如,云台在撞击前校准得到的机械限位角度为110度,在撞击后,云台的机械限位角度变为105度。若终端设备根据之前校准的机械限位角度(110度),将规避角度设置为109度,将导致云台在旋转至105度时撞上机械限位。因此,在云台每次上电时,均对其机械限位角度进行合理性判断,可以提高云台的可靠性。In this way, it is possible to avoid the use of the gimbal for a long time, and the mechanical limit angle change caused by the impact of the gimbal during this time may be caused by transportation or improper use, and the terminal device incorrectly calibrates the gimbal before the impact. The resulting mechanical limit angle is determined as the mechanical limit angle after impact. For example, the mechanical limit angle of the gimbal before calibration is 110 degrees. After the impact, the mechanical limit angle of the gimbal becomes 105 degrees. If the terminal device sets the avoidance angle to 109 degrees according to the previously calibrated mechanical limit angle (110 degrees), the pan/tilt will hit the mechanical limit when it is rotated to 105 degrees. Therefore, each time the PTZ is powered on, the mechanical limit angle is judged rationally, which can improve the reliability of the gimbal.
在一种实现方式中,终端设备控制云台的一个关节向第一方向进行转动之前,还可以接收用户的限位角度校准操作,控制云台进入限位角度校准模式;在云台处于限位角度校准模式下,执行控制云台的一个关节向第一方向进行转动的步骤。In an implementation manner, before the terminal device controls a joint of the pan-tilt to rotate in the first direction, the terminal can also receive the limit angle calibration operation of the user, and control the pan-tilt to enter the limit angle calibration mode; In the angle calibration mode, a step of controlling a joint of the pan/tilt to rotate in the first direction is performed.
在本发明实施例中,终端设备可以将校准云台的机械限位角度的功能开放给用户。具体的,终端设备上可以设置一个校准按钮,当终端设备检测到用户按下该校准按钮(即限位角度校准操作)时,可以控制云台进入限位角度校准模式。其中限位角度校准模式可以是关节角模式。In the embodiment of the present invention, the terminal device can open the function of calibrating the mechanical limit angle of the pan/tilt to the user. Specifically, a calibration button can be set on the terminal device, and when the terminal device detects that the user presses the calibration button (ie, the limit angle calibration operation), the pan/tilt can be controlled to enter the limit angle calibration mode. The limit angle calibration mode may be the joint angle mode.
通过这种方式,使得用户也可以对云台的机械限位角度进行校准。并且校准过程简单便捷,可以经常对云台的机械限位角度进行校准,使得终端设备中存储的机械限位角度与实际机械限位角度之间的误差更小。进一步的,终端设备根据存储的机械限位角度设置规避角度时,可以使得云台撞上机械限位的可能性降低,有利于提高云台的可靠性。In this way, the user can also calibrate the mechanical limit angle of the gimbal. And the calibration process is simple and convenient, and the mechanical limit angle of the pan/tilt can be calibrated frequently, so that the error between the mechanical limit angle stored in the terminal device and the actual mechanical limit angle is smaller. Further, when the terminal device sets the evasive angle according to the stored mechanical limit angle, the possibility that the pan/tilt hits the mechanical limit is reduced, which is beneficial to improving the reliability of the pan/tilt.
在一种实现方式中,用户还可以通过手动拨动云台的转动轴的方式,对云台的转动轴的机械限位角度进行校准。In an implementation manner, the user can also calibrate the mechanical limit angle of the rotating shaft of the pan/tilt by manually dialing the rotating shaft of the pan/tilt.
请参阅图5,图5是本发明实施例提供的另一种限位角度校准方法的流程示意图。如图5所示,该限位角度校准方法可包括501~506部分。其中,Please refer to FIG. 5. FIG. 5 is a schematic flowchart diagram of another method for limiting a limit angle according to an embodiment of the present invention. As shown in FIG. 5, the limit angle calibration method may include sections 501 to 506. among them,
501、终端设备控制云台的一个关节向第一方向进行转动。501. The terminal device controls a joint of the pan/tilt to rotate in a first direction.
502、终端设备控制云台的该关节向第一方向转动的过程中,获取预设时间段内关节的第一关节角集合。502. The terminal device controls the first joint angle set of the joint in the preset time period during the process of controlling the joint of the pan/tilt to rotate in the first direction.
在本发明实施例中,步骤501和502的执行过程可分别参见图3中步骤301和302中的具体描述,在此不赘述。In the embodiment of the present invention, the execution processes of steps 501 and 502 can be respectively referred to the specific descriptions in steps 301 and 302 in FIG. 3, and details are not described herein.
503、若第一关节角集合中最大关节角和最小关节角之间的差值小于第一预设阈值,则终端设备根据第一关节角集合中的关节角确定目标关节角。503. If the difference between the maximum joint angle and the minimum joint angle in the first joint angle set is less than the first preset threshold, the terminal device determines the target joint angle according to the joint angle in the first joint angle set.
在本发明实施例中,终端设备在确定云台在第一方向的机械限位角度之前,先确定目标关节角。进一度的,判断得到的目标关节角是否合理,以决定是否更新云台在第一方向的机械限位角度。通过这种方式,可以进一步的提高校准结果的准确度。In the embodiment of the present invention, the terminal device determines the target joint angle before determining the mechanical limit angle of the gimbal in the first direction. Once again, it is judged whether the target joint angle is reasonable or not to determine whether to update the mechanical limit angle of the gimbal in the first direction. In this way, the accuracy of the calibration results can be further improved.
在一种实现方式中,终端设备判断云台到达限位后,可以将第一关节角集合中的最小关节角,确定为云台在第一方向的目标关节角。在另一种实现方式中,终端设备可以将第一关节角集合中的所有关节角的算术平均数,确定为云台在第一方向的目标关节角。在又一种实现方式中,终端设备可以将第一关节角集合中的最大关节角和最小关节角的算术平均数,确定为云台在第一方向的目标关节角。在又一种实现方式中,终端设备还可以通过对所采集角度数据进行最小二乘所得到的角度,确定为云台在第一方向的目标关节角。本发明实施例对此不作限定。In an implementation manner, after determining, by the terminal device, that the gimbal reaches the limit, the minimum joint angle in the first joint angle set may be determined as the target joint angle of the gimbal in the first direction. In another implementation, the terminal device may determine an arithmetic mean of all joint angles in the first set of joint angles as a target joint angle of the gimbal in the first direction. In still another implementation, the terminal device may determine an arithmetic mean of the maximum joint angle and the minimum joint angle in the first joint angle set as the target joint angle of the pan/tilt in the first direction. In still another implementation manner, the terminal device may further determine the target joint angle of the pan/tilt in the first direction by using an angle obtained by performing least squares on the acquired angle data. This embodiment of the present invention does not limit this.
504、终端设备判断目标关节角是否在预设角度范围之内。504. The terminal device determines whether the target joint angle is within a preset angle range.
具体的,终端设备判断目标关节角是否在预设角度范围之内,用于判断得到的目标关节角是否合理。一般地,由于生产制造等问题造成的误差不会很大,即得到的目标关节角与默认机械限位角度之间的差值应在一定范围内。例如,当默认机械限位角度为110度,最大生产误差为3度时,合理的目标关节角可以在[107°,113°](即预设角度范围)之内。若得到的目标关节角在预设角度范围之内,则说明得到的目标关节角合理。若得到的目标关节角不在预设角度范围之内,则说明得到的目标关节角不合理。其不合理的产生原因可能是在转动过程中关节卡住了,或者,在转动过程中存在手档等问题,本发明实施例对此不作限定。Specifically, the terminal device determines whether the target joint angle is within a preset angle range, and is used to determine whether the obtained target joint angle is reasonable. Generally, the error caused by problems such as manufacturing is not so great, that is, the difference between the obtained target joint angle and the default mechanical limit angle should be within a certain range. For example, when the default mechanical limit angle is 110 degrees and the maximum production error is 3 degrees, a reasonable target joint angle can be within [107°, 113°] (ie, the preset angle range). If the obtained target joint angle is within the preset angle range, the obtained target joint angle is reasonable. If the obtained target joint angle is not within the preset angle range, the obtained target joint angle is unreasonable. The reason for the unreasonable reason may be that the joint is stuck during the rotation, or there is a problem such as a hand file during the rotation, which is not limited by the embodiment of the present invention.
505、若目标关节角在预设角度范围之内,则终端设备将目标关节角确定为云台在第一方向的机械限位角度。505. If the target joint angle is within a preset angle range, the terminal device determines the target joint angle as a mechanical limit angle of the pan/tilt in the first direction.
在本发明实施例中,若目标关节角在预设角度范围之内,即说明得到的目标关节角是合理的,终端设备可以将目标关节角确定为云台在第一方向的机械限位角度。即将云台在第一方向的机械限位角度校准为目标关节角。通过合理性判断的方式,可以提高校准结果的准确度。In the embodiment of the present invention, if the target joint angle is within the preset angle range, that is, the obtained target joint angle is reasonable, the terminal device can determine the target joint angle as the mechanical limit angle of the gimbal in the first direction. . The mechanical limit angle of the gimbal in the first direction is calibrated to the target joint angle. The accuracy of the calibration results can be improved by means of reasonable judgment.
506、若目标关节角不在预设角度范围之内,则终端设备保持已设置的第一方向的机械限位角度不变。506. If the target joint angle is not within the preset angle range, the terminal device maintains the mechanical limit angle of the first direction that has been set unchanged.
在本发明实施例中,若目标关节角不在预设角度范围之内,即说明得到的目标关节角是不合理的,终端设备可以保持已设置的第一方向的机械限位角度不变。在一种实现方式中,在云台出厂时,终端设备可以将第一方向的机械限位角度设置为预设初始值。预设初始值可以是默认机械限位角度、空值或其他数值,本发明实施例对此不作限定。In the embodiment of the present invention, if the target joint angle is not within the preset angle range, that is, the obtained target joint angle is unreasonable, the terminal device can maintain the mechanical limit angle of the first direction that has been set unchanged. In an implementation manner, when the pan/tilt is shipped from the factory, the terminal device can set the mechanical limit angle of the first direction to a preset initial value. The preset initial value may be a default mechanical limit angle, a null value or other values, which is not limited in the embodiment of the present invention.
通过合理性判断的方式,可以避免将不合理的目标关节角确定为云台在第一方向的机械限位角度的情况,可以提高校准结果的准确度。By means of reasonable judgment, it is possible to avoid determining the unreasonable target joint angle as the mechanical limit angle of the gimbal in the first direction, and the accuracy of the calibration result can be improved.
在一种实现方式中,终端设备根据第一关节角集合中的关节角确定目标关节角之后,可以用以下步骤替换步骤504和505:终端设备获取角度误差,角度误差为目标关节角和云台在第一方向的默认机械限位角度之间的差值的绝对值;若角度误差小于第二预设阈值,则终端设备可以将目标关节角确定为云台在第一方向的机械限位角度。In an implementation manner, after the terminal device determines the target joint angle according to the joint angle in the first joint angle set, steps 504 and 505 may be replaced by the following steps: the terminal device acquires the angle error, and the angle error is the target joint angle and the pan/tilt The absolute value of the difference between the default mechanical limit angles in the first direction; if the angle error is less than the second predetermined threshold, the terminal device may determine the target joint angle as the mechanical limit angle of the pan/tilt in the first direction .
其中,第二预设阈值是云台在生产制造过程中产生的最大误差的绝对值。角度误差为目标关节角和云台在第一方向的默认机械限位角度之间的差值的绝对值,即角度误差为检测出的云台的实际生产误差的绝对值。若角度误差小于第二预设阈值,即表明得到的目标关节角是在合理的误差范围内的,即在校准过程中发生错误的可能性很低,校准结果的可信度很高。因此,终端设备可以将目标关节角确定为云台在第一方向的机械限位角度。The second preset threshold is the absolute value of the maximum error generated by the gimbal during the manufacturing process. The angular error is the absolute value of the difference between the target joint angle and the default mechanical limit angle of the gimbal in the first direction, that is, the angular error is the absolute value of the detected actual production error of the gimbal. If the angle error is less than the second preset threshold, it indicates that the obtained target joint angle is within a reasonable error range, that is, the probability of occurrence of an error during the calibration process is low, and the reliability of the calibration result is high. Therefore, the terminal device can determine the target joint angle as the mechanical limit angle of the pan/tilt in the first direction.
例如,当云台在第一方向的默认机械限位角度为110度,且第二预设阈值为3度时。若得到的目标关节角为109度,即角度误差(1度)小于第二预设阈值(3度)时,可以将云台在第一方向的机械限位角度确定为109度。For example, when the pan/tilt has a default mechanical limit angle of 110 degrees in the first direction and the second preset threshold is 3 degrees. If the obtained target joint angle is 109 degrees, that is, the angle error (1 degree) is less than the second preset threshold (3 degrees), the mechanical limit angle of the gimbal in the first direction can be determined to be 109 degrees.
在一种实现方式中,终端设备获取角度误差之后,可以用以下步骤替换步骤506:若角度误差大于或等于第二预设阈值,则终端设备可以保持已设置的第一方向的机械限位角度不变。角度误差大于或等于第二预设阈值时,表明得到的目标关节角不在合理的误差范围内的,即在校准过程中发生错误的可能性很高,校准结果的可信度很低。因此,终端设备可以忽略得到的目标关节角,并保持已设置的第一方向的机械限位角度不变。以避免将不合理的目标关节角确定为云台在第一方向的机械限位角度的情况,有利于提高校准结果的准确度。In an implementation manner, after the terminal device acquires the angle error, the step 506 may be replaced by the following steps: if the angle error is greater than or equal to the second preset threshold, the terminal device may maintain the mechanical limit angle of the first direction that has been set. constant. When the angle error is greater than or equal to the second preset threshold, it indicates that the obtained target joint angle is not within a reasonable error range, that is, the probability of occurrence of an error during the calibration process is high, and the reliability of the calibration result is low. Therefore, the terminal device can ignore the obtained target joint angle and maintain the mechanical limit angle of the first direction that has been set unchanged. In order to avoid determining the unreasonable target joint angle as the mechanical limit angle of the gimbal in the first direction, it is beneficial to improve the accuracy of the calibration result.
可见,通过实施图3所描述的限位角度校准方法,可以在检测到云台撞到限位时,根据第一关节角集合中的关节角,确定目标关节角,并对目标关节角进行合理性判断,在目标关节角合理的情况下,才将目标关节角确定为云台在第一方向的机械限位角度,可以更准确地校准云台的实际机械限位角度。It can be seen that by implementing the limit angle calibration method described in FIG. 3, when the pan/tilt hits the limit position, the target joint angle can be determined according to the joint angle in the first joint angle set, and the target joint angle is reasonable. Sexual judgment, when the target joint angle is reasonable, the target joint angle is determined as the mechanical limit angle of the gimbal in the first direction, and the actual mechanical limit angle of the gimbal can be more accurately calibrated.
请参阅图6,图6是本发明实施例提供的又一种限位角度校准方法的流程示意图。如图6所示,该限位角度校准方法可包括601~606部分。其中,Please refer to FIG. 6. FIG. 6 is a schematic flowchart diagram of still another method for limiting a limit angle according to an embodiment of the present invention. As shown in FIG. 6, the limit angle calibration method may include parts 601 to 606. among them,
601、终端设备控制云台的一个关节向第一方向进行转动。601. The terminal device controls a joint of the pan/tilt to rotate in a first direction.
602、终端设备控制云台的该关节向第一方向转动的过程中,获取预设时间段内该关节的第一关节角集合。602. The terminal device controls the first joint angle set of the joint in the preset time period during the process of controlling the joint of the pan/tilt to rotate in the first direction.
603、若第一关节角集合中最大关节角和最小关节角之间的差值小于第一预设阈值,则终端设备根据第一关节角集合中的关节角,确定云台在第一方向的机械限位角度。603. If the difference between the maximum joint angle and the minimum joint angle in the first joint angle set is less than the first preset threshold, the terminal device determines, according to the joint angle in the first joint angle set, the pan/tilt in the first direction. Mechanical limit angle.
在本发明实施例中,步骤601、602和603的执行过程可分别参见图3中步骤301、302和303中的具体描述,在此不赘述。In the embodiment of the present invention, the execution processes of steps 601, 602, and 603 may be specifically described in steps 301, 302, and 303 in FIG. 3, and details are not described herein.
604、终端设备控制云台的该关节向第二方向进行转动,第二方向为第一方向的反方向。604. The terminal device controls the joint of the pan/tilt to rotate in a second direction, where the second direction is a reverse direction of the first direction.
在本发明实施例中,终端设备首先控制云台的该关节向第一方向进行转动,当云台在第一方向到达机械限位时,即云台在第一方向的机械限位角度的校准完成时,终端设备可以存储校准得到的该方向的机械限位角度。并控制云台自动向第一方向的反方向(即第二方向)进行转动,即对云台在第二方向的 机械限位角度进行校准。In the embodiment of the present invention, the terminal device first controls the joint of the pan-tilt to rotate in a first direction, and when the pan-tilt reaches the mechanical limit in the first direction, that is, the mechanical limit angle of the pan-tilt in the first direction is calibrated. Upon completion, the terminal device can store the mechanical limit angle of the direction obtained by calibration. And controlling the pan/tilt to automatically rotate in the opposite direction of the first direction (ie, the second direction), that is, calibrating the mechanical limit angle of the gimbal in the second direction.
通过这种方式,可以避免对云台在一个转动轴上的两个不同方向的机械限位角度进行校准时,需要在其中一个方向上的校准完成时,重新控制云台对另一个方向的机械限位角度进行校准。即可以自动、一次性校准云台在一个转动轴上的两个不同方向的机械限位角度,有利于提高校准效率和用户体验。In this way, when the mechanical limit angles of the pan/tilt in two different directions on one rotating axis are calibrated, it is necessary to re-control the mechanism of the pan/tilt to the other direction when the calibration in one of the directions is completed. The limit angle is calibrated. That is, the mechanical limit angles of the two different directions of the pan/tilt on one rotating axis can be automatically and once-timely calibrated, which is beneficial to improve calibration efficiency and user experience.
605、终端设备控制云台的该关节向第二方向转动的过程中,获取预设时间段内该关节的第二关节角集合。605. The terminal device controls the second joint angle set of the joint in the preset time period during the process of controlling the joint of the pan/tilt to rotate in the second direction.
在本发明实施例中,第二关节角集合中包含的关节角是云台的该关节向第二方向转动的过程中获得的关节角。In the embodiment of the invention, the joint angle included in the second joint angle set is the joint angle obtained during the rotation of the joint of the gimbal in the second direction.
606、若第二关节角集合中最大关节角和最小关节角之间的差值小于第一预设阈值,则终端设备根据第二关节角集合中的关节角,确定云台在第二方向的机械限位角度。606. If the difference between the maximum joint angle and the minimum joint angle in the second joint angle set is less than the first preset threshold, the terminal device determines, according to the joint angle in the second joint angle set, the pan/tilt in the second direction. Mechanical limit angle.
在本发明实施例中,除了转动方向改变之外,步骤604、605和606的执行过程可分别参见图3中步骤301、302和303中的具体描述,在此不赘述。In the embodiment of the present invention, the execution of steps 604, 605, and 606 may be specifically described in steps 301, 302, and 303 of FIG. 3, except for the change of the rotation direction, and details are not described herein.
需要说明的是,在本发明实施例中,可以首先执行步骤601~603,再执行步骤604~606。也可以先执行步骤604~606,再执行步骤601~603。本发明实施例对此不作限定。It should be noted that, in the embodiment of the present invention, steps 601-603 may be performed first, and then steps 604-606 may be performed. Steps 604-606 may also be performed first, and then steps 601-603 are performed. This embodiment of the present invention does not limit this.
可见,通过实施图6所描述的限位角度校准方法,可以自动检测云台是否撞到机械限位,并在云台撞到机械限位时,自动控制云台向相反方向进行转动,进而检测反方向的机械限位角度。可以一次性校准云台在一个转动轴上的不同方向的机械限位角度,有利于提高校准效率和用户体验。It can be seen that by implementing the limit angle calibration method described in FIG. 6, it is possible to automatically detect whether the gimbal hits the mechanical limit, and automatically controls the gimbal to rotate in the opposite direction when the pan/tilt hits the mechanical limit, and then detects Mechanical limit angle in the opposite direction. The mechanical limit angle of the gimbal in different directions on one rotating axis can be calibrated at one time, which is beneficial to improve calibration efficiency and user experience.
请参阅图7,图7是本发明实施例提供的一种终端设备的结构示意图。如图7所示,该终端设备包括存储器701和处理器702,存储器701和处理器702可以通过总线703相连接,该终端设备可以通过有线或无线方式与云台连接(图未示)。Referring to FIG. 7, FIG. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present invention. As shown in FIG. 7, the terminal device includes a memory 701 and a processor 702. The memory 701 and the processor 702 can be connected through a bus 703. The terminal device can be connected to the cloud platform by wire or wirelessly (not shown).
存储器701可以包括易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储器701也可以包括非易失性存储器(non-volatile memory),例如快闪存储器(flash memory),固态硬盘(solid-state  drive,SSD)等;存储器701还可以包括上述种类的存储器的组合。The memory 701 may include a volatile memory such as a random-access memory (RAM); the memory 701 may also include a non-volatile memory such as a flash memory (flash) Memory), solid state drive (SSD), etc.; memory 701 may also include a combination of the above types of memory.
处理器702可以包括中央处理器(central processing unit,CPU)。处理器702还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)等。上述PLD可以是现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)等。其中: Processor 702 can include a central processing unit (CPU). Processor 702 can also further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or the like. The PLD may be a field-programmable gate array (FPGA), a general array logic (GAL), or the like. among them:
存储器701,用于存储程序指令;a memory 701, configured to store program instructions;
处理器702,调用程序指令以用于:The processor 702 calls the program instructions to:
控制云台的一个关节向第一方向进行转动;Controlling a joint of the gimbal to rotate in a first direction;
控制云台的该关节向第一方向转动的过程中,获取预设时间段内该关节的第一关节角集合;During the process of controlling the joint of the gimbal to rotate in the first direction, acquiring a first joint angle set of the joint within a preset time period;
若第一关节角集合中最大关节角和最小关节角之间的差值小于第一预设阈值,则根据第一关节角集合中的关节角,确定云台在第一方向的机械限位角度。If the difference between the maximum joint angle and the minimum joint angle in the first joint angle set is less than the first preset threshold, determining the mechanical limit angle of the gimbal in the first direction according to the joint angle in the first joint angle set .
在一种实现方式中,处理器702用于控制云台的一个关节向第一方向进行转动时,具体用于:In an implementation manner, when the processor 702 is configured to control a joint of the pan/tilt to rotate in a first direction, the processor 702 is specifically configured to:
控制云台的一个关节按照预设角度向第一方向进行转动,预设角度大于云台在第一方向的默认机械限位角度。A joint controlling the gimbal rotates in a first direction according to a preset angle, and the preset angle is greater than a default mechanical limit angle of the gimbal in the first direction.
在一种实现方式中,处理器702用于根据第一关节角集合中的关节角,确定云台在第一方向的机械限位角度时,具体用于:In one implementation, the processor 702 is configured to determine, according to the joint angle in the first set of joint angles, the mechanical limit angle of the gimbal in the first direction, specifically for:
根据第一关节角集合中的关节角确定目标关节角;Determining a target joint angle according to a joint angle in the first joint angle set;
将目标关节角确定为云台在第一方向的机械限位角度。The target joint angle is determined as the mechanical limit angle of the gimbal in the first direction.
在一种实现方式中,目标关节角为第一关节角集合中的最小关节角,或目标关节角为第一关节角集合中的平均关节角。In one implementation, the target joint angle is the smallest joint angle in the first set of joint angles, or the target joint angle is the average joint angle in the first set of joint angles.
在一种实现方式中,处理器702根据第一关节角集合中的关节角确定目标关节角之后,还用于:In one implementation, after determining the target joint angle based on the joint angle in the first set of joint angles, the processor 702 is further configured to:
判断目标关节角是否在预设角度范围之内;Determining whether the target joint angle is within a preset angle range;
若是,则将目标关节角确定为云台在第一方向的机械限位角度。If yes, the target joint angle is determined as the mechanical limit angle of the gimbal in the first direction.
在一种实现方式中,处理器702判断目标关节角是否在预设角度范围之内之后,还用于:In one implementation, after the processor 702 determines whether the target joint angle is within a preset angle range, the processor 702 is further configured to:
若目标关节角不在预设角度范围之内,则保持已设置的第一方向的机械限位角度不变。If the target joint angle is not within the preset angle range, the mechanical limit angle of the first direction that has been set is maintained.
在一种实现方式中,处理器702根据第一关节角集合中的关节角确定目标关节角之后,还用于:In one implementation, after determining the target joint angle based on the joint angle in the first set of joint angles, the processor 702 is further configured to:
获取角度误差,角度误差为目标关节角和云台在第一方向的默认机械限位角度之间的差值的绝对值;Obtaining an angular error, the angular error being the absolute value of the difference between the target joint angle and the default mechanical limit angle of the gimbal in the first direction;
若角度误差小于第二预设阈值,则将目标关节角确定为云台在第一方向的机械限位角度。If the angular error is less than the second predetermined threshold, the target joint angle is determined as the mechanical limit angle of the gimbal in the first direction.
在一种实现方式中,处理器702获取角度误差之后,还用于:In one implementation, after the processor 702 acquires the angular error, it is further used to:
若角度误差大于或等于第二预设阈值,则保持已设置的第一方向的机械限位角度不变。If the angle error is greater than or equal to the second preset threshold, the mechanical limit angle of the first direction that has been set is maintained.
在一种实现方式中,该终端设备还可以包括存储介质704,处理器702确定云台在第一方向的机械限位角度之后,还用于:In an implementation manner, the terminal device may further include a storage medium 704. After determining the mechanical limit angle of the pan/tilt in the first direction, the processor 702 is further configured to:
向该存储介质704中存储云台在第一方向的机械限位角度。The mechanical limit angle of the pan/tilt in the first direction is stored in the storage medium 704.
存储介质704可以包括易失性存储器,例如随机存取存储器;存储介质704也可以包括非易失性存储器,例如快闪存储器,固态硬盘等;存储介质704还可以包括上述种类的存储器的组合。 Storage medium 704 can include volatile memory, such as random access memory; storage medium 704 can also include non-volatile memory, such as flash memory, solid state drive, and the like; storage medium 704 can also include a combination of the above-described types of memory.
在另一种实现方式中,处理器702确定云台在第一方向的机械限位角度之后,还用于:In another implementation, after determining the mechanical limit angle of the gimbal in the first direction, the processor 702 is further configured to:
向存储器701中存储云台在第一方向的机械限位角度。The mechanical limit angle of the pan/tilt in the first direction is stored in the memory 701.
在一种实现方式中,处理器702还用于:In an implementation, the processor 702 is further configured to:
根据云台在第一方向的机械限位角度,确定规避限位算法的规避角度。According to the mechanical limit angle of the gimbal in the first direction, the avoidance angle of the avoidance limit algorithm is determined.
在一种实现方式中,处理器702还用于:In an implementation, the processor 702 is further configured to:
判断云台在第一方向的机械限位角度是否在预设角度范围之内;Determining whether the mechanical limit angle of the gimbal in the first direction is within a preset angle range;
若是,则执行根据云台在第一方向的机械限位角度,确定规避限位算法的规避角度的步骤。If yes, the step of determining the avoidance angle of the avoidance limit algorithm according to the mechanical limit angle of the gimbal in the first direction is performed.
在一种实现方式中,处理器702控制云台的一个关节向第一方向进行转动 之前,还用于:In one implementation, before the processor 702 controls a joint of the gimbal to rotate in the first direction, the processor 702 is further configured to:
接收用户的限位角度校准操作,控制云台进入限位角度校准模式;Receiving the user's limit angle calibration operation, and controlling the pan/tilt to enter the limit angle calibration mode;
在云台处于限位角度校准模式下,执行控制云台的一个关节向第一方向进行转动的步骤。When the pan/tilt is in the limit angle calibration mode, a step of controlling a joint of the pan/tilt to rotate in the first direction is performed.
在一种实现方式中,处理器702还用于:In an implementation, the processor 702 is further configured to:
控制云台的该关节向第二方向进行转动,第二方向为第一方向的反方向;The joint controlling the gimbal rotates in a second direction, and the second direction is a reverse direction of the first direction;
控制云台的该关节向第二方向转动的过程中,获取预设时间段内该关节的第二关节角集合;During the process of controlling the joint of the gimbal to rotate in the second direction, acquiring a second joint angle set of the joint within a preset time period;
若第二关节角集合中最大关节角和最小关节角之间的差值小于第一预设阈值,则根据第二关节角集合中的关节角,确定云台在第二方向的机械限位角度。If the difference between the maximum joint angle and the minimum joint angle in the second joint angle set is less than the first preset threshold, determining the mechanical limit angle of the gimbal in the second direction according to the joint angle in the second joint angle set .
具体实现中,本发明实施例中所描述处理器702可执行本发明实施例图3、图5和图6提供的限位角度校准方法所描述的实现方式,在此不赘述。In a specific implementation, the processor 702 in the embodiment of the present invention may be implemented as described in the limiting angle calibration method provided in FIG. 3, FIG. 5 and FIG. 6 of the embodiment of the present invention, and details are not described herein.
以上,仅为本发明的部分实施方式,但本发明的保护范围并不局限于此,在上述实施例的基础上想到的各种等效的修改或替换,都应涵盖在本发明的保护范围之内。The above is only a part of the embodiments of the present invention, but the scope of protection of the present invention is not limited thereto, and various equivalent modifications or substitutions that are conceived on the basis of the above embodiments are intended to be covered by the scope of the present invention. within.

Claims (26)

  1. 一种限位角度校准方法,应用于校准云台的限位角度的终端设备,其特征在于,包括:A limit angle calibration method for a terminal device for calibrating a limit angle of a pan/tilt, characterized in that it comprises:
    控制所述云台的一个关节向第一方向进行转动;Controlling a joint of the gimbal to rotate in a first direction;
    控制所述云台的所述关节向所述第一方向转动的过程中,获取预设时间段内所述关节的第一关节角集合;And acquiring a first joint angle set of the joint in a preset time period during the process of controlling the joint of the pan/tilt to rotate in the first direction;
    若所述第一关节角集合中最大关节角和最小关节角之间的差值小于第一预设阈值,则根据所述第一关节角集合中的关节角,确定所述云台在所述第一方向的机械限位角度。If the difference between the maximum joint angle and the minimum joint angle in the first joint angle set is less than a first preset threshold, determining, according to the joint angle in the first joint angle set, the pan/tilt The mechanical limit angle of the first direction.
  2. 根据权利要求1所述的方法,其特征在于,所述控制所述云台的一个关节向第一方向进行转动,包括:The method according to claim 1, wherein said controlling a joint of said pan/tilt to rotate in a first direction comprises:
    控制所述云台的一个关节按照预设角度向第一方向进行转动,所述预设角度大于所述云台在所述第一方向的默认机械限位角度。Controlling a joint of the pan/tilt to rotate in a first direction according to a preset angle, the preset angle being greater than a default mechanical limit angle of the pan-tilt in the first direction.
  3. 根据权利要求1或2所述的方法,其特征在于,所述根据所述第一关节角集合中的关节角,确定所述云台在所述第一方向的机械限位角度,包括:The method according to claim 1 or 2, wherein the determining the mechanical limit angle of the gimbal in the first direction according to the joint angle in the first set of joint angles comprises:
    根据所述第一关节角集合中的关节角确定目标关节角;Determining a target joint angle according to a joint angle in the first set of joint angles;
    将所述目标关节角确定为所述云台在所述第一方向的机械限位角度。The target joint angle is determined as a mechanical limit angle of the pan/tilt in the first direction.
  4. 根据权利要求3所述的方法,其特征在于,所述目标关节角为所述第一关节角集合中的最小关节角,或所述目标关节角为所述第一关节角集合中的平均关节角。The method according to claim 3, wherein said target joint angle is a minimum joint angle in said first joint angle set, or said target joint angle is an average joint in said first joint angle set angle.
  5. 根据权利要求3或4所述的方法,其特征在于,所述根据所述第一关节角集合中的关节角确定目标关节角之后,所述方法还包括:The method according to claim 3 or 4, wherein after the determining the target joint angle based on the joint angle in the first set of joint angles, the method further comprises:
    判断所述目标关节角是否在预设角度范围之内;Determining whether the target joint angle is within a preset angle range;
    若是,则将所述目标关节角确定为所述云台在所述第一方向的机械限位角 度。If so, the target joint angle is determined as the mechanical limit angle of the gimbal in the first direction.
  6. 根据权利要求5所述的方法,其特征在于,所述判断所述目标关节角是否在预设角度范围之内之后,所述方法还包括:The method according to claim 5, wherein after the determining whether the target joint angle is within a preset angle range, the method further comprises:
    若所述目标关节角不在所述预设角度范围之内,则保持已设置的所述第一方向的机械限位角度不变。If the target joint angle is not within the preset angle range, the mechanical limit angle of the first direction that has been set is kept unchanged.
  7. 根据权利要求3或4所述的方法,其特征在于,所述根据所述第一关节角集合中的关节角确定目标关节角之后,所述方法还包括:The method according to claim 3 or 4, wherein after the determining the target joint angle based on the joint angle in the first set of joint angles, the method further comprises:
    获取角度误差,所述角度误差为所述目标关节角和所述云台在所述第一方向的默认机械限位角度之间的差值的绝对值;Obtaining an angular error, the angular error being an absolute value of a difference between the target joint angle and a default mechanical limit angle of the gimbal in the first direction;
    若所述角度误差小于第二预设阈值,则将所述目标关节角确定为所述云台在所述第一方向的机械限位角度。And if the angle error is less than the second preset threshold, determining the target joint angle as a mechanical limit angle of the pan/tilt in the first direction.
  8. 根据权利要求7所述的方法,其特征在于,所述获取角度误差之后,所述方法还包括:The method according to claim 7, wherein after the obtaining the angle error, the method further comprises:
    若所述角度误差大于或等于所述第二预设阈值,则保持已设置的所述第一方向的机械限位角度不变。If the angle error is greater than or equal to the second preset threshold, the mechanical limit angle of the first direction that has been set is kept unchanged.
  9. 根据权利要求1~8任意一项所述的方法,其特征在于,确定所述云台在所述第一方向的机械限位角度之后,所述方法还包括:The method according to any one of claims 1 to 8, wherein after the determining the mechanical limit angle of the gimbal in the first direction, the method further comprises:
    存储所述云台在所述第一方向的机械限位角度。And storing a mechanical limit angle of the pan/tilt in the first direction.
  10. 根据权利要求1~9任意一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 9, wherein the method further comprises:
    根据所述云台在所述第一方向的机械限位角度,确定规避限位算法的规避角度。Determining an avoidance angle of the avoidance limit algorithm according to the mechanical limit angle of the pan/tilt in the first direction.
  11. 根据权利要求10所述的方法,其特征在于,所述方法还包括:The method of claim 10, wherein the method further comprises:
    判断所述云台在所述第一方向的机械限位角度是否在预设角度范围之内;Determining whether the mechanical limit angle of the pan/tilt in the first direction is within a preset angle range;
    若是,则执行所述根据所述云台在所述第一方向的机械限位角度,确定规避限位算法的规避角度的步骤。If yes, performing the step of determining an avoidance angle of the avoidance limit algorithm according to the mechanical limit angle of the gimbal in the first direction.
  12. 根据权利要求1所述的方法,其特征在于,所述控制所述云台的一个关节向第一方向进行转动之前,所述方法还包括:The method according to claim 1, wherein the method further comprises: before the controlling a joint of the gimbal to rotate in a first direction, the method further comprises:
    接收用户的限位角度校准操作,控制所述云台进入限位角度校准模式;Receiving a limit angle calibration operation of the user, and controlling the pan/tilt to enter a limit angle calibration mode;
    在所述云台处于所述限位角度校准模式下,执行所述控制所述云台的一个关节向第一方向进行转动的步骤。And performing the step of controlling a joint of the pan/tilt to rotate in a first direction when the pan/tilt is in the limit angle calibration mode.
  13. 根据权利要求1~12任意一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 12, further comprising:
    控制所述云台的所述关节向第二方向进行转动,所述第二方向为所述第一方向的反方向;Controlling the joint of the pan/tilt to rotate in a second direction, the second direction being a reverse direction of the first direction;
    控制所述云台的所述关节向所述第二方向转动的过程中,获取所述预设时间段内所述关节的第二关节角集合;And acquiring a second joint angle set of the joint in the preset time period during the process of controlling the joint of the pan/tilt to rotate in the second direction;
    若所述第二关节角集合中最大关节角和最小关节角之间的差值小于所述第一预设阈值,则根据所述第二关节角集合中的关节角,确定所述云台在所述第二方向的机械限位角度。If the difference between the maximum joint angle and the minimum joint angle in the second joint angle set is less than the first preset threshold, determining the pan/tilt based on the joint angle in the second joint angle set The mechanical limit angle of the second direction.
  14. 一种终端设备,其特征在于,所述终端设备通过有线或无线方式与云台连接,所述终端设备包括:存储器和处理器,其中,The terminal device is connected to the cloud station by a wired or wireless method, and the terminal device includes: a memory and a processor, where
    所述存储器,用于存储程序指令;The memory is configured to store program instructions;
    所述处理器,调用所述程序指令以用于:The processor, the program instruction is invoked for:
    控制所述云台的一个关节向第一方向进行转动;Controlling a joint of the gimbal to rotate in a first direction;
    控制所述云台的所述关节向所述第一方向转动的过程中,获取预设时间段内所述关节的第一关节角集合;And acquiring a first joint angle set of the joint in a preset time period during the process of controlling the joint of the pan/tilt to rotate in the first direction;
    若所述第一关节角集合中最大关节角和最小关节角之间的差值小于第一预设阈值,则根据所述第一关节角集合中的关节角,确定所述云台在所述第一 方向的机械限位角度。If the difference between the maximum joint angle and the minimum joint angle in the first joint angle set is less than a first preset threshold, determining, according to the joint angle in the first joint angle set, the pan/tilt The mechanical limit angle of the first direction.
  15. 根据权利要求14所述的终端设备,其特征在于,所述处理器用于控制所述云台的一个关节向第一方向进行转动时,具体用于:The terminal device according to claim 14, wherein when the processor is configured to control a joint of the pan/tilt to rotate in a first direction, the processor is specifically configured to:
    控制所述云台的一个关节按照预设角度向第一方向进行转动,所述预设角度大于所述云台在所述第一方向的默认机械限位角度。Controlling a joint of the pan/tilt to rotate in a first direction according to a preset angle, the preset angle being greater than a default mechanical limit angle of the pan-tilt in the first direction.
  16. 根据权利要求14或15所述的终端设备,其特征在于,所述处理器用于根据所述第一关节角集合中的关节角,确定所述云台在所述第一方向的机械限位角度时,具体用于:The terminal device according to claim 14 or 15, wherein the processor is configured to determine a mechanical limit angle of the gimbal in the first direction according to a joint angle in the first set of joint angles When specifically used to:
    根据所述第一关节角集合中的关节角确定目标关节角;Determining a target joint angle according to a joint angle in the first set of joint angles;
    将所述目标关节角确定为所述云台在所述第一方向的机械限位角度。The target joint angle is determined as a mechanical limit angle of the pan/tilt in the first direction.
  17. 根据权利要求16所述的终端设备,其特征在于,所述目标关节角为所述第一关节角集合中的最小关节角,或所述目标关节角为所述第一关节角集合中的平均关节角。The terminal device according to claim 16, wherein said target joint angle is a minimum joint angle in said first joint angle set, or said target joint angle is an average in said first joint angle set Joint angle.
  18. 根据权利要求16或17所述的终端设备,其特征在于,所述处理器根据所述第一关节角集合中的关节角确定目标关节角之后,还用于:The terminal device according to claim 16 or 17, wherein the processor is further configured to: after determining the target joint angle according to the joint angle in the first set of joint angles:
    判断所述目标关节角是否在预设角度范围之内;Determining whether the target joint angle is within a preset angle range;
    若是,则将所述目标关节角确定为所述云台在所述第一方向的机械限位角度。If yes, the target joint angle is determined as a mechanical limit angle of the pan/tilt in the first direction.
  19. 根据权利要求18所述的终端设备,其特征在于,所述处理器判断所述目标关节角是否在预设角度范围之内之后,还用于:The terminal device according to claim 18, wherein the processor determines whether the target joint angle is within a preset angle range, and is further configured to:
    若所述目标关节角不在所述预设角度范围之内,则保持已设置的所述第一方向的机械限位角度不变。If the target joint angle is not within the preset angle range, the mechanical limit angle of the first direction that has been set is kept unchanged.
  20. 根据权利要求16或17所述的终端设备,其特征在于,所述处理器根 据所述第一关节角集合中的关节角确定目标关节角之后,还用于:The terminal device according to claim 16 or 17, wherein after determining the target joint angle based on the joint angle in the first set of joint angles, the processor is further configured to:
    获取角度误差,所述角度误差为所述目标关节角和所述云台在所述第一方向的默认机械限位角度之间的差值的绝对值;Obtaining an angular error, the angular error being an absolute value of a difference between the target joint angle and a default mechanical limit angle of the gimbal in the first direction;
    若所述角度误差小于第二预设阈值,则将所述目标关节角确定为所述云台在所述第一方向的机械限位角度。And if the angle error is less than the second preset threshold, determining the target joint angle as a mechanical limit angle of the pan/tilt in the first direction.
  21. 根据权利要求20所述的终端设备,其特征在于,所述处理器获取角度误差之后,还用于:The terminal device according to claim 20, wherein after the processor acquires the angle error, the method is further configured to:
    若所述角度误差大于或等于所述第二预设阈值,则保持已设置的所述第一方向的机械限位角度不变。If the angle error is greater than or equal to the second preset threshold, the mechanical limit angle of the first direction that has been set is kept unchanged.
  22. 根据权利要求14~21任意一项所述的终端设备,其特征在于,所述终端设备还包括存储介质,所述处理器确定所述云台在所述第一方向的机械限位角度之后,还用于:The terminal device according to any one of claims 14 to 21, wherein the terminal device further comprises a storage medium, and the processor determines the mechanical limit angle of the pan/tilt in the first direction, Also used for:
    向所述存储介质中存储所述云台在所述第一方向的机械限位角度。And storing, in the storage medium, a mechanical limit angle of the pan/tilt in the first direction.
  23. 根据权利要求14~22任意一项所述的终端设备,其特征在于,所述处理器还用于:The terminal device according to any one of claims 14 to 22, wherein the processor is further configured to:
    根据所述云台在所述第一方向的机械限位角度,确定规避限位算法的规避角度。Determining an avoidance angle of the avoidance limit algorithm according to the mechanical limit angle of the pan/tilt in the first direction.
  24. 根据权利要求23所述的终端设备,其特征在于,所述处理器还用于:The terminal device according to claim 23, wherein the processor is further configured to:
    判断所述云台在所述第一方向的机械限位角度是否在预设角度范围之内;Determining whether the mechanical limit angle of the pan/tilt in the first direction is within a preset angle range;
    若是,则执行所述根据所述云台在所述第一方向的机械限位角度,确定规避限位算法的规避角度的步骤。If yes, performing the step of determining an avoidance angle of the avoidance limit algorithm according to the mechanical limit angle of the gimbal in the first direction.
  25. 根据权利要求14所述的终端设备,其特征在于,所述处理器控制所述云台的一个关节向第一方向进行转动之前,还用于:The terminal device according to claim 14, wherein the processor is further configured to: before controlling a joint of the pan/tilt to rotate in a first direction:
    接收用户的限位角度校准操作,控制所述云台进入限位角度校准模式;Receiving a limit angle calibration operation of the user, and controlling the pan/tilt to enter a limit angle calibration mode;
    在所述云台处于所述限位角度校准模式下,执行所述控制所述云台的一个关节向第一方向进行转动的步骤。And performing the step of controlling a joint of the pan/tilt to rotate in a first direction when the pan/tilt is in the limit angle calibration mode.
  26. 根据权利要求14~25任意一项所述的终端设备,其特征在于,所述处理器还用于:The terminal device according to any one of claims 14 to 25, wherein the processor is further configured to:
    控制所述云台的所述关节向第二方向进行转动,所述第二方向为所述第一方向的反方向;Controlling the joint of the pan/tilt to rotate in a second direction, the second direction being a reverse direction of the first direction;
    控制所述云台的所述关节向所述第二方向转动的过程中,获取所述预设时间段内所述关节的第二关节角集合;And acquiring a second joint angle set of the joint in the preset time period during the process of controlling the joint of the pan/tilt to rotate in the second direction;
    若所述第二关节角集合中最大关节角和最小关节角之间的差值小于所述第一预设阈值,则根据所述第二关节角集合中的关节角,确定所述云台在所述第二方向的机械限位角度。If the difference between the maximum joint angle and the minimum joint angle in the second joint angle set is less than the first preset threshold, determining the pan/tilt based on the joint angle in the second joint angle set The mechanical limit angle of the second direction.
PCT/CN2018/073499 2018-01-19 2018-01-19 Position-limit angle calibration method and terminal device WO2019140655A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880010922.7A CN110268357A (en) 2018-01-19 2018-01-19 A kind of limit angle calibration method and terminal device
PCT/CN2018/073499 WO2019140655A1 (en) 2018-01-19 2018-01-19 Position-limit angle calibration method and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/073499 WO2019140655A1 (en) 2018-01-19 2018-01-19 Position-limit angle calibration method and terminal device

Publications (1)

Publication Number Publication Date
WO2019140655A1 true WO2019140655A1 (en) 2019-07-25

Family

ID=67301885

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/073499 WO2019140655A1 (en) 2018-01-19 2018-01-19 Position-limit angle calibration method and terminal device

Country Status (2)

Country Link
CN (1) CN110268357A (en)
WO (1) WO2019140655A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111604901A (en) * 2020-05-18 2020-09-01 哈尔滨工业大学 Target rotation detection method suitable for manual operation of manipulator
WO2022256977A1 (en) * 2021-06-07 2022-12-15 深圳市大疆创新科技有限公司 Information update method and apparatus, gimbal control method and apparatus, gimbal and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825124A (en) * 2019-11-15 2020-02-21 杭州电子科技大学 Holder control method and system
CN112923894B (en) * 2021-01-21 2022-11-29 西安因诺航空科技有限公司 Mechanical angle automatic calibration method applied to holder
CN113280806A (en) * 2021-05-12 2021-08-20 上海智能网联汽车技术中心有限公司 Intelligent holder suitable for posture adjustment of vehicle-road cooperative networking equipment and adjusting method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100152933A1 (en) * 2008-12-11 2010-06-17 Honeywell International Inc. Apparatus and method for unmanned aerial vehicle ground proximity detection, landing and descent
CN105223967A (en) * 2014-06-30 2016-01-06 深圳市大疆创新科技有限公司 A kind of camera shooting control method, device and tripod head equipment
CN106113039A (en) * 2016-07-08 2016-11-16 深圳市优必选科技有限公司 Steering wheel lock-bit control method and steering wheel
CN106569512A (en) * 2016-11-04 2017-04-19 极翼机器人(上海)有限公司 Holder calibration method
CN107003678A (en) * 2016-12-15 2017-08-01 深圳市大疆创新科技有限公司 Control method, device, equipment and moveable platform
CN107352038A (en) * 2014-03-14 2017-11-17 深圳市大疆灵眸科技有限公司 The control method of head and the control system of head

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100152933A1 (en) * 2008-12-11 2010-06-17 Honeywell International Inc. Apparatus and method for unmanned aerial vehicle ground proximity detection, landing and descent
CN107352038A (en) * 2014-03-14 2017-11-17 深圳市大疆灵眸科技有限公司 The control method of head and the control system of head
CN105223967A (en) * 2014-06-30 2016-01-06 深圳市大疆创新科技有限公司 A kind of camera shooting control method, device and tripod head equipment
CN106113039A (en) * 2016-07-08 2016-11-16 深圳市优必选科技有限公司 Steering wheel lock-bit control method and steering wheel
CN106569512A (en) * 2016-11-04 2017-04-19 极翼机器人(上海)有限公司 Holder calibration method
CN107003678A (en) * 2016-12-15 2017-08-01 深圳市大疆创新科技有限公司 Control method, device, equipment and moveable platform

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111604901A (en) * 2020-05-18 2020-09-01 哈尔滨工业大学 Target rotation detection method suitable for manual operation of manipulator
CN111604901B (en) * 2020-05-18 2022-06-24 哈尔滨工业大学 Target rotation detection method suitable for manual operation of manipulator
WO2022256977A1 (en) * 2021-06-07 2022-12-15 深圳市大疆创新科技有限公司 Information update method and apparatus, gimbal control method and apparatus, gimbal and storage medium

Also Published As

Publication number Publication date
CN110268357A (en) 2019-09-20

Similar Documents

Publication Publication Date Title
WO2019140655A1 (en) Position-limit angle calibration method and terminal device
WO2018072657A1 (en) Image processing method, image processing device, multi-camera photographing device, and aerial vehicle
US20220247898A1 (en) Replaceable gimbal camera, aircraft, aircraft system, and gimbal replacement method for aircraft
US20200244970A1 (en) Video processing method, device, aerial vehicle, system, and storage medium
WO2019061295A1 (en) Video processing method and device, unmanned aerial vehicle and system
US20210243357A1 (en) Photographing control method, mobile platform, control device, and storage medium
JP7136079B2 (en) Information processing device, information processing method and information processing program
WO2020019106A1 (en) Gimbal and unmanned aerial vehicle control method, gimbal, and unmanned aerial vehicle
WO2020019105A1 (en) Unmanned aerial vehicle control method and unmanned aerial vehicle
WO2020237493A1 (en) Zero calibration method for gimbal and gimbal
WO2022040951A1 (en) Image correction method and device, image collecting device, and storage medium
WO2023005135A1 (en) Laser radar synchronization method and apparatus, readable storage medium, and unmanned driving device
WO2019227438A1 (en) Image processing method and device, aircraft, system, and storage medium
WO2019127302A1 (en) Control method for unmanned aerial vehicle, control method of control terminal, and related device
CN111077915B (en) Panoramic monitoring control method, device and equipment and readable storage medium
TW201536050A (en) Image-capturing method for correcting deviation-viewing angle, its computer program product, and image-capturing device for correcting deviation viewing angle
WO2020107393A1 (en) Control method for gimbal, gimbal and unmanned aerial vehicle
WO2020191665A1 (en) Rotary photographing method, control device, movable platform and storage medium
US20210129991A1 (en) Image capturing method and unmanned aerial vehicle
JP2020020878A (en) Moving vehicle, focus control method, program, and recording medium
WO2020000130A1 (en) Time-lapse photography device and time-lapse photography method
WO2022077236A1 (en) Control method for mapping camera, mapping camera, unmanned aerial vehicle, and mapping system
WO2020042090A1 (en) Image display method and apparatus, and image processing device
WO2021195941A1 (en) Control method for gimbal, gimbal, and moveble platform
JP6998921B2 (en) Adapters, image pickup devices, support mechanisms and moving objects

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18901009

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18901009

Country of ref document: EP

Kind code of ref document: A1