WO2022051916A1 - Gimbal control method and apparatus, gimbal, and storage medium - Google Patents

Gimbal control method and apparatus, gimbal, and storage medium Download PDF

Info

Publication number
WO2022051916A1
WO2022051916A1 PCT/CN2020/114108 CN2020114108W WO2022051916A1 WO 2022051916 A1 WO2022051916 A1 WO 2022051916A1 CN 2020114108 W CN2020114108 W CN 2020114108W WO 2022051916 A1 WO2022051916 A1 WO 2022051916A1
Authority
WO
WIPO (PCT)
Prior art keywords
trajectory
target
segment
track
speed
Prior art date
Application number
PCT/CN2020/114108
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 CN202080007341.5A priority Critical patent/CN113272756A/en
Priority to PCT/CN2020/114108 priority patent/WO2022051916A1/en
Publication of WO2022051916A1 publication Critical patent/WO2022051916A1/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 present application relates to the field of PTZ technology, and in particular, to a PTZ control method, device, PTZ and storage medium.
  • Track recording and track delay are the common shooting functions of the handheld gimbal.
  • the track information is preset, and then the gimbal automatically shoots.
  • the trajectory recording and trajectory delay the trajectory generated by pre-planning mostly adopts the method of linear interpolation or the method of T-shaped or S-shaped curve.
  • the linear interpolation method only guarantees the continuity of the position on the trajectory segment, the velocity and acceleration on the trajectory segment are discontinuous, and there is a sudden change in the velocity and acceleration, resulting in an unsmooth trajectory. Smooth and smooth.
  • the method of T-shaped or S-shaped curve ensures the continuity of position, velocity and acceleration on each trajectory segment, but does not consider the velocity of the two adjacent trajectory segments before and after the joining trajectory point with a dwell time of 0 at the joining trajectory point And the continuity of acceleration, the actual picture is not ideal.
  • the present application provides a pan-tilt control method, device, pan-tilt and storage medium.
  • the present application provides a PTZ control method, the method includes:
  • the reference poses of the multiple track points are used to define the motion track of the gimbal, and the multiple track points include the one where the dwell time of the gimbal is zero. connecting track points;
  • the PTZ is controlled to move along the movement track.
  • the present application provides a pan-tilt control device, the device is communicatively connected to the pan-tilt, and the device includes: a memory and a processor;
  • the memory is used to store computer programs
  • the processor is configured to execute the computer program and implement the following steps when executing the computer program:
  • the reference poses of the multiple track points are used to define the motion track of the gimbal, and the multiple track points include the one where the dwell time of the gimbal is zero. connecting track points;
  • the PTZ is controlled to move along the movement track.
  • the present application provides a pan-tilt head, the pan-tilt head comprising the above-mentioned pan-tilt-tilt control device.
  • the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the above-mentioned PTZ control method.
  • Embodiments of the present application provide a pan-tilt control method, device, pan-tilt, and storage medium, for obtaining reference poses of multiple track points of the pan-tilt input by a user, and the reference poses of the multiple track points are used to define the
  • the movement track of the gimbal, the multiple track points include the connecting track points where the dwell time of the gimbal is zero;
  • the speed at the connection trajectory point is continuous, and the target trajectory segment includes the connection trajectory point; according to the planned speed, the gimbal is controlled to move along the motion trajectory.
  • the target trajectory segment includes the connecting trajectory points where the dwell time of the gimbal is zero
  • the speed at which the gimbal moves along the target trajectory segment in the motion trajectory is planned, so that the target trajectory segment at the connecting trajectory point is The speed is continuous.
  • the gimbal is controlled to move along the motion trajectory.
  • the speed of the gimbal at the connecting trajectory point of the target trajectory segment can be made continuous, so that the gimbal starts from the
  • the entire movement between the start track point and the end track point is relatively smooth and smooth, and there will be no drastic changes and vibrations, which can make the actual picture captured by the camera on the gimbal more smooth and smooth, without drastic changes. and vibration, the picture taken is ideal.
  • FIG. 1 is a schematic flowchart of an embodiment of a pan-tilt control method of the present application
  • FIG. 2 is a schematic flowchart of another embodiment of a pan-tilt control method of the present application.
  • FIG. 3 is a schematic flowchart of another embodiment of a pan-tilt control method of the present application.
  • FIG. 4 is a schematic flowchart of another embodiment of a pan-tilt control method of the present application.
  • FIG. 5 is a schematic flowchart of another embodiment of a pan-tilt control method of the present application.
  • FIG. 6 is a schematic structural diagram of an embodiment of a PTZ and related devices in the PTZ control method of the present application.
  • FIG. 7 is a schematic diagram of a control process of an embodiment of the pan/tilt head and related device of FIG. 6;
  • FIG. 8 is a schematic diagram of an interface for setting track information in the track delay in the PTZ control method of the present application.
  • FIG. 9 is a schematic diagram of an interface for setting track information in track recording by the PTZ control method of the present application.
  • FIG. 10 is a schematic diagram of an embodiment of a trajectory curve and trajectory planning in the PTZ control method of the present application.
  • FIG. 11 is a schematic structural diagram of an embodiment of a pan-tilt control device of the present application.
  • the trajectory recording and trajectory delay, the trajectory generated by pre-planning mostly adopts the method of linear interpolation or the method of T-shaped or S-shaped curve.
  • the linear interpolation method only ensures the continuity of the position on the trajectory segment. There are sudden changes in the speed and acceleration on the trajectory segment, the trajectory is not smooth, and the picture changes and vibrates violently during the shooting process, and the captured picture is not smooth and smooth.
  • the T-shaped or S-shaped curve method does not consider the continuity of the velocity and acceleration of the two adjacent track segments before and after the connecting track point where the dwell time is 0, and the actual picture is not ideal.
  • Embodiments of the present application provide a pan-tilt control method, device, pan-tilt, and storage medium, for obtaining reference poses of multiple track points of the pan-tilt input by a user, and the reference poses of the multiple track points are used to define the
  • the movement track of the gimbal, the multiple track points include the connecting track points where the dwell time of the gimbal is zero;
  • the speed at the connection trajectory point is continuous, and the target trajectory segment includes the connection trajectory point; according to the planned speed, the gimbal is controlled to move along the motion trajectory.
  • the target trajectory segment includes the connecting trajectory points where the dwell time of the gimbal is zero
  • the speed at which the gimbal moves along the target trajectory segment in the motion trajectory is planned, so that the target trajectory segment at the connecting trajectory point is The speed is continuous.
  • the gimbal is controlled to move along the motion trajectory.
  • the speed of the gimbal at the connecting trajectory point of the target trajectory segment can be made continuous, so that the gimbal starts from the
  • the entire movement between the start track point and the end track point is relatively smooth and smooth, and there will be no drastic changes and vibrations, which can make the actual picture captured by the camera on the gimbal more smooth and smooth, without drastic changes. And vibration, the picture taken is ideal.
  • FIG. 1 is a schematic flowchart of an embodiment of a pan-tilt control method of the present application. The method includes:
  • Step S101 Obtain the reference postures of multiple trajectory points of the gimbal input by the user, the reference postures of the multiple trajectory points are used to define the motion trajectory of the gimbal, and the multiple trajectory points include the dwell time of the gimbal The zero-joint trajectory point.
  • the trajectory point can be a specified position input by the user and required to be reached by the gimbal; the reference attitude of the trajectory point can be a designated posture input by the user and required to reach the specified position.
  • the reference attitudes of the multiple track points can be used to define the motion track of the gimbal, and the relevant information of the track points input by the user may also include: the number of track points, the arrival sequence of the multiple track points, the position of the gimbal in the adjacent Time to move between two track points, how long the gimbal stays at each track point, etc.
  • the plurality of track points include the connecting track points where the dwell time of the gimbal is zero, that is, the gimbal does not stay at the connecting track points.
  • the gimbal is usually driven by multiple motors, corresponding to multiple directions.
  • the motor in each direction drives the shaft arm connected to it to rotate. It is said that the position and attitude of the gimbal can be jointly determined by the motion trajectories of these multiple motors.
  • the manner of acquiring the reference poses of the multiple track points of the gimbal entered by the user may be that the user directly inputs the reference poses of the multiple track points of the gimbal on the gimbal. Since the input function of the input device on the PTZ is limited, it is not very convenient for the user to use.
  • the reference attitudes of multiple track points of the PTZ can be input through the mobile terminal, and then sent to the PTZ control device, that is, the steps S101, the acquiring the reference pose of the multiple track points of the pan/tilt head input by the user may include: receiving the reference pose of the multiple track points of the pan/tilt head input by the user and sent by the mobile terminal.
  • Step S102 Plan the speed of the movement of the pan/tilt head along the target trajectory segment in the motion trajectory, so that the speed of the target trajectory segment at the connection trajectory point is continuous, and the target trajectory segment includes the connection trajectory point .
  • Step S103 Control the pan/tilt to move along the motion track according to the planned speed.
  • Continuous can mean that no sudden change or jump occurs (the sudden change or jump can mean that there is no buffer in the middle, suddenly becomes larger, or suddenly becomes smaller, or suddenly becomes zero; the sudden change or jump in the speed of the movement will make the movement of the gimbal not stable.
  • smooth, non-smooth continuous includes no change or gradual change (gradually larger or gradually smaller).
  • Velocity continuity can mean that the velocity does not undergo sudden changes or jumps, does not change, or changes gradually.
  • the velocity continuous at the engagement trajectory point may mean that the velocity at the engagement trajectory point does not abruptly or jumps, does not change, or undergoes a gradual change.
  • the continuous speed can make the movement of the gimbal smooth and smooth.
  • step S102 there are many specific implementation modes of step S102, including but not limited to: the adjacent trajectory segments before and after the connecting trajectory point can be planned separately, but the starting speed of the following trajectory segment can be equal to the ending speed of the previous trajectory segment, or only the following trajectory.
  • the starting speed of the segment can be slightly lower than the ending speed of the preceding track segment, or only the starting speed of the following track segment can be slightly greater than the ending speed of the preceding track segment;
  • the adjacent track segments before and after the connecting track point can be combined Planning together, that is, the adjacent trajectory segments before and after the connecting trajectory point can be planned as a whole; and so on.
  • the number of trajectory points of the gimbal is 5
  • the arrival order of the trajectory points is trajectory point 1
  • trajectory point 2 is the traveling order of the trajectory points
  • trajectory point 3 is the connecting track point
  • the dwell time of the gimbal at the track point 3 is zero.
  • the trajectory segment between the trajectory point 2 and the trajectory point 3 and the trajectory segment between the trajectory point 3 and the trajectory point 4 are all target trajectory segments. Alternatively, you can plan the trajectory segment between trajectory point 2 and trajectory point 3, and the trajectory segment between trajectory point 3 and trajectory point 4, respectively.
  • the trajectory segment between the trajectory point 2 and the trajectory point 3, and the trajectory segment between the trajectory point 3 and the trajectory point 4 can be planned as a whole, even if the trajectory point 2, the trajectory point 3 and the trajectory point 4 jointly define the motion trajectory , take the trajectory point 2, the trajectory point 3 and the trajectory point 4 as a continuous trajectory segment, and the velocity at the trajectory segment 3 is continuous at this time.
  • the gimbal When the user specifies the track point that the gimbal needs to reach, the gimbal usually needs to stay at the track point. Therefore, under normal circumstances, the gimbal moves in the track segment between every two adjacent track points.
  • the movement of the gimbal A trajectory is usually composed of multiple such trajectory segments.
  • the speed of the gimbal moving along the target track segment in the motion track is planned, so that the The speed of the target trajectory segment at the connecting trajectory point is continuous.
  • the PTZ will move at the target trajectory segment.
  • the speed at the connecting track points is continuous, so that the entire motion track of the gimbal from the starting track point to the ending track point is relatively smooth and smooth, without violent changes and vibrations, which can make the shooting device on the gimbal relatively smooth.
  • the actual picture is relatively smooth and smooth, without drastic changes and vibrations, and the picture taken is ideal.
  • This embodiment of the present application acquires the reference poses of multiple track points of the gimbal entered by the user, the reference poses of the multiple track points are used to define the motion track of the gimbal, and the multiple track points include the stop of the gimbal
  • the target trajectory segment includes the connecting trajectory points where the dwell time of the gimbal is zero
  • the speed at which the gimbal moves along the target trajectory segment in the motion trajectory is planned, so that the target trajectory segment at the connecting trajectory point is The speed is continuous.
  • the gimbal is controlled to move along the motion trajectory.
  • the speed of the gimbal at the connecting trajectory point of the target trajectory segment can be made continuous, so that the gimbal starts from the
  • the entire movement between the start track point and the end track point is relatively smooth and smooth, and there will be no drastic changes and vibrations, which can make the actual picture captured by the camera on the gimbal more smooth and smooth, without drastic changes. And vibration, the picture taken is ideal.
  • step S102 The details of step S102 will be described in detail below.
  • the acceleration is also continuous, that is, in step S102, the speed of the gimbal moving along the target track segment in the motion track is planned, so that the target track segment is moved.
  • the speed at the connecting track point is continuous, which may include: planning the speed of the pan/tilt head moving along the target track segment in the motion track, so that the speed and acceleration of the target track segment at the connecting track point are are continuous.
  • the acceleration is also continuous at the connecting trajectory point, this can further ensure the continuity of the velocity at the connecting trajectory point, thus further ensuring that the speed of the gimbal at the connecting trajectory point of the target trajectory segment is continuous, and the motion trajectory of the target trajectory segment is It is smooth and smooth, and there will be no drastic changes and vibrations, so that the actual picture captured by the shooting device on the gimbal can be relatively smooth and smooth, without drastic changes and vibrations, and the captured picture is ideal.
  • the trajectory function can be used to plan the velocity, which can easily and conveniently realize that both the velocity and the acceleration at the connection trajectory point are continuous.
  • the motion trajectory of the gimbal is taken as a whole, and multiple trajectory segments are taken as a whole, and the multiple trajectory segments are connected to each other, and the trajectory function is used to plan the speed, that is, step S102, the described pairing of the gimbal is performed.
  • the multiple trajectory segments in the motion trajectory are taken as a whole, and the multiple trajectory segments are connected to each other.
  • the acceleration can also make the speed change of the gimbal in the entire movement trajectory very smooth and smooth, so that the speed of the gimbal in the entire movement trajectory will not change drastically and vibrate.
  • the trajectory function is a preset function that can at least make the velocity and acceleration of the target trajectory segment continuous.
  • the trajectory function may also be a trajectory function matched with computing power.
  • the trajectory parameters of the trajectory function are unknown, and the trajectory parameters of these trajectory segments can be obtained according to the relevant information of multiple trajectory points input by the user.
  • the trajectory function includes a polynomial function of more than three times, such as a cubic function, a quartic function, a quintic function, and the like.
  • the form of polynomial function is relatively simple, and the amount of calculation is moderate, and the polynomial function of more than three times can ensure that the motion parameters are continuous.
  • the trajectory function includes a cubic function. Using a cubic function can reduce the amount of calculation on the one hand, and on the other hand, it does not require much torque of the motor, which can reduce the cost of the motor.
  • the trajectory function includes a Bezier curve function.
  • step S102 the speed of the pan/tilt head moving along the motion track is planned by a track function, so that the speed and acceleration of the target track segment at the connection track point are both equal.
  • Continuous may include: sub-step S1021, sub-step S1022, sub-step S1023 and sub-step S1024.
  • Sub-step S1021 According to the non-connected trajectory points whose dwell time is not zero, the motion trajectory of the gimbal is divided according to the arrival order of the trajectory points, and a plurality of second trajectory segments corresponding to the motors in each direction are obtained, each The starting speed and the ending speed of the two track segments are both zero, and include one or more first track segments, the pan/tilt includes N motors corresponding to N directions, and the first track segment includes two adjacent track segments. A trajectory segment between successively arrived trajectory points.
  • Track segment that is, the next track segment can be started from the speed at which the track point is reached.
  • the gimbal is usually driven by multiple motors, corresponding to multiple directions.
  • the motor in each direction drives the corresponding shaft arm to move.
  • the position and attitude of the gimbal can be jointly determined by the motion trajectories of these multiple motors.
  • the motion trajectories of the pan/tilt head are divided, respectively corresponding to the motion trajectories of the motors in each direction.
  • the motion of the motor includes rotational motion
  • the speed of the motor can be angular velocity
  • the acceleration of the motor can be angular acceleration
  • the position of the motor after rotation can be an angle.
  • the trajectory point that does not need to stay it can be used as the connecting trajectory point of two adjacent first trajectory segments (that is, the end trajectory point of the previous first trajectory segment and the starting trajectory point of the next first trajectory segment).
  • the track of the gimbal can be split according to the arrival sequence of the track points to obtain multiple second track segments corresponding to the motor motion in each direction, so that the starting speed and ending speed of each second track segment are If the second trajectory segment includes a connecting trajectory point, the second trajectory segment includes a plurality of first trajectory segments, and if the second trajectory segment does not include a connecting trajectory point, the second trajectory segment includes a first trajectory segment.
  • Sub-step S1022 Use the trajectory function to make the velocity and acceleration of the target trajectory segment in the second trajectory segment at the connecting trajectory point equal to obtain the velocity of each trajectory point, and the target trajectory segment includes the previous first trajectory segment and the following first trajectory, the ending trajectory point of the former first trajectory segment includes the connecting trajectory point, and the starting trajectory point of the latter first trajectory segment includes the connecting trajectory point.
  • the speed of the motor corresponding to each direction of each track point is obtained by calculating the known information.
  • the known information includes the reference posture of multiple track points of the gimbal entered by the user and other related information of the multiple track points, such as: the arrival sequence of the track points, the movement time of the gimbal at two adjacent track points, Dwell time at track points, etc.
  • the target trajectory segment including the former first trajectory segment and the latter first trajectory segment have the same velocity and acceleration at the connecting trajectory point
  • the connecting trajectory point includes the end trajectory point of the previous first trajectory segment and The starting trajectory point of the first trajectory segment after the And the acceleration does not change, take the speed and acceleration of the end trajectory point of the first trajectory segment as the speed and acceleration of the starting trajectory point of the first trajectory segment), so as to obtain the motor speed of each trajectory point corresponding to each direction. speed.
  • This method is relatively simple and does not waste control time.
  • Sub-step S1023 According to the speed of each trajectory point and the expression of the trajectory parameter corresponding to each first trajectory segment of the motor corresponding to each direction, obtain the corresponding value of each first trajectory segment of the motor corresponding to each direction. , the expression of the trajectory parameter corresponding to each first trajectory segment of the motor corresponding to each direction is represented by the starting position, ending position, starting speed and ending speed of the first trajectory segment .
  • the expression of the trajectory parameter corresponding to each first trajectory segment of the motor corresponding to each direction is passed through the starting position (which can be the starting angle) and the ending position (which can be the starting angle) of the first trajectory segment. ending angle), starting velocity (which can be the starting angular velocity), and ending velocity (which can be the ending angular velocity).
  • the starting position and ending position of the first trajectory segment are the target positions of the two trajectory points before and after the first trajectory segment, which can be obtained from the reference attitude input by the user; the starting speed and ending speed of the first trajectory segment, That is, the target velocity of the two trajectory points before and after the first trajectory segment, which can be calculated through the previous step.
  • the expression of the trajectory parameters corresponding to each first trajectory segment of the motor corresponding to each direction is:
  • the trajectory parameters of each first trajectory segment of the motor corresponding to each direction can be obtained by calculation.
  • Sub-step S1024 Determine the target speed of the motor corresponding to each direction at the running time t according to the trajectory function and the trajectory parameters corresponding to each first trajectory segment.
  • the target speed of the motor corresponding to each direction at the running time t can be determined.
  • the number of the directions includes three mutually perpendicular directions, that is, the X axis, the Y axis, and the Z axis in the three-dimensional space.
  • step S103 controlling the pan/tilt to move along the motion trajectory according to the planned speed may include sub-step S103A1 , sub-step S103A2 and sub-step S103A3 .
  • Sub-step S103A1 According to the trajectory function and the trajectory parameters corresponding to each first trajectory segment, determine the target position of the motor corresponding to the three directions at the running time t, and the target position includes the target Euler angle.
  • Sub-step S103A2 Convert the target Euler angles of the motor corresponding to the three directions at the running time t into the target attitude quaternion of the motor corresponding to the three directions at the running time t.
  • Sub-step S103A3 Control the motion of the three-axis motor of the pan/tilt according to the target attitude quaternion of the motor corresponding to the three directions at the running time t.
  • Euler angles are more readable, intuitive, and widely used, Euler angles are usually used for the target position in this embodiment.
  • the Euler rotation corresponding to the Euler angle is to be rotated in the order of a fixed coordinate axis, so different orders will cause different results, which is easy to bring inconvenience to the control.
  • the quaternion stores the information of the rotation axis and rotation angle, which can conveniently describe the rotation of the rigid body around any axis. Quaternion rotation only needs a four-dimensional quaternion to perform rotation around any vector passing through the origin, which is convenient, fast and more efficient.
  • step S103 the control of the pan/tilt head to move along the motion trajectory according to the planned speed may further include: sub-step S103B1 and sub-step S103B2, as shown in FIG. 4 .
  • Sub-step S103B1 According to the trajectory function and the trajectory parameters corresponding to each first trajectory segment, determine the target position of the motor corresponding to each direction at the running time t.
  • Sub-step S103B2 According to the target position of the motor corresponding to each direction at the running time t, control the movement of the motor corresponding to each direction of the pan/tilt, so that the motor corresponding to each direction after the movement is at the running time t. reach the target position.
  • the target position (which may be the target angle) and the target velocity (which may be the target angular velocity) may be determined, that is, sub-step S1024.
  • the trajectory parameters corresponding to the first trajectory segment, and determining the target speed of the motor corresponding to each direction at the running time t may include: determining the running speed according to the trajectory function and the trajectory parameters corresponding to the first trajectory segment of the motor in each direction.
  • the target position and target speed of the motor corresponding to each direction at time t may be determined, that is, sub-step S1024.
  • step S103 the controlling of the pan/tilt head to move on the movement track according to the planned speed may further include: sub-step S103C1 and sub-step S103C2 .
  • Sub-step S103C1 According to the target speed of the motor corresponding to each direction at the running time t, perform feedforward control on the motion of the motor corresponding to each direction of the pan/tilt head.
  • Sub-step S103C2 According to the target position of the motor corresponding to each direction at the running time t, feedback control is performed on the motion of the motor corresponding to each direction of the pan/tilt head.
  • Feedforward control can refer to observing the situation, collecting and arranging information, grasping laws, and predicting trends, correctly predicting possible problems in the future, and taking measures in advance to eliminate possible deviations in the budding state, in order to avoid different development stages in the future. measures to be taken in advance of possible problems.
  • the measures taken in advance to avoid possible problems in the process of reaching the running time t provide technical support to make the motors corresponding to each direction at the running time t reach the target position as much as possible.
  • the ultimate goal is that the position of the motor corresponding to each direction at the running time t can reach the target position, so as to ensure that the captured picture meets the user's needs. , and feedback control is also required for this purpose.
  • Feedback control can refer to comparing the actual results after a certain action and task is completed, so as to have an impact on the next action and play a control role. Its characteristics are: it can respond in time to the objective effect caused by each step of the planning decision in the implementation process, and adjust and revise the next implementation plan accordingly, so that the implementation of the planning decision and the original plan itself are dynamic. achieve coordination.
  • the current position of the motor for example, the rotation angle
  • the current position of the motor can be continuously measured in the process of reaching the running time t, and the current position of the motor can be measured accordingly.
  • Compare the position of the motor with the target position for example, compare the current rotation angle of the motor with the target angle
  • react in time for example, compare the current rotation angle of the motor with the target angle
  • adjust and modify the next control scheme accordingly, and finally make the corresponding direction at the running time t.
  • the position of the motor and the target position are dynamically coordinated.
  • the embodiment of the present application has both feedforward control and feedback control. From the perspective of feedforward control, due to the addition of feedback control, the requirements for the accuracy of the feedforward control model are reduced, and the disturbance of unmeasured interference signals can be corrected; From the perspective of feedback control, the feedforward control function performs rough adjustment on the main disturbance in time, which greatly reduces the burden of feedback control.
  • the pan/tilt and related devices include: a roll axis motor 1, a pitch axis (pitch axis) motor 2, a yaw axis (yaw axis) motor 3, a pan/tilt base 4, and a fixing mechanism for a photographing device (Inertially including inertial measurement elements) 5 , photographing device 6 .
  • the gimbal uses the inertial measurement element as the feedback device and the motor as the output element to form a closed-loop control system.
  • the control amount is the attitude of the gimbal (that is, the angle of rotation of the three motors), that is, given a target attitude (that is, the respective target angles of the three motors at time t), the measured attitude is achieved through feedback control to achieve the target attitude.
  • the movement of the gimbal is controlled for shooting, and the method further includes: acquiring shooting information of the shooting function input by the user, the shooting information of the shooting function and the multiple track points of the gimbal input by the user corresponds to the reference pose.
  • the shooting information of the shooting function may be information related to shooting requirements corresponding to the shooting function.
  • the shooting information of the shooting function input by the user may be the shooting function input by the user and the information related to the shooting requirement corresponding to the shooting function.
  • the shooting function selected by the user can be determined on the one hand, and the shooting function selected by the user can be determined on the other hand.
  • information related to the shooting requirements of the user corresponding to the shooting function can be determined.
  • Track recording may refer to presetting the movement track of the pan/tilt, controlling the pan/tilt to move according to the preset movement track, and controlling the photographing device to shoot while the pan/tilt moves according to the set movement track.
  • the track delay may be to preset the movement track of the gimbal, control the gimbal to move according to the preset movement track, and perform time-lapse shooting according to the preset track during the process of the gimbal moving according to the set movement track.
  • FIG. 8 is a schematic diagram of an interface of setting track information in the track delay by the pan-tilt control method of the present application
  • FIG. 9 is a schematic diagram of an interface of setting the track information in the track recording by the pan-tilt control method of the present application.
  • the track point information of each track point can be set, including the number of track points, the three-dimensional attitude information of each track point, and the first track segment of each segment. The movement time of , and the dwell time of each trajectory point.
  • the method further includes: in the process of controlling the pan/tilt to move along the motion track according to the planned speed, controlling the shooting device on the pan/tilt according to the shooting information of the shooting function input by the user to shoot.
  • the gimbal is controlled to move along the motion trajectory according to the planned speed, and at the same time, the shooting device on the gimbal is controlled to shoot according to the shooting requirements set by the user, which can give users a different shooting experience.
  • the embodiment of the present application can make the gimbal
  • the entire movement of the motor in each direction from the start track point to the end track point is relatively smooth and smooth, and there will be no drastic changes and vibrations. It is smooth, without drastic changes and vibrations, and the pictures taken are ideal.
  • the photographing device may be mounted on the platform. That is, the shooting device and the gimbal are two independent devices.
  • the PTZ includes a PTZ shooting device, that is, the PTZ integrated shooting device is a PTZ shooting device.
  • trajectory curve s(t) be a function of time t, and the user sets a total of n+1 trajectory points, which are respectively denoted as q 0 , q 1 ,...,q n , then the trajectory curve has n segments of the first trajectory segment,
  • the trajectory function of the first trajectory segment is denoted as q k (t), as shown in FIG. 10 .
  • the initial velocity of the known trajectory curve is v 0 and the final velocity v n .
  • the trajectory parameters a k,0 , ak,1 , ak,2 , ak,3 can pass through the starting position q k of this segment and the ending position q k+ 1 , the starting speed v k and the ending speed v k+1 are represented.
  • step c Simplify the first trajectory segment of n segments as in step c to obtain the matrix pattern:
  • trajectory information input by the user the three-dimensional attitude information of each trajectory point (which can be target angle information in three directions), the stay time of each trajectory point, and the movement time of each first trajectory segment.
  • the user inputs the trajectory points of the motor in three directions, which are divided into three separate degrees of freedom for processing, that is, the trajectory curves S 1 (t), S 2 (t), and S 3 (t) need to be solved in three directions. .
  • the second trajectory segment S 1,2 (t) of each trajectory point corresponds to the second trajectory segment S 1,3 (t) of the 6th and 7th trajectory points; the trajectory curve of the other two degrees of freedom (ie directions) S 2 (t), S 3 (t) perform the same operations as S 1 (t)).
  • the trajectory recording or trajectory delay runs in real time, and the target position outputs S 1 (t), S 2 (t), and S 3 (t) of the three degrees of freedom are obtained respectively through the running time t.
  • the trajectory curve of the embodiment of the present application is continuous in position, speed and acceleration, and the connection of the first trajectory segment of each segment is considered, so that the generated trajectory curve is very smooth, and the trajectory recording or trajectory delay shooting pictures such as It is better, the captured picture has no sense of sudden change, and it is smooth and natural.
  • FIG. 11 is a schematic structural diagram of an embodiment of a pan-tilt control device of the present application. It should be noted that the pan-tilt control device of this embodiment can execute the steps in the above-mentioned pan-tilt control method. Please refer to the above-mentioned PTZ control method, which will not be repeated here.
  • the apparatus 100 is connected to the PTZ in communication, and the apparatus 100 includes: a memory 1 and a processor 2; the processor 2 and the memory 1 are connected through a bus.
  • the processor 2 may be a microcontroller unit, a central processing unit or a digital signal processor, and so on.
  • the memory 1 may be a Flash chip, a read-only memory, a magnetic disk, an optical disk, a U disk, a mobile hard disk, and the like.
  • the memory 1 is used to store a computer program; the processor 2 is used to execute the computer program and implement the following steps when executing the computer program:
  • the reference poses of the multiple track points are used to define the motion track of the gimbal, and the multiple track points include the one where the dwell time of the gimbal is zero.
  • the processor when executing the computer program, implements the following steps: planning the speed of the movement of the pan/tilt head along the target trajectory segment in the motion trajectory, so that the target trajectory segment is at the connecting trajectory point
  • the velocity and acceleration are both continuous.
  • the processor when executing the computer program, implements the following steps: planning the speed of the pan/tilt head moving along the motion track through a track function, so that the speed of the target track segment at the connection track point and acceleration are continuous.
  • the processor when executing the computer program, implements the following steps: according to the non-connected trajectory points whose dwell time is not zero, split the motion trajectory of the gimbal according to the arrival order of the trajectory points, and obtain the corresponding A plurality of second trajectory segments of the motor in the direction of the motor, the starting speed and the ending speed of each second trajectory segment are zero, and include one or more first trajectory segments, and the pan/tilt includes N corresponding to N directions
  • the first trajectory segment includes a trajectory segment between two adjacent trajectory points that arrive in succession; through the trajectory function, the velocity and the velocity of the target trajectory segment in the second trajectory segment at the connecting trajectory point and
  • the acceleration is equal to obtain the velocity of each trajectory point, the target trajectory segment includes the first first trajectory segment and the first trajectory after the first trajectory, the end trajectory point of the first trajectory segment includes the connecting trajectory point, the trajectory point after the
  • the starting trajectory point of a trajectory segment includes the connecting trajectory point; according to the speed of each trajectory point, the expression of the trajectory parameter corresponding to each first trajectory segment of the motor
  • the number of the directions includes three mutually perpendicular directions.
  • the processor when executing the computer program, implements the following steps: according to the trajectory function and the trajectory parameters corresponding to each first trajectory segment, determine the target position of the motor corresponding to the three directions at the running time t , the target position includes the target Euler angle; the target Euler angle of the motor corresponding to the three directions at the running time t is converted into the target attitude quaternion of the motor corresponding to the three directions at the running time t; The target attitude quaternion of the motor corresponding to the three directions at time t controls the motion of the three-axis motor of the gimbal.
  • the processor when executing the computer program, implements the following steps: according to the trajectory function and the trajectory parameters corresponding to each first trajectory segment, determine the target position of the motor corresponding to each direction at the running time t ; According to the target position of the motor corresponding to each direction at the running time t, control the motor movement corresponding to each direction of the pan/tilt, so that the motor corresponding to each direction after the movement reaches the said running time t target location.
  • the processor when executing the computer program, implements the following steps: according to the trajectory function and the trajectory parameters corresponding to each first trajectory segment, determine the target position and target of the motor corresponding to each direction at the running time t speed.
  • the processor executes the computer program, the following steps are implemented: according to the target speed of the motor corresponding to each direction at the running time t, the motion of the motor corresponding to each direction of the pan/tilt is performed in advance Feedback control; according to the target position of the motor corresponding to each direction at the running time t, feedback control is performed on the movement of the motor corresponding to each direction of the pan/tilt.
  • the trajectory function includes a polynomial function of more than three times.
  • the trajectory function includes a cubic function.
  • the trajectory function includes a Bezier curve function.
  • the processor when executing the computer program, implements the following steps: acquiring the shooting information of the shooting function input by the user, and the shooting information of the shooting function corresponds to the trajectory information input by the user.
  • the processor when executing the computer program, implements the following steps: in the process of controlling the pan/tilt head to move along the motion trajectory according to the planned speed, according to the shooting information of the shooting function input by the user , and control the shooting device on the PTZ to shoot.
  • the photographing device is mounted on the pan/tilt.
  • the pan/tilt includes a pan/tilt photographing device.
  • the shooting function includes track recording or track delay.
  • the device further includes a communication circuit, and when the processor executes the computer program, the processor implements the following steps: controlling the communication circuit to receive a reference sent by the mobile terminal for multiple trajectory points of the pan/tilt head input by the user attitude.
  • the present application further provides a pan-tilt head, the pan-tilt head comprising the pan-tilt-tilt control device according to any one of the above.
  • the pan-tilt head comprising the pan-tilt-tilt control device according to any one of the above.
  • PTZ control device for a detailed description of the related content, please refer to the above-mentioned PTZ control device, which will not be repeated here.
  • the present application also provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor enables the processor to implement the pan-tilt control method described in any one of the above .
  • the relevant content please refer to the above-mentioned relevant content section, which will not be repeated here.
  • the computer-readable storage medium may be an internal storage unit of the above-mentioned PTZ control device, such as a hard disk or a memory.
  • the computer-readable storage medium may also be an external storage device, such as an equipped plug-in hard disk, smart memory card, secure digital card, flash memory card, and the like.

