WO2021217371A1 - Control method and apparatus for movable platform - Google Patents

Control method and apparatus for movable platform Download PDF

Info

Publication number
WO2021217371A1
WO2021217371A1 PCT/CN2020/087325 CN2020087325W WO2021217371A1 WO 2021217371 A1 WO2021217371 A1 WO 2021217371A1 CN 2020087325 W CN2020087325 W CN 2020087325W WO 2021217371 A1 WO2021217371 A1 WO 2021217371A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
attitude
pan
tilt
difference
Prior art date
Application number
PCT/CN2020/087325
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 PCT/CN2020/087325 priority Critical patent/WO2021217371A1/en
Publication of WO2021217371A1 publication Critical patent/WO2021217371A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D3/00Control of position or direction
    • G05D3/12Control of position or direction using feedback

Definitions

  • the embodiments of the present application relate to the technical field of movable platforms, and in particular, to a method and device for controlling a movable platform.
  • the movable platform is equipped with a pan-tilt for carrying the camera.
  • the camera can take images during the movement of the movable platform. The more common one is the follow mode.
  • the movable platform determines the target in the image collected by the camera Later, the movable platform will control the pan-tilt to follow the target, so that the target is located at the target position in the image captured by the shooting device, such as the center position of the image.
  • the method of controlling the pan/tilt to follow the target is to obtain the current Euler angle of the pan/tilt and the target Euler angle of the pan/tilt corresponding to the target position in the image.
  • determine the Euler angle error of the gimbal to rotate according to the Euler angle error
  • determine the angular velocity of the gimbal to rotate and then control the gimbal to rotate according to the angular velocity.
  • the control error of the gimbal is eliminated by the separate control of the pitch axis and the yaw axis of the gimbal.
  • the embodiment of the present application provides a control method and device for a movable platform to optimize the control method of the pan/tilt.
  • an embodiment of the present application provides a method for controlling a movable platform.
  • the movable platform includes a pan-tilt and a camera mounted on the pan-tilt, and the method includes:
  • the target attitude difference of the pan/tilt in the target attitude representation type is a special orthogonal group matrix or quaternion
  • the pan/tilt head is controlled to rotate so that the position of the target in the shooting frame of the shooting device approaches the desired position.
  • an embodiment of the present application provides a control device for a movable platform.
  • the movable platform includes a pan/tilt and a photographing device mounted on the pan/tilt.
  • the control device includes a memory and at least one processor. ;
  • the memory is used to store program code
  • the at least one processor calls the program code, and when the program code is executed, it is used to: obtain the current position of the target object in the shooting frame of the shooting device, wherein the target object is the movable Targets tracked by the platform;
  • the target attitude difference of the pan/tilt in the target attitude representation type is a special orthogonal group matrix or quaternion
  • the pan/tilt head is controlled to rotate so that the position of the target in the shooting frame of the shooting device approaches the desired position.
  • an embodiment of the present application provides a movable platform, the movable platform including at least one processor, a pan-tilt, and a photographing device mounted on the pan-tilt;
  • the at least one processor is used to:
  • the target attitude difference of the pan/tilt in the target attitude representation type is a special orthogonal group matrix or quaternion
  • the pan/tilt head is controlled to rotate so that the position of the target in the shooting frame of the shooting device approaches the desired position.
  • an embodiment of the present application provides a movable platform, the movable platform includes the control device of the movable platform as described in the embodiment of the present application in the second aspect, a pan-tilt, and a platform mounted on the pan-tilt. Shooting device.
  • an embodiment of the present application provides a computer-readable storage medium that stores a computer program, and when the computer program is executed, it implements the method described in the embodiment of the present application in the first aspect.
  • the control method of the movable platform
  • an embodiment of the present application provides a program product, the program product includes a computer program, the computer program is stored in a readable storage medium, and at least one processor can read the A computer program, and the at least one processor executes the computer program to implement the control method of the movable platform according to the embodiment of the present application in the first aspect.
  • the mobile platform control method and device acquire the current position of the target in the shooting screen of the shooting device, and then according to the current position of the target in the shooting screen of the shooting device and the target
  • the desired position of the object in the shooting screen is determined, and the target attitude difference of the gimbal expressed by a special orthogonal group matrix or a quaternion is determined; then according to the target attitude difference, the Euler angular velocity of the gimbal rotation is determined, and according to the Euler angular velocity, Control the rotation of the pan/tilt so that the position of the target object in the shooting frame of the shooting device approaches the desired position to achieve control synchronization.
  • a special orthogonal group matrix or a quaternion is used to express the target attitude difference, and then the Euler angular velocity used to control the rotation of the pan/tilt is determined according to the target attitude difference expressed by the special orthogonal group matrix or quaternion, which can avoid Euler angular velocity.
  • the singularity of the pull angle does not have the problem of the degradation of the degree of freedom of rotation, and the control method of the pan/tilt is optimized.
  • Fig. 1 is a schematic architecture diagram of an unmanned aerial system according to an embodiment of the present application
  • Figure 2 is a schematic diagram of an application scenario provided by an embodiment of the application
  • FIG. 3 is a flowchart of a method for controlling a movable platform according to an embodiment of the application
  • FIG. 4 is a flowchart of a method for controlling a movable platform provided by another embodiment of the application.
  • FIG. 5 is a schematic structural diagram of a control device for a movable platform provided by an embodiment of the application.
  • FIG. 6 is a schematic structural diagram of a movable platform provided by an embodiment of this application.
  • FIG. 7 is a schematic structural diagram of a movable platform provided by another embodiment of this application.
  • a component when referred to as being "fixed to” another component, it can be directly on the other component or a centered component may also exist. When a component is considered to be “connected” to another component, it can be directly connected to the other component or there may be a centered component at the same time.
  • the embodiments of the present application provide a method and device for controlling a movable platform.
  • the movable platform can be unmanned aerial vehicles, unmanned vehicles, unmanned ships, robots, handheld PTZ, etc.
  • the following description of the mobile platform of this application uses drones as an example. It will be obvious to those skilled in the art that other types of drones can be used without restriction, and the embodiments of the present application can be applied to various types of drones.
  • the drone can be a small or large drone.
  • the drone may be a rotorcraft, for example, a multi-rotor drone propelled by multiple propulsion devices through the air, and the embodiments of the present application are not limited thereto.
  • Fig. 1 is a schematic architecture diagram of an unmanned aerial system according to an embodiment of the present application.
  • a rotary wing drone is taken as an example for description.
  • the unmanned aerial system 100 may include a drone 110, a display device 130, and a control terminal 140.
  • the UAV 110 may include a power system 150, a flight control system 160, a frame, and a pan/tilt 120 carried on the frame.
  • the drone 110 can wirelessly communicate with the control terminal 140 and the display device 130.
  • the drone 110 further includes a battery (not shown in the figure), and the battery provides electrical energy for the power system 150.
  • the UAV 110 may be an agricultural UAV or an industrial application UAV, and there is a need for cyclic operation.
  • the battery also has the need for cyclic operation.
  • the frame may include a fuselage and a tripod (also called a landing gear).
  • the fuselage may include a center frame and one or more arms connected to the center frame, and the one or more arms extend radially from the center frame.
  • the tripod is connected with the fuselage and used for supporting the UAV 110 when it is landed.
  • the power system 150 may include one or more electronic governors (referred to as ESCs) 151, one or more propellers 153, and one or more motors 152 corresponding to the one or more propellers 153, wherein the motors 152 are connected to Between the electronic governor 151 and the propeller 153, the motor 152 and the propeller 153 are arranged on the arm of the UAV 110; the electronic governor 151 is used to receive the driving signal generated by the flight control system 160 and provide driving according to the driving signal Current is supplied to the motor 152 to control the speed of the motor 152.
  • the motor 152 is used to drive the propeller to rotate, thereby providing power for the flight of the drone 110, and the power enables the drone 110 to realize one or more degrees of freedom of movement.
  • the drone 110 may rotate about one or more rotation axes.
  • the aforementioned rotation axis may include a roll axis (Roll), a yaw axis (Yaw), and a pitch axis (pitch).
  • the motor 152 may be a DC motor or an AC motor.
  • the motor 152 may be a brushless motor or a brushed motor.
  • the flight control system 160 may include a flight controller 161 and a sensing system 162.
  • the sensing system 162 is used to measure the attitude information of the drone, that is, the position information and state information of the drone 110 in space, such as three-dimensional position, three-dimensional angle, three-dimensional velocity, three-dimensional acceleration, and three-dimensional angular velocity.
  • the sensing system 162 may include, for example, at least one of sensors such as a gyroscope, an ultrasonic sensor, an electronic compass, an inertial measurement unit (IMU), a vision sensor, a global navigation satellite system, and a barometer.
  • the global navigation satellite system may be the Global Positioning System (GPS).
  • the flight controller 161 is used to control the flight of the drone 110, for example, it can control the flight of the drone 110 according to the attitude information measured by the sensor system 162. It should be understood that the flight controller 161 can control the drone 110 according to pre-programmed program instructions, and can also control the drone 110 by responding to one or more remote control signals from the control terminal 140.
  • Each pan/tilt head 120 may include a motor 122.
  • the pan/tilt 120 is used to carry a load, and the load is, for example, a camera 123.
  • the flight controller 161 can control the movement of the pan/tilt 120 through the motor 122.
  • the pan/tilt head 120 may further include a controller for controlling the movement of the pan/tilt head 120 by controlling the motor 122.
  • the pan-tilt 120 may be independent of the drone 110 or a part of the drone 110.
  • the motor 122 may be a DC motor or an AC motor.
  • the motor 122 may be a brushless motor or a brushed motor.
  • the pan/tilt may be located on the top of the drone or on the bottom of the drone.
  • the photographing device 123 may be, for example, a device for capturing images, such as a camera or a video camera, and the photographing device 123 may communicate with the flight controller and take pictures under the control of the flight controller.
  • the imaging device 123 of this embodiment at least includes a photosensitive element, and the photosensitive element is, for example, a Complementary Metal Oxide Semiconductor (CMOS) sensor or a Charge-coupled Device (CCD) sensor.
  • CMOS Complementary Metal Oxide Semiconductor
  • CCD Charge-coupled Device
  • the display device 130 is located on the ground end of the unmanned aerial vehicle 100, can communicate with the drone 110 in a wireless manner, and can be used to display the attitude information of the drone 110.
  • the image photographed by the photographing device 123 may also be displayed on the display device 130. It should be understood that the display device 130 may be an independent device or integrated in the control terminal 140.
  • the control terminal 140 is located on the ground end of the unmanned aerial vehicle 100, and can communicate with the drone 110 in a wireless manner for remote control of the drone 110.
  • Fig. 2 is a schematic diagram of an application scenario provided by an embodiment of the application.
  • Fig. 2 shows a drone 201 and a control terminal 202 of the drone.
  • the control terminal 202 of the drone 201 may be one or more of a remote control, a smart phone, a desktop computer, a laptop computer, and a wearable device (watch, bracelet).
  • the control terminal 202 is the remote controller 2021 and the terminal device 2022 as an example for schematic description.
  • the terminal device 2022 is, for example, a smart phone, a wearable device, a tablet computer, etc., but the embodiment of the present application is not limited thereto.
  • the drone 201 includes a fuselage 2011 and a gimbal 2012 connected to the fuselage 2011, and the gimbal 2012 is used to carry a load 2013.
  • the load 2013 includes a camera
  • the drone transmits the image captured by the camera to the control terminal 202
  • the control terminal 202 displays the image captured by the camera.
  • the drone 201 tracks the target so that the target is always located in the shooting picture captured by the shooting device displayed on the control terminal.
  • the control error of the gimbal is eliminated by the separate control of the pitch axis and the yaw axis of the gimbal.
  • the actual rotation path of the gimbal is not The smallest path; in addition, the Euler angle is singular when expressing the attitude of the gimbal and the rotation of the gimbal.
  • the rotation of the three degrees of freedom of the gimbal will degenerate into two degrees of freedom. , The control may fail.
  • a special orthogonal group matrix or a quaternion is used to express the target attitude difference, and the Euler angular velocity used to control the rotation of the pan/tilt can be determined according to the target attitude difference expressed by the special orthogonal group matrix or quaternion.
  • the singularity of Euler angles is avoided, there is no problem of degradation of the degree of freedom of rotation, and the control method of the pan/tilt is optimized.
  • the specific implementation process adopts the solutions of the following embodiments of the present application.
  • FIG. 3 is a flowchart of a method for controlling a movable platform according to an embodiment of the application.
  • the method of this embodiment can be applied to a control device of a movable platform.
  • the control device of the movable platform may be arranged on the movable platform; or, a part of the control device of the movable platform is arranged on the movable platform, and the other part is arranged on the control terminal of the movable platform.
  • the movable platform includes a pan-tilt and a camera mounted on the pan-tilt.
  • the control device of the movable platform is set on the movable platform as an example.
  • the method of this embodiment may include:
  • the movable platform can take images through the camera mounted on the pan-tilt. If it is determined that an object captured in the captured image is a target, the target is represented as a tracking target of the movable platform, and the movable platform tracks the target, such as the follow mode of the movable platform.
  • the method for determining the target object is, for example, recognizing an object in the captured image as the target object through the image, or the user determines that an object in the captured image is the target object by operating the screen displayed by the control terminal, and so on. After the photographing device photographs the target, the current position of the target in the photographing frame of the photographing device can be obtained.
  • the movable platform may adjust the posture of the movable platform so that the target is located in the shooting frame of the shooting device, or the movable platform may adjust the posture of the pan-tilt so that the target is located on the shooting device.
  • the movable platform can adjust the posture of the movable platform and the posture of the pan/tilt so that the target is located in the shooting frame of the shooting device.
  • the attitude may include: attitude in the pitch direction, attitude in the roll direction, and attitude in the yaw direction.
  • the target posture difference of the PTZ in the target posture representation type is a special orthogonal group Matrix or quaternion.
  • the movable platform tracks the target, and the desired target may be located at a position in the shooting frame of the shooting device, and this position may be referred to as the desired position.
  • the movable platform determines the target attitude difference of the pan/tilt according to the current position of the target in the shooting picture of the shooting device and the desired position of the target in the shooting picture.
  • the target posture difference may represent the posture difference between the current posture of the pan/tilt head corresponding to when the target is at the current position in the shooting screen and the expected posture of the pan/tilt head when the target is at the desired position in the shooting screen.
  • the target posture difference indicates that the posture of the pan/tilt head changes, so that the position of the target object in the shooting screen approaches the desired position, or even is located at the desired position.
  • the target posture difference in this embodiment is the target posture difference represented by the target posture representation type
  • the target posture representation type is a special orthogonal group matrix or a quaternion or an axis angle.
  • the Euler angular velocity of the pan/tilt rotation is determined according to the target attitude difference represented by the special orthogonal group matrix or the numerical target attitude difference represented by the quaternion.
  • Angular velocity represents the Euler angular velocity used by the gimbal from the current attitude to the target attitude difference.
  • the rotation of the gimbal is controlled according to the Euler angular velocity, so that the posture of the gimbal changes the target posture difference as much as possible, so that the posture of the gimbal rotates toward the desired posture.
  • the Euler angular velocity of the pan/tilt rotation is determined, so that the position of the target in the shooting image of the shooting device approaches the desired position, and even the position of the target in the shooting image of the shooting device is located at the desired position.
  • the control terminal of the movable platform sends the Euler angular velocity to the movable platform. Then the movable platform controls the rotation of the pan/tilt according to the received Euler angular velocity.
  • the current position of the target in the shooting screen of the shooting device is acquired, and then according to the current position of the target in the shooting screen of the shooting device and the desired position of the target in the shooting screen, the special feature of the pan/tilt is determined.
  • Orthogonal group matrix or quaternion representation of the target attitude difference then according to the target attitude difference, determine the Euler angular velocity of the gimbal rotation, and control the rotation of the gimbal according to the Euler angular velocity, so that the target is on the shooting screen of the camera The position in is approaching to the desired position to achieve control synchronization.
  • a special orthogonal group matrix or a quaternion is used to express the target attitude difference, and then the Euler angular velocity for controlling the rotation of the pan/tilt is determined according to the target attitude difference expressed by the special orthogonal group matrix or the quaternion.
  • the singularity of Euler angles can be avoided, there is no problem of degradation of the degree of freedom of rotation, and the control method of the PTZ is optimized.
  • FIG. 4 is a flowchart of a method for controlling a movable platform provided by another embodiment of this application. As shown in FIG. 4, the method in this embodiment may include:
  • S402 Determine the target Euler angle error of the pan/tilt head to be adjusted according to the current position and the expected position.
  • the current position corresponds to the current Euler angle of the gimbal
  • the desired position also corresponds to the expected Euler angle of the gimbal.
  • the shooting position of the camera Therefore, according to the current position and the expected position, the target Euler angle error that the pan/tilt should be adjusted can be determined.
  • a possible implementation of S402 above is: determining the position difference between the current position and the expected position according to the current position and expected position of the target in the shooting picture; this position difference can also be mapped to the posture of the PTZ The target attitude difference that needs to be adjusted to eliminate this position difference. Then, according to the position difference, the focal length of the camera, and the size of the image sensor in the camera, determine the target Euler angle error that the pan/tilt should adjust.
  • the target Euler angle error represents the target attitude difference of the pan/tilt.
  • the position difference includes the difference in the length direction of the shooting screen and the difference in the height direction of the shooting screen. Specifically: Determine the Euler angle error of the yaw direction that the gimbal should adjust according to the difference in the length direction of the shooting screen, the focal length of the camera and the length of the image sensor; and according to the difference in the width direction of the shooting screen , The focal length of the camera and the width of the image sensor determine the Euler angle error of the pitch direction that the gimbal should be adjusted.
  • the Euler angle error in the pitch direction that the pan/tilt should adjust has nothing to do with the above position difference
  • the Euler angle error in the pitch direction that the pan/tilt should adjust is a preset value, for example, 0.
  • the target attitude difference represented by the target attitude representation type is converted from the target Euler angle error representing the attitude difference.
  • Using the target attitude difference represented by the target attitude representation type to control the control of the gimbal can overcome the problems of Euler angle singularity and rotation degree of freedom degradation in the process of using Euler angle error to control the gimbal, and optimize the gimbal's way to control.
  • the target Euler angle error determined according to the current position and the expected position of the target in the shooting image includes: Euler angle error in the pitch direction and Euler angle error in the yaw axis direction.
  • the Euler angle error in the roll direction may not be determined based on the current position and the desired position of the target in the shooting image.
  • the Euler angle error in the roll direction may be a preset value, for example, the Euler angle error in the roll direction.
  • the pull angle error is 0.
  • a possible realization method of determining the target attitude difference expressed by the target attitude representation type that the gimbal should adjust can be:
  • the Euler angle error in the pitch direction is converted into the attitude difference in the pitch direction of the special orthogonal group matrix
  • the Euler angle error in the yaw direction is converted into the attitude difference in the yaw direction of the special orthogonal group matrix.
  • the attitude difference in the pitch direction of the special orthogonal group matrix and the attitude difference in the yaw direction of the special orthogonal group matrix determine the target attitude difference expressed by the special orthogonal group matrix that the pan/tilt should adjust.
  • the product of the attitude difference in the pitch direction of the special orthogonal group matrix and the attitude difference in the yaw direction of the special orthogonal group matrix is obtained, and then the target attitude difference represented by the special orthogonal group matrix to be adjusted by the gimbal is determined according to the product.
  • the attitude difference in the pitch direction of the special orthogonal group matrix the attitude difference in the roll direction of the special orthogonal group matrix, and the attitude difference in the yaw direction of the special orthogonal group matrix
  • the target posture difference represented by the intersection group matrix For example, obtain the attitude difference in the pitch direction of the special orthogonal group matrix, the attitude difference in the roll direction of the special orthogonal group matrix, the attitude difference in the yaw direction of the special orthogonal group matrix, and the product of the three.
  • the adjusted target posture difference represented by a special orthogonal group matrix obtain the attitude difference in the pitch direction of the special orthogonal group matrix, the attitude difference in the roll direction of the special orthogonal group matrix, the attitude difference in the yaw direction of the special orthogonal group matrix, and the product of the three.
  • the product is determined as the target attitude difference represented by a special orthogonal group matrix that the pan/tilt should adjust.
  • the attitude difference in the roll direction of the special orthogonal group matrix is converted from the Euler angle error in the roll direction. Since the Euler angle error in the roll direction is a preset value, the attitude difference in the roll direction of the special orthogonal group matrix can also be preset, or, in the process of obtaining the target attitude difference according to the roll The Euler angle error of the direction is determined.
  • a possible realization method of determining the target attitude difference expressed by the target attitude representation type that the gimbal should adjust can be: changing the pitch direction
  • the Euler angle error is converted into the attitude difference in the quaternion pitch direction
  • the Euler angle error in the yaw direction is converted into the attitude difference in the quaternion yaw direction.
  • the attitude difference in the quaternion pitch direction, the attitude difference in the quaternion roll direction, and the attitude difference in the quaternion yaw direction determine the target attitude difference expressed by the quaternion that the gimbal should adjust .
  • obtain the product of the attitude difference in the quaternion pitch direction, the attitude difference in the quaternion roll direction, and the attitude difference in the quaternion yaw direction and then determine the quaternion that the gimbal should be adjusted according to the product.
  • the target attitude is poor.
  • the product is determined as the target attitude difference expressed by the quaternion that the pan/tilt should adjust.
  • the attitude difference in the quaternion roll direction is converted from the Euler angle error in the roll direction. Since the Euler angle error in the roll direction is a preset value, the attitude difference in the quaternion roll direction can also be preset, or, in the process of obtaining the target attitude difference according to the roll direction The Euler angle error is determined.
  • the posture control error corresponding to the special orthogonal group matrix is determined according to the target posture difference represented by the special orthogonal group matrix. If the target posture representation type is a quaternion, then the quaternion corresponding attitude control error is determined according to the above-mentioned target posture difference represented by the quaternion.
  • a possible implementation of S404 is: determine the antisymmetric matrix of the special orthogonal group matrix according to the special orthogonal group matrix used to represent the target pose difference , And then transform the antisymmetric matrix into a column vector, and then determine the attitude control error corresponding to the special orthogonal group matrix according to the column vector.
  • each element in the column of vectors is determined as the control error of each attitude direction in the attitude control error.
  • the three elements in the column vector are determined as the control error in the pitch direction, the control error in the roll direction, and the control error in the yaw direction.
  • the column vector is, for example, a three-dimensional column vector.
  • the above-mentioned special orthogonal group matrix for representing the above-mentioned target attitude difference is a 3*3 matrix.
  • a possible implementation of S404 above is: obtain the quaternion used to represent the target pose difference; then according to the imaginary part of the quaternion used to represent the target pose difference , Determine the rotation axis corresponding to the PTZ adjustment target attitude difference, and determine the rotation angle corresponding to the PTZ adjustment target attitude difference according to the imaginary part and real part of the quaternion used to represent the target attitude difference; Rotate the angle to determine the attitude control error corresponding to the quaternion.
  • This attitude control error can also be referred to as shaft angle error.
  • the above-mentioned rotation axis is a rotation axis represented by a 3-dimensional column vector.
  • a possible implementation of determining the attitude control error corresponding to the quaternion is: obtaining the intermediate 3-dimensional column vector according to the product of the rotation angle and the rotation axis represented by the 3-dimensional column vector;
  • the product of the rotation axis and the rotation angle represented by the 3-dimensional column vector is a 3-dimensional column vector, and this embodiment may determine the product as an intermediate 3-dimensional column vector.
  • the three elements in the middle 3-dimensional column vector are determined as the control error in the pitch direction, the control error in the roll direction, and the control error in the yaw direction.
  • the Euler angular velocity of the pan/tilt rotation is determined according to the attitude control error. For example, determine the Euler angular velocity of the pan/tilt rotation according to the attitude control error corresponding to the special orthogonal group matrix, or determine the Euler angular velocity of the pan/tilt rotation according to the attitude control error corresponding to the quaternion.
  • determining the Euler angular velocity of the pan/tilt rotation according to the attitude control error may include S405 and S406.
  • the angular velocity of the pan/tilt rotation is determined according to the attitude control error.
  • the angular velocity of the pan/tilt rotation may be determined according to the attitude control error and the preset control coefficient; for example, the angular velocity of the pan/tilt rotation may be determined according to the product of the preset control coefficient and the attitude control error.
  • the attitude control error may include the control error of the pitch direction, the control error of the roll direction, and the control error of the yaw direction.
  • the angular velocity of the pan/tilt rotation includes the angular velocity of the pitch direction, the angular velocity of the roll direction, and the angular velocity of the yaw direction.
  • the product of the preset control coefficient and the control error in the pitch direction can be obtained, and the angular velocity in the pitch direction of the pan/tilt rotation can be determined according to the product.
  • the product can be determined as the angular velocity in the pitch direction of the pan/tilt rotation.
  • the product of the preset control coefficient and the control error in the roll direction is obtained, and the angular velocity in the roll direction of the pan/tilt rotation is determined according to the product.
  • the product is determined as the angular velocity in the roll direction of the pan/tilt rotation.
  • the product of the preset control coefficient and the control error of the yaw direction is obtained, and the angular velocity of the yaw direction of the pan/tilt rotation is determined according to the product, for example, the product is determined as the angular velocity of the yaw direction of the pan/tilt rotation.
  • the preset control coefficients used for obtaining angular velocities in different directions may be the same control coefficient, or may also be not all the same control coefficients.
  • the preset control coefficient for the special orthogonal group matrix and the preset control system for the quaternion may be the same or different.
  • S406 Determine the Euler angular velocity of the pan/tilt rotation according to the angular velocity.
  • the angular velocity of the gimbal rotation is converted into the Euler angular velocity of the gimbal rotation.
  • the obtained Euler angular velocity is also related to the current attitude of the target attitude representation type of the gimbal. That is, before determining the Euler angular velocity of the gimbal rotation, the current attitude of the target attitude representation type of the gimbal is also obtained, and then the Euler angular velocity of the gimbal rotation is determined according to the above angular velocity and the current attitude of the target attitude representation type of the gimbal. .
  • the current posture of the target posture indication type of the aforementioned pan/tilt may include: the current posture of the target posture indication type in the pitch direction, and the current posture of the target posture indication type in the roll direction.
  • the angular velocity may include: the angular velocity in the pitch direction, the angular velocity in the roll direction, and the angular velocity in the yaw direction.
  • the Euler angular velocity may include the Euler angular velocity in the pitch direction, the Euler angular velocity in the roll direction, and the Euler angular velocity in the yaw direction. In this embodiment, the Euler angular velocity in the pitch direction can be determined according to the angular velocity in the pitch direction.
  • the angular velocity in the pitch direction is determined as the Euler angular velocity in the pitch direction.
  • the Euler angular velocity in the roll direction of the pan/tilt rotation is determined according to the product of the current posture in the pitch direction and the angular velocity in the roll direction according to the target posture indication type. For example, it is determined that the product is the Euler angular velocity in the roll direction.
  • the Euler angular velocity in the yaw direction of the pan/tilt rotation is also determined according to the angular velocity in the yaw direction, the current attitude in the pitch direction of the target attitude representation type, and the current attitude in the roll direction of the target attitude representation type.
  • the Euler angular velocity in the yaw direction is determined according to the product of the current attitude of the target attitude representation type in the roll direction, the current attitude of the target attitude representation type in the pitch direction, and the angular velocity in the yaw direction.
  • the product is the Euler angular velocity in the yaw direction.
  • the angular velocity is further converted into Euler angular velocity according to the current attitude of the pan/tilt, which ensures the global effectiveness of controlling the pan/tilt.
  • the rotation of the pan/tilt is controlled according to the Euler angular velocity, so that the change of the pan/tilt's attitude is closer to the target attitude difference that needs to be changed, and as much as possible to ensure that the position of the target in the shooting image is close to the desired position and achieve control synchronization.
  • the Euler angular velocities in the three attitude directions are obtained, and the rotation of the gimbal can be controlled accordingly, which can shorten the rotation path of the gimbal and make the rotation of the gimbal more rapid, accurate and smooth.
  • the Euler angular velocity is obtained from the target attitude difference expressed by a special orthogonal group matrix or quaternion, not the target attitude difference expressed by Euler angles, so the singularity of Euler angles can be avoided, and there is no rotation.
  • the problem of degree of freedom degradation optimizes the control method of the PTZ.
  • the following is an example to illustrate the solution of the present application with the target pose representation type being a special orthogonal group matrix or a quaternion.
  • the current position of the target in the shooting frame of the shooting device can be obtained, that is, the current coordinates of the target in the shooting frame are (b cx , b cy ).
  • the size of the photographed frame of the photographing device includes the length I w in the longitudinal direction and the width I h in the width direction.
  • the desired position of the target in the shooting picture is the center position of the shooting picture
  • the desired position that is, the desired coordinates of the target in the shooting picture
  • the aforementioned unit may be a pixel.
  • the focal length cam f of the camera (unit: um) and the size of the image sensor of the camera (length dimension is cam cw , width dimension is cam ch , unit is um), determine the pitch direction that the gimbal should be adjusted target error ⁇ pitch tar Euler angles and the target yaw direction Euler angle error ⁇ yaw tar:
  • the target Euler angle error ⁇ roll tar in the roll direction that the pan/tilt should adjust is 0.
  • the target Euler angle error that the pan/tilt should adjust can be recorded as ⁇ yaw tar , ⁇ pitch tar , ⁇ roll tar ⁇ .
  • the current Euler angle of the gimbal includes the current Euler angle in the pitch direction, which is pitch cur , the current Euler angle in the yaw direction, yaw cur , and the current Euler angle in the roll direction, roll cur .
  • the current Euler angle of the gimbal can be recorded as ⁇ yaw cur , pitch cur , roll cur ⁇ .
  • Me is a 3*3 antisymmetric matrix, and then Me is transformed into a column vector V error , V error is a 3-dimensional column vector, and V error represents the attitude control error.
  • V error (M e ) ⁇ , where () ⁇ means to convert the antisymmetric matrix into a column vector.
  • K p V error [w roll w pitch w yaw ] T , where K p is the preset control coefficient, w yaw is the angular velocity in the yaw direction, w pitch is the angular velocity in the pitch direction, and w roll is the roll direction Angular velocity.
  • R (pitch cur ) is converted from the current Euler angle pitch cur of the pitch direction of the gimbal into a special orthogonal group matrix
  • R (roll cur ) is converted from the current Euler angle roll cur of the roll direction of the gimbal. It is a special orthogonal group matrix.
  • the Euler angular velocity is output to the pan-tilt for pan-tilt control.
  • arctan (
  • the attitude control error V error is obtained according to the rotation axis u and the rotation angle ⁇ , and V error is a three-dimensional column vector.
  • K p V error [w roll w pitch w yaw ] T , where K p is the preset control coefficient, w yaw is the angular velocity in the yaw direction, w pitch is the angular velocity in the pitch direction, and w roll is the roll direction Angular velocity.
  • represents the multiplication between the quaternion and the 3-dimensional column vector.
  • q(pitch cur ) is converted from the current Euler angle pitch cur in the pitch direction of the gimbal to a quaternion
  • q(roll cur ) is converted from the current Euler angle roll cur in the roll direction of the gimbal to four. Yuan number.
  • the Euler angular velocity is output to the pan-tilt for pan-tilt control.
  • the embodiments of the present application can improve the control effect of the pan/tilt in the movable platform, and make the rotation of the pan/tilt more rapid, accurate, and smooth.
  • the effectiveness of control can be guaranteed in any posture of the PTZ, there is no control singularity, and the degree of freedom is reduced.
  • the gimbal rotates to make the path of the target at the desired position better, shorter and smoother.
  • the Euler angular velocity output by the application to the pan/tilt is better than the angular velocity in the prior art in terms of control effect.
  • An embodiment of the present application also provides a computer storage medium, the computer storage medium stores program instructions, and the program execution may include some or all of the steps of the movable platform control method in any of the above embodiments. .
  • FIG. 5 is a schematic structural diagram of a control device for a movable platform provided by an embodiment of the application.
  • the movable platform of this embodiment includes a pan-tilt and a camera mounted on the pan-tilt.
  • the control device 500 of the movable platform of this embodiment includes: at least one processor 501, and the figure takes one processor 501 as an example.
  • the at least one processor 501 is configured to: obtain the current position of a target object in the shooting frame of the shooting device, wherein the target object is a tracking object of the movable platform; The current position in the shooting screen of the device and the desired position of the target in the shooting screen determine the target attitude difference of the pan/tilt head expressed in the target attitude representation type, and the target attitude representation type is a special orthogonal group matrix Or a quaternion; according to the target attitude difference, determine the Euler angular velocity of the pan/tilt rotation; according to the Euler angular velocity, control the rotation of the pan/tilt so that the target is photographed by the camera The position on the screen approaches the desired position.
  • the at least one processor 501 is specifically configured to: determine the attitude control error corresponding to the target attitude representation type according to the target attitude difference; Euler angular velocity.
  • the at least one processor 501 is specifically configured to: determine the angular velocity of the pan/tilt rotation according to the attitude control error; and determine the Euler angular velocity of the pan/tilt rotation according to the angular velocity.
  • the attitude control error includes a control error in a pitch direction, a control error in a roll direction, and a control error in a yaw direction.
  • the at least one processor 501 is specifically configured to: determine the angular velocity of the pitch direction of the pan/tilt rotation according to the product of the preset control coefficient and the control error in the pitch direction; The product of the control error of the direction determines the angular velocity of the roll direction of the pan/tilt head rotation; and the product of the preset control coefficient and the control error of the yaw direction determines the angular velocity of the yaw direction of the pan/tilt rotation.
  • the at least one processor 501 is further configured to obtain the current posture of the target posture representation type of the gimbal before determining the Euler angular velocity of the gimbal rotation according to the posture control error .
  • the at least one processor 501 determines the Euler angular velocity of the pan/tilt rotation according to the angular velocity, it is specifically configured to: determine the The Euler angular velocity of the pan/tilt rotation.
  • the current posture of the target posture indication type of the pan/tilt includes: the current posture of the pitch direction of the target posture indication type, and the current posture of the roll direction of the target posture indication type.
  • the angular velocity includes: angular velocity in the pitch direction, angular velocity in the roll direction, and angular velocity in the yaw direction.
  • the at least one processor 501 is specifically configured to: determine the Euler angular velocity in the pitch direction according to the angular velocity in the pitch direction;
  • the attitude represents the current attitude of the type roll direction, and determines the Euler angular velocity of the yaw direction of the pan/tilt rotation.
  • the at least one processor 501 is specifically configured to: determine an antisymmetric matrix according to the special orthogonal group matrix used to represent the target pose difference Convert the antisymmetric matrix into a column vector; determine the attitude control error corresponding to the target attitude representation type according to the column vector.
  • the at least one processor 501 is specifically configured to: determine each element in the column vector as the control error of each attitude direction in the attitude control error.
  • the special orthogonal group matrix is a 3*3 matrix
  • the column vector is a 3-dimensional column vector
  • the at least one processor 501 is specifically configured to determine the three elements in the column vector as the control error in the pitch direction, the control error in the roll direction, and the control error in the yaw direction, respectively.
  • the at least one processor 501 is specifically configured to: determine the cloud according to the imaginary part of the quaternion used to represent the target attitude difference The stage adjusts the rotation axis corresponding to the target attitude difference; according to the imaginary part and the real part of the quaternion used to represent the target attitude difference, determine the rotation angle corresponding to the PTZ to adjust the target attitude difference; according to The rotation axis and the rotation angle determine the attitude control error corresponding to the target attitude representation type.
  • the rotation axis is a rotation axis represented by a 3-dimensional column vector.
  • the at least one processor 501 is specifically configured to: obtain an intermediate 3-dimensional column vector according to the product of the rotation angle and the rotation axis represented by the 3-dimensional column vector; and determine the three elements in the intermediate 3-dimensional column vector respectively It is the control error of the pitch direction, the control error of the roll direction, and the control error of the yaw direction.
  • the at least one processor 501 is specifically configured to: determine the target Euler angle error to be adjusted by the pan/tilt according to the current position and the expected position; according to the target Euler angle error, Determine the target attitude difference represented by the target attitude representation type that the pan/tilt should adjust.
  • the target Euler angle error includes: Euler angle error in the pitch direction and Euler angle error in the yaw axis direction.
  • the at least one processor 501 is specifically configured to: convert the Euler angle error in the pitch direction into the attitude of the special orthogonal group matrix in the pitch direction Difference; convert the Euler angle error of the yaw direction into the attitude difference of the yaw direction of the special orthogonal group matrix; according to the attitude difference of the special orthogonal group matrix in the pitch direction and the attitude difference of the special orthogonal group matrix in the yaw direction , Determine the target attitude difference represented by a special orthogonal group matrix that the pan/tilt should adjust.
  • the at least one processor 501 is specifically configured to: obtain the product of the attitude difference in the pitch direction of the special orthogonal group matrix and the attitude difference in the yaw direction of the special orthogonal group matrix; and determine according to the product The target attitude difference represented by a special orthogonal group matrix that the pan/tilt should adjust.
  • the at least one processor 501 is specifically configured to: convert the Euler angle error in the pitch direction into the attitude difference in the quaternion pitch direction;
  • the Euler angle error of the heading direction is converted into the attitude difference of the quaternion yaw direction; according to the attitude difference of the quaternion pitch direction and the attitude difference of the quaternion yaw direction, determine the four that the gimbal should be adjusted.
  • the target posture difference expressed by the element number.
  • the at least one processor 501 is specifically configured to: obtain the product of the attitude difference in the quaternion pitch direction and the attitude difference in the quaternion yaw direction; and determine the pan/tilt head according to the product The target attitude difference expressed as a quaternion that should be adjusted.
  • the at least one processor 501 is specifically configured to: determine a position difference between the current position and the desired position according to the current position and the desired position;
  • the target Euler angle error to be adjusted by the pan/tilt head is determined.
  • the position difference includes the difference in the length direction of the shooting picture and the difference in the height direction of the shooting picture.
  • the at least one processor 501 is specifically configured to determine the yaw direction of the pan/tilt head to be adjusted according to the difference in the length direction of the shooting image, the focal length of the shooting device, and the length dimension of the image sensor According to the difference in the width direction of the shooting picture, the focal length of the shooting device and the width of the image sensor, the Euler angle error in the pitch direction that the pan/tilt should be adjusted is determined.
  • control device 500 of the movable platform of this embodiment may further include a memory 502.
  • the memory 502 is used to store program codes.
  • the at least one processor 501 calls the program code, and when the program code is executed, it is used to implement the foregoing methods.
  • control device of the movable platform of this embodiment can be used to implement the technical solutions of the foregoing method embodiments of the present application, and the implementation principles and technical effects are similar, and will not be repeated here.
  • FIG. 6 is a schematic structural diagram of a movable platform provided by an embodiment of the application.
  • the movable platform 600 of this embodiment includes a pan/tilt 601, and a camera 602 mounted on the pan/tilt 601 And at least one processor 603.
  • One processor 603 is shown as an example in the figure.
  • the at least one processor 603 is configured to: obtain the current position of the target in the shooting frame of the shooting device 602, where the target is the tracking object of the movable platform 600; according to the location of the target The current position in the shooting picture of the shooting device 602 and the desired position of the target in the shooting picture are determined, and the target attitude difference of the pan/tilt 601 expressed in the target attitude representation type is determined, and the target attitude representation type is special Orthogonal group matrix or quaternion; according to the target attitude difference, determine the Euler angular velocity of the pan/tilt 601 rotation; according to the Euler angular velocity, control the rotation of the pan/tilt 601 so that the target is in The position in the photographing frame of the photographing device 602 approaches the desired position.
  • the at least one processor 603 is specifically configured to: determine the attitude control error corresponding to the target attitude representation type according to the target attitude difference; and determine the rotation of the pan/tilt head 601 according to the attitude control error The Euler angular velocity.
  • the at least one processor 603 is specifically configured to: determine the angular velocity of the pan/tilt 601 rotation according to the attitude control error; and determine the Euler angular velocity of the pan/tilt 601 rotation according to the angular velocity.
  • the attitude control error includes a control error in a pitch direction, a control error in a roll direction, and a control error in a yaw direction.
  • the at least one processor 603 is specifically configured to: determine the angular velocity in the pitch direction of the pan/tilt 601 rotation according to the product of the preset control coefficient and the control error in the pitch direction; The product of the control error of the rolling direction determines the angular velocity of the rolling direction of the pan/tilt 601 rotation; the product of the preset control coefficient and the control error of the yaw direction determines the yaw direction of the pan/tilt 601 rotation The angular velocity.
  • the at least one processor 603 is further configured to obtain the target attitude representation type of the pan/tilt 601 before determining the Euler angular velocity of the pan/tilt 601 rotation according to the attitude control error Current posture.
  • the at least one processor 603 determines the Euler angular velocity at which the pan/tilt 601 rotates according to the angular velocity, it is specifically configured to: determine the current attitude according to the angular velocity and the target attitude representation type of the pan/tilt 601 The Euler angular velocity at which the pan/tilt 601 rotates.
  • the current posture of the target posture indication type of the pan/tilt head 601 includes: the current posture of the pitch direction of the target posture indication type, and the current posture of the roll direction of the target posture indication type.
  • the angular velocity includes: angular velocity in the pitch direction, angular velocity in the roll direction, and angular velocity in the yaw direction.
  • the at least one processor 603 is specifically configured to: determine the Euler angular velocity in the pitch direction according to the angular velocity in the pitch direction; determine the rotation of the pan/tilt head 601 according to the angular velocity in the roll direction and the current attitude in the pitch direction of the target attitude indication type
  • the Euler angular velocity in the roll direction of the yaw direction, the current attitude in the pitch direction of the target attitude representation type, and the current attitude in the roll direction of the target attitude representation type to determine the Euler angular velocity in the yaw direction of the pan/tilt 601 rotation. Angle speed.
  • the at least one processor 603 is specifically configured to: determine an antisymmetric matrix according to the special orthogonal group matrix used to represent the target pose difference Convert the antisymmetric matrix into a column vector; determine the attitude control error corresponding to the target attitude representation type according to the column vector.
  • the at least one processor 603 is specifically configured to: determine each element in the column vector as the control error of each attitude direction in the attitude control error.
  • the special orthogonal group matrix is a 3*3 matrix
  • the column vector is a 3-dimensional column vector.
  • the at least one processor 603 is specifically configured to determine the three elements in the column vector as the control error in the pitch direction, the control error in the roll direction, and the control error in the yaw direction, respectively.
  • the at least one processor 501 is specifically configured to: determine the cloud according to the imaginary part of the quaternion used to represent the target attitude difference
  • the stage 601 adjusts the rotation axis corresponding to the target attitude difference; according to the imaginary part and the real part in the quaternion used to represent the target attitude difference, it is determined that the pan/tilt 601 adjusts the rotation angle corresponding to the target attitude difference ; According to the rotation axis and the rotation angle, determine the attitude control error corresponding to the target attitude representation type.
  • the rotation axis is a rotation axis represented by a 3-dimensional column vector.
  • the at least one processor 603 is specifically configured to: obtain an intermediate 3-dimensional column vector according to the product of the rotation angle and the rotation axis represented by the 3-dimensional column vector; They are respectively determined as the control error in the pitch direction, the control error in the roll direction, and the control error in the yaw direction.
  • the at least one processor 603 is specifically configured to: determine the target Euler angle error that the pan/tilt head 601 should adjust according to the current position and the expected position;
  • the target attitude difference represented by the target attitude representation type that the pan/tilt 601 should be adjusted is determined.
  • the target Euler angle error includes: Euler angle error in the pitch direction and Euler angle error in the yaw axis direction.
  • the at least one processor 603 is specifically configured to: convert the Euler angle error in the pitch direction into the attitude of the special orthogonal group matrix in the pitch direction Difference; convert the Euler angle error of the yaw direction into the attitude difference of the yaw direction of the special orthogonal group matrix; according to the attitude difference of the special orthogonal group matrix in the pitch direction and the attitude difference of the special orthogonal group matrix in the yaw direction , Determine the target attitude difference represented by the special orthogonal group matrix that the pan/tilt 601 should adjust.
  • the at least one processor 603 is specifically configured to: obtain the product of the attitude difference in the pitch direction of the special orthogonal group matrix and the attitude difference in the yaw direction of the special orthogonal group matrix; and determine according to the product The PTZ 601 should adjust the target attitude difference represented by a special orthogonal group matrix.
  • the at least one processor 603 is specifically configured to: convert the Euler angle error in the pitch direction into the attitude difference in the quaternion pitch direction; The Euler angle error of the heading direction is converted into the attitude difference of the quaternion yaw direction; according to the attitude difference of the quaternion pitch direction and the attitude difference of the quaternion yaw direction, it is determined that the gimbal 601 should be adjusted The target posture difference represented by the quaternion.
  • the at least one processor 603 is specifically configured to: obtain the product of the attitude difference in the quaternion pitch direction and the attitude difference in the quaternion yaw direction; and determine the pan/tilt head according to the product 601 The target attitude difference expressed in quaternion that should be adjusted.
  • the at least one processor 603 is specifically configured to: determine the position difference between the current position and the desired position according to the current position and the desired position; The focal length of the photographing device 602 and the size of the image sensor of the photographing device 602 determine the target Euler angle error that the pan/tilt 601 should adjust.
  • the position difference includes the difference in the length direction of the shooting picture and the difference in the height direction of the shooting picture.
  • the at least one processor 603 is specifically configured to determine the offset that the pan/tilt head 601 should adjust according to the difference in the length direction of the shooting picture, the focal length of the shooting device 602, and the length dimension of the image sensor. Euler angle error in the heading direction; according to the difference in the width direction of the shooting picture, the focal length of the camera 602, and the width size of the image sensor, determine the Euler in the pitch direction that the pan/tilt 601 should adjust Angle error.
  • the movable platform 600 of this embodiment may further include a memory (not shown in the figure).
  • the memory is used to store program codes.
  • the at least one processor 603 calls the program code, and when the program code is executed, it is used to implement the foregoing methods.
  • the movable platform 600 of this embodiment may further include a communication device (not shown in the figure), and the communication device is used to communicate with a control terminal of the movable platform.
  • the movable platform of this embodiment can be used to implement the technical solutions of the foregoing method embodiments of the present application, and its implementation principles and technical effects are similar, and will not be repeated here.
  • FIG. 7 is a schematic structural diagram of a movable platform provided by another embodiment of the application. As shown in FIG. The camera 703 on the PTZ 702.
  • the photographing device 703 is used to photograph an image.
  • the control device 701 of the movable platform can control the rotation of the pan/tilt 702.
  • control device 701 of the movable platform may adopt the structure of the device embodiment shown in FIG. 5, and correspondingly, may execute the technical solution provided by any of the foregoing method embodiments, which will not be repeated here.
  • a person of ordinary skill in the art can understand that all or part of the steps in the above method embodiments can be implemented by a program instructing relevant hardware.
  • the foregoing program can be stored in a computer readable storage medium. When the program is executed, it is executed. Including the steps of the foregoing method embodiment; and the foregoing storage medium includes: read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks, etc., which can store program codes Medium.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Studio Devices (AREA)

Abstract

A control method and apparatus for a movable platform. The method comprises: acquiring the current position of a target in a picture taken by a photographic apparatus, wherein the target is a tracked object of the movable platform (S301); according to the current position of the target in the picture taken by the photographic apparatus and a desired position of the target in the photographed picture, determining a target attitude difference, which is represented by a target attitude representation type, of a gimbal, wherein the target attitude representation type is a special orthogonal group matrix or a quaternion (S302); according to the target attitude difference, determining the Euler angular velocity of the rotation of the gimbal (S303); and according to the Euler angular velocity, controlling the gimbal to rotate, such that the position of the target in the picture taken by the photographic apparatus tends to approach the desired position (S304), so as to achieve control synchronization. Moreover, the Euler angular velocity is obtained according to the target attitude difference represented by the special orthogonal group matrix or the quaternion; therefore, singularity of the Euler angles can be avoided, such that the problem of degradation of the rotational degree of freedom is solved, and the control mode for the gimbal is optimized.

Description

可移动平台的控制方法和装置Control method and device of movable platform 技术领域Technical field
本申请实施例涉及可移动平台技术领域,尤其涉及一种可移动平台的控制方法和装置。The embodiments of the present application relate to the technical field of movable platforms, and in particular, to a method and device for controlling a movable platform.
背景技术Background technique
可移动平台中设置有用于搭载拍摄装置的云台,拍摄装置可以在可移动平台的运动过程中拍摄图像,比较常见的是跟随模式,当可移动平台确定拍摄装置采集到的图像中的目标物后,可移动平台会控制云台跟随该目标物,以使拍摄装置采集的图像中目标物位于目标位置,比如图像的中心位置。The movable platform is equipped with a pan-tilt for carrying the camera. The camera can take images during the movement of the movable platform. The more common one is the follow mode. When the movable platform determines the target in the image collected by the camera Later, the movable platform will control the pan-tilt to follow the target, so that the target is located at the target position in the image captured by the shooting device, such as the center position of the image.
目前,控制云台跟随目标物的方式为:获取云台的当前欧拉角以及使得目标物位于图像中的目标位置对应的云台的目标欧拉角。根据上述当前欧拉角以及目标欧拉角,确定云台要转动的欧拉角误差,根据欧拉角误差,确定云台要转动的角速度,然后根据角速度控制云台转动。然而,在目前的云台控制中,云台的控制误差是由云台的俯仰轴和偏航轴的单独控制来消除的,这样在控制上有不同步的问题,云台实际转动的路径不是最小的路径;另外,在欧拉角在表达云台的姿态和云台的旋转时具有奇异性,在云台处于某些姿态时,云台三个自由度的旋转会退化成两个自由度,控制可能会失效。At present, the method of controlling the pan/tilt to follow the target is to obtain the current Euler angle of the pan/tilt and the target Euler angle of the pan/tilt corresponding to the target position in the image. According to the above-mentioned current Euler angle and the target Euler angle, determine the Euler angle error of the gimbal to rotate, according to the Euler angle error, determine the angular velocity of the gimbal to rotate, and then control the gimbal to rotate according to the angular velocity. However, in the current gimbal control, the control error of the gimbal is eliminated by the separate control of the pitch axis and the yaw axis of the gimbal. In this way, there is a problem of unsynchronization in the control, and the actual rotation path of the gimbal is not The smallest path; in addition, the Euler angle is singular when expressing the attitude of the gimbal and the rotation of the gimbal. When the gimbal is in certain attitudes, the rotation of the three degrees of freedom of the gimbal will degenerate into two degrees of freedom. , The control may fail.
发明内容Summary of the invention
本申请实施例提供一种可移动平台的控制方法和装置,以优化云台的控制方式。The embodiment of the present application provides a control method and device for a movable platform to optimize the control method of the pan/tilt.
第一方面,本申请实施例提供一种可移动平台的控制方法,所述可移动平台包括云台和搭载在所述云台上的拍摄装置,所述方法包括:In a first aspect, an embodiment of the present application provides a method for controlling a movable platform. The movable platform includes a pan-tilt and a camera mounted on the pan-tilt, and the method includes:
获取目标物在所述拍摄装置的拍摄画面中的当前位置,其中,所述目标物为所述可移动平台的跟踪对象;Acquiring the current position of the target in the shooting picture of the shooting device, wherein the target is a tracking object of the movable platform;
根据目标物在所述拍摄装置的拍摄画面中的当前位置以及所述目标物在拍摄画面中的期望位置,确定所述云台的以目标姿态表示类型表示的目标姿 态差,所述目标姿态表示类型为特殊正交群矩阵或者四元数;According to the current position of the target in the shooting screen of the shooting device and the desired position of the target in the shooting screen, determine the target attitude difference of the pan/tilt in the target attitude representation type, and the target attitude represents The type is a special orthogonal group matrix or quaternion;
根据所述目标姿态差,确定所述云台转动的欧拉角速度;Determine the Euler angular velocity of the rotation of the gimbal according to the target attitude difference;
根据所述欧拉角速度,控制所述云台转动,以使所述目标物在所述拍摄装置的拍摄画面中的位置向所述期望位置趋近。According to the Euler angular velocity, the pan/tilt head is controlled to rotate so that the position of the target in the shooting frame of the shooting device approaches the desired position.
第二方面,本申请实施例提供一种可移动平台的控制装置,所述可移动平台包括云台和搭载在所述云台上的拍摄装置,所述控制装置包括:存储器和至少一个处理器;In a second aspect, an embodiment of the present application provides a control device for a movable platform. The movable platform includes a pan/tilt and a photographing device mounted on the pan/tilt. The control device includes a memory and at least one processor. ;
所述存储器,用于存储程序代码;The memory is used to store program code;
所述至少一个处理器,调用所述程序代码,当程序代码被执行时,用于:获取目标物在所述拍摄装置的拍摄画面中的当前位置,其中,所述目标物为所述可移动平台的跟踪对象;The at least one processor calls the program code, and when the program code is executed, it is used to: obtain the current position of the target object in the shooting frame of the shooting device, wherein the target object is the movable Targets tracked by the platform;
根据目标物在所述拍摄装置的拍摄画面中的当前位置以及所述目标物在拍摄画面中的期望位置,确定所述云台的以目标姿态表示类型表示的目标姿态差,所述目标姿态表示类型为特殊正交群矩阵或者四元数;According to the current position of the target in the shooting screen of the shooting device and the desired position of the target in the shooting screen, determine the target attitude difference of the pan/tilt in the target attitude representation type, and the target attitude represents The type is a special orthogonal group matrix or quaternion;
根据所述目标姿态差,确定所述云台转动的欧拉角速度;Determine the Euler angular velocity of the rotation of the gimbal according to the target attitude difference;
根据所述欧拉角速度,控制所述云台转动,以使所述目标物在所述拍摄装置的拍摄画面中的位置向所述期望位置趋近。According to the Euler angular velocity, the pan/tilt head is controlled to rotate so that the position of the target in the shooting frame of the shooting device approaches the desired position.
第三方面,本申请实施例提供一种可移动平台,所述可移动平台包括至少一个处理器、云台和搭载在所述云台上的拍摄装置;In a third aspect, an embodiment of the present application provides a movable platform, the movable platform including at least one processor, a pan-tilt, and a photographing device mounted on the pan-tilt;
所述至少一个处理器,用于:The at least one processor is used to:
获取目标物在所述拍摄装置的拍摄画面中的当前位置,其中,所述目标物为所述可移动平台的跟踪对象;Acquiring the current position of the target in the shooting picture of the shooting device, wherein the target is a tracking object of the movable platform;
根据目标物在所述拍摄装置的拍摄画面中的当前位置以及所述目标物在拍摄画面中的期望位置,确定所述云台的以目标姿态表示类型表示的目标姿态差,所述目标姿态表示类型为特殊正交群矩阵或者四元数;According to the current position of the target in the shooting screen of the shooting device and the desired position of the target in the shooting screen, determine the target attitude difference of the pan/tilt in the target attitude representation type, and the target attitude represents The type is a special orthogonal group matrix or quaternion;
根据所述目标姿态差,确定所述云台转动的欧拉角速度;Determine the Euler angular velocity of the rotation of the gimbal according to the target attitude difference;
根据所述欧拉角速度,控制所述云台转动,以使所述目标物在所述拍摄装置的拍摄画面中的位置向所述期望位置趋近。According to the Euler angular velocity, the pan/tilt head is controlled to rotate so that the position of the target in the shooting frame of the shooting device approaches the desired position.
第四方面,本申请实施例提供一种可移动平台,所述可移动平台包括如第二方面本申请实施例所述的可移动平台的控制装置、云台和搭载在所述云 台上的拍摄装置。In the fourth aspect, an embodiment of the present application provides a movable platform, the movable platform includes the control device of the movable platform as described in the embodiment of the present application in the second aspect, a pan-tilt, and a platform mounted on the pan-tilt. Shooting device.
第五方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序在被执行时,实现如第一方面本申请实施例所述的可移动平台的控制方法。In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium that stores a computer program, and when the computer program is executed, it implements the method described in the embodiment of the present application in the first aspect. The control method of the movable platform.
第六方面,本申请实施例提供一种程序产品,所述程序产品包括计算机程序,所述计算机程序存储在可读存储介质中,至少一个处理器可以从所述可读存储介质读取所述计算机程序,所述至少一个处理器执行所述计算机程序以实施如第一方面本申请实施例所述的可移动平台的控制方法。In a sixth aspect, an embodiment of the present application provides a program product, the program product includes a computer program, the computer program is stored in a readable storage medium, and at least one processor can read the A computer program, and the at least one processor executes the computer program to implement the control method of the movable platform according to the embodiment of the present application in the first aspect.
综上所述,本申请实施例提供的可移动平台的控制方法和装置,获取目标物在拍摄装置的拍摄画面中的当前位置,再根据目标物在拍摄装置的拍摄画面中的当前位置以及目标物在拍摄画面中的期望位置,确定云台的以特殊正交群矩阵或者四元数表示的目标姿态差;然后根据目标姿态差,确定云台转动的欧拉角速度,并根据欧拉角速度,控制云台转动,以使目标物在拍摄装置的拍摄画面中的位置向期望位置趋近,达到控制同步。本实施例以特殊正交群矩阵或者四元数表示目标姿态差,进而根据以特殊正交群矩阵或者四元数表示的目标姿态差确定用于控制云台转动的欧拉角速度,能够避免欧拉角的奇异性,不存在旋转自由度退化的问题,优化了云台的控制方式。In summary, the mobile platform control method and device provided by the embodiments of the present application acquire the current position of the target in the shooting screen of the shooting device, and then according to the current position of the target in the shooting screen of the shooting device and the target The desired position of the object in the shooting screen is determined, and the target attitude difference of the gimbal expressed by a special orthogonal group matrix or a quaternion is determined; then according to the target attitude difference, the Euler angular velocity of the gimbal rotation is determined, and according to the Euler angular velocity, Control the rotation of the pan/tilt so that the position of the target object in the shooting frame of the shooting device approaches the desired position to achieve control synchronization. In this embodiment, a special orthogonal group matrix or a quaternion is used to express the target attitude difference, and then the Euler angular velocity used to control the rotation of the pan/tilt is determined according to the target attitude difference expressed by the special orthogonal group matrix or quaternion, which can avoid Euler angular velocity. The singularity of the pull angle does not have the problem of the degradation of the degree of freedom of rotation, and the control method of the pan/tilt is optimized.
附图说明Description of the drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1是根据本申请的实施例的无人飞行系统的示意性架构图;Fig. 1 is a schematic architecture diagram of an unmanned aerial system according to an embodiment of the present application;
图2为本申请实施例提供的应用场景示意图;Figure 2 is a schematic diagram of an application scenario provided by an embodiment of the application;
图3为本申请一实施例提供的可移动平台的控制方法的流程图;FIG. 3 is a flowchart of a method for controlling a movable platform according to an embodiment of the application;
图4为本申请另一实施例提供的可移动平台的控制方法的流程图;4 is a flowchart of a method for controlling a movable platform provided by another embodiment of the application;
图5为本申请一实施例提供的一种可移动平台的控制装置的结构示意图;5 is a schematic structural diagram of a control device for a movable platform provided by an embodiment of the application;
图6为本申请一实施例提供的一种可移动平台结构示意图;FIG. 6 is a schematic structural diagram of a movable platform provided by an embodiment of this application;
图7为本申请另一实施例提供的一种可移动平台的结构示意图。FIG. 7 is a schematic structural diagram of a movable platform provided by another embodiment of this application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
需要说明的是,当组件被称为“固定于”另一个组件,它可以直接在另一个组件上或者也可以存在居中的组件。当一个组件被认为是“连接”另一个组件,它可以是直接连接到另一个组件或者可能同时存在居中组件。It should be noted that when a component is referred to as being "fixed to" another component, it can be directly on the other component or a centered component may also exist. When a component is considered to be "connected" to another component, it can be directly connected to the other component or there may be a centered component at the same time.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。本文所使用的术语“及/或”包括一个或多个相关的所列项目的任意的和所有的组合。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field of this application. The terms used in the specification of the application herein are only for the purpose of describing specific embodiments, and are not intended to limit the application. The term "and/or" as used herein includes any and all combinations of one or more related listed items.
本申请的实施例提供了可移动平台的控制方法和装置。其中,可移动平台可以是无人机、无人车、无人船、机器人、手持云台等。以下对本申请可移动平台的描述使用无人机作为示例。对于本领域技术人员将会显而易见的是,可以不受限制地使用其他类型的无人机,本申请的实施例可以应用于各种类型的无人机。例如,无人机可以是小型或大型的无人机。在某些实施例中,无人机可以是旋翼无人机(rotorcraft),例如,由多个推动装置通过空气推动的多旋翼无人机,本申请的实施例并不限于此。The embodiments of the present application provide a method and device for controlling a movable platform. Among them, the movable platform can be unmanned aerial vehicles, unmanned vehicles, unmanned ships, robots, handheld PTZ, etc. The following description of the mobile platform of this application uses drones as an example. It will be obvious to those skilled in the art that other types of drones can be used without restriction, and the embodiments of the present application can be applied to various types of drones. For example, the drone can be a small or large drone. In some embodiments, the drone may be a rotorcraft, for example, a multi-rotor drone propelled by multiple propulsion devices through the air, and the embodiments of the present application are not limited thereto.
图1是根据本申请的实施例的无人飞行系统的示意性架构图。本实施例以旋翼无人机为例进行说明。Fig. 1 is a schematic architecture diagram of an unmanned aerial system according to an embodiment of the present application. In this embodiment, a rotary wing drone is taken as an example for description.
无人飞行系统100可以包括无人机110、显示设备130和控制终端140。其中,无人机110可以包括动力系统150、飞行控制系统160、机架和承载在机架上的云台120。无人机110可以与控制终端140和显示设备130进行无线通信。其中,无人机110还包括电池(图中未示出),电池为动力系统150提供电能。无人机110可以是农业无人机或行业应用无人机,有循环作业的需求。相应的,电池也有循环作业的需求。The unmanned aerial system 100 may include a drone 110, a display device 130, and a control terminal 140. Among them, the UAV 110 may include a power system 150, a flight control system 160, a frame, and a pan/tilt 120 carried on the frame. The drone 110 can wirelessly communicate with the control terminal 140 and the display device 130. Among them, the drone 110 further includes a battery (not shown in the figure), and the battery provides electrical energy for the power system 150. The UAV 110 may be an agricultural UAV or an industrial application UAV, and there is a need for cyclic operation. Correspondingly, the battery also has the need for cyclic operation.
机架可以包括机身和脚架(也称为起落架)。机身可以包括中心架以及与中心架连接的一个或多个机臂,一个或多个机臂呈辐射状从中心架延伸出。脚架与机身连接,用于在无人机110着陆时起支撑作用。The frame may include a fuselage and a tripod (also called a landing gear). The fuselage may include a center frame and one or more arms connected to the center frame, and the one or more arms extend radially from the center frame. The tripod is connected with the fuselage and used for supporting the UAV 110 when it is landed.
动力系统150可以包括一个或多个电子调速器(简称为电调)151、一个或多个螺旋桨153以及与一个或多个螺旋桨153相对应的一个或多个电机152,其中电机152连接在电子调速器151与螺旋桨153之间,电机152和螺旋桨153设置在无人机110的机臂上;电子调速器151用于接收飞行控制系统160产生的驱动信号,并根据驱动信号提供驱动电流给电机152,以控制电机152的转速。电机152用于驱动螺旋桨旋转,从而为无人机110的飞行提供动力,该动力使得无人机110能够实现一个或多个自由度的运动。在某些实施例中,无人机110可以围绕一个或多个旋转轴旋转。例如,上述旋转轴可以包括横滚轴(Roll)、偏航轴(Yaw)和俯仰轴(pitch)。应理解,电机152可以是直流电机,也可以交流电机。另外,电机152可以是无刷电机,也可以是有刷电机。The power system 150 may include one or more electronic governors (referred to as ESCs) 151, one or more propellers 153, and one or more motors 152 corresponding to the one or more propellers 153, wherein the motors 152 are connected to Between the electronic governor 151 and the propeller 153, the motor 152 and the propeller 153 are arranged on the arm of the UAV 110; the electronic governor 151 is used to receive the driving signal generated by the flight control system 160 and provide driving according to the driving signal Current is supplied to the motor 152 to control the speed of the motor 152. The motor 152 is used to drive the propeller to rotate, thereby providing power for the flight of the drone 110, and the power enables the drone 110 to realize one or more degrees of freedom of movement. In some embodiments, the drone 110 may rotate about one or more rotation axes. For example, the aforementioned rotation axis may include a roll axis (Roll), a yaw axis (Yaw), and a pitch axis (pitch). It should be understood that the motor 152 may be a DC motor or an AC motor. In addition, the motor 152 may be a brushless motor or a brushed motor.
飞行控制系统160可以包括飞行控制器161和传感系统162。传感系统162用于测量无人机的姿态信息,即无人机110在空间的位置信息和状态信息,例如,三维位置、三维角度、三维速度、三维加速度和三维角速度等。传感系统162例如可以包括陀螺仪、超声传感器、电子罗盘、惯性测量单元(Inertial Measurement Unit,IMU)、视觉传感器、全球导航卫星系统和气压计等传感器中的至少一种。例如,全球导航卫星系统可以是全球定位系统(Global Positioning System,GPS)。飞行控制器161用于控制无人机110的飞行,例如,可以根据传感系统162测量的姿态信息控制无人机110的飞行。应理解,飞行控制器161可以按照预先编好的程序指令对无人机110进行控制,也可以通过响应来自控制终端140的一个或多个遥控信号对无人机110进行控制。The flight control system 160 may include a flight controller 161 and a sensing system 162. The sensing system 162 is used to measure the attitude information of the drone, that is, the position information and state information of the drone 110 in space, such as three-dimensional position, three-dimensional angle, three-dimensional velocity, three-dimensional acceleration, and three-dimensional angular velocity. The sensing system 162 may include, for example, at least one of sensors such as a gyroscope, an ultrasonic sensor, an electronic compass, an inertial measurement unit (IMU), a vision sensor, a global navigation satellite system, and a barometer. For example, the global navigation satellite system may be the Global Positioning System (GPS). The flight controller 161 is used to control the flight of the drone 110, for example, it can control the flight of the drone 110 according to the attitude information measured by the sensor system 162. It should be understood that the flight controller 161 can control the drone 110 according to pre-programmed program instructions, and can also control the drone 110 by responding to one or more remote control signals from the control terminal 140.
每个云台120可以包括电机122。云台120用于携带负载,负载例如是拍摄装置123。飞行控制器161可以通过电机122控制云台120的运动。可选的,作为另一实施例,云台120还可以包括控制器,用于通过控制电机122来控制云台120的运动。应理解,云台120可以独立于无人机110,也可以为无人机110的一部分。应理解,电机122可以是直流电机,也可以是交流 电机。另外,电机122可以是无刷电机,也可以是有刷电机。还应理解,云台可以位于无人机的顶部,也可以位于无人机的底部。Each pan/tilt head 120 may include a motor 122. The pan/tilt 120 is used to carry a load, and the load is, for example, a camera 123. The flight controller 161 can control the movement of the pan/tilt 120 through the motor 122. Optionally, as another embodiment, the pan/tilt head 120 may further include a controller for controlling the movement of the pan/tilt head 120 by controlling the motor 122. It should be understood that the pan-tilt 120 may be independent of the drone 110 or a part of the drone 110. It should be understood that the motor 122 may be a DC motor or an AC motor. In addition, the motor 122 may be a brushless motor or a brushed motor. It should also be understood that the pan/tilt may be located on the top of the drone or on the bottom of the drone.
拍摄装置123例如可以是照相机或摄像机等用于捕获图像的设备,拍摄装置123可以与飞行控制器通信,并在飞行控制器的控制下进行拍摄。本实施例的拍摄装置123至少包括感光元件,该感光元件例如为互补金属氧化物半导体(Complementary Metal Oxide Semiconductor,CMOS)传感器或电荷耦合元件(Charge-coupled Device,CCD)传感器。The photographing device 123 may be, for example, a device for capturing images, such as a camera or a video camera, and the photographing device 123 may communicate with the flight controller and take pictures under the control of the flight controller. The imaging device 123 of this embodiment at least includes a photosensitive element, and the photosensitive element is, for example, a Complementary Metal Oxide Semiconductor (CMOS) sensor or a Charge-coupled Device (CCD) sensor.
显示设备130位于无人飞行系统100的地面端,可以通过无线方式与无人机110进行通信,并且可以用于显示无人机110的姿态信息。另外,还可以在显示设备130上显示拍摄装置123拍摄的图像。应理解,显示设备130可以是独立的设备,也可以集成在控制终端140中。The display device 130 is located on the ground end of the unmanned aerial vehicle 100, can communicate with the drone 110 in a wireless manner, and can be used to display the attitude information of the drone 110. In addition, the image photographed by the photographing device 123 may also be displayed on the display device 130. It should be understood that the display device 130 may be an independent device or integrated in the control terminal 140.
控制终端140位于无人飞行系统100的地面端,可以通过无线方式与无人机110进行通信,用于对无人机110进行远程操纵。The control terminal 140 is located on the ground end of the unmanned aerial vehicle 100, and can communicate with the drone 110 in a wireless manner for remote control of the drone 110.
应理解,上述对于无人飞行系统各组成部分的命名仅是出于标识的目的,并不应理解为对本申请的实施例的限制。It should be understood that the aforementioned naming of the components of the unmanned aerial system is only for identification purposes, and should not be construed as a limitation to the embodiments of the present application.
图2为本申请实施例提供的应用场景示意图,如图2所示,图2中示出了无人机201、无人机的控制终端202。无人机201的控制终端202可以是遥控器、智能手机、台式电脑、膝上型电脑、穿戴式设备(手表、手环)中的一种或多种。本申请实施例以控制终端202为摇控器2021和终端设备2022为例来进行示意性说明。该终端设备2022例如是智能手机、可穿戴设备、平板电脑等,但本申请实施例并限于此。Fig. 2 is a schematic diagram of an application scenario provided by an embodiment of the application. As shown in Fig. 2, Fig. 2 shows a drone 201 and a control terminal 202 of the drone. The control terminal 202 of the drone 201 may be one or more of a remote control, a smart phone, a desktop computer, a laptop computer, and a wearable device (watch, bracelet). In the embodiment of the present application, the control terminal 202 is the remote controller 2021 and the terminal device 2022 as an example for schematic description. The terminal device 2022 is, for example, a smart phone, a wearable device, a tablet computer, etc., but the embodiment of the present application is not limited thereto.
无人机201的包括机身2011和连接在所述机身2011上的云台2012,云台2012用于承载负载2013。其中,负载2013包括有拍摄装置,无人机将拍摄装置拍摄到的图像传输给控制终端202,控制终端202显示拍摄装置拍摄到的图像。在无人机201跟踪目标物的场景中,无人机201通过跟踪目标物使得目标物一直位于控制终端显示的拍摄装置拍摄到的拍摄画面中。在一些情景下,需要控制目标物位于拍摄画面的固定的目标位置,比如拍摄画面的中心位置。然而,在目前的云台控制中,云台的控制误差是由云台的俯仰轴和偏航轴的单独控制来消除的,这样在控制上有不同步的问题,云台实际转动的路径不是最小的路径;另外,在欧拉角在表达云台的姿态和云台的旋转 时具有奇异性,在云台处于某些姿态时,云台三个自由度的旋转会退化成两个自由度,控制可能会失效。所以,本实施例以特殊正交群矩阵或者四元数表示目标姿态差,进而根据以特殊正交群矩阵或者四元数表示的目标姿态差确定用于控制云台转动的欧拉角速度,能够避免欧拉角的奇异性,不存在旋转自由度退化的问题,优化了云台的控制方式。具体实现过程采用本申请下述各实施例的方案。The drone 201 includes a fuselage 2011 and a gimbal 2012 connected to the fuselage 2011, and the gimbal 2012 is used to carry a load 2013. Wherein, the load 2013 includes a camera, the drone transmits the image captured by the camera to the control terminal 202, and the control terminal 202 displays the image captured by the camera. In a scene where the drone 201 tracks a target, the drone 201 tracks the target so that the target is always located in the shooting picture captured by the shooting device displayed on the control terminal. In some scenarios, it is necessary to control the target object to be located at a fixed target position of the shooting image, such as the center position of the shooting image. However, in the current gimbal control, the control error of the gimbal is eliminated by the separate control of the pitch axis and the yaw axis of the gimbal. In this way, there is a problem of unsynchronization in the control, and the actual rotation path of the gimbal is not The smallest path; in addition, the Euler angle is singular when expressing the attitude of the gimbal and the rotation of the gimbal. When the gimbal is in certain attitudes, the rotation of the three degrees of freedom of the gimbal will degenerate into two degrees of freedom. , The control may fail. Therefore, in this embodiment, a special orthogonal group matrix or a quaternion is used to express the target attitude difference, and the Euler angular velocity used to control the rotation of the pan/tilt can be determined according to the target attitude difference expressed by the special orthogonal group matrix or quaternion. The singularity of Euler angles is avoided, there is no problem of degradation of the degree of freedom of rotation, and the control method of the pan/tilt is optimized. The specific implementation process adopts the solutions of the following embodiments of the present application.
图3为本申请一实施例提供的可移动平台的控制方法的流程图,本实施例的方法可以应用于可移动平台的控制装置中。该可移动平台的控制装置可以设置在可移动平台;或者,该可移动平台的控制装置的一部分设置在可移动平台上,另一部分设置在可移动平台的控制终端上。所述可移动平台包括云台和搭载在云台上的拍摄装置,本实施例以可移动平台的控制装置设置在可移动平台为例,如图3所示,本实施例的方法可以包括:FIG. 3 is a flowchart of a method for controlling a movable platform according to an embodiment of the application. The method of this embodiment can be applied to a control device of a movable platform. The control device of the movable platform may be arranged on the movable platform; or, a part of the control device of the movable platform is arranged on the movable platform, and the other part is arranged on the control terminal of the movable platform. The movable platform includes a pan-tilt and a camera mounted on the pan-tilt. In this embodiment, the control device of the movable platform is set on the movable platform as an example. As shown in FIG. 3, the method of this embodiment may include:
S301、获取目标物在拍摄装置的拍摄画面中的当前位置,其中,目标物为可移动平台的跟踪对象。S301. Acquire the current position of the target object in the shooting frame of the shooting device, where the target object is a tracking object of a movable platform.
本实施例中,可移动平台通过云台搭载的拍摄装置可以拍摄图像。如果确定拍摄图像中拍摄到的一物体为目标物,该目标物即表示为可移动平台的跟踪对象,则可移动平台跟踪该目标物,比如可移动平台的跟随模式。确定目标物方式例如是通过图像识别到拍摄图像中某个物体为目标物,或者,用户通过操作控制终端显示的画面来确定拍摄图像中某个物体为目标物,等等。拍摄装置拍摄到目标物后,可以获取目标物在拍摄装置的拍摄画面中的当前位置。In this embodiment, the movable platform can take images through the camera mounted on the pan-tilt. If it is determined that an object captured in the captured image is a target, the target is represented as a tracking target of the movable platform, and the movable platform tracks the target, such as the follow mode of the movable platform. The method for determining the target object is, for example, recognizing an object in the captured image as the target object through the image, or the user determines that an object in the captured image is the target object by operating the screen displayed by the control terminal, and so on. After the photographing device photographs the target, the current position of the target in the photographing frame of the photographing device can be obtained.
其中,可移动平台跟踪目标物的过程中,可以是可移动平台调整可移动平台的姿态使得目标物位于拍摄装置的拍摄画面中,或者,可移动平台调整云台的姿态使得目标物位于拍摄装置的拍摄画面中,或者,可移动平台调整可移动平台的姿态以及云台的姿态使得目标物位于拍摄装置的拍摄画面中。Wherein, in the process of tracking the target by the movable platform, the movable platform may adjust the posture of the movable platform so that the target is located in the shooting frame of the shooting device, or the movable platform may adjust the posture of the pan-tilt so that the target is located on the shooting device. Alternatively, the movable platform can adjust the posture of the movable platform and the posture of the pan/tilt so that the target is located in the shooting frame of the shooting device.
姿态可以包括:俯仰(pitch)方向的姿态、横滚(Roll)方向的姿态、偏航(Yaw)方向的姿态。The attitude may include: attitude in the pitch direction, attitude in the roll direction, and attitude in the yaw direction.
S302、根据目标物在拍摄装置的拍摄画面中的当前位置以及目标物在拍摄画面中的期望位置,确定云台的以目标姿态表示类型表示的目标姿态差,目标姿态表示类型为特殊正交群矩阵或者四元数。S302. According to the current position of the target in the shooting image of the shooting device and the desired position of the target in the shooting image, determine the target posture difference of the PTZ in the target posture representation type, and the target posture representation type is a special orthogonal group Matrix or quaternion.
本实施例中,可移动平台跟踪目标物,期望目标物可以位于拍摄装置的拍摄画面中的一位置,该位置可以称为期望位置。可移动平台根据目标物在拍摄装置的拍摄画面中的当前位置以及目标物在拍摄画面中的期望位置,确定云台的目标姿态差。该目标姿态差可以表示目标物位于拍摄画面中的当前位置时对应的云台的当前姿态与目标物位于拍摄画面中的期望位置时云台的期望姿态之间的姿态差。该目标姿态差表示云台的姿态改变,使得目标物在拍摄画面中的位置向期望位置趋近,甚至位于期望位置。In this embodiment, the movable platform tracks the target, and the desired target may be located at a position in the shooting frame of the shooting device, and this position may be referred to as the desired position. The movable platform determines the target attitude difference of the pan/tilt according to the current position of the target in the shooting picture of the shooting device and the desired position of the target in the shooting picture. The target posture difference may represent the posture difference between the current posture of the pan/tilt head corresponding to when the target is at the current position in the shooting screen and the expected posture of the pan/tilt head when the target is at the desired position in the shooting screen. The target posture difference indicates that the posture of the pan/tilt head changes, so that the position of the target object in the shooting screen approaches the desired position, or even is located at the desired position.
其中,本实施例中的目标姿态差是以目标姿态表示类型表示的目标姿态差,目标姿态表示类型为特殊正交群矩阵或者四元数或者轴角。Among them, the target posture difference in this embodiment is the target posture difference represented by the target posture representation type, and the target posture representation type is a special orthogonal group matrix or a quaternion or an axis angle.
S303、根据目标姿态差,确定云台转动的欧拉角速度。S303. Determine the Euler angular velocity of the pan/tilt rotation according to the target attitude difference.
本实施例中,在确定云台的上述目标姿态差后,根据该特殊正交群矩阵表示的目标姿态差或者四元表示的数目标姿态差,确定云台转动的欧拉角速度,该欧拉角速度表示云台由当前姿态转到目标姿态差所采用的欧拉角速度。In this embodiment, after the above-mentioned target attitude difference of the pan/tilt is determined, the Euler angular velocity of the pan/tilt rotation is determined according to the target attitude difference represented by the special orthogonal group matrix or the numerical target attitude difference represented by the quaternion. Angular velocity represents the Euler angular velocity used by the gimbal from the current attitude to the target attitude difference.
S304、根据欧拉角速度,控制云台转动,以使目标物在拍摄装置的拍摄画面中的位置向期望位置趋近。S304. Control the rotation of the pan/tilt according to the Euler angular velocity, so that the position of the target in the shooting frame of the shooting device approaches a desired position.
本实施例中,在确定上述欧拉角速度后,根据欧拉角速度,控制云台转动,以使云台的姿态尽可能变化上述目标姿态差,使得云台的姿态朝期望姿态转动。根据目标姿态差,确定云台转动的欧拉角速度,进而使得目标物在拍摄装置的拍摄画面中的位置向期望位置趋近,甚至使得目标物在拍摄装置的拍摄画面中的位置位于期望位置。In this embodiment, after the Euler angular velocity is determined, the rotation of the gimbal is controlled according to the Euler angular velocity, so that the posture of the gimbal changes the target posture difference as much as possible, so that the posture of the gimbal rotates toward the desired posture. According to the target attitude difference, the Euler angular velocity of the pan/tilt rotation is determined, so that the position of the target in the shooting image of the shooting device approaches the desired position, and even the position of the target in the shooting image of the shooting device is located at the desired position.
可选的,欧拉角速度是可移动平台的控制终端确定的,则可移动平台的控制终端向可移动平台发送欧拉角速度。然后可移动平台根据接收的欧拉角速度控制云台转动。Optionally, if the Euler angular velocity is determined by the control terminal of the movable platform, the control terminal of the movable platform sends the Euler angular velocity to the movable platform. Then the movable platform controls the rotation of the pan/tilt according to the received Euler angular velocity.
本实施例中,获取目标物在拍摄装置的拍摄画面中的当前位置,再根据目标物在拍摄装置的拍摄画面中的当前位置以及目标物在拍摄画面中的期望位置,确定云台的以特殊正交群矩阵或者四元数表示的目标姿态差;然后根据目标姿态差,确定云台转动的欧拉角速度,并根据欧拉角速度,控制云台转动,以使目标物在拍摄装置的拍摄画面中的位置向期望位置趋近,达到控制同步。本实施例以特殊正交群矩阵或者四元数表示目标姿态差,进而根据以特殊正交群矩阵或者四元数表示的目标姿态差确定用于控制云台转动的欧 拉角速度。而不是根据欧拉角误差确定角速度,并根据角速度来控制云台转动。所以能够避免欧拉角的奇异性,不存在旋转自由度退化的问题,优化了云台的控制方式。In this embodiment, the current position of the target in the shooting screen of the shooting device is acquired, and then according to the current position of the target in the shooting screen of the shooting device and the desired position of the target in the shooting screen, the special feature of the pan/tilt is determined. Orthogonal group matrix or quaternion representation of the target attitude difference; then according to the target attitude difference, determine the Euler angular velocity of the gimbal rotation, and control the rotation of the gimbal according to the Euler angular velocity, so that the target is on the shooting screen of the camera The position in is approaching to the desired position to achieve control synchronization. In this embodiment, a special orthogonal group matrix or a quaternion is used to express the target attitude difference, and then the Euler angular velocity for controlling the rotation of the pan/tilt is determined according to the target attitude difference expressed by the special orthogonal group matrix or the quaternion. Instead of determining the angular velocity based on the Euler angle error, and controlling the pan/tilt rotation based on the angular velocity. Therefore, the singularity of Euler angles can be avoided, there is no problem of degradation of the degree of freedom of rotation, and the control method of the PTZ is optimized.
在图3所示实施例的基础上,图4为本申请另一实施例提供的可移动平台的控制方法的流程图,如图4所示,本实施例的方法可以包括:On the basis of the embodiment shown in FIG. 3, FIG. 4 is a flowchart of a method for controlling a movable platform provided by another embodiment of this application. As shown in FIG. 4, the method in this embodiment may include:
S401、获取目标物在拍摄装置的拍摄画面中的当前位置,其中,目标物为可移动平台的跟踪对象。S401. Acquire a current position of a target object in a shooting frame of the shooting device, where the target object is a tracking object of a movable platform.
本实施例中,上述S401的具体实现过程可以参见图3所示实施例中的相关描述,此处不再赘述。In this embodiment, for the specific implementation process of the foregoing S401, reference may be made to the related description in the embodiment shown in FIG. 3, which will not be repeated here.
S402、根据当前位置和期望位置,确定云台应调整的目标欧拉角误差。S402: Determine the target Euler angle error of the pan/tilt head to be adjusted according to the current position and the expected position.
本实施例中,当前位置与云台的当前欧拉角对应,期望位置也会对应云台的期望欧拉角,该期望欧拉角表示云台的姿态为该期望欧拉角时目标物位于拍摄装置的拍摄位置。所以根据当前位置与期望位置,可以确定云台应调整的目标欧拉角误差。In this embodiment, the current position corresponds to the current Euler angle of the gimbal, and the desired position also corresponds to the expected Euler angle of the gimbal. The shooting position of the camera. Therefore, according to the current position and the expected position, the target Euler angle error that the pan/tilt should be adjusted can be determined.
其中,上述S402的一种可能的实现方式为:根据目标物在拍摄画面中的当前位置和期望位置,确定当前位置与期望位置之间的位置差;这个位置差也可以映射到姿态上云台需要调整的目标姿态差,以消除这个位置差。然后根据位置差、拍摄装置的焦距以及拍摄装置中图像传感器的尺寸,确定云台应调整的目标欧拉角误差,此处以目标欧拉角误差表示云台要调整的目标姿态差。Among them, a possible implementation of S402 above is: determining the position difference between the current position and the expected position according to the current position and expected position of the target in the shooting picture; this position difference can also be mapped to the posture of the PTZ The target attitude difference that needs to be adjusted to eliminate this position difference. Then, according to the position difference, the focal length of the camera, and the size of the image sensor in the camera, determine the target Euler angle error that the pan/tilt should adjust. Here, the target Euler angle error represents the target attitude difference of the pan/tilt.
位置差包括拍摄画面的长度方向的差值和拍摄画面的高度方向的差值。具体的是:根据拍摄画面的长度方向的差值、拍摄装置的焦距以及图像传感器的长度尺寸,确定云台应调整的偏航方向的欧拉角误差;以及根据拍摄画面的宽度方向的差值、拍摄装置的焦距以及图像传感器的宽度尺寸,确定云台应调整的俯仰方向的欧拉角误差。可选的,云台应调整的俯仰方向的欧拉角误差与上述位置差无关,该云台应调整的俯仰方向的欧拉角误差为预先设定的值,例如为0。The position difference includes the difference in the length direction of the shooting screen and the difference in the height direction of the shooting screen. Specifically: Determine the Euler angle error of the yaw direction that the gimbal should adjust according to the difference in the length direction of the shooting screen, the focal length of the camera and the length of the image sensor; and according to the difference in the width direction of the shooting screen , The focal length of the camera and the width of the image sensor determine the Euler angle error of the pitch direction that the gimbal should be adjusted. Optionally, the Euler angle error in the pitch direction that the pan/tilt should adjust has nothing to do with the above position difference, and the Euler angle error in the pitch direction that the pan/tilt should adjust is a preset value, for example, 0.
S403、根据目标欧拉角误差,确定云台应调整的以目标姿态表示类型表示的目标姿态差。S403: According to the target Euler angle error, determine the target attitude difference represented by the target attitude representation type that the gimbal should adjust.
本实施例以目标姿态表示类型表示的目标姿态差是由表示姿态差的目标 欧拉角误差转化得到的。利用以所述目标姿态表示类型表示的目标姿态差来控制云台的控制能够克服利用欧拉角误差控制云台过程中的欧拉角奇异性和旋转自由度退化的问题,优化了云台的控制方式。In this embodiment, the target attitude difference represented by the target attitude representation type is converted from the target Euler angle error representing the attitude difference. Using the target attitude difference represented by the target attitude representation type to control the control of the gimbal can overcome the problems of Euler angle singularity and rotation degree of freedom degradation in the process of using Euler angle error to control the gimbal, and optimize the gimbal's way to control.
在一些实施例中,根据目标物在拍摄画面中的当前位置与期望位置确定的目标欧拉角误差包括:俯仰方向的欧拉角误差、偏航轴方向的欧拉角误差。其中,横滚方向的欧拉角误差可以不基于目标物在拍摄画面中的当前位置与期望位置确定,该横滚方向的欧拉角误差可以预先设定的值,例如该横滚方向的欧拉角误差为0。In some embodiments, the target Euler angle error determined according to the current position and the expected position of the target in the shooting image includes: Euler angle error in the pitch direction and Euler angle error in the yaw axis direction. Wherein, the Euler angle error in the roll direction may not be determined based on the current position and the desired position of the target in the shooting image. The Euler angle error in the roll direction may be a preset value, for example, the Euler angle error in the roll direction. The pull angle error is 0.
以上述目标姿态表示类型为特殊正交群矩阵为例,上述根据目标欧拉角误差,确定云台应调整的以目标姿态表示类型表示的目标姿态差的一种可能的实现方式可以为:将俯仰方向的欧拉角误差转化为特殊正交群矩阵俯仰方向的姿态差,以及将偏航方向的欧拉角误差转化为特殊正交群矩阵偏航方向的姿态差。再根据特殊正交群矩阵俯仰方向的姿态差、特殊正交群矩阵偏航方向的姿态差,确定云台应调整的以特殊正交群矩阵表示的目标姿态差。比如获取特殊正交群矩阵俯仰方向的姿态差、特殊正交群矩阵偏航方向的姿态差的乘积,再根据该乘积确定云台应调整的以特殊正交群矩阵表示的目标姿态差。Taking the above-mentioned target attitude representation type as a special orthogonal group matrix as an example, according to the target Euler angle error, a possible realization method of determining the target attitude difference expressed by the target attitude representation type that the gimbal should adjust can be: The Euler angle error in the pitch direction is converted into the attitude difference in the pitch direction of the special orthogonal group matrix, and the Euler angle error in the yaw direction is converted into the attitude difference in the yaw direction of the special orthogonal group matrix. Then according to the attitude difference in the pitch direction of the special orthogonal group matrix and the attitude difference in the yaw direction of the special orthogonal group matrix, determine the target attitude difference expressed by the special orthogonal group matrix that the pan/tilt should adjust. For example, the product of the attitude difference in the pitch direction of the special orthogonal group matrix and the attitude difference in the yaw direction of the special orthogonal group matrix is obtained, and then the target attitude difference represented by the special orthogonal group matrix to be adjusted by the gimbal is determined according to the product.
可选的,可以根据特殊正交群矩阵俯仰方向的姿态差、特殊正交群矩阵横滚方向的姿态差、特殊正交群矩阵偏航方向的姿态差,确定云台应调整的以特殊正交群矩阵表示的目标姿态差。比如获取特殊正交群矩阵俯仰方向的姿态差、特殊正交群矩阵横滚方向的姿态差、特殊正交群矩阵偏航方向的姿态差、三者的乘积,再根据该乘积确定云台应调整的以特殊正交群矩阵表示的目标姿态差。例如将该乘积确定为云台应调整的以特殊正交群矩阵表示的目标姿态差。其中,特殊正交群矩阵横滚方向的姿态差是与横滚方向的欧拉角误差转化得到。由于横滚方向的欧拉角误差是预先设定的值,所以特殊正交群矩阵横滚方向的姿态差也可以是预先设定的,或者,在需要获得目标姿态差的过程中根据横滚方向的欧拉角误差确定。Optionally, according to the attitude difference in the pitch direction of the special orthogonal group matrix, the attitude difference in the roll direction of the special orthogonal group matrix, and the attitude difference in the yaw direction of the special orthogonal group matrix, it can be determined that the gimbal should be adjusted to the special direction. The target posture difference represented by the intersection group matrix. For example, obtain the attitude difference in the pitch direction of the special orthogonal group matrix, the attitude difference in the roll direction of the special orthogonal group matrix, the attitude difference in the yaw direction of the special orthogonal group matrix, and the product of the three. The adjusted target posture difference represented by a special orthogonal group matrix. For example, the product is determined as the target attitude difference represented by a special orthogonal group matrix that the pan/tilt should adjust. Among them, the attitude difference in the roll direction of the special orthogonal group matrix is converted from the Euler angle error in the roll direction. Since the Euler angle error in the roll direction is a preset value, the attitude difference in the roll direction of the special orthogonal group matrix can also be preset, or, in the process of obtaining the target attitude difference according to the roll The Euler angle error of the direction is determined.
以上述目标姿态表示类型为四元数为例,上述根据目标欧拉角误差,确定云台应调整的以目标姿态表示类型表示的目标姿态差的一种可能的实现方式可以为:将俯仰方向的欧拉角误差转化为四元数俯仰方向的姿态差,以及 将偏航方向的欧拉角误差转化为四元数偏航方向的姿态差。再根据四元数俯仰方向的姿态差、四元数偏航方向的姿态差,确定云台应调整的以四元数表示的目标姿态差。比如获取四元数俯仰方向的姿态差、四元数偏航方向的姿态差的乘积,再根据该乘积确定云台应调整的以四元数表示的目标姿态差。Taking the aforementioned target attitude representation type as a quaternion as an example, according to the target Euler angle error, a possible realization method of determining the target attitude difference expressed by the target attitude representation type that the gimbal should adjust can be: changing the pitch direction The Euler angle error is converted into the attitude difference in the quaternion pitch direction, and the Euler angle error in the yaw direction is converted into the attitude difference in the quaternion yaw direction. Then, according to the attitude difference in the quaternion pitch direction and the attitude difference in the quaternion yaw direction, determine the target attitude difference expressed by the quaternion that the gimbal should adjust. For example, obtain the product of the attitude difference in the quaternion pitch direction and the attitude difference in the quaternion yaw direction, and then determine the target attitude difference expressed by the quaternion that the gimbal should adjust based on the product.
可选的,可以根据四元数俯仰方向的姿态差、四元数横滚方向的姿态差、四元数偏航方向的姿态差,确定云台应调整的以四元数表示的目标姿态差。比如获取四元数俯仰方向的姿态差、四元数横滚方向的姿态差、四元数偏航方向的姿态差三者的乘积,再根据该乘积确定云台应调整的以四元数表示的目标姿态差。例如将该乘积确定为云台应调整的以四元数表示的目标姿态差。其中,四元数横滚方向的姿态差是与横滚方向的欧拉角误差转化得到。由于横滚方向的欧拉角误差是预先设定的值,所以四元数横滚方向的姿态差也可以是预先设定的,或者,在需要获得目标姿态差的过程中根据横滚方向的欧拉角误差确定。Optionally, according to the attitude difference in the quaternion pitch direction, the attitude difference in the quaternion roll direction, and the attitude difference in the quaternion yaw direction, determine the target attitude difference expressed by the quaternion that the gimbal should adjust . For example, obtain the product of the attitude difference in the quaternion pitch direction, the attitude difference in the quaternion roll direction, and the attitude difference in the quaternion yaw direction, and then determine the quaternion that the gimbal should be adjusted according to the product. The target attitude is poor. For example, the product is determined as the target attitude difference expressed by the quaternion that the pan/tilt should adjust. Among them, the attitude difference in the quaternion roll direction is converted from the Euler angle error in the roll direction. Since the Euler angle error in the roll direction is a preset value, the attitude difference in the quaternion roll direction can also be preset, or, in the process of obtaining the target attitude difference according to the roll direction The Euler angle error is determined.
S404、根据目标姿态差,确定目标姿态表示类型对应的姿态控制误差。S404: Determine an attitude control error corresponding to the target attitude representation type according to the target attitude difference.
本实施例中,如果目标姿态表示类型为特殊正交群矩阵,则根据上述以特殊正交群矩阵表示的目标姿态差,确定特殊正交群矩阵对应的姿态控制误差。如果目标姿态表示类型为四元数,则根据上述以四元数表示的目标姿态差,确定以四元数对应的姿态控制误差。In this embodiment, if the target posture representation type is a special orthogonal group matrix, the posture control error corresponding to the special orthogonal group matrix is determined according to the target posture difference represented by the special orthogonal group matrix. If the target posture representation type is a quaternion, then the quaternion corresponding attitude control error is determined according to the above-mentioned target posture difference represented by the quaternion.
如果目标姿态表示类型为特殊正交群矩阵,则上述S404的一种可能的实现方式为:根据用于表示上述目标姿态差的特殊正交群矩阵,确定该特殊正交群矩阵的反对称矩阵,再将该反对称矩阵转化为列向量,然后根据该列向量,确定特殊正交群矩阵对应的姿态控制误差。比如将该列向量中的各元素,分别确定为姿态控制误差中各姿态方向的控制误差。例如将该列向量中的3个元素分别确定为俯仰方向的控制误差、横滚方向的控制误差、偏航方向的控制误差。该列向量例如是3维列向量,相应地,上述的用于表示上述目标姿态差的特殊正交群矩阵为3*3的矩阵。If the target pose representation type is a special orthogonal group matrix, a possible implementation of S404 is: determine the antisymmetric matrix of the special orthogonal group matrix according to the special orthogonal group matrix used to represent the target pose difference , And then transform the antisymmetric matrix into a column vector, and then determine the attitude control error corresponding to the special orthogonal group matrix according to the column vector. For example, each element in the column of vectors is determined as the control error of each attitude direction in the attitude control error. For example, the three elements in the column vector are determined as the control error in the pitch direction, the control error in the roll direction, and the control error in the yaw direction. The column vector is, for example, a three-dimensional column vector. Correspondingly, the above-mentioned special orthogonal group matrix for representing the above-mentioned target attitude difference is a 3*3 matrix.
如果目标姿态表示类型为四元数,则上述S404的一种可能的实现方式为:获取用于表示目标姿态差的四元数;再根据用于表示目标姿态差的四元数中的虚部,确定云台调整目标姿态差对应的旋转轴,以及根据用于表示目标姿态差的四元数中的虚部和实部,确定云台调整目标姿态差对应的旋转角度; 再根据旋转轴和旋转角度,确定四元数对应的姿态控制误差。该姿态控制误差也可称为轴角误差。If the target pose representation type is a quaternion, a possible implementation of S404 above is: obtain the quaternion used to represent the target pose difference; then according to the imaginary part of the quaternion used to represent the target pose difference , Determine the rotation axis corresponding to the PTZ adjustment target attitude difference, and determine the rotation angle corresponding to the PTZ adjustment target attitude difference according to the imaginary part and real part of the quaternion used to represent the target attitude difference; Rotate the angle to determine the attitude control error corresponding to the quaternion. This attitude control error can also be referred to as shaft angle error.
可选的,上述旋转轴为3维列向量表示的旋转轴。相应地,根据旋转轴和旋转角度,确定四元数对应的姿态控制误差的一种可能的实现方式为:根据旋转角度与3维列向量表示的旋转轴的乘积,获得中间3维列向量;旋转轴与该3维列向量表示的旋转角度的乘积为一个3维列向量,本实施例可以将该乘积确定为中间3维列向量。然后将该中间3维列向量中3个元素分别确定为俯仰方向的控制误差、横滚方向的控制误差、偏航方向的控制误差。Optionally, the above-mentioned rotation axis is a rotation axis represented by a 3-dimensional column vector. Correspondingly, according to the rotation axis and the rotation angle, a possible implementation of determining the attitude control error corresponding to the quaternion is: obtaining the intermediate 3-dimensional column vector according to the product of the rotation angle and the rotation axis represented by the 3-dimensional column vector; The product of the rotation axis and the rotation angle represented by the 3-dimensional column vector is a 3-dimensional column vector, and this embodiment may determine the product as an intermediate 3-dimensional column vector. Then the three elements in the middle 3-dimensional column vector are determined as the control error in the pitch direction, the control error in the roll direction, and the control error in the yaw direction.
在确定目标姿态表示类型对应的姿态控制误差之后,再根据该姿态控制误差确定云台转动的欧拉角速度。比如根据特殊正交群矩阵对应的姿态控制误差,确定云台转动的欧拉角速度,或者,根据四元数对应的姿态控制误差,确定云台转动的欧拉角速度。本实施例是在获得以特殊正交群矩阵或四元数表示的目标姿态差之后,先获得特殊正交群矩阵或四元数对应的姿态控制误差,再根据该姿态控制误差获得欧拉角速度,有效避免了由欧拉角误差控制云台转动过程中的自由度损失。After determining the attitude control error corresponding to the target attitude representation type, the Euler angular velocity of the pan/tilt rotation is determined according to the attitude control error. For example, determine the Euler angular velocity of the pan/tilt rotation according to the attitude control error corresponding to the special orthogonal group matrix, or determine the Euler angular velocity of the pan/tilt rotation according to the attitude control error corresponding to the quaternion. In this embodiment, after obtaining the target attitude difference represented by the special orthogonal group matrix or quaternion, first obtain the attitude control error corresponding to the special orthogonal group matrix or quaternion, and then obtain the Euler angular velocity according to the attitude control error This effectively avoids the loss of freedom in the process of controlling the rotation of the pan/tilt by Euler angle error.
可选的,在一种可能的实现方式中,根据该姿态控制误差确定云台转动的欧拉角速度可以包括S405和S406。Optionally, in a possible implementation manner, determining the Euler angular velocity of the pan/tilt rotation according to the attitude control error may include S405 and S406.
S405、根据姿态控制误差,确定云台转动的角速度。S405. Determine the angular velocity of the pan/tilt rotation according to the attitude control error.
本实施例中,在获得特殊正交群矩阵或四元数对应的姿态控制误差后,根据该姿态控制误差,确定云台转动的角速度。In this embodiment, after the attitude control error corresponding to the special orthogonal group matrix or the quaternion is obtained, the angular velocity of the pan/tilt rotation is determined according to the attitude control error.
可选的,可以根据该姿态控制误差以及预设控制系数,确定云台转动的角速度;比如根据预设控制系数与该姿态控制误差的乘积,确定云台转动的角速度。Optionally, the angular velocity of the pan/tilt rotation may be determined according to the attitude control error and the preset control coefficient; for example, the angular velocity of the pan/tilt rotation may be determined according to the product of the preset control coefficient and the attitude control error.
其中,姿态控制误差可以包括俯仰方向的控制误差、横滚方向的控制误差、偏航方向的控制误差,云台转动的角速度包括俯仰方向的角速度、横滚方向的角速度、偏航方向的角速度。本实施例中,可以获取预设控制系数与俯仰方向的控制误差的乘积,并根据该乘积确定云台转动的俯仰方向的角速度,例如将该乘积确定为云台转动的俯仰方向的角速度。获取预设控制系数与横滚方向的控制误差的乘积,并根据该乘积确定云台转动的横滚方向的角速度,例如将该乘积确定为云台转动的横滚方向的角速度。获取预设控制系 数与偏航方向的控制误差的乘积,并根据该乘积确定云台转动的偏航方向的角速度,例如将该乘积确定为云台转动的偏航方向的角速度。Among them, the attitude control error may include the control error of the pitch direction, the control error of the roll direction, and the control error of the yaw direction. The angular velocity of the pan/tilt rotation includes the angular velocity of the pitch direction, the angular velocity of the roll direction, and the angular velocity of the yaw direction. In this embodiment, the product of the preset control coefficient and the control error in the pitch direction can be obtained, and the angular velocity in the pitch direction of the pan/tilt rotation can be determined according to the product. For example, the product can be determined as the angular velocity in the pitch direction of the pan/tilt rotation. The product of the preset control coefficient and the control error in the roll direction is obtained, and the angular velocity in the roll direction of the pan/tilt rotation is determined according to the product. For example, the product is determined as the angular velocity in the roll direction of the pan/tilt rotation. The product of the preset control coefficient and the control error of the yaw direction is obtained, and the angular velocity of the yaw direction of the pan/tilt rotation is determined according to the product, for example, the product is determined as the angular velocity of the yaw direction of the pan/tilt rotation.
需要说明的是,针对获得不同方向的角速度所采用的预设控制系数可以为同一控制系数,或者,也可以是不全相同的控制系数。针对特殊正交群矩阵的预设控制系数与针对四元数的预设控制系统可以相同,也可以不相同。It should be noted that the preset control coefficients used for obtaining angular velocities in different directions may be the same control coefficient, or may also be not all the same control coefficients. The preset control coefficient for the special orthogonal group matrix and the preset control system for the quaternion may be the same or different.
本实施例中,通过先获得不同方向的姿态控制误差,再统一获得不同方向的角速度。有效避免了不同方向分开计算误差,分别给定角速度的情况。In this embodiment, by first obtaining attitude control errors in different directions, and then uniformly obtaining angular velocities in different directions. This effectively avoids the situation of separate calculation errors in different directions and given angular velocities separately.
S406、根据角速度,确定云台转动的欧拉角速度。S406: Determine the Euler angular velocity of the pan/tilt rotation according to the angular velocity.
在获得云台转动的角速度后,再将云台转动的角速度转化为云台转动的欧拉角速度。After obtaining the angular velocity of the gimbal rotation, the angular velocity of the gimbal rotation is converted into the Euler angular velocity of the gimbal rotation.
可选的,获得的欧拉角速度还与云台的目标姿态表示类型的当前姿态有关。也就是,在确定云台转动的欧拉角速度之前还获取云台的目标姿态表示类型的当前姿态,再根据上述角速度以及云台的目标姿态表示类型的当前姿态,确定云台转动的欧拉角速度。Optionally, the obtained Euler angular velocity is also related to the current attitude of the target attitude representation type of the gimbal. That is, before determining the Euler angular velocity of the gimbal rotation, the current attitude of the target attitude representation type of the gimbal is also obtained, and then the Euler angular velocity of the gimbal rotation is determined according to the above angular velocity and the current attitude of the target attitude representation type of the gimbal. .
其中,上述云台的目标姿态表示类型的当前姿态可以包括:目标姿态表示类型俯仰方向的当前姿态、目标姿态表示类型横滚方向的当前姿态。角速度可以包括:俯仰方向的角速度、横滚方向的角速度、偏航方向的角速度。欧拉角速度可以包括:俯仰方向的欧拉角速度、横滚方向的欧拉角速度、偏航方向的欧拉角速度。本实施例中,可以根据俯仰方向的角速度,确定俯仰方向的欧拉角速度。比如将俯仰方向的角速度确定为俯仰方向的欧拉角速度。以及根据横滚方向的角速度和目标姿态表示类型俯仰方向的当前姿态,确定云台转动的横滚方向的欧拉角速度。比如根据目标姿态表示类型俯仰方向的当前姿态与横滚方向的角速度的乘积,确定横滚方向的欧拉角速度。例如确定该乘积为该横滚方向的欧拉角速度。还根据偏航方向的角速度、目标姿态表示类型俯仰方向的当前姿态、目标姿态表示类型横滚方向的当前姿态,确定所述云台转动的偏航方向的欧拉角速度。比如根据目标姿态表示类型横滚方向的当前姿态、目标姿态表示类型俯仰方向的当前姿态、偏航方向的角速度三者的乘积,确定偏航方向的欧拉角速度。例如确定该乘积为该偏航方向的欧拉角速度。Wherein, the current posture of the target posture indication type of the aforementioned pan/tilt may include: the current posture of the target posture indication type in the pitch direction, and the current posture of the target posture indication type in the roll direction. The angular velocity may include: the angular velocity in the pitch direction, the angular velocity in the roll direction, and the angular velocity in the yaw direction. The Euler angular velocity may include the Euler angular velocity in the pitch direction, the Euler angular velocity in the roll direction, and the Euler angular velocity in the yaw direction. In this embodiment, the Euler angular velocity in the pitch direction can be determined according to the angular velocity in the pitch direction. For example, the angular velocity in the pitch direction is determined as the Euler angular velocity in the pitch direction. And according to the angular velocity in the roll direction and the current posture in the pitch direction of the target posture indication type, the Euler angular velocity in the roll direction of the pan/tilt rotation is determined. For example, the Euler angular velocity in the roll direction is determined according to the product of the current posture in the pitch direction and the angular velocity in the roll direction according to the target posture indication type. For example, it is determined that the product is the Euler angular velocity in the roll direction. The Euler angular velocity in the yaw direction of the pan/tilt rotation is also determined according to the angular velocity in the yaw direction, the current attitude in the pitch direction of the target attitude representation type, and the current attitude in the roll direction of the target attitude representation type. For example, the Euler angular velocity in the yaw direction is determined according to the product of the current attitude of the target attitude representation type in the roll direction, the current attitude of the target attitude representation type in the pitch direction, and the angular velocity in the yaw direction. For example, it is determined that the product is the Euler angular velocity in the yaw direction.
因此,本实施例在获得角速度后,会根据云台的当前姿态,将角速度进 一步转换为欧拉角速度,保证了控制云台的全局有效性。Therefore, after the angular velocity is obtained in this embodiment, the angular velocity is further converted into Euler angular velocity according to the current attitude of the pan/tilt, which ensures the global effectiveness of controlling the pan/tilt.
S407、根据欧拉角速度,控制云台转动,以使目标物在拍摄装置的拍摄画面中的位置向期望位置趋近。S407: Control the rotation of the pan/tilt according to the Euler angular velocity, so that the position of the target in the shooting image of the shooting device approaches a desired position.
本实施例中,S407的具体实现过程可以参见图3所示实施例中的相关描述,此处不再赘述。In this embodiment, the specific implementation process of S407 can refer to the related description in the embodiment shown in FIG. 3, which will not be repeated here.
本实施例根据欧拉角速度来控制云台转动,使得云台的姿态的变化更加接近需变化的目标姿态差,尽可能确保目标物在拍摄画面中的位置趋近期望位置,达到控制同步。而且获得三个姿态方向的欧拉角速度,据此控制云台转动,能够缩短云台转动的路径,使得云台转动更加快速、准确、平滑。另外,欧拉角速度是根据以特殊正交群矩阵或者四元数表示的目标姿态差得到,并不是由欧拉角表示的目标姿态差得到,所以能够避免欧拉角的奇异性,不存在旋转自由度退化的问题,优化了云台的控制方式。In this embodiment, the rotation of the pan/tilt is controlled according to the Euler angular velocity, so that the change of the pan/tilt's attitude is closer to the target attitude difference that needs to be changed, and as much as possible to ensure that the position of the target in the shooting image is close to the desired position and achieve control synchronization. Moreover, the Euler angular velocities in the three attitude directions are obtained, and the rotation of the gimbal can be controlled accordingly, which can shorten the rotation path of the gimbal and make the rotation of the gimbal more rapid, accurate and smooth. In addition, the Euler angular velocity is obtained from the target attitude difference expressed by a special orthogonal group matrix or quaternion, not the target attitude difference expressed by Euler angles, so the singularity of Euler angles can be avoided, and there is no rotation. The problem of degree of freedom degradation optimizes the control method of the PTZ.
下面分别以目标姿态表示类型为特殊正交群矩阵或者四元数对本申请的方案进行举例说明。The following is an example to illustrate the solution of the present application with the target pose representation type being a special orthogonal group matrix or a quaternion.
在拍摄装置拍摄到目标物后,可以获取目标物在拍摄装置的拍摄画面中的当前位置,也就是目标物在拍摄画面中的当前坐标是(b cx,b cy)。其中,拍摄装置的拍摄画面的尺寸包括长度方向的长I w以及宽度方向的宽I h。比如目标物在拍摄画面中的期望位置为拍摄画面的中心位置,该期望位置,也就是目标物在拍摄画面中的期望坐标可以是(0.5I w,0.5I h)。上述的单位可以是像素。然后根据当前位置和期望位置,确定位置差(长度方向的差值x p以及宽度方向的差值y p): After the shooting device captures the target, the current position of the target in the shooting frame of the shooting device can be obtained, that is, the current coordinates of the target in the shooting frame are (b cx , b cy ). Among them, the size of the photographed frame of the photographing device includes the length I w in the longitudinal direction and the width I h in the width direction. For example, the desired position of the target in the shooting picture is the center position of the shooting picture, and the desired position, that is, the desired coordinates of the target in the shooting picture, may be (0.5I w , 0.5I h ). The aforementioned unit may be a pixel. Then, according to the current position and the desired position, determine the position difference (the difference x p in the length direction and the difference y p in the width direction):
Figure PCTCN2020087325-appb-000001
Figure PCTCN2020087325-appb-000001
根据上述位置差、拍摄装置的焦距cam f(单位为um)以及拍摄装置的图像传感器的尺寸(长度尺寸为cam cw,宽度尺寸为cam ch,单位为um),确定云台应调整的俯仰方向的目标欧拉角误差Δpitch tar以及偏航方向的目标欧拉角误差Δyaw tarAccording to the above position difference, the focal length cam f of the camera (unit: um) and the size of the image sensor of the camera (length dimension is cam cw , width dimension is cam ch , unit is um), determine the pitch direction that the gimbal should be adjusted target error Δpitch tar Euler angles and the target yaw direction Euler angle error Δyaw tar:
Figure PCTCN2020087325-appb-000002
Figure PCTCN2020087325-appb-000002
其中,云台应调整的横滚方向的目标欧拉角误差Δroll tar为0。云台应调整的目标欧拉角误差可以记为{Δyaw tar,Δpitch tar,Δroll tar}。 Among them, the target Euler angle error Δroll tar in the roll direction that the pan/tilt should adjust is 0. The target Euler angle error that the pan/tilt should adjust can be recorded as {Δyaw tar , Δpitch tar , Δroll tar }.
云台的当前欧拉角包括俯仰方向的当前欧拉角为pitch cur、偏航方向的当前欧拉角yaw cur、横滚方向的当前欧拉角roll cur。云台的当前欧拉角可以记为{yaw cur,pitch cur,roll cur}。 The current Euler angle of the gimbal includes the current Euler angle in the pitch direction, which is pitch cur , the current Euler angle in the yaw direction, yaw cur , and the current Euler angle in the roll direction, roll cur . The current Euler angle of the gimbal can be recorded as {yaw cur , pitch cur , roll cur }.
在一种实现方式中,即在以特殊正交群矩阵表示云台的姿态的实现方式中,具体如下:In one implementation, that is, in the implementation of expressing the attitude of the pan/tilt with a special orthogonal group matrix, the details are as follows:
1、将Δpitch tar转化为特殊正交群矩阵俯仰方向的姿态差R(Δpitch tar),将Δyaw tar转化为特殊正交群矩阵偏航方向的姿态差R(Δyaw tar),将Δroll tar转化为特殊正交群矩阵横滚方向的姿态差R(Δroll tar)。其中,R()将欧拉角转为特殊正交群矩阵。 1, into the special Δpitch tar pitch direction orthogonal group attitude difference matrix R (Δpitch tar), into the special Δyaw tar yaw direction orthogonal group posture difference matrix R (Δyaw tar), into the Δroll tar The posture difference R (Δroll tar ) of the special orthogonal group matrix in the roll direction. Among them, R() converts Euler angles into a special orthogonal group matrix.
Figure PCTCN2020087325-appb-000003
Figure PCTCN2020087325-appb-000003
Figure PCTCN2020087325-appb-000004
Figure PCTCN2020087325-appb-000004
Figure PCTCN2020087325-appb-000005
Figure PCTCN2020087325-appb-000005
2、根据R(Δpitch tar)、R(Δyaw tar)、R(Δroll tar)获得以特殊正交群矩阵表示的目标姿态差R tar2. According to R (Δpitch tar ), R (Δyaw tar ), R (Δroll tar ), obtain the target attitude difference R tar represented by a special orthogonal group matrix.
Figure PCTCN2020087325-appb-000006
Figure PCTCN2020087325-appb-000006
3、根据R tar,获得特殊正交群矩阵对应的姿态控制误差。具体地,令R e=R tar获取R e的反对称矩阵M e3. According to R tar , obtain the attitude control error corresponding to the special orthogonal group matrix. In particular, so that R e = R tar acquired anti-symmetric matrix R e M e:
Figure PCTCN2020087325-appb-000007
Figure PCTCN2020087325-appb-000007
获得的M e为3*3的反对称矩阵,再将M e转化为列向量V error,V error为3维列向量,V error即表示姿态控制误差。 The obtained Me is a 3*3 antisymmetric matrix, and then Me is transformed into a column vector V error , V error is a 3-dimensional column vector, and V error represents the attitude control error.
V error=(M e) ,其中,() 表示将反对称矩阵转为列向量。 V error = (M e ) , where () means to convert the antisymmetric matrix into a column vector.
4、将姿态控制误差V error转化为角速度w。 4. Convert attitude control error V error into angular velocity w.
w=K pV error=[w roll w pitch w yaw] T,其中K p为预设控制系数,w yaw为偏航方 向的角速度,w pitch为俯仰方向的角速度,w roll为横滚方向的角速度。 w = K p V error = [w roll w pitch w yaw ] T , where K p is the preset control coefficient, w yaw is the angular velocity in the yaw direction, w pitch is the angular velocity in the pitch direction, and w roll is the roll direction Angular velocity.
5、将角速度w转化为欧拉角速度w euler5, the angular velocity w is converted to an angular velocity w Euler Euler.
Figure PCTCN2020087325-appb-000008
Figure PCTCN2020087325-appb-000008
其中,R(pitch cur)是由云台的俯仰方向的当前欧拉角pitch cur转化为特殊正交群矩阵,R(roll cur)是由云台的横滚方向的当前欧拉角roll cur转化为特殊正交群矩阵。 Among them, R (pitch cur ) is converted from the current Euler angle pitch cur of the pitch direction of the gimbal into a special orthogonal group matrix, and R (roll cur ) is converted from the current Euler angle roll cur of the roll direction of the gimbal. It is a special orthogonal group matrix.
6、将欧拉角速度输出至云台,进行云台控制。6. The Euler angular velocity is output to the pan-tilt for pan-tilt control.
在另一种实现方式中,即在以四元数表示云台的姿态的实现方式中,具体如下:In another implementation manner, that is, in the implementation manner in which the attitude of the PTZ is expressed by a quaternion, the details are as follows:
1、将Δpitch tar转化为四元数俯仰方向的姿态差q(Δpitch tar),将Δyaw tar转化为四元数偏航方向的姿态差q(Δyaw tar),将Δroll tar转化为四元数横滚方向的姿态差q(Δroll tar)。其中,q()将欧拉角转为四元数。 1. Convert Δpitch tar into the attitude difference q in the quaternion pitch direction (Δpitch tar ), convert Δyaw tar into the attitude difference q in the quaternion yaw direction (Δyaw tar ), and convert Δroll tar into quaternion horizontal The posture difference in the rolling direction q (Δroll tar ). Among them, q() converts Euler angles to quaternions.
Figure PCTCN2020087325-appb-000009
Figure PCTCN2020087325-appb-000009
2、根据q(Δpitch tar)、q(Δyaw tar)、q(Δroll tar)获得以四元数表示的目标姿态差R tar2. According to q(Δpitch tar ), q(Δyaw tar ), q(Δroll tar ), obtain the target attitude difference R tar expressed by a quaternion.
Figure PCTCN2020087325-appb-000010
Figure PCTCN2020087325-appb-000010
3、根据q tar,获得四元数对应的姿态控制误差,也可称为轴角误差。具体地,令q error=q tar,获取旋转轴u及旋转角度θ: 3. According to q tar , obtain the attitude control error corresponding to the quaternion, which can also be called the axis angle error. Specifically, let q error =q tar to obtain the rotation axis u and the rotation angle θ:
Figure PCTCN2020087325-appb-000011
θ=arctan(||q error,v||,q error,w),其中,q error,v表示q error的虚部,q error,w表示q error的实部。
Figure PCTCN2020087325-appb-000011
θ = arctan (|| q error, v ||, q error, w), where, q error, v represents the imaginary part q error, q error, w represents the real part of q error.
再根据旋转轴u及旋转角度θ获得姿态控制误差V error,V error为3维列向量。 Then, the attitude control error V error is obtained according to the rotation axis u and the rotation angle θ, and V error is a three-dimensional column vector.
V error=θu。 V error =θu.
4、将姿态控制误差V error转化为角速度w。 4. Convert attitude control error V error into angular velocity w.
w=K pV error=[w roll w pitch w yaw] T,其中K p为预设控制系数,w yaw为偏航方向的角速度,w pitch为俯仰方向的角速度,w roll为横滚方向的角速度。 w = K p V error = [w roll w pitch w yaw ] T , where K p is the preset control coefficient, w yaw is the angular velocity in the yaw direction, w pitch is the angular velocity in the pitch direction, and w roll is the roll direction Angular velocity.
5、将角速度w转化为欧拉角速度w euler5, the angular velocity w is converted to an angular velocity w Euler Euler.
Figure PCTCN2020087325-appb-000012
Figure PCTCN2020087325-appb-000012
其中上述符号□表示四元数与3维列向量之间的乘法。The above symbol □ represents the multiplication between the quaternion and the 3-dimensional column vector.
其中,q(pitch cur)是由云台的俯仰方向的当前欧拉角pitch cur转化为四元数,q(roll cur)是由云台的横滚方向的当前欧拉角roll cur转化为四元数。 Among them, q(pitch cur ) is converted from the current Euler angle pitch cur in the pitch direction of the gimbal to a quaternion, and q(roll cur ) is converted from the current Euler angle roll cur in the roll direction of the gimbal to four. Yuan number.
6、将欧拉角速度输出至云台,进行云台控制。6. The Euler angular velocity is output to the pan-tilt for pan-tilt control.
综上所述,本申请实施例能够提升可移动平台中云台的控制效果,使得云台转动更加快速、准确、平滑。在云台的任意姿态下都可以保证控制的有效性,不存在控制奇异点,自由度降低的情况。云台在转动至使目标物位于期望位置处的路径更优、更短,更为平滑。而且本申请向云台输出的为欧拉角速度,相较于现有技术中的角速度,在控制效果上更优。In summary, the embodiments of the present application can improve the control effect of the pan/tilt in the movable platform, and make the rotation of the pan/tilt more rapid, accurate, and smooth. The effectiveness of control can be guaranteed in any posture of the PTZ, there is no control singularity, and the degree of freedom is reduced. The gimbal rotates to make the path of the target at the desired position better, shorter and smoother. Moreover, the Euler angular velocity output by the application to the pan/tilt is better than the angular velocity in the prior art in terms of control effect.
本申请实施例中还提供了一种计算机存储介质,该计算机存储介质中存储有程序指令,所述程序执行时可包括如上述任一实施例中的可移动平台的控制方法的部分或全部步骤。An embodiment of the present application also provides a computer storage medium, the computer storage medium stores program instructions, and the program execution may include some or all of the steps of the movable platform control method in any of the above embodiments. .
图5为本申请一实施例提供的一种可移动平台的控制装置的结构示意图,本实施例的可移动平台包括云台和搭载在所述云台上的拍摄装置。如图5所示,本实施例的可移动平台的控制装置500包括:至少一个处理器501,图中以一个处理器501为例示出。FIG. 5 is a schematic structural diagram of a control device for a movable platform provided by an embodiment of the application. The movable platform of this embodiment includes a pan-tilt and a camera mounted on the pan-tilt. As shown in FIG. 5, the control device 500 of the movable platform of this embodiment includes: at least one processor 501, and the figure takes one processor 501 as an example.
所述至少一个处理器501,用于:获取目标物在所述拍摄装置的拍摄画面中的当前位置,其中,所述目标物为所述可移动平台的跟踪对象;根据目标物在所述拍摄装置的拍摄画面中的当前位置以及所述目标物在拍摄画面中的期望位置,确定所述云台的以目标姿态表示类型表示的目标姿态差,所述目标姿态表示类型为特殊正交群矩阵或者四元数;根据所述目标姿态差,确定所述云台转动的欧拉角速度;根据所述欧拉角速度,控制所述云台转动,以使所述目标物在所述拍摄装置的拍摄画面中的位置向所述期望位置趋近。The at least one processor 501 is configured to: obtain the current position of a target object in the shooting frame of the shooting device, wherein the target object is a tracking object of the movable platform; The current position in the shooting screen of the device and the desired position of the target in the shooting screen determine the target attitude difference of the pan/tilt head expressed in the target attitude representation type, and the target attitude representation type is a special orthogonal group matrix Or a quaternion; according to the target attitude difference, determine the Euler angular velocity of the pan/tilt rotation; according to the Euler angular velocity, control the rotation of the pan/tilt so that the target is photographed by the camera The position on the screen approaches the desired position.
可选的,所述至少一个处理器501,具体用于:根据所述目标姿态差,确定所述目标姿态表示类型对应的姿态控制误差;根据所述姿态控制误差,确定所述云台转动的欧拉角速度。Optionally, the at least one processor 501 is specifically configured to: determine the attitude control error corresponding to the target attitude representation type according to the target attitude difference; Euler angular velocity.
可选的,所述至少一个处理器501,具体用于:根据所述姿态控制误差,确定所述云台转动的角速度;根据所述角速度,确定所述云台转动的欧拉角速度。Optionally, the at least one processor 501 is specifically configured to: determine the angular velocity of the pan/tilt rotation according to the attitude control error; and determine the Euler angular velocity of the pan/tilt rotation according to the angular velocity.
可选的,所述姿态控制误差包括俯仰方向的控制误差、横滚方向的控制误差、偏航方向的控制误差。所述至少一个处理器501,具体用于:根据预设控制系数与所述俯仰方向的控制误差的乘积,确定所述云台转动的俯仰方向的角速度;根据预设控制系数与所述横滚方向的控制误差的乘积,确定所述云台转动的横滚方向的角速度;根据预设控制系数与所述偏航方向的控制 误差的乘积,确定所述云台转动的偏航方向的角速度。Optionally, the attitude control error includes a control error in a pitch direction, a control error in a roll direction, and a control error in a yaw direction. The at least one processor 501 is specifically configured to: determine the angular velocity of the pitch direction of the pan/tilt rotation according to the product of the preset control coefficient and the control error in the pitch direction; The product of the control error of the direction determines the angular velocity of the roll direction of the pan/tilt head rotation; and the product of the preset control coefficient and the control error of the yaw direction determines the angular velocity of the yaw direction of the pan/tilt rotation.
可选的,所述至少一个处理器501,还用于在根据所述姿态控制误差,确定所述云台转动的欧拉角速度之前,获取所述云台的所述目标姿态表示类型的当前姿态。Optionally, the at least one processor 501 is further configured to obtain the current posture of the target posture representation type of the gimbal before determining the Euler angular velocity of the gimbal rotation according to the posture control error .
所述至少一个处理器501在根据所述角速度,确定所述云台转动的欧拉角速度时,具体用于:根据所述角速度和所述云台的目标姿态表示类型的当前姿态,确定所述云台转动的欧拉角速度。When the at least one processor 501 determines the Euler angular velocity of the pan/tilt rotation according to the angular velocity, it is specifically configured to: determine the The Euler angular velocity of the pan/tilt rotation.
可选的,所述云台的目标姿态表示类型的当前姿态包括:目标姿态表示类型的俯仰方向的当前姿态、目标姿态表示类型的横滚方向的当前姿态。Optionally, the current posture of the target posture indication type of the pan/tilt includes: the current posture of the pitch direction of the target posture indication type, and the current posture of the roll direction of the target posture indication type.
可选的,所述角速度包括:俯仰方向的角速度、横滚方向的角速度、偏航方向的角速度。所述至少一个处理器501,具体用于:根据俯仰方向的角速度,确定俯仰方向的欧拉角速度;Optionally, the angular velocity includes: angular velocity in the pitch direction, angular velocity in the roll direction, and angular velocity in the yaw direction. The at least one processor 501 is specifically configured to: determine the Euler angular velocity in the pitch direction according to the angular velocity in the pitch direction;
根据横滚方向的角速度和目标姿态表示类型俯仰方向的当前姿态,确定所述云台转动的横滚方向的欧拉角速度;根据偏航方向的角速度、目标姿态表示类型俯仰方向的当前姿态、目标姿态表示类型横滚方向的当前姿态,确定所述云台转动的偏航方向的欧拉角速度。Determine the Euler angular velocity in the roll direction of the gimbal rotation according to the angular velocity in the roll direction and the current posture in the pitch direction of the target attitude; The attitude represents the current attitude of the type roll direction, and determines the Euler angular velocity of the yaw direction of the pan/tilt rotation.
可选的,若所述目标姿态表示类型为特殊正交群矩阵,所述至少一个处理器501,具体用于:根据用于表示所述目标姿态差的特殊正交群矩阵,确定反对称矩阵;将所述反对称矩阵转化为列向量;根据所述列向量,确定所述目标姿态表示类型对应的姿态控制误差。Optionally, if the target pose representation type is a special orthogonal group matrix, the at least one processor 501 is specifically configured to: determine an antisymmetric matrix according to the special orthogonal group matrix used to represent the target pose difference Convert the antisymmetric matrix into a column vector; determine the attitude control error corresponding to the target attitude representation type according to the column vector.
可选的,所述至少一个处理器501,具体用于:将所述列向量中的各元素,分别确定为姿态控制误差中各姿态方向的控制误差。Optionally, the at least one processor 501 is specifically configured to: determine each element in the column vector as the control error of each attitude direction in the attitude control error.
可选的,所述特殊正交群矩阵为3*3的矩阵,所述列向量为3维的列向量;Optionally, the special orthogonal group matrix is a 3*3 matrix, and the column vector is a 3-dimensional column vector;
所述至少一个处理器501,具体用于:将所述列向量中的3个元素分别确定为俯仰方向的控制误差、横滚方向的控制误差、偏航方向的控制误差。The at least one processor 501 is specifically configured to determine the three elements in the column vector as the control error in the pitch direction, the control error in the roll direction, and the control error in the yaw direction, respectively.
可选的,若所述目标姿态表示类型为四元数,所述至少一个处理器501,具体用于:根据用于表示所述目标姿态差的四元数中的虚部,确定所述云台调整所述目标姿态差对应的旋转轴;根据用于表示所述目标姿态差的四元数中的虚部和实部,确定所述云台调整所述目标姿态差对应的旋转角度;根据 所述旋转轴和所述旋转角度,确定所述目标姿态表示类型对应的姿态控制误差。Optionally, if the target attitude representation type is a quaternion, the at least one processor 501 is specifically configured to: determine the cloud according to the imaginary part of the quaternion used to represent the target attitude difference The stage adjusts the rotation axis corresponding to the target attitude difference; according to the imaginary part and the real part of the quaternion used to represent the target attitude difference, determine the rotation angle corresponding to the PTZ to adjust the target attitude difference; according to The rotation axis and the rotation angle determine the attitude control error corresponding to the target attitude representation type.
可选的,所述旋转轴为3维列向量表示的旋转轴。所述至少一个处理器501,具体用于:根据旋转角度与所述3维列向量表示的旋转轴的乘积,获得中间3维列向量;将所述中间3维列向量中3个元素分别确定为俯仰方向的控制误差、横滚方向的控制误差、偏航方向的控制误差。Optionally, the rotation axis is a rotation axis represented by a 3-dimensional column vector. The at least one processor 501 is specifically configured to: obtain an intermediate 3-dimensional column vector according to the product of the rotation angle and the rotation axis represented by the 3-dimensional column vector; and determine the three elements in the intermediate 3-dimensional column vector respectively It is the control error of the pitch direction, the control error of the roll direction, and the control error of the yaw direction.
可选的,所述至少一个处理器501,具体用于:根据所述当前位置和所述期望位置,确定所述云台应调整的目标欧拉角误差;根据所述目标欧拉角误差,确定所述云台应调整的以目标姿态表示类型表示的目标姿态差。Optionally, the at least one processor 501 is specifically configured to: determine the target Euler angle error to be adjusted by the pan/tilt according to the current position and the expected position; according to the target Euler angle error, Determine the target attitude difference represented by the target attitude representation type that the pan/tilt should adjust.
可选的,所述目标欧拉角误差包括:俯仰方向的欧拉角误差、偏航轴方向的欧拉角误差。Optionally, the target Euler angle error includes: Euler angle error in the pitch direction and Euler angle error in the yaw axis direction.
可选的,若所述目标姿态表示类型为特殊正交群矩阵,则所述至少一个处理器501,具体用于:将俯仰方向的欧拉角误差转化为特殊正交群矩阵俯仰方向的姿态差;将偏航方向的欧拉角误差转化为特殊正交群矩阵偏航方向的姿态差;根据所述特殊正交群矩阵俯仰方向的姿态差、特殊正交群矩阵偏航方向的姿态差,确定所述云台应调整的以特殊正交群矩阵表示的目标姿态差。Optionally, if the target attitude representation type is a special orthogonal group matrix, the at least one processor 501 is specifically configured to: convert the Euler angle error in the pitch direction into the attitude of the special orthogonal group matrix in the pitch direction Difference; convert the Euler angle error of the yaw direction into the attitude difference of the yaw direction of the special orthogonal group matrix; according to the attitude difference of the special orthogonal group matrix in the pitch direction and the attitude difference of the special orthogonal group matrix in the yaw direction , Determine the target attitude difference represented by a special orthogonal group matrix that the pan/tilt should adjust.
可选的,所述至少一个处理器501,具体用于:获取所述特殊正交群矩阵俯仰方向的姿态差、特殊正交群矩阵偏航方向的姿态差的乘积;根据所述乘积,确定所述云台应调整的以特殊正交群矩阵表示的目标姿态差。Optionally, the at least one processor 501 is specifically configured to: obtain the product of the attitude difference in the pitch direction of the special orthogonal group matrix and the attitude difference in the yaw direction of the special orthogonal group matrix; and determine according to the product The target attitude difference represented by a special orthogonal group matrix that the pan/tilt should adjust.
可选的,若所述目标姿态表示类型为四元数,则所述至少一个处理器501,具体用于:将俯仰方向的欧拉角误差转化为四元数俯仰方向的姿态差;将偏航方向的欧拉角误差转化为四元数偏航方向的姿态差;根据所述四元数俯仰方向的姿态差、四元数偏航方向的姿态差,确定所述云台应调整的四元数表示的目标姿态差。Optionally, if the target attitude representation type is a quaternion, the at least one processor 501 is specifically configured to: convert the Euler angle error in the pitch direction into the attitude difference in the quaternion pitch direction; The Euler angle error of the heading direction is converted into the attitude difference of the quaternion yaw direction; according to the attitude difference of the quaternion pitch direction and the attitude difference of the quaternion yaw direction, determine the four that the gimbal should be adjusted. The target posture difference expressed by the element number.
可选的,所述至少一个处理器501,具体用于:获取所述四元数俯仰方向的姿态差、四元数偏航方向的姿态差的乘积;根据所述乘积,确定所述云台应调整的以四元数表示的目标姿态差。Optionally, the at least one processor 501 is specifically configured to: obtain the product of the attitude difference in the quaternion pitch direction and the attitude difference in the quaternion yaw direction; and determine the pan/tilt head according to the product The target attitude difference expressed as a quaternion that should be adjusted.
可选的,所述至少一个处理器501,具体用于:根据所述当前位置和所述期望位置,确定所述当前位置与所述期望位置之间的位置差;Optionally, the at least one processor 501 is specifically configured to: determine a position difference between the current position and the desired position according to the current position and the desired position;
根据所述位置差、所述拍摄装置的焦距以及所述拍摄装置的图像传感器的尺寸,确定所述云台应调整的目标欧拉角误差。According to the position difference, the focal length of the photographing device, and the size of the image sensor of the photographing device, the target Euler angle error to be adjusted by the pan/tilt head is determined.
可选的,所述位置差包括拍摄画面的长度方向的差值和拍摄画面的高度方向的差值。所述至少一个处理器501,具体用于:根据所述拍摄画面的长度方向的差值、所述拍摄装置的焦距以及所述图像传感器的长度尺寸,确定所述云台应调整的偏航方向的欧拉角误差;根据所述拍摄画面的宽度方向的差值、所述拍摄装置的焦距以及所述图像传感器的宽度尺寸,确定所述云台应调整的俯仰方向的欧拉角误差。Optionally, the position difference includes the difference in the length direction of the shooting picture and the difference in the height direction of the shooting picture. The at least one processor 501 is specifically configured to determine the yaw direction of the pan/tilt head to be adjusted according to the difference in the length direction of the shooting image, the focal length of the shooting device, and the length dimension of the image sensor According to the difference in the width direction of the shooting picture, the focal length of the shooting device and the width of the image sensor, the Euler angle error in the pitch direction that the pan/tilt should be adjusted is determined.
可选的,本实施例的可移动平台的控制装置500还可以包括存储器502。存储器502,用于存储程序代码。所述至少一个处理器501,调用所述程序代码,当程序代码被执行时,用于实施上述各方法。Optionally, the control device 500 of the movable platform of this embodiment may further include a memory 502. The memory 502 is used to store program codes. The at least one processor 501 calls the program code, and when the program code is executed, it is used to implement the foregoing methods.
本实施例的可移动平台的控制装置,可以用于执行本申请上述各方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The control device of the movable platform of this embodiment can be used to implement the technical solutions of the foregoing method embodiments of the present application, and the implementation principles and technical effects are similar, and will not be repeated here.
图6为本申请一实施例提供的一种可移动平台结构示意图,如图6所示,本实施例的可移动平台600包括云台601、搭载在所述云台601上的拍摄装置602以为及至少一个处理器603,图中以一个处理器603为例示出。6 is a schematic structural diagram of a movable platform provided by an embodiment of the application. As shown in FIG. 6, the movable platform 600 of this embodiment includes a pan/tilt 601, and a camera 602 mounted on the pan/tilt 601 And at least one processor 603. One processor 603 is shown as an example in the figure.
所述至少一个处理器603,用于:获取目标物在所述拍摄装置602的拍摄画面中的当前位置,其中,所述目标物为所述可移动平台600的跟踪对象;根据目标物在所述拍摄装置602的拍摄画面中的当前位置以及所述目标物在拍摄画面中的期望位置,确定所述云台601的以目标姿态表示类型表示的目标姿态差,所述目标姿态表示类型为特殊正交群矩阵或者四元数;根据所述目标姿态差,确定所述云台601转动的欧拉角速度;根据所述欧拉角速度,控制所述云台601转动,以使所述目标物在所述拍摄装置602的拍摄画面中的位置向所述期望位置趋近。The at least one processor 603 is configured to: obtain the current position of the target in the shooting frame of the shooting device 602, where the target is the tracking object of the movable platform 600; according to the location of the target The current position in the shooting picture of the shooting device 602 and the desired position of the target in the shooting picture are determined, and the target attitude difference of the pan/tilt 601 expressed in the target attitude representation type is determined, and the target attitude representation type is special Orthogonal group matrix or quaternion; according to the target attitude difference, determine the Euler angular velocity of the pan/tilt 601 rotation; according to the Euler angular velocity, control the rotation of the pan/tilt 601 so that the target is in The position in the photographing frame of the photographing device 602 approaches the desired position.
可选的,所述至少一个处理器603,具体用于:根据所述目标姿态差,确定所述目标姿态表示类型对应的姿态控制误差;根据所述姿态控制误差,确定所述云台601转动的欧拉角速度。Optionally, the at least one processor 603 is specifically configured to: determine the attitude control error corresponding to the target attitude representation type according to the target attitude difference; and determine the rotation of the pan/tilt head 601 according to the attitude control error The Euler angular velocity.
可选的,所述至少一个处理器603,具体用于:根据所述姿态控制误差,确定所述云台601转动的角速度;根据所述角速度,确定所述云台601转动的欧拉角速度。Optionally, the at least one processor 603 is specifically configured to: determine the angular velocity of the pan/tilt 601 rotation according to the attitude control error; and determine the Euler angular velocity of the pan/tilt 601 rotation according to the angular velocity.
可选的,所述姿态控制误差包括俯仰方向的控制误差、横滚方向的控制误差、偏航方向的控制误差。所述至少一个处理器603,具体用于:根据预设控制系数与所述俯仰方向的控制误差的乘积,确定所述云台601转动的俯仰方向的角速度;根据预设控制系数与所述横滚方向的控制误差的乘积,确定所述云台601转动的横滚方向的角速度;根据预设控制系数与所述偏航方向的控制误差的乘积,确定所述云台601转动的偏航方向的角速度。Optionally, the attitude control error includes a control error in a pitch direction, a control error in a roll direction, and a control error in a yaw direction. The at least one processor 603 is specifically configured to: determine the angular velocity in the pitch direction of the pan/tilt 601 rotation according to the product of the preset control coefficient and the control error in the pitch direction; The product of the control error of the rolling direction determines the angular velocity of the rolling direction of the pan/tilt 601 rotation; the product of the preset control coefficient and the control error of the yaw direction determines the yaw direction of the pan/tilt 601 rotation The angular velocity.
可选的,所述至少一个处理器603,还用于在根据所述姿态控制误差,确定所述云台601转动的欧拉角速度之前,获取所述云台601的所述目标姿态表示类型的当前姿态。Optionally, the at least one processor 603 is further configured to obtain the target attitude representation type of the pan/tilt 601 before determining the Euler angular velocity of the pan/tilt 601 rotation according to the attitude control error Current posture.
所述至少一个处理器603在根据所述角速度,确定所述云台601转动的欧拉角速度时,具体用于:根据所述角速度和所述云台601的目标姿态表示类型的当前姿态,确定所述云台601转动的欧拉角速度。When the at least one processor 603 determines the Euler angular velocity at which the pan/tilt 601 rotates according to the angular velocity, it is specifically configured to: determine the current attitude according to the angular velocity and the target attitude representation type of the pan/tilt 601 The Euler angular velocity at which the pan/tilt 601 rotates.
可选的,所述云台601的目标姿态表示类型的当前姿态包括:目标姿态表示类型的俯仰方向的当前姿态、目标姿态表示类型的横滚方向的当前姿态。Optionally, the current posture of the target posture indication type of the pan/tilt head 601 includes: the current posture of the pitch direction of the target posture indication type, and the current posture of the roll direction of the target posture indication type.
可选的,所述角速度包括:俯仰方向的角速度、横滚方向的角速度、偏航方向的角速度。所述至少一个处理器603,具体用于:根据俯仰方向的角速度,确定俯仰方向的欧拉角速度;根据横滚方向的角速度和目标姿态表示类型俯仰方向的当前姿态,确定所述云台601转动的横滚方向的欧拉角速度;根据偏航方向的角速度、目标姿态表示类型俯仰方向的当前姿态、目标姿态表示类型横滚方向的当前姿态,确定所述云台601转动的偏航方向的欧拉角速度。Optionally, the angular velocity includes: angular velocity in the pitch direction, angular velocity in the roll direction, and angular velocity in the yaw direction. The at least one processor 603 is specifically configured to: determine the Euler angular velocity in the pitch direction according to the angular velocity in the pitch direction; determine the rotation of the pan/tilt head 601 according to the angular velocity in the roll direction and the current attitude in the pitch direction of the target attitude indication type The Euler angular velocity in the roll direction of the yaw direction, the current attitude in the pitch direction of the target attitude representation type, and the current attitude in the roll direction of the target attitude representation type to determine the Euler angular velocity in the yaw direction of the pan/tilt 601 rotation. Angle speed.
可选的,若所述目标姿态表示类型为特殊正交群矩阵,所述至少一个处理器603,具体用于:根据用于表示所述目标姿态差的特殊正交群矩阵,确定反对称矩阵;将所述反对称矩阵转化为列向量;根据所述列向量,确定所述目标姿态表示类型对应的姿态控制误差。Optionally, if the target pose representation type is a special orthogonal group matrix, the at least one processor 603 is specifically configured to: determine an antisymmetric matrix according to the special orthogonal group matrix used to represent the target pose difference Convert the antisymmetric matrix into a column vector; determine the attitude control error corresponding to the target attitude representation type according to the column vector.
可选的,所述至少一个处理器603,具体用于:将所述列向量中的各元素,分别确定为姿态控制误差中各姿态方向的控制误差。Optionally, the at least one processor 603 is specifically configured to: determine each element in the column vector as the control error of each attitude direction in the attitude control error.
可选的,所述特殊正交群矩阵为3*3的矩阵,所述列向量为3维的列向量。所述至少一个处理器603,具体用于:将所述列向量中的3个元素分别确定为俯仰方向的控制误差、横滚方向的控制误差、偏航方向的控制误差。Optionally, the special orthogonal group matrix is a 3*3 matrix, and the column vector is a 3-dimensional column vector. The at least one processor 603 is specifically configured to determine the three elements in the column vector as the control error in the pitch direction, the control error in the roll direction, and the control error in the yaw direction, respectively.
可选的,若所述目标姿态表示类型为四元数,所述至少一个处理器501,具体用于:根据用于表示所述目标姿态差的四元数中的虚部,确定所述云台601调整所述目标姿态差对应的旋转轴;根据用于表示所述目标姿态差的四元数中的虚部和实部,确定所述云台601调整所述目标姿态差对应的旋转角度;根据所述旋转轴和所述旋转角度,确定所述目标姿态表示类型对应的姿态控制误差。Optionally, if the target attitude representation type is a quaternion, the at least one processor 501 is specifically configured to: determine the cloud according to the imaginary part of the quaternion used to represent the target attitude difference The stage 601 adjusts the rotation axis corresponding to the target attitude difference; according to the imaginary part and the real part in the quaternion used to represent the target attitude difference, it is determined that the pan/tilt 601 adjusts the rotation angle corresponding to the target attitude difference ; According to the rotation axis and the rotation angle, determine the attitude control error corresponding to the target attitude representation type.
可选的,所述旋转轴为3维列向量表示的旋转轴。所述至少一个处理器603,具体用于:根据所述旋转角度与所述3维列向量表示的旋转轴的乘积,获得中间3维列向量;将所述中间3维列向量中3个元素分别确定为俯仰方向的控制误差、横滚方向的控制误差、偏航方向的控制误差。Optionally, the rotation axis is a rotation axis represented by a 3-dimensional column vector. The at least one processor 603 is specifically configured to: obtain an intermediate 3-dimensional column vector according to the product of the rotation angle and the rotation axis represented by the 3-dimensional column vector; They are respectively determined as the control error in the pitch direction, the control error in the roll direction, and the control error in the yaw direction.
可选的,所述至少一个处理器603,具体用于:根据所述当前位置和所述期望位置,确定所述云台601应调整的目标欧拉角误差;Optionally, the at least one processor 603 is specifically configured to: determine the target Euler angle error that the pan/tilt head 601 should adjust according to the current position and the expected position;
根据所述目标欧拉角误差,确定所述云台601应调整的以目标姿态表示类型表示的目标姿态差。According to the target Euler angle error, the target attitude difference represented by the target attitude representation type that the pan/tilt 601 should be adjusted is determined.
可选的,所述目标欧拉角误差包括:俯仰方向的欧拉角误差、偏航轴方向的欧拉角误差。Optionally, the target Euler angle error includes: Euler angle error in the pitch direction and Euler angle error in the yaw axis direction.
可选的,若所述目标姿态表示类型为特殊正交群矩阵,则所述至少一个处理器603,具体用于:将俯仰方向的欧拉角误差转化为特殊正交群矩阵俯仰方向的姿态差;将偏航方向的欧拉角误差转化为特殊正交群矩阵偏航方向的姿态差;根据所述特殊正交群矩阵俯仰方向的姿态差、特殊正交群矩阵偏航方向的姿态差,确定所述云台601应调整的以特殊正交群矩阵表示的目标姿态差。Optionally, if the target attitude representation type is a special orthogonal group matrix, the at least one processor 603 is specifically configured to: convert the Euler angle error in the pitch direction into the attitude of the special orthogonal group matrix in the pitch direction Difference; convert the Euler angle error of the yaw direction into the attitude difference of the yaw direction of the special orthogonal group matrix; according to the attitude difference of the special orthogonal group matrix in the pitch direction and the attitude difference of the special orthogonal group matrix in the yaw direction , Determine the target attitude difference represented by the special orthogonal group matrix that the pan/tilt 601 should adjust.
可选的,所述至少一个处理器603,具体用于:获取所述特殊正交群矩阵俯仰方向的姿态差、特殊正交群矩阵偏航方向的姿态差的乘积;根据所述乘积,确定所述云台601应调整的以特殊正交群矩阵表示的目标姿态差。Optionally, the at least one processor 603 is specifically configured to: obtain the product of the attitude difference in the pitch direction of the special orthogonal group matrix and the attitude difference in the yaw direction of the special orthogonal group matrix; and determine according to the product The PTZ 601 should adjust the target attitude difference represented by a special orthogonal group matrix.
可选的,若所述目标姿态表示类型为四元数,则所述至少一个处理器603,具体用于:将俯仰方向的欧拉角误差转化为四元数俯仰方向的姿态差;将偏航方向的欧拉角误差转化为四元数偏航方向的姿态差;根据所述四元数俯仰方向的姿态差、四元数偏航方向的姿态差,确定所述云台601应调整的四元数表示的目标姿态差。Optionally, if the target attitude representation type is a quaternion, the at least one processor 603 is specifically configured to: convert the Euler angle error in the pitch direction into the attitude difference in the quaternion pitch direction; The Euler angle error of the heading direction is converted into the attitude difference of the quaternion yaw direction; according to the attitude difference of the quaternion pitch direction and the attitude difference of the quaternion yaw direction, it is determined that the gimbal 601 should be adjusted The target posture difference represented by the quaternion.
可选的,所述至少一个处理器603,具体用于:获取所述四元数俯仰方向的姿态差、四元数偏航方向的姿态差的乘积;根据所述乘积,确定所述云台601应调整的以四元数表示的目标姿态差。Optionally, the at least one processor 603 is specifically configured to: obtain the product of the attitude difference in the quaternion pitch direction and the attitude difference in the quaternion yaw direction; and determine the pan/tilt head according to the product 601 The target attitude difference expressed in quaternion that should be adjusted.
可选的,所述至少一个处理器603,具体用于:根据所述当前位置和所述期望位置,确定所述当前位置与所述期望位置之间的位置差;根据所述位置差、所述拍摄装置602的焦距以及所述拍摄装置602的图像传感器的尺寸,确定所述云台601应调整的目标欧拉角误差。Optionally, the at least one processor 603 is specifically configured to: determine the position difference between the current position and the desired position according to the current position and the desired position; The focal length of the photographing device 602 and the size of the image sensor of the photographing device 602 determine the target Euler angle error that the pan/tilt 601 should adjust.
可选的,所述位置差包括拍摄画面的长度方向的差值和拍摄画面的高度方向的差值。所述至少一个处理器603,具体用于:根据所述拍摄画面的长度方向的差值、所述拍摄装置602的焦距以及所述图像传感器的长度尺寸,确定所述云台601应调整的偏航方向的欧拉角误差;根据所述拍摄画面的宽度方向的差值、所述拍摄装置602的焦距以及所述图像传感器的宽度尺寸,确定所述云台601应调整的俯仰方向的欧拉角误差。Optionally, the position difference includes the difference in the length direction of the shooting picture and the difference in the height direction of the shooting picture. The at least one processor 603 is specifically configured to determine the offset that the pan/tilt head 601 should adjust according to the difference in the length direction of the shooting picture, the focal length of the shooting device 602, and the length dimension of the image sensor. Euler angle error in the heading direction; according to the difference in the width direction of the shooting picture, the focal length of the camera 602, and the width size of the image sensor, determine the Euler in the pitch direction that the pan/tilt 601 should adjust Angle error.
可选的,本实施例的可移动平台600还可以包括存储器(图中未示出)。存储器,用于存储程序代码。所述至少一个处理器603,调用所述程序代码,当程序代码被执行时,用于实施上述各方法。Optionally, the movable platform 600 of this embodiment may further include a memory (not shown in the figure). The memory is used to store program codes. The at least one processor 603 calls the program code, and when the program code is executed, it is used to implement the foregoing methods.
可选的,本实施例的可移动平台600还可以包括通信装置(图中未示出),通信装置用于与可移动平台的控制终端通信。Optionally, the movable platform 600 of this embodiment may further include a communication device (not shown in the figure), and the communication device is used to communicate with a control terminal of the movable platform.
本实施例的可移动平台,可以用于执行本申请上述各方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The movable platform of this embodiment can be used to implement the technical solutions of the foregoing method embodiments of the present application, and its implementation principles and technical effects are similar, and will not be repeated here.
图7为本申请另一实施例提供的一种可移动平台的结构示意图,如图7所示,本实施例的可移动平台700可以包括:可移动平台的控制装置701、云台702、搭载在所述云台702上的拍摄装置703。FIG. 7 is a schematic structural diagram of a movable platform provided by another embodiment of the application. As shown in FIG. The camera 703 on the PTZ 702.
拍摄装置703用于拍摄图像。可移动平台的控制装置701可以控制云台702转动。The photographing device 703 is used to photograph an image. The control device 701 of the movable platform can control the rotation of the pan/tilt 702.
其中,可移动平台的控制装置701可以采用图5所示装置实施例的结构,对应的,可以执行上述任一方法实施例提供的技术方案,此处不再赘述。Wherein, the control device 701 of the movable platform may adopt the structure of the device embodiment shown in FIG. 5, and correspondingly, may execute the technical solution provided by any of the foregoing method embodiments, which will not be repeated here.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述 的存储介质包括:只读内存(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。A person of ordinary skill in the art can understand that all or part of the steps in the above method embodiments can be implemented by a program instructing relevant hardware. The foregoing program can be stored in a computer readable storage medium. When the program is executed, it is executed. Including the steps of the foregoing method embodiment; and the foregoing storage medium includes: read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks, etc., which can store program codes Medium.
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the application, not to limit them; although the application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or equivalently replace some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present application. Scope.

Claims (42)

  1. 一种可移动平台的控制方法,其特征在于,所述可移动平台包括云台和搭载在所述云台上的拍摄装置,所述方法包括:A method for controlling a movable platform, wherein the movable platform includes a pan-tilt and a photographing device mounted on the pan-tilt, and the method includes:
    获取目标物在所述拍摄装置的拍摄画面中的当前位置,其中,所述目标物为所述可移动平台的跟踪对象;Acquiring the current position of the target in the shooting picture of the shooting device, wherein the target is a tracking object of the movable platform;
    根据目标物在所述拍摄装置的拍摄画面中的当前位置以及所述目标物在拍摄画面中的期望位置,确定所述云台的以目标姿态表示类型表示的目标姿态差,所述目标姿态表示类型为特殊正交群矩阵或者四元数;According to the current position of the target in the shooting screen of the shooting device and the desired position of the target in the shooting screen, determine the target attitude difference of the pan/tilt in the target attitude representation type, and the target attitude represents The type is a special orthogonal group matrix or quaternion;
    根据所述目标姿态差,确定所述云台转动的欧拉角速度;Determine the Euler angular velocity of the rotation of the gimbal according to the target attitude difference;
    根据所述欧拉角速度,控制所述云台转动,以使所述目标物在所述拍摄装置的拍摄画面中的位置向所述期望位置趋近。According to the Euler angular velocity, the pan/tilt head is controlled to rotate so that the position of the target in the shooting frame of the shooting device approaches the desired position.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述目标姿态差,确定所述云台转动的欧拉角速度,包括:The method according to claim 1, wherein the determining the Euler angular velocity of the pan-tilt rotation according to the target attitude difference comprises:
    根据所述目标姿态差,确定所述目标姿态表示类型对应的姿态控制误差;Determine the attitude control error corresponding to the target attitude representation type according to the target attitude difference;
    根据所述姿态控制误差,确定所述云台转动的欧拉角速度。According to the attitude control error, the Euler angular velocity of the pan/tilt rotation is determined.
  3. 根据权利要求2所述的方法,其特征在于,根据所述姿态控制误差,确定所述云台转动的欧拉角速度,包括:The method according to claim 2, wherein determining the Euler angular velocity of the pan/tilt rotation according to the attitude control error comprises:
    根据所述姿态控制误差,确定所述云台转动的角速度;Determine the angular velocity of the rotation of the pan/tilt according to the attitude control error;
    根据所述角速度,确定所述云台转动的欧拉角速度。According to the angular velocity, the Euler angular velocity of the rotation of the pan/tilt is determined.
  4. 根据权利要求3所述的方法,其特征在于,所述姿态控制误差包括俯仰方向的控制误差、横滚方向的控制误差、偏航方向的控制误差,所述根据所述姿态控制误差,确定所述云台转动的角速度,包括:The method according to claim 3, wherein the attitude control error includes a control error in a pitch direction, a control error in a roll direction, and a control error in a yaw direction, and the attitude control error is determined based on the attitude control error. State the angular velocity of the pan/tilt rotation, including:
    根据预设控制系数与所述俯仰方向的控制误差的乘积,确定所述云台转动的俯仰方向的角速度;Determine the angular velocity of the pitch direction of the pan/tilt rotation according to the product of the preset control coefficient and the control error in the pitch direction;
    根据预设控制系数与所述横滚方向的控制误差的乘积,确定所述云台转动的横滚方向的角速度;Determine the angular velocity in the roll direction of the pan/tilt rotation according to the product of the preset control coefficient and the control error in the roll direction;
    根据预设控制系数与所述偏航方向的控制误差的乘积,确定所述云台转动的偏航方向的角速度。The angular velocity of the yaw direction of the pan/tilt rotation is determined according to the product of the preset control coefficient and the control error of the yaw direction.
  5. 根据权利要求3或4所述的方法,其特征在于,所述根据所述姿态控制误差,确定所述云台转动的欧拉角速度之前,还包括:The method according to claim 3 or 4, wherein before determining the Euler angular velocity of the pan/tilt rotation according to the attitude control error, the method further comprises:
    获取所述云台的所述目标姿态表示类型的当前姿态;Acquiring the current posture of the target posture representation type of the pan/tilt;
    根据所述角速度,确定所述云台转动的欧拉角速度,包括:According to the angular velocity, determining the Euler angular velocity of the pan/tilt rotation includes:
    根据所述角速度和所述云台的目标姿态表示类型的当前姿态,确定所述云台转动的欧拉角速度。Determine the Euler angular velocity of the rotation of the pan/tilt head according to the angular velocity and the current attitude of the target attitude representation type of the pan/tilt head.
  6. 根据权利要求5所述的方法,其特征在于,所述云台的目标姿态表示类型的当前姿态包括:目标姿态表示类型的俯仰方向的当前姿态、目标姿态表示类型的横滚方向的当前姿态。The method according to claim 5, wherein the current attitude of the target attitude representation type of the pan/tilt head includes: the current attitude of the pitch direction of the target attitude representation type and the current attitude of the roll direction of the target attitude representation type.
  7. 根据权利要求6所述的方法,其特征在于,所述角速度包括:俯仰方向的角速度、横滚方向的角速度、偏航方向的角速度;The method according to claim 6, wherein the angular velocity comprises: angular velocity in a pitch direction, angular velocity in a roll direction, and angular velocity in a yaw direction;
    所述根据所述角速度和所述云台的目标姿态表示类型的当前姿态,确定所述云台转动的欧拉角速度,包括:The determining the Euler angular velocity of the rotation of the gimbal according to the angular velocity and the current posture of the target posture representation type of the gimbal includes:
    根据俯仰方向的角速度,确定俯仰方向的欧拉角速度;According to the angular velocity in the pitch direction, determine the Euler angular velocity in the pitch direction;
    根据横滚方向的角速度和目标姿态表示类型俯仰方向的当前姿态,确定所述云台转动的横滚方向的欧拉角速度;Determine the Euler angular velocity in the roll direction of the pan/tilt rotation according to the angular velocity in the roll direction and the current posture in the pitch direction of the target posture indication type;
    根据偏航方向的角速度、目标姿态表示类型俯仰方向的当前姿态、目标姿态表示类型横滚方向的当前姿态,确定所述云台转动的偏航方向的欧拉角速度。Determine the Euler angular velocity of the yaw direction of the pan/tilt rotation according to the angular velocity of the yaw direction, the current attitude of the target attitude indicating the type of pitch direction, and the current attitude of the target attitude indicating the type of roll direction.
  8. 根据权利要求2-7任一项所述的方法,其特征在于,若所述目标姿态表示类型为特殊正交群矩阵,所述根据所述目标姿态差,确定所述目标姿态表示类型对应的姿态控制误差,包括:The method according to any one of claims 2-7, wherein if the target posture representation type is a special orthogonal group matrix, the target posture difference is determined based on the target posture representation type. Attitude control errors, including:
    根据用于表示所述目标姿态差的特殊正交群矩阵,确定反对称矩阵;Determine the antisymmetric matrix according to the special orthogonal group matrix used to represent the target attitude difference;
    将所述反对称矩阵转化为列向量;Converting the antisymmetric matrix into a column vector;
    根据所述列向量,确定所述目标姿态表示类型对应的姿态控制误差。According to the column vector, the attitude control error corresponding to the target attitude representation type is determined.
  9. 根据权利要求8所述的方法,其特征在于,根据所述列向量,确定所述目标姿态表示类型对应的姿态控制误差,包括:The method according to claim 8, wherein the determining the attitude control error corresponding to the target attitude representation type according to the column vector comprises:
    将所述列向量中的各元素,分别确定为姿态控制误差中各姿态方向的控制误差。Each element in the column vector is determined as the control error of each attitude direction in the attitude control error.
  10. 根据权利要求9所述的方法,其特征在于,所述特殊正交群矩阵为3*3的矩阵,所述列向量为3维的列向量;The method according to claim 9, wherein the special orthogonal group matrix is a 3*3 matrix, and the column vector is a 3-dimensional column vector;
    将所述列向量中的各元素,分别确定为姿态控制误差中各姿态方向的控 制误差,包括:Each element in the column vector is determined as the control error of each attitude direction in the attitude control error, including:
    将所述列向量中的3个元素分别确定为俯仰方向的控制误差、横滚方向的控制误差、偏航方向的控制误差。The three elements in the column vector are respectively determined as the control error in the pitch direction, the control error in the roll direction, and the control error in the yaw direction.
  11. 根据权利要求2-7任一项所述的方法,其特征在于,若所述目标姿态表示类型为四元数,所述根据所述目标姿态差,确定所述目标姿态表示类型对应的姿态控制误差,包括:The method according to any one of claims 2-7, wherein if the target posture representation type is a quaternion, the posture control corresponding to the target posture representation type is determined according to the target posture difference Errors, including:
    根据用于表示所述目标姿态差的四元数中的虚部,确定所述云台调整所述目标姿态差对应的旋转轴;Determine, according to the imaginary part of the quaternion used to represent the target attitude difference, that the pan/tilt adjusts the rotation axis corresponding to the target attitude difference;
    根据用于表示所述目标姿态差的四元数中的虚部和实部,确定所述云台调整所述目标姿态差对应的旋转角度;Determine, according to the imaginary part and the real part of the quaternion used to represent the target attitude difference, the rotation angle corresponding to the adjustment of the target attitude difference by the pan/tilt;
    根据所述旋转轴和所述旋转角度,确定所述目标姿态表示类型对应的姿态控制误差。Determine the attitude control error corresponding to the target attitude representation type according to the rotation axis and the rotation angle.
  12. 根据权利要求11所述的方法,其特征在于,所述旋转轴为3维列向量表示的旋转轴;The method according to claim 11, wherein the rotation axis is a rotation axis represented by a 3-dimensional column vector;
    所述根据所述旋转轴和所述旋转角度,确定所述目标姿态表示类型对应的姿态控制误差,包括:The determining the attitude control error corresponding to the target attitude representation type according to the rotation axis and the rotation angle includes:
    根据所述旋转角度与所述3维列向量表示的旋转轴的乘积,获得中间3维列向量;Obtaining an intermediate 3-dimensional column vector according to the product of the rotation angle and the rotation axis represented by the 3-dimensional column vector;
    将所述中间3维列向量中3个元素分别确定为俯仰方向的控制误差、横滚方向的控制误差、偏航方向的控制误差。The three elements in the intermediate 3-dimensional column vector are respectively determined as the control error in the pitch direction, the control error in the roll direction, and the control error in the yaw direction.
  13. 根据权利要求1-12任一项所述的方法,其特征在于,所述根据目标物在所述拍摄装置的拍摄画面中的当前位置以及所述目标物在图像上的期望位置,确定所述云台应调整的以目标姿态表示类型表示的目标姿态差,包括:The method according to any one of claims 1-12, wherein the determination of the The target attitude difference expressed by the target attitude representation type that the gimbal should adjust, including:
    根据所述当前位置和所述期望位置,确定所述云台应调整的目标欧拉角误差;Determine the target Euler angle error that the pan/tilt should adjust according to the current position and the expected position;
    根据所述目标欧拉角误差,确定所述云台应调整的以目标姿态表示类型表示的目标姿态差。According to the target Euler angle error, determine the target attitude difference represented by the target attitude representation type that the pan/tilt should adjust.
  14. 根据权利要求13所述的方法,其特征在于,所述目标欧拉角误差包括:俯仰方向的欧拉角误差、偏航轴方向的欧拉角误差。The method according to claim 13, wherein the target Euler angle error comprises: Euler angle error in the pitch direction and Euler angle error in the yaw axis direction.
  15. 根据权利要求14所述的方法,其特征在于,若所述目标姿态表示类 型为特殊正交群矩阵,则所述根据所述目标欧拉角误差,确定所述云台应调整的以目标姿态表示类型表示的目标姿态差,包括:The method according to claim 14, wherein if the target pose representation type is a special orthogonal group matrix, the target pose is determined according to the target Euler angle error. The target attitude difference indicated by the indication type, including:
    将俯仰方向的欧拉角误差转化为特殊正交群矩阵俯仰方向的姿态差;Convert the Euler angle error in the pitch direction into the attitude difference in the pitch direction of the special orthogonal group matrix;
    将偏航方向的欧拉角误差转化为特殊正交群矩阵偏航方向的姿态差;Convert the Euler angle error of the yaw direction into the attitude difference of the yaw direction of the special orthogonal group matrix;
    根据所述特殊正交群矩阵俯仰方向的姿态差、特殊正交群矩阵偏航方向的姿态差,确定所述云台应调整的以特殊正交群矩阵表示的目标姿态差。According to the attitude difference in the pitch direction of the special orthogonal group matrix and the attitude difference in the yaw direction of the special orthogonal group matrix, the target attitude difference represented by the special orthogonal group matrix to be adjusted by the pan/tilt is determined.
  16. 根据权利要求15所述的方法,其特征在于,根据所述特殊正交群矩阵俯仰方向的姿态差、特殊正交群矩阵偏航方向的姿态差,确定所述云台应调整的以特殊正交群矩阵表示的目标姿态差,包括:The method according to claim 15, characterized in that, according to the attitude difference in the pitch direction of the special orthogonal group matrix and the attitude difference in the yaw direction of the special orthogonal group matrix, it is determined that the pan/tilt head should be adjusted to the special right direction. The target posture difference represented by the intersection group matrix includes:
    获取所述特殊正交群矩阵俯仰方向的姿态差、特殊正交群矩阵偏航方向的姿态差的乘积;Obtaining the product of the attitude difference in the pitch direction of the special orthogonal group matrix and the attitude difference in the yaw direction of the special orthogonal group matrix;
    根据所述乘积,确定所述云台应调整的以特殊正交群矩阵表示的目标姿态差。According to the product, determine the target attitude difference represented by a special orthogonal group matrix that the pan/tilt should adjust.
  17. 根据权利要求14所述的方法,其特征在于,若所述目标姿态表示类型为四元数,则所述根据所述目标欧拉角误差,确定所述云台应调整的目标姿态表示类型表示的目标姿态差,包括:The method according to claim 14, wherein if the target attitude representation type is a quaternion, the target attitude representation type that the pan/tilt should be adjusted is determined according to the target Euler angle error The poor target attitude includes:
    将俯仰方向的欧拉角误差转化为四元数俯仰方向的姿态差;Convert the Euler angle error in the pitch direction into the attitude difference in the quaternion pitch direction;
    将偏航方向的欧拉角误差转化为四元数偏航方向的姿态差;Convert the Euler angle error of the yaw direction into the attitude difference of the quaternion yaw direction;
    根据所述四元数俯仰方向的姿态差、四元数偏航方向的姿态差,确定所述云台应调整的四元数表示的目标姿态差。According to the attitude difference in the quaternion pitch direction and the attitude difference in the quaternion yaw direction, determine the target attitude difference represented by the quaternion to be adjusted by the pan/tilt head.
  18. 根据权利要求17所述的方法,其特征在于,所述根据所述四元数俯仰方向的姿态差、四元数偏航方向的姿态差,确定所述云台应调整的以四元数表示的目标姿态差,包括:The method according to claim 17, characterized in that, according to the attitude difference in the quaternion pitch direction and the attitude difference in the quaternion yaw direction, it is determined that the pan/tilt head should be adjusted in quaternion. The poor target attitude includes:
    获取所述四元数俯仰方向的姿态差、四元数偏航方向的姿态差的乘积;Obtaining the product of the attitude difference in the quaternion pitch direction and the attitude difference in the quaternion yaw direction;
    根据所述乘积,确定所述云台应调整的以四元数表示的目标姿态差。According to the product, determine the target attitude difference represented by a quaternion that the pan/tilt should adjust.
  19. 根据权利要求13-18任一项所述的方法,其特征在于,所述根据所述当前位置和所述期望位置,确定所述云台应调整的目标欧拉角误差,包括:The method according to any one of claims 13-18, wherein the determining the target Euler angle error that the pan/tilt head should adjust according to the current position and the desired position comprises:
    根据所述当前位置和所述期望位置,确定所述当前位置与所述期望位置之间的位置差;Determine the position difference between the current position and the desired position according to the current position and the desired position;
    根据所述位置差、所述拍摄装置的焦距以及所述拍摄装置的图像传感器 的尺寸,确定所述云台应调整的目标欧拉角误差。According to the position difference, the focal length of the photographing device, and the size of the image sensor of the photographing device, the target Euler angle error to be adjusted by the pan/tilt head is determined.
  20. 根据权利要求19所述的方法,其特征在于,所述位置差包括拍摄画面的长度方向的差值和拍摄画面的高度方向的差值;The method according to claim 19, wherein the position difference comprises a difference in the length direction of the shooting picture and a difference in the height direction of the shooting picture;
    根据所述位置差、所述拍摄装置的焦距以及所述拍摄装置中图像传感器的尺寸,确定所述云台应调整的目标欧拉角误差,包括:According to the position difference, the focal length of the photographing device, and the size of the image sensor in the photographing device, determining the target Euler angle error of the pan/tilt head to be adjusted includes:
    根据所述拍摄画面的长度方向的差值、所述拍摄装置的焦距以及所述图像传感器的长度尺寸,确定所述云台应调整的偏航方向的欧拉角误差;Determine the Euler angle error of the yaw direction to be adjusted by the pan/tilt head according to the difference in the length direction of the shooting image, the focal length of the shooting device, and the length dimension of the image sensor;
    根据所述拍摄画面的宽度方向的差值、所述拍摄装置的焦距以及所述图像传感器的宽度尺寸,确定所述云台应调整的俯仰方向的欧拉角误差。According to the difference in the width direction of the photographed image, the focal length of the photographing device, and the width dimension of the image sensor, the Euler angle error of the pitch direction to be adjusted by the pan/tilt is determined.
  21. 一种可移动平台的控制装置,其特征在于,所述可移动平台包括云台和搭载在所述云台上的拍摄装置,所述控制装置包括:存储器和至少一个处理器;A control device for a movable platform, characterized in that the movable platform includes a pan/tilt and a photographing device mounted on the pan/tilt, and the control device includes a memory and at least one processor;
    所述存储器,用于存储程序代码;The memory is used to store program code;
    所述至少一个处理器,调用所述程序代码,当程序代码被执行时,用于:The at least one processor calls the program code, and when the program code is executed, is used to:
    获取目标物在所述拍摄装置的拍摄画面中的当前位置,其中,所述目标物为所述可移动平台的跟踪对象;Acquiring the current position of the target in the shooting picture of the shooting device, wherein the target is a tracking object of the movable platform;
    根据目标物在所述拍摄装置的拍摄画面中的当前位置以及所述目标物在拍摄画面中的期望位置,确定所述云台的以目标姿态表示类型表示的目标姿态差,所述目标姿态表示类型为特殊正交群矩阵或者四元数;According to the current position of the target in the shooting screen of the shooting device and the desired position of the target in the shooting screen, determine the target attitude difference of the pan/tilt in the target attitude representation type, and the target attitude represents The type is a special orthogonal group matrix or quaternion;
    根据所述目标姿态差,确定所述云台转动的欧拉角速度;Determine the Euler angular velocity of the rotation of the gimbal according to the target attitude difference;
    根据所述欧拉角速度,控制所述云台转动,以使所述目标物在所述拍摄装置的拍摄画面中的位置向所述期望位置趋近。According to the Euler angular velocity, the pan/tilt head is controlled to rotate so that the position of the target in the shooting frame of the shooting device approaches the desired position.
  22. 根据权利要求21所述的控制装置,其特征在于,所述至少一个处理器,具体用于:The control device according to claim 21, wherein the at least one processor is specifically configured to:
    根据所述目标姿态差,确定所述目标姿态表示类型对应的姿态控制误差;Determine the attitude control error corresponding to the target attitude representation type according to the target attitude difference;
    根据所述姿态控制误差,确定所述云台转动的欧拉角速度。According to the attitude control error, the Euler angular velocity of the pan/tilt rotation is determined.
  23. 根据权利要求22所述的控制装置,其特征在于,所述至少一个处理器,具体用于:The control device according to claim 22, wherein the at least one processor is specifically configured to:
    根据所述姿态控制误差,确定所述云台转动的角速度;Determine the angular velocity of the rotation of the pan/tilt according to the attitude control error;
    根据所述角速度,确定所述云台转动的欧拉角速度。According to the angular velocity, the Euler angular velocity of the rotation of the pan/tilt is determined.
  24. 根据权利要求23所述的控制装置,其特征在于,所述姿态控制误差包括俯仰方向的控制误差、横滚方向的控制误差、偏航方向的控制误差,所述至少一个处理器,具体用于:The control device according to claim 23, wherein the attitude control error includes a control error in a pitch direction, a control error in a roll direction, and a control error in a yaw direction, and the at least one processor is specifically configured to :
    根据预设控制系数与所述俯仰方向的控制误差的乘积,确定所述云台转动的俯仰方向的角速度;Determine the angular velocity of the pitch direction of the pan/tilt rotation according to the product of the preset control coefficient and the control error in the pitch direction;
    根据预设控制系数与所述横滚方向的控制误差的乘积,确定所述云台转动的横滚方向的角速度;Determine the angular velocity in the roll direction of the pan/tilt rotation according to the product of the preset control coefficient and the control error in the roll direction;
    根据预设控制系数与所述偏航方向的控制误差的乘积,确定所述云台转动的偏航方向的角速度。The angular velocity of the yaw direction of the pan/tilt rotation is determined according to the product of the preset control coefficient and the control error of the yaw direction.
  25. 根据权利要求23或24所述的控制装置,其特征在于,所述至少一个处理器,还用于在根据所述姿态控制误差,确定所述云台转动的欧拉角速度之前,获取所述云台的所述目标姿态表示类型的当前姿态;The control device according to claim 23 or 24, wherein the at least one processor is further configured to obtain the cloud before determining the Euler angular velocity of the pan/tilt rotation according to the attitude control error The target posture of the station represents the current posture of the type;
    所述至少一个处理器在根据所述角速度,确定所述云台转动的欧拉角速度时,具体用于:The at least one processor is specifically configured to determine the Euler angular velocity of the pan/tilt rotation according to the angular velocity:
    根据所述角速度和所述云台的目标姿态表示类型的当前姿态,确定所述云台转动的欧拉角速度。Determine the Euler angular velocity of the rotation of the pan/tilt head according to the angular velocity and the current attitude of the target attitude representation type of the pan/tilt head.
  26. 根据权利要求25所述的控制装置,其特征在于,所述云台的目标姿态表示类型的当前姿态包括:目标姿态表示类型的俯仰方向的当前姿态、目标姿态表示类型的横滚方向的当前姿态。The control device according to claim 25, wherein the current attitude of the target attitude representation type of the pan/tilt head includes: the current attitude of the pitch direction of the target attitude representation type, and the current attitude of the roll direction of the target attitude representation type. .
  27. 根据权利要求26所述的控制装置,其特征在于,所述角速度包括:俯仰方向的角速度、横滚方向的角速度、偏航方向的角速度;The control device according to claim 26, wherein the angular velocity comprises: the angular velocity in the pitch direction, the angular velocity in the roll direction, and the angular velocity in the yaw direction;
    所述至少一个处理器,具体用于:The at least one processor is specifically used for:
    根据俯仰方向的角速度,确定俯仰方向的欧拉角速度;According to the angular velocity in the pitch direction, determine the Euler angular velocity in the pitch direction;
    根据横滚方向的角速度和目标姿态表示类型俯仰方向的当前姿态,确定所述云台转动的横滚方向的欧拉角速度;Determine the Euler angular velocity in the roll direction of the pan/tilt rotation according to the angular velocity in the roll direction and the current posture in the pitch direction of the target posture indication type;
    根据偏航方向的角速度、目标姿态表示类型俯仰方向的当前姿态、目标姿态表示类型横滚方向的当前姿态,确定所述云台转动的偏航方向的欧拉角速度。Determine the Euler angular velocity of the yaw direction of the pan/tilt rotation according to the angular velocity of the yaw direction, the current attitude of the target attitude indicating the type of pitch direction, and the current attitude of the target attitude indicating the type of roll direction.
  28. 根据权利要求22-27任一项所述的控制装置,其特征在于,若所述目标姿态表示类型为特殊正交群矩阵,所述至少一个处理器,具体用于:The control device according to any one of claims 22-27, wherein if the target pose representation type is a special orthogonal group matrix, the at least one processor is specifically configured to:
    根据用于表示所述目标姿态差的特殊正交群矩阵,确定反对称矩阵;Determine the antisymmetric matrix according to the special orthogonal group matrix used to represent the target attitude difference;
    将所述反对称矩阵转化为列向量;Converting the antisymmetric matrix into a column vector;
    根据所述列向量,确定所述目标姿态表示类型对应的姿态控制误差。According to the column vector, the attitude control error corresponding to the target attitude representation type is determined.
  29. 根据权利要求28所述的控制装置,其特征在于,所述至少一个处理器,具体用于:The control device according to claim 28, wherein the at least one processor is specifically configured to:
    将所述列向量中的各元素,分别确定为姿态控制误差中各姿态方向的控制误差。Each element in the column vector is determined as the control error of each attitude direction in the attitude control error.
  30. 根据权利要求29所述的控制装置,其特征在于,所述特殊正交群矩阵为3*3的矩阵,所述列向量为3维的列向量;The control device according to claim 29, wherein the special orthogonal group matrix is a 3*3 matrix, and the column vector is a 3-dimensional column vector;
    所述至少一个处理器,具体用于:The at least one processor is specifically used for:
    将所述列向量中的3个元素分别确定为俯仰方向的控制误差、横滚方向的控制误差、偏航方向的控制误差。The three elements in the column vector are respectively determined as the control error in the pitch direction, the control error in the roll direction, and the control error in the yaw direction.
  31. 根据权利要求22-27任一项所述的控制装置,其特征在于,若所述目标姿态表示类型为四元数,所述至少一个处理器,具体用于:The control device according to any one of claims 22-27, wherein if the target posture representation type is a quaternion, the at least one processor is specifically configured to:
    根据用于表示所述目标姿态差的四元数中的虚部,确定所述云台调整所述目标姿态差对应的旋转轴;Determine, according to the imaginary part of the quaternion used to represent the target attitude difference, that the pan/tilt adjusts the rotation axis corresponding to the target attitude difference;
    根据用于表示所述目标姿态差的四元数中的虚部和实部,确定所述云台调整所述目标姿态差对应的旋转角度;Determine, according to the imaginary part and the real part of the quaternion used to represent the target attitude difference, the rotation angle corresponding to the adjustment of the target attitude difference by the pan/tilt;
    根据所述旋转轴和所述旋转角度,确定所述目标姿态表示类型对应的姿态控制误差。Determine the attitude control error corresponding to the target attitude representation type according to the rotation axis and the rotation angle.
  32. 根据权利要求31所述的控制装置,其特征在于,所述旋转轴为3维列向量表示的旋转轴;The control device according to claim 31, wherein the rotation axis is a rotation axis represented by a 3-dimensional column vector;
    所述至少一个处理器,具体用于:The at least one processor is specifically used for:
    根据所述旋转角度与所述3维列向量表示的旋转轴的乘积,获得中间3维列向量;Obtaining an intermediate 3-dimensional column vector according to the product of the rotation angle and the rotation axis represented by the 3-dimensional column vector;
    将所述中间3维列向量中3个元素分别确定为俯仰方向的控制误差、横滚方向的控制误差、偏航方向的控制误差。The three elements in the intermediate 3-dimensional column vector are respectively determined as the control error in the pitch direction, the control error in the roll direction, and the control error in the yaw direction.
  33. 根据权利要求21-32任一项所述的控制装置,其特征在于,所述至少一个处理器,具体用于:The control device according to any one of claims 21-32, wherein the at least one processor is specifically configured to:
    根据所述当前位置和所述期望位置,确定所述云台应调整的目标欧拉角 误差;Determine the target Euler angle error that the pan/tilt should adjust according to the current position and the expected position;
    根据所述目标欧拉角误差,确定所述云台应调整的以目标姿态表示类型表示的目标姿态差。According to the target Euler angle error, determine the target attitude difference represented by the target attitude representation type that the pan/tilt should adjust.
  34. 根据权利要求33所述的控制装置,其特征在于,所述目标欧拉角误差包括:俯仰方向的欧拉角误差、偏航轴方向的欧拉角误差。The control device according to claim 33, wherein the target Euler angle error comprises: Euler angle error in the pitch direction and Euler angle error in the yaw axis direction.
  35. 根据权利要求34所述的控制装置,其特征在于,若所述目标姿态表示类型为特殊正交群矩阵,则所述至少一个处理器,具体用于:The control device according to claim 34, wherein if the target pose representation type is a special orthogonal group matrix, the at least one processor is specifically configured to:
    将俯仰方向的欧拉角误差转化为特殊正交群矩阵俯仰方向的姿态差;Convert the Euler angle error in the pitch direction into the attitude difference in the pitch direction of the special orthogonal group matrix;
    将偏航方向的欧拉角误差转化为特殊正交群矩阵偏航方向的姿态差;Convert the Euler angle error of the yaw direction into the attitude difference of the yaw direction of the special orthogonal group matrix;
    根据所述特殊正交群矩阵俯仰方向的姿态差、特殊正交群矩阵偏航方向的姿态差,确定所述云台应调整的以特殊正交群矩阵表示的目标姿态差。According to the attitude difference in the pitch direction of the special orthogonal group matrix and the attitude difference in the yaw direction of the special orthogonal group matrix, the target attitude difference represented by the special orthogonal group matrix to be adjusted by the pan/tilt is determined.
  36. 根据权利要求35所述的控制装置,其特征在于,所述至少一个处理器,具体用于:The control device according to claim 35, wherein the at least one processor is specifically configured to:
    获取所述特殊正交群矩阵俯仰方向的姿态差、特殊正交群矩阵偏航方向的姿态差的乘积;Obtaining the product of the attitude difference in the pitch direction of the special orthogonal group matrix and the attitude difference in the yaw direction of the special orthogonal group matrix;
    根据所述乘积,确定所述云台应调整的以特殊正交群矩阵表示的目标姿态差。According to the product, determine the target attitude difference represented by a special orthogonal group matrix that the pan/tilt should adjust.
  37. 根据权利要求34所述的控制装置,其特征在于,若所述目标姿态表示类型为四元数,则所述至少一个处理器,具体用于:The control device according to claim 34, wherein if the target posture representation type is a quaternion, the at least one processor is specifically configured to:
    将俯仰方向的欧拉角误差转化为四元数俯仰方向的姿态差;Convert the Euler angle error in the pitch direction into the attitude difference in the quaternion pitch direction;
    将偏航方向的欧拉角误差转化为四元数偏航方向的姿态差;Convert the Euler angle error of the yaw direction into the attitude difference of the quaternion yaw direction;
    根据所述四元数俯仰方向的姿态差、四元数偏航方向的姿态差,确定所述云台应调整的四元数表示的目标姿态差。According to the attitude difference in the quaternion pitch direction and the attitude difference in the quaternion yaw direction, determine the target attitude difference represented by the quaternion to be adjusted by the pan/tilt head.
  38. 根据权利要求37所述的控制装置,其特征在于,所述至少一个处理器,具体用于:The control device according to claim 37, wherein the at least one processor is specifically configured to:
    获取所述四元数俯仰方向的姿态差、四元数偏航方向的姿态差的乘积;Obtaining the product of the attitude difference in the quaternion pitch direction and the attitude difference in the quaternion yaw direction;
    根据所述乘积,确定所述云台应调整的以四元数表示的目标姿态差。According to the product, determine the target attitude difference represented by a quaternion that the pan/tilt should adjust.
  39. 根据权利要求33-38任一项所述的控制装置,其特征在于,所述至少一个处理器,具体用于:The control device according to any one of claims 33-38, wherein the at least one processor is specifically configured to:
    根据所述当前位置和所述期望位置,确定所述当前位置与所述期望位置 之间的位置差;Determine the position difference between the current position and the expected position according to the current position and the expected position;
    根据所述位置差、所述拍摄装置的焦距以及所述拍摄装置的图像传感器的尺寸,确定所述云台应调整的目标欧拉角误差。According to the position difference, the focal length of the photographing device, and the size of the image sensor of the photographing device, the target Euler angle error to be adjusted by the pan/tilt head is determined.
  40. 根据权利要求39所述的控制装置,其特征在于,所述位置差包括拍摄画面的长度方向的差值和拍摄画面的高度方向的差值;The control device according to claim 39, wherein the position difference comprises a difference in the length direction of the shooting picture and a difference in the height direction of the shooting picture;
    所述至少一个处理器,具体用于:The at least one processor is specifically used for:
    根据所述拍摄画面的长度方向的差值、所述拍摄装置的焦距以及所述图像传感器的长度尺寸,确定所述云台应调整的偏航方向的欧拉角误差;Determine the Euler angle error of the yaw direction to be adjusted by the pan/tilt head according to the difference in the length direction of the shooting image, the focal length of the shooting device, and the length dimension of the image sensor;
    根据所述拍摄画面的宽度方向的差值、所述拍摄装置的焦距以及所述图像传感器的宽度尺寸,确定所述云台应调整的俯仰方向的欧拉角误差。According to the difference in the width direction of the photographed image, the focal length of the photographing device, and the width dimension of the image sensor, the Euler angle error of the pitch direction to be adjusted by the pan/tilt is determined.
  41. 一种可移动平台,其特征在于,所述可移动平台包括如权利要求21-40任一项所述的可移动平台的控制装置、云台以及搭载在所述云台上的拍摄装置。A movable platform, characterized in that the movable platform comprises the control device of the movable platform according to any one of claims 21-40, a pan-tilt, and a photographing device mounted on the pan-tilt.
  42. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序;所述计算机程序在被执行时,实现如权利要求1-20任一项所述的可移动平台的控制方法。A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium; when the computer program is executed, the portable platform according to any one of claims 1-20 is realized的控制方法。 Control methods.
PCT/CN2020/087325 2020-04-27 2020-04-27 Control method and apparatus for movable platform WO2021217371A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/087325 WO2021217371A1 (en) 2020-04-27 2020-04-27 Control method and apparatus for movable platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/087325 WO2021217371A1 (en) 2020-04-27 2020-04-27 Control method and apparatus for movable platform

Publications (1)

Publication Number Publication Date
WO2021217371A1 true WO2021217371A1 (en) 2021-11-04

Family

ID=78373936

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/087325 WO2021217371A1 (en) 2020-04-27 2020-04-27 Control method and apparatus for movable platform

Country Status (1)

Country Link
WO (1) WO2021217371A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114167902A (en) * 2021-12-03 2022-03-11 重庆市亿飞智联科技有限公司 Holder control method, holder control device, control equipment and storage medium
CN115008468A (en) * 2022-07-04 2022-09-06 中国科学院沈阳自动化研究所 Mechanical arm attitude speed planning control method
CN117742364A (en) * 2023-12-21 2024-03-22 烟台大学 Track tracking control method and system of four-rotor unmanned aerial vehicle with gesture planner
CN117968464A (en) * 2024-03-28 2024-05-03 江苏深蓝航天有限公司 Rocket high-altitude attitude control method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150207987A1 (en) * 2013-06-19 2015-07-23 The Boeing Company Systems and Methods for Tracking Location of Movable Target Object
CN105116926A (en) * 2015-08-20 2015-12-02 深圳一电科技有限公司 Holder control method and device
CN108549413A (en) * 2018-04-27 2018-09-18 全球能源互联网研究院有限公司 A kind of holder method of controlling rotation, device and unmanned vehicle
CN108762324A (en) * 2018-05-23 2018-11-06 深圳市道通智能航空技术有限公司 Horizontal stage electric machine angle and angular speed evaluation method, device, holder and aircraft

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150207987A1 (en) * 2013-06-19 2015-07-23 The Boeing Company Systems and Methods for Tracking Location of Movable Target Object
CN105116926A (en) * 2015-08-20 2015-12-02 深圳一电科技有限公司 Holder control method and device
CN108549413A (en) * 2018-04-27 2018-09-18 全球能源互联网研究院有限公司 A kind of holder method of controlling rotation, device and unmanned vehicle
CN108762324A (en) * 2018-05-23 2018-11-06 深圳市道通智能航空技术有限公司 Horizontal stage electric machine angle and angular speed evaluation method, device, holder and aircraft

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114167902A (en) * 2021-12-03 2022-03-11 重庆市亿飞智联科技有限公司 Holder control method, holder control device, control equipment and storage medium
CN115008468A (en) * 2022-07-04 2022-09-06 中国科学院沈阳自动化研究所 Mechanical arm attitude speed planning control method
CN117742364A (en) * 2023-12-21 2024-03-22 烟台大学 Track tracking control method and system of four-rotor unmanned aerial vehicle with gesture planner
CN117742364B (en) * 2023-12-21 2024-05-10 烟台大学 Track tracking control method and system of four-rotor unmanned aerial vehicle with gesture planner
CN117968464A (en) * 2024-03-28 2024-05-03 江苏深蓝航天有限公司 Rocket high-altitude attitude control method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US11949992B2 (en) UAV panoramic imaging
WO2021217371A1 (en) Control method and apparatus for movable platform
US10771699B2 (en) Systems and methods for rolling shutter correction
WO2019223270A1 (en) Method and apparatus for estimating angle and angular velocity of electric motor of gimbal, and gimbal and aerial vehicle
WO2019144271A1 (en) Method and device for controlling unmanned aerial vehicle, and unmanned aerial vehicle
CN110268704B (en) Video processing method, device, unmanned aerial vehicle and system
WO2019227441A1 (en) Video control method and device of movable platform
US11076082B2 (en) Systems and methods for digital video stabilization
CN105045279A (en) System and method for automatically generating panorama photographs through aerial photography of unmanned aerial aircraft
WO2018035764A1 (en) Method for taking wide-angle pictures, device, cradle heads, unmanned aerial vehicle and robot
WO2020181494A1 (en) Parameter synchronization method, image capture apparatus, and movable platform
WO2020172800A1 (en) Patrol control method for movable platform, and movable platform
WO2019227289A1 (en) Time-lapse photography control method and device
WO2020048365A1 (en) Flight control method and device for aircraft, and terminal device and flight control system
WO2019104583A1 (en) Maximum temperature point tracking method, device and drone
CN111247389B (en) Data processing method and device for shooting equipment and image processing equipment
WO2020227998A1 (en) Image stability augmentation control method, photography device and movable platform
WO2019075758A1 (en) Imaging control method, imaging device and unmanned aerial vehicle
WO2019183789A1 (en) Method and apparatus for controlling unmanned aerial vehicle, and unmanned aerial vehicle
WO2020062089A1 (en) Magnetic sensor calibration method and movable platform
WO2020042159A1 (en) Rotation control method and apparatus for gimbal, control device, and mobile platform
WO2021168821A1 (en) Mobile platform control method and device
WO2020019175A1 (en) Image processing method and apparatus, and photographing device and unmanned aerial vehicle
CN110351483A (en) A kind of adaptive zoom monitoring unmanned platform of more camera lenses and control method
WO2020237429A1 (en) Control method for remote control device, and remote control device

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: 20933170

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: 20933170

Country of ref document: EP

Kind code of ref document: A1