Landscapes

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

Abstract

A gimbal control method and apparatus, a gimbal, and a storage medium. The method comprises: acquiring a reference attitude of a plurality of trajectory points of a gimbal input by a user, the reference attitude of a plurality of trajectory points being used for defining a motion trajectory of the gimbal, and the plurality of trajectory points comprising a connection trajectory point at which the stay time of the gimbal is zero (S101); planning the speed of motion of the gimbal along a target trajectory segment in the motion trajectory so that the target trajectory segment is continuous in terms of speed at the connection trajectory point, the target trajectory segment comprising the connection trajectory point (S102); and controlling, according to the planned speed, the gimbal to move along the motion trajectory (S103).

Description

云台控制方法、装置、云台及存储介质PTZ control method, device, PTZ and storage medium 技术领域technical field
本申请涉及云台技术领域,尤其涉及一种云台控制方法、装置、云台及存储介质。The present application relates to the field of PTZ technology, and in particular, to a PTZ control method, device, PTZ and storage medium.
背景技术Background technique
轨迹录像和轨迹延时是手持云台常用的拍摄功能,预先设定轨迹信息,然后云台自动地进行拍摄。Track recording and track delay are the common shooting functions of the handheld gimbal. The track information is preset, and then the gimbal automatically shoots.
目前轨迹录像和轨迹延时,预先规划生成的轨迹多采用线性插值的方法或者T型或者S型曲线的方法。线性插值的方法只保证轨迹段上位置的连续性,轨迹段上速度和加速度不连续,速度和加速度存在突变,导致轨迹并不平滑,实际拍摄过程中画面剧烈变化和震动,拍摄出来的画面不够流畅和顺滑。T型或者S型曲线的方法,保证每段轨迹段上位置、速度和加速度的连续性,但未考虑停留时间为0的衔接轨迹点的前后相邻两个轨迹段在衔接轨迹点处的速度和加速度的连续性问题,实际拍摄出的画面不理想。At present, the trajectory recording and trajectory delay, the trajectory generated by pre-planning mostly adopts the method of linear interpolation or the method of T-shaped or S-shaped curve. The linear interpolation method only guarantees the continuity of the position on the trajectory segment, the velocity and acceleration on the trajectory segment are discontinuous, and there is a sudden change in the velocity and acceleration, resulting in an unsmooth trajectory. Smooth and smooth. The method of T-shaped or S-shaped curve ensures the continuity of position, velocity and acceleration on each trajectory segment, but does not consider the velocity of the two adjacent trajectory segments before and after the joining trajectory point with a dwell time of 0 at the joining trajectory point And the continuity of acceleration, the actual picture is not ideal.
发明内容SUMMARY OF THE INVENTION
基于此,本申请提供一种云台控制方法、装置、云台及存储介质。Based on this, the present application provides a pan-tilt control method, device, pan-tilt and storage medium.
第一方面,本申请提供了一种云台控制方法,所述方法包括:In a first aspect, the present application provides a PTZ control method, the method includes:
获取用户输入的云台的多个轨迹点的参考姿态,所述多个轨迹点的参考姿态用于限定所述云台的运动轨迹,所述多个轨迹点包括云台的停留时间为零的衔接轨迹点;Obtain the reference poses of multiple track points of the gimbal entered by the user, the reference poses of the multiple track points are used to define the motion track of the gimbal, and the multiple track points include the one where the dwell time of the gimbal is zero. connecting track points;
对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度连续,所述目标轨迹段包括所述衔接轨迹点;planning the speed of the movement of the pan/tilt head along the target trajectory segment in the motion trajectory, so that the speed of the target trajectory segment at the connection trajectory point is continuous, and the target trajectory segment includes the connection trajectory point;
按照规划后的速度,控制所述云台沿所述运动轨迹运动。According to the planned speed, the PTZ is controlled to move along the movement track.
第二方面,本申请提供了一种云台控制装置,所述装置与云台通信连接,所述装置包括:存储器和处理器;In a second aspect, the present application provides a pan-tilt control device, the device is communicatively connected to the pan-tilt, and the device includes: a memory and a processor;
所述存储器用于存储计算机程序;the memory is used to store computer programs;
所述处理器用于执行所述计算机程序并在执行所述计算机程序时,实现如下步骤:The processor is configured to execute the computer program and implement the following steps when executing the computer program:
获取用户输入的云台的多个轨迹点的参考姿态,所述多个轨迹点的参考姿态用于限定所述云台的运动轨迹,所述多个轨迹点包括云台的停留时间为零的衔接轨迹点;Obtain the reference poses of multiple track points of the gimbal entered by the user, the reference poses of the multiple track points are used to define the motion track of the gimbal, and the multiple track points include the one where the dwell time of the gimbal is zero. connecting track points;
对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度连续,所述目标轨迹段包括所述衔接轨迹点;planning the speed of the movement of the pan/tilt head along the target trajectory segment in the motion trajectory, so that the speed of the target trajectory segment at the connection trajectory point is continuous, and the target trajectory segment includes the connection trajectory point;
按照规划后的速度,控制所述云台沿所述运动轨迹运动。According to the planned speed, the PTZ is controlled to move along the movement track.
第三方面,本申请提供了一种云台,所述云台包括如上所述的云台控制装置。In a third aspect, the present application provides a pan-tilt head, the pan-tilt head comprising the above-mentioned pan-tilt-tilt control device.
第四方面,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如上所述的云台控制方法。In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the above-mentioned PTZ control method.
本申请实施例提供了一种云台控制方法、装置、云台及存储介质,获取用户输入的云台的多个轨迹点的参考姿态,所述多个轨迹点的参考姿态用于限定所述云台的运动轨迹,所述多个轨迹点包括云台的停留时间为零的衔接轨迹点;对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度连续,所述目标轨迹段包括所述衔接轨迹点;按照规划后的速度,控制所述云台沿所述运动轨迹运动。由于目标轨迹段包括云台的停留时间为零的衔接轨迹点,对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度连续,按照规划后的速度,控制所述云台沿所述运动轨迹运动,通过这种方式,能够使云台在目标轨迹段的所述衔接轨迹点处的速度连续,使云台从起始轨迹点到终止轨迹点之间的整个运动比较流畅、顺滑,不会出现剧烈变化和震动,这能够使云台上拍摄装置实际拍摄出的画面比较流畅、顺滑,不会出现剧烈变化和震动, 拍摄出的画面比较理想。Embodiments of the present application provide a pan-tilt control method, device, pan-tilt, and storage medium, for obtaining reference poses of multiple track points of the pan-tilt input by a user, and the reference poses of the multiple track points are used to define the The movement track of the gimbal, the multiple track points include the connecting track points where the dwell time of the gimbal is zero; The speed at the connection trajectory point is continuous, and the target trajectory segment includes the connection trajectory point; according to the planned speed, the gimbal is controlled to move along the motion trajectory. Since the target trajectory segment includes the connecting trajectory points where the dwell time of the gimbal is zero, the speed at which the gimbal moves along the target trajectory segment in the motion trajectory is planned, so that the target trajectory segment at the connecting trajectory point is The speed is continuous. According to the planned speed, the gimbal is controlled to move along the motion trajectory. In this way, the speed of the gimbal at the connecting trajectory point of the target trajectory segment can be made continuous, so that the gimbal starts from the The entire movement between the start track point and the end track point is relatively smooth and smooth, and there will be no drastic changes and vibrations, which can make the actual picture captured by the camera on the gimbal more smooth and smooth, without drastic changes. and vibration, the picture taken is ideal.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not limiting of the present application.
附图说明Description of drawings
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. For those of ordinary skill, other drawings can also be obtained from these drawings without any creative effort.
图1是本申请云台控制方法一实施例的流程示意图;1 is a schematic flowchart of an embodiment of a pan-tilt control method of the present application;
图2是本申请云台控制方法另一实施例的流程示意图;2 is a schematic flowchart of another embodiment of a pan-tilt control method of the present application;
图3是本申请云台控制方法又一实施例的流程示意图;3 is a schematic flowchart of another embodiment of a pan-tilt control method of the present application;
图4是本申请云台控制方法又一实施例的流程示意图;4 is a schematic flowchart of another embodiment of a pan-tilt control method of the present application;
图5是本申请云台控制方法又一实施例的流程示意图;5 is a schematic flowchart of another embodiment of a pan-tilt control method of the present application;
图6是本申请云台控制方法中云台及相关装置一实施例的结构示意图;6 is a schematic structural diagram of an embodiment of a PTZ and related devices in the PTZ control method of the present application;
图7是图6的云台及相关装置一实施例的控制过程示意图;FIG. 7 is a schematic diagram of a control process of an embodiment of the pan/tilt head and related device of FIG. 6;
图8是本申请云台控制方法在轨迹延时中设置轨迹信息的一界面示意图;8 is a schematic diagram of an interface for setting track information in the track delay in the PTZ control method of the present application;
图9是本申请云台控制方法在轨迹录像中设置轨迹信息的一界面示意图;9 is a schematic diagram of an interface for setting track information in track recording by the PTZ control method of the present application;
图10是本申请云台控制方法中轨迹曲线和轨迹规划一实施例的示意图;10 is a schematic diagram of an embodiment of a trajectory curve and trajectory planning in the PTZ control method of the present application;
图11是本申请云台控制装置一实施例的结构示意图。FIG. 11 is a schematic structural diagram of an embodiment of a pan-tilt control device of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flowcharts shown in the figures are for illustration only, and do not necessarily include all contents and operations/steps, nor do they have to be performed in the order described. For example, some operations/steps can also be decomposed, combined or partially combined, so the actual execution order may be changed according to the actual situation.
目前轨迹录像和轨迹延时,预先规划生成的轨迹多采用线性插值的方法或者T型或者S型曲线的方法。线性插值的方法只保证轨迹段上位置的连续性,轨迹段上速度和加速度存在突变,轨迹不平滑,拍摄过程中画面剧烈变化和震动,拍摄出来的画面不够流畅和顺滑。T型或者S型曲线的方法,未考虑停留时间为0的衔接轨迹点的前后相邻两个轨迹段在衔接轨迹点处的速度和加速度的连续性问题,实际拍摄出的画面不理想。At present, the trajectory recording and trajectory delay, the trajectory generated by pre-planning mostly adopts the method of linear interpolation or the method of T-shaped or S-shaped curve. The linear interpolation method only ensures the continuity of the position on the trajectory segment. There are sudden changes in the speed and acceleration on the trajectory segment, the trajectory is not smooth, and the picture changes and vibrates violently during the shooting process, and the captured picture is not smooth and smooth. The T-shaped or S-shaped curve method does not consider the continuity of the velocity and acceleration of the two adjacent track segments before and after the connecting track point where the dwell time is 0, and the actual picture is not ideal.
本申请实施例提供了一种云台控制方法、装置、云台及存储介质,获取用户输入的云台的多个轨迹点的参考姿态,所述多个轨迹点的参考姿态用于限定所述云台的运动轨迹,所述多个轨迹点包括云台的停留时间为零的衔接轨迹点;对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度连续,所述目标轨迹段包括所述衔接轨迹点;按照规划后的速度,控制所述云台沿所述运动轨迹运动。由于目标轨迹段包括云台的停留时间为零的衔接轨迹点,对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度连续,按照规划后的速度,控制所述云台沿所述运动轨迹运动,通过这种方式,能够使云台在目标轨迹段的所述衔接轨迹点处的速度连续,使云台从起始轨迹点到终止轨迹点之间的整个运动比较流畅、顺滑,不会出现剧烈变化和震动,这能够使云台上拍摄装置实际拍摄出的画面比较流畅、顺滑,不会出现剧烈变化和震动,拍摄出的画面比较理想。Embodiments of the present application provide a pan-tilt control method, device, pan-tilt, and storage medium, for obtaining reference poses of multiple track points of the pan-tilt input by a user, and the reference poses of the multiple track points are used to define the The movement track of the gimbal, the multiple track points include the connecting track points where the dwell time of the gimbal is zero; The speed at the connection trajectory point is continuous, and the target trajectory segment includes the connection trajectory point; according to the planned speed, the gimbal is controlled to move along the motion trajectory. Since the target trajectory segment includes the connecting trajectory points where the dwell time of the gimbal is zero, the speed at which the gimbal moves along the target trajectory segment in the motion trajectory is planned, so that the target trajectory segment at the connecting trajectory point is The speed is continuous. According to the planned speed, the gimbal is controlled to move along the motion trajectory. In this way, the speed of the gimbal at the connecting trajectory point of the target trajectory segment can be made continuous, so that the gimbal starts from the The entire movement between the start track point and the end track point is relatively smooth and smooth, and there will be no drastic changes and vibrations, which can make the actual picture captured by the camera on the gimbal more smooth and smooth, without drastic changes. And vibration, the picture taken is ideal.
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and features in the embodiments may be combined with each other without conflict.
参见图1,图1是本申请云台控制方法一实施例的流程示意图,所述方法包括:Referring to FIG. 1, FIG. 1 is a schematic flowchart of an embodiment of a pan-tilt control method of the present application. The method includes:
步骤S101:获取用户输入的云台的多个轨迹点的参考姿态,所述多个轨迹点的参考姿态用于限定所述云台的运动轨迹,所述多个轨迹点包括云台的停留时间为零的衔接轨迹点。Step S101: Obtain the reference postures of multiple trajectory points of the gimbal input by the user, the reference postures of the multiple trajectory points are used to define the motion trajectory of the gimbal, and the multiple trajectory points include the dwell time of the gimbal The zero-joint trajectory point.
轨迹点可以是用户输入的、要求云台需要到达的指定位置;轨迹点的参考姿态可以是用户输入的、要求云台到达指定位置的指定姿态。多个轨迹点的参考姿态能够用于限定所述云台的运动轨迹,用户输入的轨迹点的相关信息还可 以包括:轨迹点的个数、多个轨迹点的到达顺序、云台在相邻两个轨迹点之间运动的时间、云台在每个轨迹点停留的时间,等等。其中所述多个轨迹点包括云台的停留时间为零的衔接轨迹点,即云台在衔接轨迹点不停留。The trajectory point can be a specified position input by the user and required to be reached by the gimbal; the reference attitude of the trajectory point can be a designated posture input by the user and required to reach the specified position. The reference attitudes of the multiple track points can be used to define the motion track of the gimbal, and the relevant information of the track points input by the user may also include: the number of track points, the arrival sequence of the multiple track points, the position of the gimbal in the adjacent Time to move between two track points, how long the gimbal stays at each track point, etc. Wherein, the plurality of track points include the connecting track points where the dwell time of the gimbal is zero, that is, the gimbal does not stay at the connecting track points.
云台通常由多个电机驱动,分别对应多个方向,每个方向的电机驱动与之连接的轴臂旋转,云台的运动轨迹可以拆分对应多个方向多个电机的运动轨迹,也就是说,云台的位置和姿态可以通过这多个电机的运动轨迹共同决定。The gimbal is usually driven by multiple motors, corresponding to multiple directions. The motor in each direction drives the shaft arm connected to it to rotate. It is said that the position and attitude of the gimbal can be jointly determined by the motion trajectories of these multiple motors.
获取用户输入的云台的多个轨迹点的参考姿态的方式可以是,用户直接在云台上输入云台的多个轨迹点的参考姿态。由于云台上输入设备的输入功能有限,用户使用起来不太方便,在一实施例中,可以通过移动终端输入云台的多个轨迹点的参考姿态,然后发送给云台控制装置,即步骤S101,所述获取用户输入的云台的多个轨迹点的参考姿态,可以包括:接收移动终端发送的所述用户输入的云台的多个轨迹点的参考姿态。The manner of acquiring the reference poses of the multiple track points of the gimbal entered by the user may be that the user directly inputs the reference poses of the multiple track points of the gimbal on the gimbal. Since the input function of the input device on the PTZ is limited, it is not very convenient for the user to use. In one embodiment, the reference attitudes of multiple track points of the PTZ can be input through the mobile terminal, and then sent to the PTZ control device, that is, the steps S101, the acquiring the reference pose of the multiple track points of the pan/tilt head input by the user may include: receiving the reference pose of the multiple track points of the pan/tilt head input by the user and sent by the mobile terminal.
步骤S102:对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度连续,所述目标轨迹段包括所述衔接轨迹点。Step S102: Plan the speed of the movement of the pan/tilt head along the target trajectory segment in the motion trajectory, so that the speed of the target trajectory segment at the connection trajectory point is continuous, and the target trajectory segment includes the connection trajectory point .
步骤S103:按照规划后的速度,控制所述云台沿所述运动轨迹运动。Step S103: Control the pan/tilt to move along the motion track according to the planned speed.
连续可以是指不发生突变或跳变(突变或跳变可以是中间没有缓冲,突然变大,或突然变小,或者突然变为零;运动的速度突变或跳变会使云台的运动不流畅、不顺滑),连续包括不发生变化或者发生渐进的变化(逐渐的变大或者逐渐的变小)。速度连续可以是速度不发生突变或跳变,不发生变化或者发生渐进的变化。Continuous can mean that no sudden change or jump occurs (the sudden change or jump can mean that there is no buffer in the middle, suddenly becomes larger, or suddenly becomes smaller, or suddenly becomes zero; the sudden change or jump in the speed of the movement will make the movement of the gimbal not stable. smooth, non-smooth), continuous includes no change or gradual change (gradually larger or gradually smaller). Velocity continuity can mean that the velocity does not undergo sudden changes or jumps, does not change, or changes gradually.
在所述衔接轨迹点处的速度连续可以是指在所述衔接轨迹点处的速度不发生突变或跳变,不发生变化或者发生渐进的变化。速度连续能够使云台的运动流畅、顺滑。The velocity continuous at the engagement trajectory point may mean that the velocity at the engagement trajectory point does not abruptly or jumps, does not change, or undergoes a gradual change. The continuous speed can make the movement of the gimbal smooth and smooth.
步骤S102具体的实现方式很多,包括但不限于:可以将衔接轨迹点前后相邻的轨迹段分别规划,只是后面的轨迹段的起始速度可以等于前面轨迹段的结束速度,或者只是后面的轨迹段的起始速度可以稍微小于前面轨迹段的结束速度,或者只是后面的轨迹段的起始速度可以稍微大于前面轨迹段的结束速度;又如:可以将衔接轨迹点前后相邻的轨迹段结合在一起规划,即可以将衔接轨 迹点前后相邻的轨迹段作为一个整体进行规划;等等。There are many specific implementation modes of step S102, including but not limited to: the adjacent trajectory segments before and after the connecting trajectory point can be planned separately, but the starting speed of the following trajectory segment can be equal to the ending speed of the previous trajectory segment, or only the following trajectory. The starting speed of the segment can be slightly lower than the ending speed of the preceding track segment, or only the starting speed of the following track segment can be slightly greater than the ending speed of the preceding track segment; another example: the adjacent track segments before and after the connecting track point can be combined Planning together, that is, the adjacent trajectory segments before and after the connecting trajectory point can be planned as a whole; and so on.
例如:云台的轨迹点的个数是5个,轨迹点的到达顺序是轨迹点1、轨迹点2、轨迹点3、轨迹点4以及轨迹点5,轨迹段依次分别为:轨迹点1和轨迹点2之间的轨迹段、轨迹点2和轨迹点3之间的轨迹段、轨迹点3和轨迹点4之间的轨迹段、轨迹点4和轨迹点5之间的轨迹段。假如轨迹点3为衔接轨迹点,云台在轨迹点3的停留时间为零。轨迹点2和轨迹点3之间的轨迹段、轨迹点3和轨迹点4之间的轨迹段,均为目标轨迹段。或者,可以分别规划轨迹点2和轨迹点3之间的轨迹段、轨迹点3和轨迹点4之间的轨迹段,在规划速度的时候,注意两个轨迹段在轨迹点3处的衔接,使轨迹点3处的速度连续。或者,可以将轨迹点2和轨迹点3之间的轨迹段、轨迹点3和轨迹点4之间的轨迹段作为一个整体规划,即使轨迹点2、轨迹点3以及轨迹点4共同限定运动轨迹,将轨迹点2、轨迹点3以及轨迹点4作为一个连续的轨迹段,此时轨迹段3处的速度连续。For example: the number of trajectory points of the gimbal is 5, the arrival order of the trajectory points is trajectory point 1, trajectory point 2, trajectory point 3, trajectory point 4 and trajectory point 5, and the trajectory segments are respectively: trajectory point 1 and trajectory point 5. Track segment between track point 2, track segment between track point 2 and track point 3, track segment between track point 3 and track point 4, track segment between track point 4 and track point 5. If the track point 3 is the connecting track point, the dwell time of the gimbal at the track point 3 is zero. The trajectory segment between the trajectory point 2 and the trajectory point 3 and the trajectory segment between the trajectory point 3 and the trajectory point 4 are all target trajectory segments. Alternatively, you can plan the trajectory segment between trajectory point 2 and trajectory point 3, and the trajectory segment between trajectory point 3 and trajectory point 4, respectively. When planning the speed, pay attention to the connection of the two trajectory segments at trajectory point 3. Make the velocity at trajectory point 3 continuous. Alternatively, the trajectory segment between the trajectory point 2 and the trajectory point 3, and the trajectory segment between the trajectory point 3 and the trajectory point 4 can be planned as a whole, even if the trajectory point 2, the trajectory point 3 and the trajectory point 4 jointly define the motion trajectory , take the trajectory point 2, the trajectory point 3 and the trajectory point 4 as a continuous trajectory segment, and the velocity at the trajectory segment 3 is continuous at this time.
用户在指定云台需要到达的轨迹点,通常是需要云台在该轨迹点停留,因此,通常情况下云台是在每相邻两个轨迹点之间的轨迹段内运动,云台的运动轨迹通常由多段这样的轨迹段组成的。对于用户指定云台需要到达的、不需要云台停留的衔接轨迹点,由于云台不需要在衔接轨迹点停留,对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度连续,通过这种方式,能够保证后续按照规划后的速度,控制所述云台沿所述运动轨迹运动时,云台在目标轨迹段的所述衔接轨迹点处的速度连续,使云台从起始轨迹点到终止轨迹点之间的整个运动轨迹比较流畅、顺滑,不会出现剧烈变化和震动,这能够使云台上拍摄装置实际拍摄出的画面比较流畅、顺滑,不会出现剧烈变化和震动,拍摄出的画面比较理想。When the user specifies the track point that the gimbal needs to reach, the gimbal usually needs to stay at the track point. Therefore, under normal circumstances, the gimbal moves in the track segment between every two adjacent track points. The movement of the gimbal A trajectory is usually composed of multiple such trajectory segments. For the connection track points that the user specifies that the gimbal needs to reach and does not need the gimbal to stay, since the gimbal does not need to stay at the connecting track point, the speed of the gimbal moving along the target track segment in the motion track is planned, so that the The speed of the target trajectory segment at the connecting trajectory point is continuous. In this way, it can be ensured that when the PTZ is controlled to move along the motion trajectory according to the planned speed, the PTZ will move at the target trajectory segment. The speed at the connecting track points is continuous, so that the entire motion track of the gimbal from the starting track point to the ending track point is relatively smooth and smooth, without violent changes and vibrations, which can make the shooting device on the gimbal relatively smooth. The actual picture is relatively smooth and smooth, without drastic changes and vibrations, and the picture taken is ideal.
本申请实施例获取用户输入的云台的多个轨迹点的参考姿态,所述多个轨迹点的参考姿态用于限定所述云台的运动轨迹,所述多个轨迹点包括云台的停留时间为零的衔接轨迹点;对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度连续,所述目标轨迹段包括所述衔接轨迹点;按照规划后的速度,控制所述云台沿所述运动轨迹运动。由于目标轨迹段包括云台的停留时间为零的衔接轨迹点,对云台沿所述运 动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度连续,按照规划后的速度,控制所述云台沿所述运动轨迹运动,通过这种方式,能够使云台在目标轨迹段的所述衔接轨迹点处的速度连续,使云台从起始轨迹点到终止轨迹点之间的整个运动比较流畅、顺滑,不会出现剧烈变化和震动,这能够使云台上拍摄装置实际拍摄出的画面比较流畅、顺滑,不会出现剧烈变化和震动,拍摄出的画面比较理想。This embodiment of the present application acquires the reference poses of multiple track points of the gimbal entered by the user, the reference poses of the multiple track points are used to define the motion track of the gimbal, and the multiple track points include the stop of the gimbal The time-zero connection trajectory point; the speed of the pan/tilt moving along the target trajectory segment in the motion trajectory is planned, so that the speed of the target trajectory segment at the connection trajectory point is continuous, and the target trajectory segment includes The connecting track point; according to the planned speed, the gimbal is controlled to move along the motion track. Since the target trajectory segment includes the connecting trajectory points where the dwell time of the gimbal is zero, the speed at which the gimbal moves along the target trajectory segment in the motion trajectory is planned, so that the target trajectory segment at the connecting trajectory point is The speed is continuous. According to the planned speed, the gimbal is controlled to move along the motion trajectory. In this way, the speed of the gimbal at the connecting trajectory point of the target trajectory segment can be made continuous, so that the gimbal starts from the The entire movement between the start track point and the end track point is relatively smooth and smooth, and there will be no drastic changes and vibrations, which can make the actual picture captured by the camera on the gimbal more smooth and smooth, without drastic changes. And vibration, the picture taken is ideal.
下面详细说明步骤S102的细节内容。The details of step S102 will be described in detail below.
在一实施例中,衔接轨迹点处,除了速度连续,加速度也连续,即步骤S102,所述对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度连续,可以包括:对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度和加速度均连续。In one embodiment, at the connecting track point, in addition to the continuous speed, the acceleration is also continuous, that is, in step S102, the speed of the gimbal moving along the target track segment in the motion track is planned, so that the target track segment is moved. The speed at the connecting track point is continuous, which may include: planning the speed of the pan/tilt head moving along the target track segment in the motion track, so that the speed and acceleration of the target track segment at the connecting track point are are continuous.
由于在衔接轨迹点处加速度也连续,这更加能够保证在衔接轨迹点处速度的连续性,从而更加能够保证云台在目标轨迹段的衔接轨迹点处的速度连续,在目标轨迹段的运动轨迹的流畅、顺滑,不会出现剧烈变化和震动,从而能够使云台上拍摄装置实际拍摄出的画面比较流畅、顺滑,不会出现剧烈变化和震动,拍摄出的画面比较理想。Since the acceleration is also continuous at the connecting trajectory point, this can further ensure the continuity of the velocity at the connecting trajectory point, thus further ensuring that the speed of the gimbal at the connecting trajectory point of the target trajectory segment is continuous, and the motion trajectory of the target trajectory segment is It is smooth and smooth, and there will be no drastic changes and vibrations, so that the actual picture captured by the shooting device on the gimbal can be relatively smooth and smooth, without drastic changes and vibrations, and the captured picture is ideal.
其中,当将衔接轨迹点前后相邻的轨迹段结合在一起规划的时候,可以采用轨迹函数对速度进行规划,这样能够较为简单便利地可以实现衔接轨迹点处速度和加速度均连续。Among them, when the adjacent trajectory segments before and after the connection trajectory point are combined together for planning, the trajectory function can be used to plan the velocity, which can easily and conveniently realize that both the velocity and the acceleration at the connection trajectory point are continuous.
在一实施例中,将云台的运动轨迹作为一个整体,将多个轨迹段作为一个整体,多个轨迹段相互衔接起来,采用轨迹函数对速度进行规划,即步骤S102,所述对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度和加速度均连续,包括:通过轨迹函数对云台沿所述运动轨迹运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度和加速度均连续。In an embodiment, the motion trajectory of the gimbal is taken as a whole, and multiple trajectory segments are taken as a whole, and the multiple trajectory segments are connected to each other, and the trajectory function is used to plan the speed, that is, step S102, the described pairing of the gimbal is performed. Planning along the speed of the target trajectory segment in the motion trajectory so that the speed and acceleration of the target trajectory segment at the connecting trajectory point are both continuous, including: moving the pan/tilt along the motion trajectory through a trajectory function The velocity and acceleration of the target trajectory segment at the connecting trajectory point are both continuous.
由于将云台的运动轨迹作为一个整体,将运动轨迹中多个轨迹段作为一个整体,将多个轨迹段相互衔接起来,在满足使所述目标轨迹段在所述衔接轨迹点处的速度和加速度均连续的情况下,还能够使云台在整个的运动轨迹中的速 度的变化非常流畅、顺滑,使云台在整个的运动轨迹中的速度不会出现剧烈变化和震动。Since the motion trajectory of the gimbal is taken as a whole, the multiple trajectory segments in the motion trajectory are taken as a whole, and the multiple trajectory segments are connected to each other. When the acceleration is continuous, it can also make the speed change of the gimbal in the entire movement trajectory very smooth and smooth, so that the speed of the gimbal in the entire movement trajectory will not change drastically and vibrate.
轨迹函数是预先设置的、至少能够使目标轨迹段的速度和加速度均连续的函数。在一实施例中,轨迹函数还可以是与算力匹配的轨迹函数。The trajectory function is a preset function that can at least make the velocity and acceleration of the target trajectory segment continuous. In one embodiment, the trajectory function may also be a trajectory function matched with computing power.
轨迹函数的轨迹参数是未知的,可以根据用户输入的多个轨迹点的相关信息,求得这些轨迹段的轨迹参数。The trajectory parameters of the trajectory function are unknown, and the trajectory parameters of these trajectory segments can be obtained according to the relevant information of multiple trajectory points input by the user.
在一实施例中,所述轨迹函数包括三次以上的多项式函数,例如:三次函数、四次函数、五次函数,等等。多项式函数形式较为简单,计算量适中,三次以上的多项式函数能够保证运动参数是连续的。In one embodiment, the trajectory function includes a polynomial function of more than three times, such as a cubic function, a quartic function, a quintic function, and the like. The form of polynomial function is relatively simple, and the amount of calculation is moderate, and the polynomial function of more than three times can ensure that the motion parameters are continuous.
在一实施例中,所述轨迹函数包括三次函数。采用三次函数,一方面可以减少计算量,另一方面对电机扭矩要求不大,可以降低电机成本。In one embodiment, the trajectory function includes a cubic function. Using a cubic function can reduce the amount of calculation on the one hand, and on the other hand, it does not require much torque of the motor, which can reduce the cost of the motor.
在一实施例中,所述轨迹函数包括贝塞尔曲线函数。In one embodiment, the trajectory function includes a Bezier curve function.
参见图2,在一实施例中,步骤S102,所述通过轨迹函数对云台沿所述运动轨迹运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度和加速度均连续,可以包括:子步骤S1021、子步骤S1022、子步骤S1023以及子步骤S1024。Referring to FIG. 2, in an embodiment, in step S102, the speed of the pan/tilt head moving along the motion track is planned by a track function, so that the speed and acceleration of the target track segment at the connection track point are both equal. Continuous, may include: sub-step S1021, sub-step S1022, sub-step S1023 and sub-step S1024.
子步骤S1021:根据停留时间不为零的非衔接轨迹点,按照轨迹点的到达顺序将云台的运动轨迹进行拆分,得到对应每个方向的电机的多个第二轨迹段,每个第二轨迹段的起始速度和终止速度均为零,且包括一个或多个第一轨迹段,所述云台包括对应N个方向的N个电机,所述第一轨迹段包括相邻两个先后到达的轨迹点之间的轨迹段。Sub-step S1021: According to the non-connected trajectory points whose dwell time is not zero, the motion trajectory of the gimbal is divided according to the arrival order of the trajectory points, and a plurality of second trajectory segments corresponding to the motors in each direction are obtained, each The starting speed and the ending speed of the two track segments are both zero, and include one or more first track segments, the pan/tilt includes N motors corresponding to N directions, and the first track segment includes two adjacent track segments. A trajectory segment between successively arrived trajectory points.
对于停留时间不为零的非衔接轨迹点,由于云台到达该轨迹点时需要停留一定时间,因此云台到达该轨迹点时速度可以降到零,停留时间结束后,云台从该轨迹点继续下一段轨迹段,即可以从零速度开始加速。对于停留时间为零的衔接轨迹点,由于云台到达该轨迹点时不需要停留,因此云台到达该轨迹点时可以不需要将速度降到零,云台可以直接从该轨迹点继续下一段轨迹段,即可以从到达该轨迹点的速度开始下一段轨迹段。For non-connected track points whose dwell time is not zero, since the gimbal needs to stay for a certain period of time when it reaches the track point, the speed of the gimbal can drop to zero when it reaches the track point. Continue to the next trajectory segment, that is, you can start accelerating from zero speed. For the connecting track point with zero dwell time, since the gimbal does not need to stop when it reaches the track point, the gimbal does not need to reduce the speed to zero when it reaches the track point, and the gimbal can continue to the next segment directly from the track point. Track segment, that is, the next track segment can be started from the speed at which the track point is reached.
云台通常由多个电机驱动,分别对应多个方向,每个方向的电机驱动对应的轴臂进行运动,云台的运动轨迹可以拆分对应多个方向多个电机的运动轨迹, 也就是说,云台的位置和姿态可以通过这多个电机的运动轨迹共同决定。本实施例将云台的运动轨迹进行拆分,分别对应到每个方向的电机的运动轨迹。云台的运动轨迹拆分后,电机的运动包括旋转运动,电机的速度可以是角速度,电机的加速度可以角加速度,电机旋转后的位置可以是角度。The gimbal is usually driven by multiple motors, corresponding to multiple directions. The motor in each direction drives the corresponding shaft arm to move. , the position and attitude of the gimbal can be jointly determined by the motion trajectories of these multiple motors. In this embodiment, the motion trajectories of the pan/tilt head are divided, respectively corresponding to the motion trajectories of the motors in each direction. After the motion track of the gimbal is split, the motion of the motor includes rotational motion, the speed of the motor can be angular velocity, the acceleration of the motor can be angular acceleration, and the position of the motor after rotation can be an angle.
对于不需要停留的轨迹点,可以作为前后相邻两个第一轨迹段的衔接轨迹点(即前第一轨迹段的结束轨迹点和后第一轨迹段的起始轨迹点),因此根据非衔接轨迹点,按照轨迹点的到达顺序可以将云台的轨迹进行拆分,得到对应每个方向的电机运动的多个第二轨迹段,这样每个第二轨迹段的起始速度和终止速度均为零,如果第二轨迹段包括衔接轨迹点,该第二轨迹段包括多个第一轨迹段,如果第二轨迹段不包括衔接轨迹点,该第二轨迹段包括一个第一轨迹段。For the trajectory point that does not need to stay, it can be used as the connecting trajectory point of two adjacent first trajectory segments (that is, the end trajectory point of the previous first trajectory segment and the starting trajectory point of the next first trajectory segment). By connecting the track points, the track of the gimbal can be split according to the arrival sequence of the track points to obtain multiple second track segments corresponding to the motor motion in each direction, so that the starting speed and ending speed of each second track segment are If the second trajectory segment includes a connecting trajectory point, the second trajectory segment includes a plurality of first trajectory segments, and if the second trajectory segment does not include a connecting trajectory point, the second trajectory segment includes a first trajectory segment.
子步骤S1022:通过所述轨迹函数使所述第二轨迹段中的目标轨迹段在衔接轨迹点处的速度和加速度相等,得到每个轨迹点的速度,所述目标轨迹段包括前第一轨迹段和后第一轨迹,所述前第一轨迹段的结束轨迹点包括所述衔接轨迹点,所述后第一轨迹段的起始轨迹点包括所述衔接轨迹点。Sub-step S1022: Use the trajectory function to make the velocity and acceleration of the target trajectory segment in the second trajectory segment at the connecting trajectory point equal to obtain the velocity of each trajectory point, and the target trajectory segment includes the previous first trajectory segment and the following first trajectory, the ending trajectory point of the former first trajectory segment includes the connecting trajectory point, and the starting trajectory point of the latter first trajectory segment includes the connecting trajectory point.
本实施例中,通过已知信息计算得到每个轨迹点对应每个方向的电机的速度。已知信息包括用户输入的云台的多个轨迹点的参考姿态以及多个轨迹点的其他相关信息,例如:轨迹点的达到顺序,云台在相邻两个轨迹点的运动时间,云台在轨迹点的停留时间,等等。所述第二轨迹段中包括前第一轨迹段和后第一轨迹段的目标轨迹段在衔接轨迹点点处的速度、加速度相等,所述衔接轨迹点包括前第一轨迹段的结束轨迹点和后第一轨迹段的起始轨迹点,即使前第一轨迹段的结束轨迹点和后第一轨迹段的起始轨迹点的速度以及加速度相等(使前第一轨迹段的结束轨迹点的速度以及加速度不发生变化,将前第一轨迹段的结束轨迹点的速度以及加速度作为后第一轨迹段的起始轨迹点的速度以及加速度),从而得到每个轨迹点对应每个方向的电机的速度。该方式较为简单,且不会浪费控制时间。In this embodiment, the speed of the motor corresponding to each direction of each track point is obtained by calculating the known information. The known information includes the reference posture of multiple track points of the gimbal entered by the user and other related information of the multiple track points, such as: the arrival sequence of the track points, the movement time of the gimbal at two adjacent track points, Dwell time at track points, etc. In the second trajectory segment, the target trajectory segment including the former first trajectory segment and the latter first trajectory segment have the same velocity and acceleration at the connecting trajectory point, and the connecting trajectory point includes the end trajectory point of the previous first trajectory segment and The starting trajectory point of the first trajectory segment after the And the acceleration does not change, take the speed and acceleration of the end trajectory point of the first trajectory segment as the speed and acceleration of the starting trajectory point of the first trajectory segment), so as to obtain the motor speed of each trajectory point corresponding to each direction. speed. This method is relatively simple and does not waste control time.
子步骤S1023:根据所述每个轨迹点的速度、对应每个方向的电机的每个第一轨迹段对应的轨迹参数的表达式,得到对应每个方向的电机的每个第一轨迹段对应的轨迹参数,所述对应每个方向的电机的每个第一轨迹段对应的轨迹 参数的表达式是通过所述第一轨迹段的起始位置、终止位置、起始速度以及终止速度表示的。Sub-step S1023: According to the speed of each trajectory point and the expression of the trajectory parameter corresponding to each first trajectory segment of the motor corresponding to each direction, obtain the corresponding value of each first trajectory segment of the motor corresponding to each direction. , the expression of the trajectory parameter corresponding to each first trajectory segment of the motor corresponding to each direction is represented by the starting position, ending position, starting speed and ending speed of the first trajectory segment .
本实施例中,将对应每个方向的电机的每个第一轨迹段对应的轨迹参数的表达式通过所述第一轨迹段的起始位置(可以是起始角度)、终止位置(可以是终止角度)、起始速度(可以是起始角速度)以及终止速度(可以是终止角速度)表示。其中,第一轨迹段的起始位置、终止位置,即为第一轨迹段前后两个轨迹点的目标位置,可以从用户输入的参考姿态得到;第一轨迹段的起始速度以及终止速度,即为第一轨迹段前后两个轨迹点的目标速度,可以通过上一步骤计算得到。In this embodiment, the expression of the trajectory parameter corresponding to each first trajectory segment of the motor corresponding to each direction is passed through the starting position (which can be the starting angle) and the ending position (which can be the starting angle) of the first trajectory segment. ending angle), starting velocity (which can be the starting angular velocity), and ending velocity (which can be the ending angular velocity). Among them, the starting position and ending position of the first trajectory segment are the target positions of the two trajectory points before and after the first trajectory segment, which can be obtained from the reference attitude input by the user; the starting speed and ending speed of the first trajectory segment, That is, the target velocity of the two trajectory points before and after the first trajectory segment, which can be calculated through the previous step.
当所述第一轨迹段的起始位置、终止位置、起始速度以及终止速度均是已知的时候,通过对应每个方向的电机的每个第一轨迹段对应的轨迹参数的表达式即可计算获得对应每个方向的电机的每个第一轨迹段的轨迹参数。When the starting position, ending position, starting speed and ending speed of the first trajectory segment are known, the expression of the trajectory parameters corresponding to each first trajectory segment of the motor corresponding to each direction is: The trajectory parameters of each first trajectory segment of the motor corresponding to each direction can be obtained by calculation.
子步骤S1024:根据所述轨迹函数以及每个第一轨迹段对应的轨迹参数,确定在运行时刻t的对应每个方向的电机的目标速度。Sub-step S1024: Determine the target speed of the motor corresponding to each direction at the running time t according to the trajectory function and the trajectory parameters corresponding to each first trajectory segment.
当轨迹参数确定了后,即可确定在运行时刻t的对应每个方向的电机的目标速度。After the trajectory parameters are determined, the target speed of the motor corresponding to each direction at the running time t can be determined.
在一实施例中,所述方向的个数包括三个相互垂直的方向,即三维空间的X轴、Y轴、Z轴。In one embodiment, the number of the directions includes three mutually perpendicular directions, that is, the X axis, the Y axis, and the Z axis in the three-dimensional space.
参见图3,在一实施例中,步骤S103,所述按照规划后的速度,控制所述云台沿所述运动轨迹运动,可以包括:子步骤S103A1、子步骤S103A2以及子步骤S103A3。Referring to FIG. 3 , in an embodiment, step S103 , controlling the pan/tilt to move along the motion trajectory according to the planned speed may include sub-step S103A1 , sub-step S103A2 and sub-step S103A3 .
子步骤S103A1:根据所述轨迹函数以及每个第一轨迹段对应的轨迹参数,确定在运行时刻t的对应三个方向的电机的目标位置,所述目标位置包括目标欧拉角。Sub-step S103A1: According to the trajectory function and the trajectory parameters corresponding to each first trajectory segment, determine the target position of the motor corresponding to the three directions at the running time t, and the target position includes the target Euler angle.
子步骤S103A2:将运行时刻t的对应三个方向的电机的目标欧拉角转换为运行时刻t的对应三个方向的电机的目标姿态四元数。Sub-step S103A2: Convert the target Euler angles of the motor corresponding to the three directions at the running time t into the target attitude quaternion of the motor corresponding to the three directions at the running time t.
子步骤S103A3:根据所述运行时刻t的对应三个方向的电机的目标姿态四元数,控制所述云台的三轴电机运动。Sub-step S103A3: Control the motion of the three-axis motor of the pan/tilt according to the target attitude quaternion of the motor corresponding to the three directions at the running time t.
一般而言,由于欧拉角可读性更好一些,形象直观,使用更为广泛,本实 施例中目标位置通常采用欧拉角。但是欧拉角对应的欧拉旋转是要按照一个固定的坐标轴的顺序旋转的,因此不同的顺序会造成不同的结果,这容易给控制带来不便。四元数存储了旋转轴和旋转角的信息,它能方便的描述刚体绕任意轴的旋转。四元数旋转只需要一个四维的四元数就可以执行绕任意过原点的向量的旋转,方便快捷,效率更高。Generally speaking, since Euler angles are more readable, intuitive, and widely used, Euler angles are usually used for the target position in this embodiment. However, the Euler rotation corresponding to the Euler angle is to be rotated in the order of a fixed coordinate axis, so different orders will cause different results, which is easy to bring inconvenience to the control. The quaternion stores the information of the rotation axis and rotation angle, which can conveniently describe the rotation of the rigid body around any axis. Quaternion rotation only needs a four-dimensional quaternion to perform rotation around any vector passing through the origin, which is convenient, fast and more efficient.
在一实施例中,步骤S103,所述按照规划后的速度,控制所述云台沿所述运动轨迹运动,还可以包括:子步骤S103B1和子步骤S103B2,如图4。In an embodiment, step S103, the control of the pan/tilt head to move along the motion trajectory according to the planned speed may further include: sub-step S103B1 and sub-step S103B2, as shown in FIG. 4 .
子步骤S103B1:根据所述轨迹函数以及每个第一轨迹段对应的轨迹参数,确定在运行时刻t的对应每个方向的电机的目标位置。Sub-step S103B1: According to the trajectory function and the trajectory parameters corresponding to each first trajectory segment, determine the target position of the motor corresponding to each direction at the running time t.
子步骤S103B2:根据在运行时刻t的对应每个方向的电机的目标位置,控制所述云台的对应每个方向的电机运动,使运动后的对应每个方向的电机在所述运行时刻t达到所述目标位置。Sub-step S103B2: According to the target position of the motor corresponding to each direction at the running time t, control the movement of the motor corresponding to each direction of the pan/tilt, so that the motor corresponding to each direction after the movement is at the running time t. reach the target position.
在本实施例中,控制云台的电机运动时,要求最终对应每个方向的电机在运动时刻t达到目标位置。通过这种方式,能够确保云台的电机严格按照预定的时间达到预定的目标位置,从而能够为后续拍摄到使用户满意的画面提供技术支持。In this embodiment, when the motor of the gimbal is controlled to move, it is required that the motor corresponding to each direction finally reaches the target position at the movement time t. In this way, it can be ensured that the motor of the gimbal reaches the predetermined target position strictly according to the predetermined time, so as to provide technical support for the subsequent shooting of pictures that satisfy the user.
在一实施例中,为了方便后面的精确控制,可以确定目标位置(可以是目标角度)和目标速度(可以是目标角速度),即子步骤S1024,所述根据轨迹函数以及每个方向的电机的第一轨迹段对应的轨迹参数,确定在运行时刻t的对应每个方向的电机的目标速度,可以包括:根据轨迹函数以及每个方向的电机的第一轨迹段对应的轨迹参数,确定在运行时刻t的对应每个方向的电机的目标位置和目标速度。In one embodiment, in order to facilitate the subsequent precise control, the target position (which may be the target angle) and the target velocity (which may be the target angular velocity) may be determined, that is, sub-step S1024. The trajectory parameters corresponding to the first trajectory segment, and determining the target speed of the motor corresponding to each direction at the running time t may include: determining the running speed according to the trajectory function and the trajectory parameters corresponding to the first trajectory segment of the motor in each direction. The target position and target speed of the motor corresponding to each direction at time t.
此时,参见图5,步骤S103,所述控制所述云台在所述运动轨迹,按照规划后的速度运动,还可以包括:子步骤S103C1和子步骤S103C2。At this time, referring to FIG. 5 , in step S103 , the controlling of the pan/tilt head to move on the movement track according to the planned speed may further include: sub-step S103C1 and sub-step S103C2 .
子步骤S103C1:根据在运行时刻t的对应每个方向的电机的目标速度,对所述云台的对应每个方向的电机的运动进行前馈控制。Sub-step S103C1: According to the target speed of the motor corresponding to each direction at the running time t, perform feedforward control on the motion of the motor corresponding to each direction of the pan/tilt head.
子步骤S103C2:根据在运行时刻t的对应每个方向的电机的目标位置,对所述云台的对应每个方向的电机的运动进行反馈控制。Sub-step S103C2: According to the target position of the motor corresponding to each direction at the running time t, feedback control is performed on the motion of the motor corresponding to each direction of the pan/tilt head.
前馈控制可以是指通过观察情况、收集整理信息、掌握规律、预测趋势, 正确预计未来可能出现的问题,提前采取措施,将可能发生的偏差消除在萌芽状态中,为避免在未来不同发展阶段可能出现的问题而事先采取的措施。本实施例中,由于获知运行时刻t的对应每个方向的电机的目标速度,据此可以正确预计在达到运行时刻t的过程中,可能出现的问题,提前采取措施,将可能发生的偏差消除在萌芽状态中,为避免在达到运行时刻t的过程中可能出现的问题而事先采取的措施,为使得在运行时刻t的对应每个方向的电机尽可能达到目标位置提供技术支持。Feedforward control can refer to observing the situation, collecting and arranging information, grasping laws, and predicting trends, correctly predicting possible problems in the future, and taking measures in advance to eliminate possible deviations in the budding state, in order to avoid different development stages in the future. measures to be taken in advance of possible problems. In this embodiment, since the target speed of the motor corresponding to each direction at the running time t is known, it is possible to correctly predict the possible problems in the process of reaching the running time t, and take measures in advance to eliminate the possible deviations In the budding state, the measures taken in advance to avoid possible problems in the process of reaching the running time t provide technical support to make the motors corresponding to each direction at the running time t reach the target position as much as possible.
不管在运行时刻t的对应每个方向的电机的速度是否达到目标速度,最终的目标是在运行时刻t的对应每个方向的电机的位置能够达到目标位置,这样才能保证拍摄的画面满足用户需求,为此还需要进行反馈控制。Regardless of whether the speed of the motor corresponding to each direction at the running time t reaches the target speed, the ultimate goal is that the position of the motor corresponding to each direction at the running time t can reach the target position, so as to ensure that the captured picture meets the user's needs. , and feedback control is also required for this purpose.
反馈控制可以是指在某一行动和任务完成之后,将实际结果进行比较,从而对下一步行动的进行产生影响,起到控制的作用。其特点是:对计划决策在实施过程中的每一步骤所引起的客观效果,能够及时做出反应,并据此调整、修改下一步的实施方案,使计划决策的实施与原计划本身在动态中达到协调。本实施例中,由于获知在运行时刻t的对应每个方向的电机的目标位置,据此可以在达到运行时刻t的过程中,不断测量电机当前的位置(例如旋转的角度),将电机当前的位置与目标位置比较(例如将电机当前旋转的角度与目标角度比较),然后及时做出反应,并据此调整、修改下一步的控制方案,最终能够使在运行时刻t的对应每个方向的电机的位置与目标位置在动态中达到协调。Feedback control can refer to comparing the actual results after a certain action and task is completed, so as to have an impact on the next action and play a control role. Its characteristics are: it can respond in time to the objective effect caused by each step of the planning decision in the implementation process, and adjust and revise the next implementation plan accordingly, so that the implementation of the planning decision and the original plan itself are dynamic. achieve coordination. In this embodiment, since the target position of the motor corresponding to each direction at the running time t is known, the current position of the motor (for example, the rotation angle) can be continuously measured in the process of reaching the running time t, and the current position of the motor can be measured accordingly. Compare the position of the motor with the target position (for example, compare the current rotation angle of the motor with the target angle), and then react in time, and adjust and modify the next control scheme accordingly, and finally make the corresponding direction at the running time t. The position of the motor and the target position are dynamically coordinated.
本申请实施例既有前馈控制,也有反馈控制,从前馈控制角度看,由于增加了反馈控制,降低了对前馈控制模型精度的要求,并能对没有测量的干扰信号的扰动进行校正;从反馈控制角度看,前馈控制作用对主要干扰及时进行粗调,大大减少反馈控制的负担。The embodiment of the present application has both feedforward control and feedback control. From the perspective of feedforward control, due to the addition of feedback control, the requirements for the accuracy of the feedforward control model are reduced, and the disturbance of unmeasured interference signals can be corrected; From the perspective of feedback control, the feedforward control function performs rough adjustment on the main disturbance in time, which greatly reduces the burden of feedback control.
下面以三轴电机的云台为例说明采用反馈控制对云台的控制过程。The following takes the PTZ of the three-axis motor as an example to illustrate the control process of the PTZ using feedback control.
参见图6,该云台及相关装置包括:翻滚轴(roll轴)电机1、俯仰轴(pitch轴)电机2、偏航轴(yaw轴)电机3、云台基座4、拍摄装置固定机构(内部包含惯性测量元件)5、拍摄装置6。Referring to FIG. 6, the pan/tilt and related devices include: a roll axis motor 1, a pitch axis (pitch axis) motor 2, a yaw axis (yaw axis) motor 3, a pan/tilt base 4, and a fixing mechanism for a photographing device (Inertially including inertial measurement elements) 5 , photographing device 6 .
参见图7,云台通过惯性测量元件作为反馈器件,电机作为输出元件,形成闭环控制系统。在这个控制系统中控制量是云台的姿态(即三个电机旋转的 角度),即给定一个目标姿态(即三个电机t时刻各自的目标角度),通过反馈控制实现测量姿态达到目标姿态。Referring to Figure 7, the gimbal uses the inertial measurement element as the feedback device and the motor as the output element to form a closed-loop control system. In this control system, the control amount is the attitude of the gimbal (that is, the angle of rotation of the three motors), that is, given a target attitude (that is, the respective target angles of the three motors at time t), the measured attitude is achieved through feedback control to achieve the target attitude. .
在一应用场景中,控制云台移动是为了拍摄,所述方法还包括:获取用户输入的拍摄功能的拍摄信息,所述拍摄功能的拍摄信息与所述用户输入的云台的多个轨迹点的参考姿态相对应。In an application scenario, the movement of the gimbal is controlled for shooting, and the method further includes: acquiring shooting information of the shooting function input by the user, the shooting information of the shooting function and the multiple track points of the gimbal input by the user corresponds to the reference pose.
拍摄功能的拍摄信息可以是该拍摄功能对应的与拍摄要求相关的信息。用户输入的拍摄功能的拍摄信息,可以是用户输入的拍摄功能以及该拍摄功能对应的与拍摄要求相关的信息,通过用户输入的拍摄功能的拍摄信息,一方面能够确定用户选择的拍摄功能,另一方面能够确定该拍摄功能对应的用户的拍摄要求相关的信息。The shooting information of the shooting function may be information related to shooting requirements corresponding to the shooting function. The shooting information of the shooting function input by the user may be the shooting function input by the user and the information related to the shooting requirement corresponding to the shooting function. Through the shooting information of the shooting function input by the user, the shooting function selected by the user can be determined on the one hand, and the shooting function selected by the user can be determined on the other hand. On the one hand, information related to the shooting requirements of the user corresponding to the shooting function can be determined.
其中,较为常用的拍摄功能包括轨迹录像或轨迹延时。轨迹录像可以是指预先设置云台的移动轨迹,控制云台按照预先设定的移动轨迹移动,在云台按照设定的移动轨迹移动的过程中控制拍摄装置进行拍摄。轨迹延时可以是预先设置云台的移动轨迹,控制云台按照预先设定的移动轨迹移动,在云台按照设定的移动轨迹移动的过程中按照预先设置的轨迹进行延时拍摄。Among them, the more commonly used shooting functions include track recording or track delay. Track recording may refer to presetting the movement track of the pan/tilt, controlling the pan/tilt to move according to the preset movement track, and controlling the photographing device to shoot while the pan/tilt moves according to the set movement track. The track delay may be to preset the movement track of the gimbal, control the gimbal to move according to the preset movement track, and perform time-lapse shooting according to the preset track during the process of the gimbal moving according to the set movement track.
参见图8和图9,图8是本申请云台控制方法在轨迹延时中设置轨迹信息的一界面示意图,图9本申请云台控制方法在轨迹录像中设置轨迹信息的一界面示意图。如图所示,在轨迹延时或轨迹录像的拍摄功能下,可以设置各个轨迹点的轨迹点信息,其中包括轨迹点的个数,每个轨迹点的三维姿态信息,每段第一轨迹段的运动时间,每个轨迹点的停留时间。8 and FIG. 9, FIG. 8 is a schematic diagram of an interface of setting track information in the track delay by the pan-tilt control method of the present application, and FIG. 9 is a schematic diagram of an interface of setting the track information in the track recording by the pan-tilt control method of the present application. As shown in the figure, under the shooting function of track delay or track video, the track point information of each track point can be set, including the number of track points, the three-dimensional attitude information of each track point, and the first track segment of each segment. The movement time of , and the dwell time of each trajectory point.
其中,所述方法还包括:在按照规划后的速度控制所述云台沿所述运动轨迹运动的过程中,根据所述用户输入的拍摄功能的拍摄信息,控制所述云台上的拍摄装置进行拍摄。Wherein, the method further includes: in the process of controlling the pan/tilt to move along the motion track according to the planned speed, controlling the shooting device on the pan/tilt according to the shooting information of the shooting function input by the user to shoot.
按照规划后的速度控制云台沿所述运动轨迹运动,同时控制云台上的拍摄装置按照用户设定的拍摄要求进行拍摄,能够给用户不一样的拍摄体验,本申请实施例能够使云台的每个方向的电机从起始轨迹点到终止轨迹点之间的整个运动比较流畅、顺滑,不会出现剧烈变化和震动,这能够是云台上拍摄装置实际拍摄出的画面比较流畅、顺滑,不会出现剧烈变化和震动,拍摄出的画面比较理想。The gimbal is controlled to move along the motion trajectory according to the planned speed, and at the same time, the shooting device on the gimbal is controlled to shoot according to the shooting requirements set by the user, which can give users a different shooting experience. The embodiment of the present application can make the gimbal The entire movement of the motor in each direction from the start track point to the end track point is relatively smooth and smooth, and there will be no drastic changes and vibrations. It is smooth, without drastic changes and vibrations, and the pictures taken are ideal.
其中,所述拍摄装置可以搭载在所述云台上。即拍摄装置和云台是两个独立的设备。Wherein, the photographing device may be mounted on the platform. That is, the shooting device and the gimbal are two independent devices.
在另一实施例中,所述云台包括云台拍摄装置,即云台集成拍摄装置为云台拍摄装置。In another embodiment, the PTZ includes a PTZ shooting device, that is, the PTZ integrated shooting device is a PTZ shooting device.
下面以三次函数为例详细说明上述的过程。The above process is described in detail below by taking a cubic function as an example.
1、轨迹函数和轨迹规划:1. Trajectory function and trajectory planning:
a、设轨迹曲线s(t)为时间t的函数,用户共设置n+1个轨迹点,分别记作q 0,q 1,…,q n,则轨迹曲线共有n段第一轨迹段,第一轨迹段的轨迹函数记作q k(t),如图10所示。其中,已知轨迹曲线的初始速度为v 0和终止速度v na. Let the trajectory curve s(t) be a function of time t, and the user sets a total of n+1 trajectory points, which are respectively denoted as q 0 , q 1 ,...,q n , then the trajectory curve has n segments of the first trajectory segment, The trajectory function of the first trajectory segment is denoted as q k (t), as shown in FIG. 10 . Among them, the initial velocity of the known trajectory curve is v 0 and the final velocity v n .
s(t)={q k(t),t∈[t k,t k+1],k=0,…,n-1} s(t)={q k (t),t∈[t k ,t k+1 ],k=0,...,n-1}
q k(t)=a k,0+a k,1(t-t k)+a k,2(t-t k) 2+a k,3(t-t k) 3 q k (t)= ak,0 + ak,1 (tt k )+ ak,2 (tt k ) 2 + ak,3 (tt k ) 3
b、对于第k段第一轨迹段,可以对其轨迹参数a k,0,a k,1,a k,2,a k,3通过此段的起始位置q k,终止位置q k+1,起始速度v k和终止速度v k+1表示。 b. For the first trajectory segment of the k-th segment, the trajectory parameters a k,0 , ak,1 , ak,2 , ak,3 can pass through the starting position q k of this segment and the ending position q k+ 1 , the starting speed v k and the ending speed v k+1 are represented.
Figure PCTCN2020114108-appb-000001
Figure PCTCN2020114108-appb-000001
Figure PCTCN2020114108-appb-000002
Figure PCTCN2020114108-appb-000002
c、考虑第k段第一轨迹段和第k+1段第一轨迹段的衔接轨迹点处,其位置,速度和加速度均连续,因此有:c. Consider that the position, velocity and acceleration of the connecting trajectory point of the first trajectory segment of the k-th segment and the first trajectory segment of the k+1-th segment are continuous, so there are:
Figure PCTCN2020114108-appb-000003
Figure PCTCN2020114108-appb-000003
d、将n段第一轨迹段进行如第c步化简,可得矩阵模式:d. Simplify the first trajectory segment of n segments as in step c to obtain the matrix pattern:
Figure PCTCN2020114108-appb-000004
Figure PCTCN2020114108-appb-000004
v={v 0,v 1,…,v n-1,v n} T v={v 0 ,v 1 ,...,v n-1 ,v n } T
Figure PCTCN2020114108-appb-000005
Figure PCTCN2020114108-appb-000005
e、通过对A矩阵的LU分解(LU Factorization),可以解得每一个轨迹点的速度,得到速度矩阵v。e. Through the LU factorization of the A matrix, the velocity of each trajectory point can be solved, and the velocity matrix v can be obtained.
f、将速度矩阵v的每一个速度,代入第d步中,可以解得每一段第一轨迹段的轨迹参数a k,0,a k,1,a k,2,a k,3f. Substitute each velocity of the velocity matrix v into the dth step, and the trajectory parameters ak,0 , ak,1 , ak,2 , ak,3 of each first trajectory segment can be solved.
2、考虑用户输入的轨迹信息:每个轨迹点的三维姿态信息(可以是三个方向的目标角度信息),每个轨迹点的停留时间,每个第一轨迹段的运动时间。2. Consider the trajectory information input by the user: the three-dimensional attitude information of each trajectory point (which can be target angle information in three directions), the stay time of each trajectory point, and the movement time of each first trajectory segment.
a、用户输入三个方向的电机的轨迹点,分为三个单独的自由度进行处理,即需要求解三个方向的轨迹曲线S 1(t),S 2(t),S 3(t)。 a. The user inputs the trajectory points of the motor in three directions, which are divided into three separate degrees of freedom for processing, that is, the trajectory curves S 1 (t), S 2 (t), and S 3 (t) need to be solved in three directions. .
b、考虑其中一个自由度(即方向)的轨迹曲线,如S 1(t),根据轨迹点是否存在停留时间进行拆分(例如:设置7个轨迹点,其中第3个、第6个轨迹点需要停留,则将S 1(t)拆分成三段,分别对应第1,2,3个轨迹点的第二轨迹段S 1,1(t);对应第3,4,5,6个轨迹点的第二轨迹段S 1,2(t),对应第6,7个轨迹点的第二轨迹段S 1,3(t));另外两个自由度(即方向)的轨迹曲线S 2(t),S 3(t)进行与S 1(t)相同的操作)。 b. Consider the trajectory curve of one of the degrees of freedom (ie direction), such as S 1 (t), and split it according to whether the trajectory point has a dwell time (for example: set 7 trajectory points, of which the 3rd and 6th trajectory If the point needs to stay, split S 1 (t) into three segments, corresponding to the second track segment S 1,1 (t) of the 1st, 2nd, and 3rd track points respectively; corresponding to the 3rd, 4th, 5th, and 6th track points respectively. The second trajectory segment S 1,2 (t) of each trajectory point corresponds to the second trajectory segment S 1,3 (t) of the 6th and 7th trajectory points; the trajectory curve of the other two degrees of freedom (ie directions) S 2 (t), S 3 (t) perform the same operations as S 1 (t)).
c、对第二轨迹段S 1,1(t),S 1,2(t),S 1,3(t)通过上面第1步进行规划;另外两个自由度(即方向)的轨迹曲线S 2(t),S 3(t)进行相同的操作。 c. Plan the second trajectory segment S 1,1 (t), S 1,2 (t), S 1,3 (t) through the first step above; the trajectory curves of the other two degrees of freedom (ie directions) S 2 (t), S 3 (t) do the same.
d、存储相关第二轨迹段的各个第一轨迹段的轨迹参数。d. Store the track parameters of each first track segment of the relevant second track segment.
e、轨迹录像或者轨迹延时实时运行,通过运行时间t分别求得三个自由度的目标位置输出S 1(t),S 2(t),S 3(t)。 e. The trajectory recording or trajectory delay runs in real time, and the target position outputs S 1 (t), S 2 (t), and S 3 (t) of the three degrees of freedom are obtained respectively through the running time t.
f、将三个自由度的S 1(t),S 2(t),S 3(t)实时输出的目标欧拉角位置信息转换成目标姿态四元数,据此控制云台的三轴电机运动,控制云台上的拍摄装置进行拍摄。 f. Convert the target Euler angle position information of the real-time output of S 1 (t), S 2 (t), S 3 (t) of the three degrees of freedom into the target attitude quaternion, and control the three axes of the gimbal accordingly. The motor moves to control the shooting device on the gimbal to shoot.
通过上述方式,本申请实施例的轨迹曲线在位置、速度和加速度都连续,并且考虑了各段第一轨迹段的衔接,使得生成的轨迹曲线十分平滑,使得轨迹录像或轨迹延时等拍摄画面较好,拍摄出的画面没有突变感,平顺流畅自然。In the above manner, the trajectory curve of the embodiment of the present application is continuous in position, speed and acceleration, and the connection of the first trajectory segment of each segment is considered, so that the generated trajectory curve is very smooth, and the trajectory recording or trajectory delay shooting pictures such as It is better, the captured picture has no sense of sudden change, and it is smooth and natural.
参见图11,图11是本申请云台控制装置一实施例的结构示意图,需要说明的是,本实施例的云台控制装置能够执行上述云台控制方法中的步骤,相关内容的详细说明,请参见上述云台控制方法,在此不再赘叙。Referring to FIG. 11, FIG. 11 is a schematic structural diagram of an embodiment of a pan-tilt control device of the present application. It should be noted that the pan-tilt control device of this embodiment can execute the steps in the above-mentioned pan-tilt control method. Please refer to the above-mentioned PTZ control method, which will not be repeated here.
所述装置100与云台通信连接,所述装置100包括:存储器1和处理器2;处理器2与存储器1通过总线连接。The apparatus 100 is connected to the PTZ in communication, and the apparatus 100 includes: a memory 1 and a processor 2; the processor 2 and the memory 1 are connected through a bus.
其中,处理器2可以是微控制单元、中央处理单元或数字信号处理器,等等。Wherein, the processor 2 may be a microcontroller unit, a central processing unit or a digital signal processor, and so on.
其中,存储器1可以是Flash芯片、只读存储器、磁盘、光盘、U盘或者移动硬盘等等。Wherein, the memory 1 may be a Flash chip, a read-only memory, a magnetic disk, an optical disk, a U disk, a mobile hard disk, and the like.
所述存储器1用于存储计算机程序;所述处理器2用于执行所述计算机程序并在执行所述计算机程序时,实现如下步骤:The memory 1 is used to store a computer program; the processor 2 is used to execute the computer program and implement the following steps when executing the computer program:
获取用户输入的云台的多个轨迹点的参考姿态,所述多个轨迹点的参考姿态用于限定所述云台的运动轨迹,所述多个轨迹点包括云台的停留时间为零的衔接轨迹点;对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度连续,所述目标轨迹段包括所述衔接轨迹点;按照规划后的速度控制所述云台沿所述运动轨迹运动。Obtain the reference poses of multiple track points of the gimbal entered by the user, the reference poses of the multiple track points are used to define the motion track of the gimbal, and the multiple track points include the one where the dwell time of the gimbal is zero. Connecting track points; planning the speed of the movement of the gimbal along the target track segment in the motion track, so that the speed of the target track segment at the connecting track point is continuous, and the target track segment includes the connecting track point; control the pan/tilt to move along the motion track according to the planned speed.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度和加速度均连续。Wherein, when executing the computer program, the processor implements the following steps: planning the speed of the movement of the pan/tilt head along the target trajectory segment in the motion trajectory, so that the target trajectory segment is at the connecting trajectory point The velocity and acceleration are both continuous.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:通过轨迹函数对云台沿所述运动轨迹运动的速度进行规划,使所述目标轨迹段在所述衔接 轨迹点处的速度和加速度均连续。Wherein, when executing the computer program, the processor implements the following steps: planning the speed of the pan/tilt head moving along the motion track through a track function, so that the speed of the target track segment at the connection track point and acceleration are continuous.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:根据停留时间不为零的非衔接轨迹点,按照轨迹点的到达顺序将云台的运动轨迹进行拆分,得到对应每个方向的电机的多个第二轨迹段,每个第二轨迹段的起始速度和终止速度均为零,且包括一个或多个第一轨迹段,所述云台包括对应N个方向的N个电机,所述第一轨迹段包括相邻两个先后到达的轨迹点之间的轨迹段;通过所述轨迹函数使所述第二轨迹段中的目标轨迹段在衔接轨迹点处的速度和加速度相等,得到每个轨迹点的速度,所述目标轨迹段包括前第一轨迹段和后第一轨迹,所述前第一轨迹段的结束轨迹点包括所述衔接轨迹点,所述后第一轨迹段的起始轨迹点包括所述衔接轨迹点;根据所述每个轨迹点的速度、对应每个方向的电机的每个第一轨迹段对应的轨迹参数的表达式,得到对应每个方向的电机的每个第一轨迹段对应的轨迹参数,所述对应每个方向的电机的每个第一轨迹段对应的轨迹参数的表达式是通过所述第一轨迹段的起始位置、终止位置、起始速度以及终止速度表示的;根据所述轨迹函数以及每个第一轨迹段对应的轨迹参数,确定在运行时刻t的对应每个方向的电机的目标速度。Wherein, when executing the computer program, the processor implements the following steps: according to the non-connected trajectory points whose dwell time is not zero, split the motion trajectory of the gimbal according to the arrival order of the trajectory points, and obtain the corresponding A plurality of second trajectory segments of the motor in the direction of the motor, the starting speed and the ending speed of each second trajectory segment are zero, and include one or more first trajectory segments, and the pan/tilt includes N corresponding to N directions The first trajectory segment includes a trajectory segment between two adjacent trajectory points that arrive in succession; through the trajectory function, the velocity and the velocity of the target trajectory segment in the second trajectory segment at the connecting trajectory point and The acceleration is equal to obtain the velocity of each trajectory point, the target trajectory segment includes the first first trajectory segment and the first trajectory after the first trajectory, the end trajectory point of the first trajectory segment includes the connecting trajectory point, the trajectory point after the The starting trajectory point of a trajectory segment includes the connecting trajectory point; according to the speed of each trajectory point, the expression of the trajectory parameter corresponding to each first trajectory segment of the motor corresponding to each direction, the corresponding each The trajectory parameter corresponding to each first trajectory segment of the motor in each direction, the expression of the trajectory parameter corresponding to each first trajectory segment of the motor corresponding to each direction is the starting position of the first trajectory segment, The end position, the start speed and the end speed are represented; according to the trajectory function and the trajectory parameters corresponding to each first trajectory segment, the target speed of the motor corresponding to each direction at the running time t is determined.
其中,所述方向的个数包括三个相互垂直的方向。Wherein, the number of the directions includes three mutually perpendicular directions.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:根据所述轨迹函数以及每个第一轨迹段对应的轨迹参数,确定在运行时刻t的对应三个方向的电机的目标位置,所述目标位置包括目标欧拉角;将运行时刻t的对应三个方向的电机的目标欧拉角转换为运行时刻t的对应三个方向的电机的目标姿态四元数;根据所述运行时刻t的对应三个方向的电机的目标姿态四元数,控制所述云台的三轴电机运动。Wherein, when executing the computer program, the processor implements the following steps: according to the trajectory function and the trajectory parameters corresponding to each first trajectory segment, determine the target position of the motor corresponding to the three directions at the running time t , the target position includes the target Euler angle; the target Euler angle of the motor corresponding to the three directions at the running time t is converted into the target attitude quaternion of the motor corresponding to the three directions at the running time t; The target attitude quaternion of the motor corresponding to the three directions at time t controls the motion of the three-axis motor of the gimbal.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:根据所述轨迹函数以及每个第一轨迹段对应的轨迹参数,确定在运行时刻t的对应每个方向的电机的目标位置;根据在运行时刻t的对应每个方向的电机的目标位置,控制所述云台的对应每个方向的电机运动,使运动后的对应每个方向的电机在所述运行时刻t达到所述目标位置。Wherein, when executing the computer program, the processor implements the following steps: according to the trajectory function and the trajectory parameters corresponding to each first trajectory segment, determine the target position of the motor corresponding to each direction at the running time t ; According to the target position of the motor corresponding to each direction at the running time t, control the motor movement corresponding to each direction of the pan/tilt, so that the motor corresponding to each direction after the movement reaches the said running time t target location.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:根据轨迹函数以及每个第一轨迹段对应的轨迹参数,确定在运行时刻t的对应每个方向的 电机的目标位置和目标速度。Wherein, when executing the computer program, the processor implements the following steps: according to the trajectory function and the trajectory parameters corresponding to each first trajectory segment, determine the target position and target of the motor corresponding to each direction at the running time t speed.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:根据在运行时刻t的对应每个方向的电机的目标速度,对所述云台的对应每个方向的电机的运动进行前馈控制;根据在运行时刻t的对应每个方向的电机的目标位置,对所述云台的对应每个方向的电机的运动进行反馈控制。Wherein, when the processor executes the computer program, the following steps are implemented: according to the target speed of the motor corresponding to each direction at the running time t, the motion of the motor corresponding to each direction of the pan/tilt is performed in advance Feedback control; according to the target position of the motor corresponding to each direction at the running time t, feedback control is performed on the movement of the motor corresponding to each direction of the pan/tilt.
其中,所述轨迹函数包括三次以上的多项式函数。Wherein, the trajectory function includes a polynomial function of more than three times.
其中,所述轨迹函数包括三次函数。Wherein, the trajectory function includes a cubic function.
其中,所述轨迹函数包括贝塞尔曲线函数。Wherein, the trajectory function includes a Bezier curve function.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:获取用户输入的拍摄功能的拍摄信息,所述拍摄功能的拍摄信息与所述用户输入的轨迹信息相对应。Wherein, when executing the computer program, the processor implements the following steps: acquiring the shooting information of the shooting function input by the user, and the shooting information of the shooting function corresponds to the trajectory information input by the user.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:在按照规划后的速度控制所述云台沿所述运动轨迹运动的过程中,根据所述用户输入的拍摄功能的拍摄信息,控制所述云台上的拍摄装置进行拍摄。Wherein, when executing the computer program, the processor implements the following steps: in the process of controlling the pan/tilt head to move along the motion trajectory according to the planned speed, according to the shooting information of the shooting function input by the user , and control the shooting device on the PTZ to shoot.
其中,所述拍摄装置搭载在所述云台上。Wherein, the photographing device is mounted on the pan/tilt.
其中,所述云台包括云台拍摄装置。Wherein, the pan/tilt includes a pan/tilt photographing device.
其中,所述拍摄功能包括轨迹录像或轨迹延时。Wherein, the shooting function includes track recording or track delay.
其中,所述装置还包括通信电路,所述处理器在执行所述计算机程序时,实现如下步骤:控制所述通信电路接收移动终端发送的所述用户输入的云台的多个轨迹点的参考姿态。Wherein, the device further includes a communication circuit, and when the processor executes the computer program, the processor implements the following steps: controlling the communication circuit to receive a reference sent by the mobile terminal for multiple trajectory points of the pan/tilt head input by the user attitude.
本申请还提供一种云台,所述云台包括如上任一项所述的云台控制装置。相关内容的详细说明,请参见上述云台控制装置,在此不再赘叙。The present application further provides a pan-tilt head, the pan-tilt head comprising the pan-tilt-tilt control device according to any one of the above. For a detailed description of the related content, please refer to the above-mentioned PTZ control device, which will not be repeated here.
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如上任一项所述的云台控制方法。相关内容的详细说明请参见上述相关内容部分,在此不再赘叙。The present application also provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor enables the processor to implement the pan-tilt control method described in any one of the above . For a detailed description of the relevant content, please refer to the above-mentioned relevant content section, which will not be repeated here.
其中,该计算机可读存储介质可以是上述云台控制装置的内部存储单元,例如硬盘或内存。该计算机可读存储介质也可以是外部存储设备,例如配备的插接式硬盘、智能存储卡、安全数字卡、闪存卡,等等。Wherein, the computer-readable storage medium may be an internal storage unit of the above-mentioned PTZ control device, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device, such as an equipped plug-in hard disk, smart memory card, secure digital card, flash memory card, and the like.
应当理解,在本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。It should be understood that the terms used in the specification of the present application are only for the purpose of describing particular embodiments and are not intended to limit the present application.
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It will also be understood that, as used in this specification and the appended claims, the term "and/or" refers to and including any and all possible combinations of one or more of the associated listed items.
以上所述,仅为本申请的具体实施例,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalents within the technical scope disclosed in the present application. Modifications or substitutions shall be covered by the protection scope of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (38)

  1. 一种云台控制方法,其特征在于,包括:A PTZ control method, comprising:
    获取用户输入的云台的多个轨迹点的参考姿态,所述多个轨迹点的参考姿态用于限定所述云台的运动轨迹,所述多个轨迹点包括云台的停留时间为零的衔接轨迹点;Obtain the reference poses of multiple track points of the gimbal entered by the user, the reference poses of the multiple track points are used to define the motion track of the gimbal, and the multiple track points include the one where the dwell time of the gimbal is zero. connecting track points;
    对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度连续,所述目标轨迹段包括所述衔接轨迹点;planning the speed of the movement of the pan/tilt head along the target trajectory segment in the motion trajectory, so that the speed of the target trajectory segment at the connection trajectory point is continuous, and the target trajectory segment includes the connection trajectory point;
    按照规划后的速度,控制所述云台沿所述运动轨迹运动。According to the planned speed, the PTZ is controlled to move along the movement track.
  2. 根据权利要求1所述的方法,其特征在于,所述对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度连续,包括:The method according to claim 1, wherein the speed of the pan/tilt head moving along the target trajectory segment in the motion trajectory is planned, so that the speed of the target trajectory segment at the connecting trajectory point is continuous ,include:
    对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度和加速度均连续。The speed of the movement of the pan/tilt head along the target track segment in the motion track is planned, so that the speed and acceleration of the target track segment at the connecting track point are both continuous.
  3. 根据权利要求2所述的方法,其特征在于,所述对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度和加速度均连续,包括:The method according to claim 2, wherein the speed of the pan/tilt moving along the target trajectory segment in the motion trajectory is planned, so that the speed of the target trajectory segment at the connecting trajectory point and the Accelerations are all continuous, including:
    通过轨迹函数对云台沿所述运动轨迹运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度和加速度均连续。The speed of the gimbal moving along the motion track is planned by the track function, so that both the speed and the acceleration of the target track segment at the connecting track point are continuous.
  4. 根据权利要求3所述的方法,其特征在于,所述通过轨迹函数对云台沿所述运动轨迹运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度和加速度均连续,包括:The method according to claim 3, wherein the speed of the gimbal moving along the motion track is planned by a track function, so that the speed and acceleration of the target track segment at the connection track point are the same Continuous, including:
    根据停留时间不为零的非衔接轨迹点,按照轨迹点的到达顺序将云台的运动轨迹进行拆分,得到对应每个方向的电机的多个第二轨迹段,每个第二轨迹段的起始速度和终止速度均为零,且包括一个或多个第一轨迹段,所述云台包括对应N个方向的N个电机,所述第一轨迹段包括相邻两个先后到达的轨迹点之间的轨迹段;According to the non-connected trajectory points whose dwell time is not zero, the motion trajectory of the gimbal is divided according to the arrival order of the trajectory points, and a plurality of second trajectory segments corresponding to the motors in each direction are obtained. The starting speed and the ending speed are both zero, and include one or more first trajectory segments, the pan/tilt includes N motors corresponding to N directions, and the first trajectory segment includes two adjacent trajectories that arrive in succession track segments between points;
    通过所述轨迹函数使所述第二轨迹段中的目标轨迹段在衔接轨迹点处的速度和加速度相等,得到每个轨迹点的速度,所述目标轨迹段包括前第一轨迹 段和后第一轨迹,所述前第一轨迹段的结束轨迹点包括所述衔接轨迹点,所述后第一轨迹段的起始轨迹点包括所述衔接轨迹点;The velocity and acceleration of the target trajectory segment in the second trajectory segment at the connecting trajectory point are equalized by the trajectory function, and the velocity of each trajectory point is obtained, and the target trajectory segment includes the first trajectory segment before and the trajectory after the first trajectory segment. a trajectory, the ending trajectory point of the former first trajectory segment includes the connecting trajectory point, and the starting trajectory point of the latter first trajectory segment includes the connecting trajectory point;
    根据所述每个轨迹点的速度、对应每个方向的电机的每个第一轨迹段对应的轨迹参数的表达式,得到对应每个方向的电机的每个第一轨迹段对应的轨迹参数,所述对应每个方向的电机的每个第一轨迹段对应的轨迹参数的表达式是通过所述第一轨迹段的起始位置、终止位置、起始速度以及终止速度表示的;According to the speed of each trajectory point and the expression of the trajectory parameter corresponding to each first trajectory segment of the motor corresponding to each direction, the trajectory parameter corresponding to each first trajectory segment of the motor corresponding to each direction is obtained, The expression of the trajectory parameter corresponding to each first trajectory segment of the motor corresponding to each direction is represented by the starting position, ending position, starting speed and ending speed of the first trajectory segment;
    根据所述轨迹函数以及每个第一轨迹段对应的轨迹参数,确定在运行时刻t的对应每个方向的电机的目标速度。According to the trajectory function and the trajectory parameters corresponding to each first trajectory segment, the target speed of the motor corresponding to each direction at the running time t is determined.
  5. 根据权利要求4所述的方法,其特征在于,所述方向的个数包括三个相互垂直的方向。The method according to claim 4, wherein the number of the directions includes three mutually perpendicular directions.
  6. 根据权利要求5所述的方法,其特征在于,所述按照规划后的速度,控制所述云台沿所述运动轨迹运动,包括:The method according to claim 5, wherein the controlling the pan/tilt to move along the motion trajectory according to the planned speed comprises:
    根据所述轨迹函数以及每个第一轨迹段对应的轨迹参数,确定在运行时刻t的对应三个方向的电机的目标位置,所述目标位置包括目标欧拉角;According to the trajectory function and the trajectory parameters corresponding to each first trajectory segment, determine the target position of the motor corresponding to the three directions at the running time t, and the target position includes the target Euler angle;
    将运行时刻t的对应三个方向的电机的目标欧拉角转换为运行时刻t的对应三个方向的电机的目标姿态四元数;Convert the target Euler angles of the motor corresponding to the three directions at the running time t into the target attitude quaternion of the motor corresponding to the three directions at the running time t;
    根据所述运行时刻t的对应三个方向的电机的目标姿态四元数,控制所述云台的三轴电机运动。According to the target attitude quaternion of the motor corresponding to the three directions at the running time t, the motion of the three-axis motor of the gimbal is controlled.
  7. 根据权利要求4所述的方法,其特征在于,所述按照规划后的速度,控制所述云台沿所述运动轨迹运动,包括:The method according to claim 4, wherein the controlling the pan/tilt to move along the motion trajectory according to the planned speed comprises:
    根据所述轨迹函数以及每个第一轨迹段对应的轨迹参数,确定在运行时刻t的对应每个方向的电机的目标位置;Determine the target position of the motor corresponding to each direction at the running time t according to the trajectory function and the trajectory parameters corresponding to each first trajectory segment;
    根据在运行时刻t的对应每个方向的电机的目标位置,控制所述云台的对应每个方向的电机运动,使运动后的对应每个方向的电机在所述运行时刻t达到所述目标位置。According to the target position of the motor corresponding to each direction at the running time t, the movement of the motor corresponding to each direction of the gimbal is controlled, so that the motor corresponding to each direction after the movement reaches the target at the running time t Location.
  8. 根据权利要求4所述的方法,其特征在于,所述根据所述轨迹函数以及每个第一轨迹段对应的轨迹参数,确定在运行时刻t的对应每个方向的电机的目标速度,包括:The method according to claim 4, wherein, determining the target speed of the motor corresponding to each direction at the running time t according to the trajectory function and the trajectory parameters corresponding to each first trajectory segment, comprising:
    根据所述轨迹函数以及每个第一轨迹段对应的轨迹参数,确定在运行时刻 t的对应每个方向的电机的目标位置和目标速度。According to the trajectory function and the trajectory parameters corresponding to each first trajectory segment, the target position and target speed of the motor corresponding to each direction at the running time t are determined.
  9. 根据权利要求8所述的方法,其特征在于,所述按照规划后的速度,控制所述云台沿所述运动轨迹运动,包括:The method according to claim 8, wherein the controlling the pan/tilt to move along the motion trajectory according to the planned speed comprises:
    根据在运行时刻t的对应每个方向的电机的目标速度,对所述云台的对应每个方向的电机的运动进行前馈控制;According to the target speed of the motor corresponding to each direction at the running time t, feedforward control is performed on the motion of the motor corresponding to each direction of the gimbal;
    根据在运行时刻t的对应每个方向的电机的目标位置,对所述云台的对应每个方向的电机的运动进行反馈控制。According to the target position of the motor corresponding to each direction at the running time t, feedback control is performed on the movement of the motor corresponding to each direction of the pan/tilt head.
  10. 根据权利要求3所述的方法,其特征在于,所述轨迹函数包括三次以上的多项式函数。The method according to claim 3, wherein the trajectory function comprises a polynomial function of more than three times.
  11. 根据权利要求10所述的方法,其特征在于,所述轨迹函数包括三次函数。The method of claim 10, wherein the trajectory function comprises a cubic function.
  12. 根据权利要求3所述的方法,其特征在于,所述轨迹函数包括贝塞尔曲线函数。The method of claim 3, wherein the trajectory function comprises a Bezier curve function.
  13. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    获取用户输入的拍摄功能的拍摄信息,所述拍摄功能的拍摄信息与所述用户输入的云台的多个轨迹点的参考姿态相对应。The shooting information of the shooting function input by the user is acquired, and the shooting information of the shooting function corresponds to the reference poses of the multiple track points of the pan/tilt head input by the user.
  14. 根据权利要求13所述的方法,其特征在于,所述方法还包括:The method of claim 13, wherein the method further comprises:
    在按照规划后的速度控制所述云台沿所述运动轨迹运动的过程中,根据所述用户输入的拍摄功能的拍摄信息,控制所述云台上的拍摄装置进行拍摄。During the process of controlling the pan/tilt head to move along the motion track according to the planned speed, the camera on the pan/tilt head is controlled to shoot according to the shooting information of the shooting function input by the user.
  15. 根据权利要求14所述的方法,其特征在于,所述拍摄装置搭载在所述云台上。The method according to claim 14, wherein the photographing device is mounted on the platform.
  16. 根据权利要求14所述的方法,其特征在于,所述云台包括云台拍摄装置。The method according to claim 14, wherein the pan/tilt comprises a pan/tilt photographing device.
  17. 根据权利要求13所述的方法,其特征在于,所述拍摄功能包括轨迹录像或轨迹延时。The method according to claim 13, wherein the shooting function includes track recording or track delay.
  18. 根据权利要求1所述的方法,其特征在于,所述获取用户输入的云台的多个轨迹点的参考姿态,包括:The method according to claim 1, wherein the obtaining the reference poses of multiple trajectory points of the PTZ input by the user comprises:
    接收移动终端发送的所述用户输入的云台的多个轨迹点的参考姿态。The reference poses of multiple track points of the pan/tilt head input by the user and sent by the mobile terminal are received.
  19. 一种云台控制装置,其特征在于,所述装置与云台通信连接,所述装 置包括:存储器和处理器;A pan-tilt control device, characterized in that the device is connected in communication with the pan-tilt, and the device comprises: a memory and a processor;
    所述存储器用于存储计算机程序;the memory is used to store computer programs;
    所述处理器用于执行所述计算机程序并在执行所述计算机程序时,实现如下步骤:The processor is configured to execute the computer program and implement the following steps when executing the computer program:
    获取用户输入的云台的多个轨迹点的参考姿态,所述多个轨迹点的参考姿态用于限定所述云台的运动轨迹,所述多个轨迹点包括云台的停留时间为零的衔接轨迹点;Obtain the reference poses of multiple track points of the gimbal entered by the user, the reference poses of the multiple track points are used to define the motion track of the gimbal, and the multiple track points include the one where the dwell time of the gimbal is zero. connecting track points;
    对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度连续,所述目标轨迹段包括所述衔接轨迹点;planning the speed of the movement of the pan/tilt head along the target trajectory segment in the motion trajectory, so that the speed of the target trajectory segment at the connection trajectory point is continuous, and the target trajectory segment includes the connection trajectory point;
    按照规划后的速度控制所述云台沿所述运动轨迹运动。The gimbal is controlled to move along the motion track according to the planned speed.
  20. 根据权利要求19所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 19, wherein, when the processor executes the computer program, the following steps are implemented:
    对云台沿所述运动轨迹中的目标轨迹段运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度和加速度均连续。The speed of the movement of the pan/tilt head along the target track segment in the motion track is planned, so that the speed and acceleration of the target track segment at the connecting track point are both continuous.
  21. 根据权利要求20所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The apparatus according to claim 20, wherein when the processor executes the computer program, the following steps are implemented:
    通过轨迹函数对云台沿所述运动轨迹运动的速度进行规划,使所述目标轨迹段在所述衔接轨迹点处的速度和加速度均连续。The speed of the gimbal moving along the motion track is planned by the track function, so that both the speed and the acceleration of the target track segment at the connecting track point are continuous.
  22. 根据权利要求21所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 21, wherein, when the processor executes the computer program, the following steps are implemented:
    根据停留时间不为零的非衔接轨迹点,按照轨迹点的到达顺序将云台的运动轨迹进行拆分,得到对应每个方向的电机的多个第二轨迹段,每个第二轨迹段的起始速度和终止速度均为零,且包括一个或多个第一轨迹段,所述云台包括对应N个方向的N个电机,所述第一轨迹段包括相邻两个先后到达的轨迹点之间的轨迹段;According to the non-connected trajectory points whose dwell time is not zero, the motion trajectory of the gimbal is divided according to the arrival order of the trajectory points, and a plurality of second trajectory segments corresponding to the motors in each direction are obtained. The starting speed and the ending speed are both zero, and include one or more first trajectory segments, the pan/tilt includes N motors corresponding to N directions, and the first trajectory segment includes two adjacent trajectories that arrive in succession track segments between points;
    通过所述轨迹函数使所述第二轨迹段中的目标轨迹段在轨迹衔接点处的速度和加速度相等,得到每个轨迹点的速度,所述目标轨迹段包括前第一轨迹段和后第一轨迹,所述前第一轨迹段的结束轨迹点包括所述衔接轨迹点,所述后第一轨迹段的起始轨迹点包括所述衔接轨迹点;The velocity and acceleration of the target trajectory segment in the second trajectory segment at the trajectory junction point are equalized by the trajectory function to obtain the velocity of each trajectory point, and the target trajectory segment includes the previous first trajectory segment and the next trajectory segment. a trajectory, the ending trajectory point of the former first trajectory segment includes the connecting trajectory point, and the starting trajectory point of the latter first trajectory segment includes the connecting trajectory point;
    根据所述每个轨迹点的速度、对应每个方向的电机的每个第一轨迹段对应的轨迹参数的表达式,得到对应每个方向的电机的每个第一轨迹段对应的轨迹参数,所述对应每个方向的电机的每个第一轨迹段对应的轨迹参数的表达式是通过所述第一轨迹段的起始位置、终止位置、起始速度以及终止速度表示的;According to the speed of each trajectory point and the expression of the trajectory parameter corresponding to each first trajectory segment of the motor corresponding to each direction, the trajectory parameter corresponding to each first trajectory segment of the motor corresponding to each direction is obtained, The expression of the trajectory parameter corresponding to each first trajectory segment of the motor corresponding to each direction is represented by the starting position, ending position, starting speed and ending speed of the first trajectory segment;
    根据所述轨迹函数以及每个第一轨迹段对应的轨迹参数,确定在运行时刻t的对应每个方向的电机的目标速度。According to the trajectory function and the trajectory parameters corresponding to each first trajectory segment, the target speed of the motor corresponding to each direction at the running time t is determined.
  23. 根据权利要求22所述的装置,其特征在于,所述方向的个数包括三个相互垂直的方向。The device according to claim 22, wherein the number of the directions includes three mutually perpendicular directions.
  24. 根据权利要求23所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The apparatus according to claim 23, wherein when the processor executes the computer program, the following steps are implemented:
    根据所述轨迹函数以及每个第一轨迹段对应的轨迹参数,确定在运行时刻t的对应三个方向的电机的目标位置,所述目标位置包括目标欧拉角;According to the trajectory function and the trajectory parameters corresponding to each first trajectory segment, determine the target position of the motor corresponding to the three directions at the running time t, and the target position includes the target Euler angle;
    将运行时刻t的对应三个方向的电机的目标欧拉角转换为运行时刻t的对应三个方向的电机的目标姿态四元数;Convert the target Euler angles of the motor corresponding to the three directions at the running time t into the target attitude quaternion of the motor corresponding to the three directions at the running time t;
    根据所述运行时刻t的对应三个方向的电机的目标姿态四元数,控制所述云台的三轴电机运动。According to the target attitude quaternion of the motor corresponding to the three directions at the running time t, the motion of the three-axis motor of the gimbal is controlled.
  25. 根据权利要求22所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 22, wherein, when the processor executes the computer program, the following steps are implemented:
    根据所述轨迹函数以及每个第一轨迹段对应的轨迹参数,确定在运行时刻t的对应每个方向的电机的目标位置;Determine the target position of the motor corresponding to each direction at the running time t according to the trajectory function and the trajectory parameters corresponding to each first trajectory segment;
    根据在运行时刻t的对应每个方向的电机的目标位置,控制所述云台的对应每个方向的电机运动,使运动后的对应每个方向的电机在所述运行时刻t达到所述目标位置。According to the target position of the motor corresponding to each direction at the running time t, the movement of the motor corresponding to each direction of the gimbal is controlled, so that the motor corresponding to each direction after the movement reaches the target at the running time t Location.
  26. 根据权利要求22所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 22, wherein, when the processor executes the computer program, the following steps are implemented:
    根据所述轨迹函数以及每个第一轨迹段对应的轨迹参数,确定在运行时刻t的对应每个方向的电机的目标位置和目标速度。According to the trajectory function and the trajectory parameters corresponding to each first trajectory segment, the target position and target speed of the motor corresponding to each direction at the running time t are determined.
  27. 根据权利要求26所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The apparatus according to claim 26, wherein, when the processor executes the computer program, the following steps are implemented:
    根据在运行时刻t的对应每个方向的电机的目标速度,对所述云台的对应每个方向的电机的运动进行前馈控制;According to the target speed of the motor corresponding to each direction at the running time t, feedforward control is performed on the motion of the motor corresponding to each direction of the gimbal;
    根据在运行时刻t的对应每个方向的电机的目标位置,对所述云台的对应每个方向的电机的运动进行反馈控制。According to the target position of the motor corresponding to each direction at the running time t, feedback control is performed on the movement of the motor corresponding to each direction of the pan/tilt head.
  28. 根据权利要求21所述的装置,其特征在于,所述轨迹函数包括三次以上的多项式函数。The apparatus according to claim 21, wherein the trajectory function comprises a polynomial function of more than three times.
  29. 根据权利要求28所述的装置,其特征在于,所述轨迹函数包括三次函数。The apparatus of claim 28, wherein the trajectory function comprises a cubic function.
  30. 根据权利要求21所述的装置,其特征在于,所述轨迹函数包括贝塞尔曲线函数。The apparatus of claim 21, wherein the trajectory function comprises a Bezier curve function.
  31. 根据权利要求19所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 19, wherein, when the processor executes the computer program, the following steps are implemented:
    获取用户输入的拍摄功能的拍摄信息,所述拍摄功能的拍摄信息与所述用户输入的云台的多个轨迹点的参考姿态相对应。The shooting information of the shooting function input by the user is acquired, and the shooting information of the shooting function corresponds to the reference poses of the multiple track points of the pan/tilt head input by the user.
  32. 根据权利要求31所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 31, wherein, when the processor executes the computer program, the following steps are implemented:
    在按照规划后的速度控制所述云台沿所述运动轨迹运动的过程中,根据所述用户输入的拍摄功能的拍摄信息,控制所述云台上的拍摄装置进行拍摄。During the process of controlling the pan/tilt head to move along the motion track according to the planned speed, the camera on the pan/tilt head is controlled to shoot according to the shooting information of the shooting function input by the user.
  33. 根据权利要求32所述的装置,其特征在于,所述拍摄装置搭载在所述云台上。The apparatus according to claim 32, wherein the imaging device is mounted on the pan/tilt head.
  34. 根据权利要求32所述的装置,其特征在于,所述云台包括云台拍摄装置。The device according to claim 32, wherein the PTZ comprises a PTZ shooting device.
  35. 根据权利要求31所述的装置,其特征在于,所述拍摄功能包括轨迹录像或轨迹延时。The device according to claim 31, wherein the shooting function includes track recording or track delay.
  36. 根据权利要求19所述的装置,其特征在于,所述装置还包括通信电路,所述处理器在执行所述计算机程序时,实现如下步骤:The apparatus according to claim 19, wherein the apparatus further comprises a communication circuit, and when the processor executes the computer program, the following steps are implemented:
    控制所述通信电路接收移动终端发送的所述用户输入的云台的多个轨迹点的参考姿态。The communication circuit is controlled to receive the reference poses of multiple track points of the pan/tilt head input by the user and sent by the mobile terminal.
  37. 一种云台,其特征在于,所述云台包括如权利要求19-36任一项所述 的云台控制装置。A PTZ, characterized in that the PTZ comprises the PTZ control device according to any one of claims 19-36.
  38. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如权利要求1-18任一项所述的云台控制方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the process according to any one of claims 1-18 PTZ control method.
PCT/CN2020/114108 2020-09-08 2020-09-08 Gimbal control method and apparatus, gimbal, and storage medium WO2022051916A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080007341.5A CN113272756A (en) 2020-09-08 2020-09-08 Holder control method and device, holder and storage medium
PCT/CN2020/114108 WO2022051916A1 (en) 2020-09-08 2020-09-08 Gimbal control method and apparatus, gimbal, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/114108 WO2022051916A1 (en) 2020-09-08 2020-09-08 Gimbal control method and apparatus, gimbal, and storage medium

Publications (1)

Publication Number Publication Date
WO2022051916A1 true WO2022051916A1 (en) 2022-03-17

Family

ID=77227969

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/114108 WO2022051916A1 (en) 2020-09-08 2020-09-08 Gimbal control method and apparatus, gimbal, and storage medium

Country Status (2)

Country Link
CN (1) CN113272756A (en)
WO (1) WO2022051916A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113824927B (en) * 2021-08-18 2023-07-25 浙江大华技术股份有限公司 Control method and device for automatic cruising of tripod head, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102141794A (en) * 2011-02-25 2011-08-03 广西大学 Continuous locus intersegment connecting speed processing method for numerical control system
CN204156958U (en) * 2014-11-12 2015-02-11 星际控股集团有限公司 A kind of high-definition network camera vehicle-mounted integral high-speed holder
CN104486543A (en) * 2014-12-09 2015-04-01 北京时代沃林科技发展有限公司 Equipment and method for controlling cloud deck camera by intelligent terminal in touch manner
CN107309872A (en) * 2017-05-08 2017-11-03 南京航空航天大学 A kind of flying robot and its control method with mechanical arm
CN110337621A (en) * 2018-04-09 2019-10-15 深圳市大疆创新科技有限公司 Motion profile determination, time-lapse photography method, equipment and machine readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020000130A1 (en) * 2018-06-25 2020-01-02 深圳市固胜智能科技有限公司 Time-lapse photography device and time-lapse photography method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102141794A (en) * 2011-02-25 2011-08-03 广西大学 Continuous locus intersegment connecting speed processing method for numerical control system
CN204156958U (en) * 2014-11-12 2015-02-11 星际控股集团有限公司 A kind of high-definition network camera vehicle-mounted integral high-speed holder
CN104486543A (en) * 2014-12-09 2015-04-01 北京时代沃林科技发展有限公司 Equipment and method for controlling cloud deck camera by intelligent terminal in touch manner
CN107309872A (en) * 2017-05-08 2017-11-03 南京航空航天大学 A kind of flying robot and its control method with mechanical arm
CN110337621A (en) * 2018-04-09 2019-10-15 深圳市大疆创新科技有限公司 Motion profile determination, time-lapse photography method, equipment and machine readable storage medium

Also Published As

Publication number Publication date
CN113272756A (en) 2021-08-17

Similar Documents

Publication Publication Date Title
US11611811B2 (en) Video processing method and device, unmanned aerial vehicle and system
CN108521777B (en) Control method of cradle head, cradle head and unmanned aerial vehicle
US20170039671A1 (en) Robotic self-filming system
WO2020215215A1 (en) Gimbal control method and device, gimbal, system and storage medium
WO2019134154A1 (en) Control method for non-orthogonal tripod head, tripod head thereof, and storage device
US20210112194A1 (en) Method and device for taking group photo
WO2019051640A1 (en) Control method for pan-tilt, controller, and pan-tilt
WO2019127052A1 (en) Method of repeating flight path and aerial vehicle
WO2020253207A1 (en) Projection picture anti-shake method and apparatus, and projector
KR20130037746A (en) Photographing apparatus, motion estimation apparatus, method for image compensation, method for motion estimation, computer-readable recording medium
WO2019195991A1 (en) Trajectory determination and time-lapse photography methods, device, and machine readable storage medium
CN110431507A (en) A kind of cloud platform control method and holder
JP2018206365A (en) Method for processing image, device, and electronic device
WO2022051916A1 (en) Gimbal control method and apparatus, gimbal, and storage medium
JP2017073753A (en) Correction method, program, and electronic apparatus
WO2020062281A1 (en) Cradle head control method, cradle head, movable platform and readable storage medium
WO2018191971A1 (en) Cradle head control method and cradle head
CN111406401A (en) Mode switching method and device of holder, movable platform and storage medium
WO2020000423A1 (en) Control method for gimbal, gimbal, aerial vehicle, and computer-readable storage medium
CN110060295A (en) Object localization method and device, control device follow equipment and storage medium
CN116922387B (en) Real-time control method and system for photographic robot
WO2022000138A1 (en) Photographing control method and apparatus, and gimbal and photographing system
CN113170051A (en) Holder control method, handheld holder and computer readable storage medium
CN109531578B (en) Humanoid mechanical arm somatosensory control method and device
WO2021258308A1 (en) Zoom control method and apparatus, and handheld gimbal and computer-readable storage medium

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

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

Country of ref document: EP

Kind code of ref document: A1