CN117369370A - Curve track planning method, electronic equipment and storage medium - Google Patents

Curve track planning method, electronic equipment and storage medium Download PDF

Info

Publication number
CN117369370A
CN117369370A CN202311532129.2A CN202311532129A CN117369370A CN 117369370 A CN117369370 A CN 117369370A CN 202311532129 A CN202311532129 A CN 202311532129A CN 117369370 A CN117369370 A CN 117369370A
Authority
CN
China
Prior art keywords
curve
acceleration
initial
reconstruction
speed
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202311532129.2A
Other languages
Chinese (zh)
Inventor
李姗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Inovance Technology Co Ltd
Original Assignee
Shenzhen Inovance Technology Co Ltd
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 Shenzhen Inovance Technology Co Ltd filed Critical Shenzhen Inovance Technology Co Ltd
Priority to CN202311532129.2A priority Critical patent/CN117369370A/en
Publication of CN117369370A publication Critical patent/CN117369370A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/416Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by control of velocity, acceleration or deceleration
    • G05B19/4163Adaptive control of feed or cutting velocity
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/36Nc in input of data, input key till input tape
    • G05B2219/36521Select by combination of detected force, acceleration, speed, work rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Feedback Control In General (AREA)

Abstract

The application discloses a curve track planning method, electronic equipment and a readable storage medium, wherein the curve track planning method comprises the following steps: acquiring a first constraint parameter for planning a first curve for an object to be planned; converting the first constraint parameter into a second constraint parameter of a second curve, wherein the second curve is more conductive than the first curve; and planning a curve track of the object to be planned according to the initial motion parameter of the object to be planned and the second constraint parameter to obtain the second curve. The control method and the control device solve the technical problem that the control effect of motion control by an acceleration and deceleration curve is poor.

Description

Curve track planning method, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of motion control technologies, and in particular, to a method for planning a curved track, an electronic device, and a readable storage medium.
Background
Along with the continuous development of technology, motion control technology is widely applied to high-grade numerical control equipment, robots and other mechanical equipment, wherein moving parts of the mechanical equipment and the like cannot be started and stopped at high speed, so that a reasonable acceleration and deceleration curve is required to be designed, and the starting process and the stopping process can be fast and smooth, such as a linear acceleration and deceleration curve, an exponential acceleration and deceleration curve, a trigonometric acceleration and deceleration curve and the like.
At present, a motion control system controls a motion component to rapidly and accurately perform track motion at a given speed in a very short time through a single pre-planned acceleration and deceleration curve under the normal condition, but because the smoothness of different acceleration and deceleration curves is different, a large number of speed abrupt changes exist in the motion process, and severe vibration, noise and other conditions easily occur in the motion process, so that the current control effect of performing motion control through the acceleration and deceleration curve is poor.
Disclosure of Invention
The main purpose of the present application is to provide a curve track planning method, an electronic device and a readable storage medium, which aim to solve the technical problem of poor control effect of motion control with an acceleration/deceleration curve in the prior art.
In order to achieve the above object, the present application provides a curved track planning method, which includes:
acquiring a first constraint parameter for planning a first curve for an object to be planned;
converting the first constraint parameter into a second constraint parameter of a second curve, wherein the second curve is more conductive than the first curve;
and planning a curve track of the object to be planned according to the initial motion parameter of the object to be planned and the second constraint parameter to obtain the second curve.
To achieve the above object, the present application further provides a curved track planning apparatus, including:
the acquisition module is used for acquiring first constraint parameters of a first curve planned for the object to be planned;
the conversion module is used for converting the first constraint parameters into second constraint parameters of a second curve, wherein the second curve is strong in conductivity compared with the first curve;
and the planning module is used for planning the curve track of the object to be planned according to the initial motion parameter of the object to be planned and the second constraint parameter to obtain the second curve.
The application also provides an electronic device comprising: the system comprises a memory, a processor and a program of the curve track planning method stored on the memory and capable of running on the processor, wherein the program of the curve track planning method can realize the steps of the curve track planning method when being executed by the processor.
The present application also provides a computer-readable storage medium having stored thereon a program for implementing a curve trajectory planning method, which when executed by a processor implements the steps of the curve trajectory planning method as described above.
The present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of a curve track planning method as described above.
The application provides a curve track planning method, electronic equipment and a readable storage medium, namely, first constraint parameters for planning a first curve for an object to be planned are obtained; converting the first constraint parameter into a second constraint parameter of a second curve, wherein the second curve is more conductive than the first curve; and planning a curve track of the object to be planned according to the initial motion parameter of the object to be planned and the second constraint parameter to obtain the second curve. Compared with the first curve, the second curve has strong conductivity, and the second curve is used as an acceleration and deceleration curve for planning an object to be planned, so that the speed and the acceleration of the object to be planned in the actual motion process are more continuous, namely, the second curve replaces the first curve to perform acceleration and deceleration control on the object to be planned, the speed mutation and the acceleration mutation problem of the object to be planned in the track motion process can be reduced, and meanwhile, the aim of flexibly planning different types of acceleration and deceleration curves for the object to be planned on the premise of simplifying the curve planning process can be realized by switching constraint parameters of the first curve and constraint parameters of the second curve. Instead of always controlling the object to be planned to perform track motion through a single acceleration and deceleration curve planned. Therefore, the technical defects that a large number of speed abrupt changes exist in the movement process due to different smoothness of different acceleration and deceleration curves, so that severe vibration, noise and other conditions easily occur in the movement process are overcome, and the control effect of performing movement control by using the acceleration and deceleration curves is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic flow chart of a first embodiment of a curve trajectory planning method according to the present application;
FIG. 2 is a schematic diagram showing a front-to-back comparison of sinusoidal acceleration and deceleration curves for adjusting initial reconstructed jerk according to a first embodiment of the curve trajectory planning method of the present application;
FIG. 3 is a flow chart of a second embodiment of a curve trajectory planning method according to the present application;
FIG. 4 is a schematic diagram showing a second embodiment of a curve trajectory planning method for performing secondary adjustment of an adjustment acceleration
FIG. 5 is a schematic diagram of an embodiment of a curve trajectory planning device of the present application;
fig. 6 is a schematic device structure diagram of a hardware running environment related to a curve track planning method in an embodiment of the present application.
The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings in conjunction with the embodiments.
Detailed Description
In order to make the above objects, features and advantages of the present invention more comprehensible, the following description of the embodiments accompanied with the accompanying drawings will be given in detail. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Firstly, it should be understood that parameters such as speed, track and position of a mechanical device are usually controlled in real time through a motion control technology, in a motion control process of high speed, in order to make a start process and a stop process faster and smoother, a reasonable acceleration and deceleration curve is often designed, and an acceleration and deceleration process of a motor is taken as an example, if acceleration and deceleration can be realized in a very short time, the running of the motor will be relatively stable, but different acceleration and deceleration curves have differences in characteristics, for example, a trapezoidal acceleration and deceleration curve and an exponential acceleration and deceleration curve have acceleration mutation in the control process, that is, the change amplitude of acceleration in a certain time step is larger, and a sinusoidal curve is also a trigonometric function, so that the acceleration in the motion process of the track is continuous, and therefore, the current sinusoidal curve is applied more widely in a motion control system, but a great amount of trigonometric function operation process is involved in controlling the acceleration and deceleration of the motor by using the sinusoidal curve, so that no matter whether a single acceleration and deceleration curve has a very high requirement for control hardware is realized, for motion control, for example, the acceleration and deceleration curve has a significant effect is not only simplified, but also has a significant control effect in that the control is realized by planning and the control of the acceleration and deceleration curve.
An embodiment of the present application provides a curve track planning method, in a first embodiment of the curve track planning method of the present application, referring to fig. 1, the curve track planning method includes:
step S10, obtaining first constraint parameters of a first curve for planning an object to be planned;
step S20, converting the first constraint parameter into a second constraint parameter of a second curve, wherein the second curve has strong conductivity compared with the first curve;
and step S30, performing curve track planning on the object to be planned according to the initial motion parameters and the second constraint parameters of the object to be planned to obtain the second curve.
It can be understood that during motion control, the mechanical equipment can be controlled by designing an acceleration and deceleration curve so as to avoid phenomena such as impact, desynchronization or vibration in the motion process, however, the existing acceleration and deceleration curve has certain advantages and disadvantages, for example, the linear acceleration and deceleration algorithm is simple and takes short time, but the acceleration curve is discontinuous, the problem of speed abrupt change exists, so that the processing quality of the mechanical equipment is affected, the trigonometric function acceleration and deceleration curve can utilize a sine curve between 0 and pi to construct a speed curve, and further continuous guidance of acceleration and jerk is realized, so that the purpose of smooth photochemical transition of speed is achieved, but the trigonometric function acceleration and deceleration curve can involve a large amount of trigonometric function operation and is unfavorable for realizing in hardware, and therefore, the current control effect of motion control by the acceleration and deceleration curve is poor.
In order to solve the above-mentioned drawbacks, the present embodiment provides a curve trajectory planning method, which may sequentially perform data processing through an acquisition module, a conversion module and a planning module of a control device, so as to construct a second curve on the basis of a first constraint parameter of a first curve, and achieve the purpose of converting between different acceleration and deceleration curves.
Additionally, it should be noted that, the object to be planned is used to represent a moving part of a mechanical device waiting for performing acceleration and deceleration curve planning, specifically may be a motor shaft, a mechanical arm, a screw rod, or the like, and the first curve and the second curve both belong to the acceleration and deceleration curve, specifically may be one or more curves, where the second curve has a strong conductivity compared with the first curve, for example, in one implementation manner, the first curve may be a trapezoidal acceleration and deceleration curve, the second curve may be an exponential acceleration and deceleration curve, that is, the second curve is more continuous in acceleration change compared with the first curve, for example, in another implementation manner, the first curve may be a trapezoidal acceleration and deceleration curve, and the second curve may be a sinusoidal acceleration and deceleration curve, that is, the first curve has an acceleration mutation problem, and the second curve uses a sinusoidal function sin as the acceleration, and its derivative is a triangular function, so that the acceleration mutation problem may be avoided, where the first curve may be obtained by construction (only determining the first constraint parameter of the first curve) or not be obtained by construction (in another implementation manner).
Additionally, it should be noted that, the first constraint parameter and the second constraint parameter may be one or more constraint parameters, where the constraint parameters are used to constrain a motion trajectory of an object to be planned, and may include a motion distance, a maximum motion speed, a maximum acceleration constraint, a maximum deceleration constraint, a maximum jerk constraint, and the like, and it is understood that constraint parameters of different acceleration and deceleration curves are substantially the same, but there is a difference, for example, in one embodiment, assuming that the first curve is a trapezoidal acceleration and deceleration curve, the second curve is a sinusoidal acceleration and deceleration curve, the first curve and the second curve may be the same in motion distance and maximum motion speed, and there is a difference in a maximum acceleration constraint, a maximum deceleration constraint, and a maximum acceleration, for example, a maximum acceleration constraint in the first constraint parameter is a constant, and a maximum acceleration constraint in the second constraint parameter is a trigonometric function, where the constraint parameters may be expressed as numerical values in a specific form.
Additionally, it should be noted that, the initial motion parameter is used to represent an initial real-time motion state, and is determined by a current time step of the object to be planned, specifically may be an initial acceleration, an initial speed, or the like, and may be acquired by a set sensor, and an abscissa of the curve may be set as time when the curve is planned, and an ordinate of the curve may be set as a position, a speed, an acceleration, a jerk, or the like, for example, in one embodiment, assuming that an ordinate of the curve is a speed, and an abscissa of the curve is a time, the second curve is a speed-time sinusoidal curve of the object to be planned, and in addition, a curve segment number may be set when the curve is planned, specifically may be two segments, three segments, or four segments, or the like.
As an example, steps S10 to S30 include: acquiring initial motion parameters of an object to be planned, planning a trapezoidal acceleration and deceleration curve for the object to be planned according to the initial motion parameters, and determining first constraint parameters of the trapezoidal acceleration and deceleration curve; the first constraint parameters are input into a preset curve conversion model, and numerical conversion is carried out on the first constraint parameters through the preset curve conversion model to obtain second constraint parameters of a sine acceleration and deceleration curve, wherein the preset curve conversion model can be a curve conversion formula; and planning the object to be planned to obtain the sine acceleration and deceleration curve through the initial motion parameters and the second constraint parameters of the object to be planned. The sine acceleration and deceleration curve takes the sine value as acceleration, the derivative of the sine acceleration and deceleration curve is a trigonometric function, namely, the acceleration change is gentle, so that the problem of acceleration mutation of the trapezoid acceleration and deceleration curve can be well avoided, meanwhile, the second constraint parameter of the sine acceleration and deceleration curve is obtained by converting the first constraint parameter of the trapezoid acceleration and deceleration curve, namely, the second constraint parameter of the sine acceleration and deceleration curve is not obtained by carrying out a large amount of operation through the trigonometric function, so that the planning process of the sine acceleration and deceleration curve can be simplified, the problem of acceleration mutation of an object to be planned in track motion can be avoided, and the track planning flow of the curve can be simplified, so that the control effect of motion control by the acceleration and deceleration curve is improved.
In one embodiment, it is assumed that in the first constraint parameter, the movement distance is x and the maximum movement velocity is v max The maximum acceleration constraint is a max The maximum deceleration constraint is d max Maximum jerk constraint of J max In the initial motion parameters, the initial acceleration is v 0 An initial speed of a 0 The preset curve conversion model is as follows:
wherein a' max For maximum acceleration constraint in the second constraint parameter, d' max For maximum deceleration constraint in the second constraint parameter, at t=t a And obtaining a sinusoidal model consistent with the trapezoidal model value, wherein the sinusoidal model is specifically as follows:
v=v 0 +a′ max t a
wherein, the step of performing curve track planning on the object to be planned according to the initial motion parameter and the second constraint parameter of the object to be planned to obtain the second curve includes:
step A10, detecting whether the second curve can be planned according to the initial motion parameter and the second constraint parameter;
and step A20, if yes, planning the object to be planned to obtain the second curve according to the initial motion parameter and the second constraint parameter.
In this embodiment, it should be noted that, since the sinusoidal acceleration and deceleration curve has the track specification standard, and further when the sinusoidal acceleration and deceleration curve is constructed, it is required to ensure that the sinusoidal acceleration and deceleration curve can be constructed under the initial motion parameter and the second constraint parameter, and meanwhile, since the sinusoidal acceleration and deceleration curve has the curve planning reversal when the given acceleration and the given speed are set unreasonably, the sinusoidal acceleration and deceleration curve obtained finally cannot be ensured to meet the actual motion requirement of the object to be planned through the conversion of the curve conversion model in the actual application scenario.
To solve the above-mentioned drawbacks, it is first detected by setting specific detection means whether a sinusoidal acceleration-deceleration curve can be planned or not, and when the sinusoidal acceleration-deceleration curve cannot be normally obtained, the constraint parameters that can be used to construct the sinusoidal acceleration-deceleration curve are reconstructed by setting constraint parameter reconstruction means, it being understood that reconstruction is only required if the initial acceleration is smaller than the maximum acceleration limit (determined by positive or negative of the product of the initial acceleration and the initial velocity), and the aim of the reconstruction is to ensure the continuation of the sinusoidal acceleration-deceleration curve, for example, in one embodiment, the initial velocity v can be calculated by 0 And initial acceleration a 0 As a condition for determining whether reconstruction of the sinusoidal acceleration and deceleration curve is required, at an initial velocity v 0 And initial acceleration a 0 If the product of (2) is positive, the current state of the object to be planned is positioned in the acceleration section of the sine acceleration and deceleration curve, and the initial speed v 0 And initial acceleration a 0 When the product of (2) is negative, thenRepresenting the deceleration of the current state of the object to be planned in a sinusoidal acceleration/deceleration curve, wherein, taking the current state of the object to be planned in an acceleration section as an example, the maximum acceleration limit a is used at this time max A determination amount for whether the sinusoidal acceleration/deceleration curve is reconstructed is determined, if the initial acceleration a is determined 0 Less than the maximum acceleration limit a max And initial acceleration a 0 Is not zero, the initial point of the sinusoidal acceleration and deceleration curve at the curve segment is positioned at the maximum acceleration limit a max The sine acceleration/deceleration curve under the limit is on, i.e. the sine acceleration/deceleration curve is continuous, by determining the initial point at which the maximum acceleration limit a max The phase of the sine acceleration and deceleration curve under the limit is located, and a motion reconstruction parameter corresponding to the curve section can be calculated through the phase, wherein the motion reconstruction parameter is used for representing the motion parameter obtained by reconstruction, and specifically can comprise a reconstruction initial speed, a reconstruction initial position, a reconstruction distance and the like, and a preset reconstruction model is set for reconstruction according to the difference of the second constraint parameter, and the preset reconstruction model can specifically be as follows:
x'=x+(x 0 -x 0 ')
wherein x 'is the reconstructed initial distance, x' 0 Reconstructing the initial position, v' 0 The initial velocity is reconstructed, w is the phase, and J is the jerk constraint.
As an example, steps a10 to a20 include: determining the parameter total quantity of the initial motion parameter and the second constraint parameter, and detecting whether the sinusoidal acceleration and deceleration curve can be planned according to the magnitude relation between the parameter total quantity and the preset parameter quantity; if the sinusoidal acceleration and deceleration curve can be obtained through planning is detected, the second curve is obtained for the object to be planned according to the initial speed, the initial acceleration and the second constraint parameter; if the fact that the second curve can not be planned is detected, reconstructing the initial speed and the initial acceleration through a preset reconstruction model to obtain a reconstructed initial speed and a reconstructed initial acceleration; and planning the object to be planned to obtain the sinusoidal acceleration and deceleration curve according to the reconstruction initial speed, the reconstruction initial acceleration and the second constraint parameter.
The specific steps of determining the parameter total amount of the initial motion parameter and the second constraint parameter, and detecting whether the sinusoidal acceleration/deceleration curve can be planned according to the magnitude relation between the parameter total amount and the preset parameter amount are as follows:
if the total parameter is greater than or equal to the preset parameter number, determining that the sinusoidal acceleration and deceleration curve can be planned, if the total parameter is less than the preset parameter number, determining that the sinusoidal acceleration and deceleration curve cannot be planned, for example, assuming that the total parameter is zero, recording that the total parameter is added with 1 for each initial motion parameter and each second constraint parameter, and the preset parameter number is a specific value, and comparing the two parameters to obtain whether the sinusoidal acceleration and deceleration curve can be planned.
Firstly determining whether a sinusoidal acceleration and deceleration curve can be planned through the initial motion parameters and the second constraint parameters, when determining that the sinusoidal acceleration and deceleration curve can be planned, planning an object to be planned by utilizing the existing initial motion parameters and the second constraint parameters to obtain the sinusoidal acceleration and deceleration curve, when determining that the sinusoidal acceleration and deceleration curve can not be planned, obtaining a motion reconstruction parameter through reconstructing the initial motion parameters, and planning the sinusoidal acceleration and deceleration curve according to the motion reconstruction parameter and the second constraint parameters, namely, ensuring that the sinusoidal acceleration and deceleration curve meeting the actual requirements of a user can be planned through the curve track planning method, thereby avoiding the technical defect that the curve planning is reversed due to unreasonable initial motion parameter setting, and laying a foundation for completely solving the acceleration mutation problem in the motion control process by the acceleration and deceleration curve on the premise of improving the control effect of motion control by the acceleration and deceleration curve.
The step of detecting whether the second curve can be obtained by planning according to the initial motion parameter and the second constraint parameter comprises the following steps:
step B10, determining acceleration mutation parameters of the object to be planned according to the initial speed and the initial acceleration;
and step B20, determining whether the second curve can be planned or not by comparing the magnitude relation between the acceleration abrupt change parameter and the acceleration constraint parameter.
In this embodiment, it should be noted that, since the number of parameters is not enough to fully feed back whether the object to be planned can plan the standard sinusoidal acceleration-deceleration curve under the constraint of the initial acceleration and the initial speed, further, the acceleration mutation parameter can be determined by further calculating the initial acceleration and the initial speed, and determining whether the sinusoidal acceleration-deceleration curve can be planned by the acceleration mutation parameter, where the acceleration mutation parameter is used to represent the acceleration mutation amplitude, and may specifically be the product of the initial acceleration and the initial speed, and the acceleration constraint parameter may specifically be the maximum acceleration or the maximum deceleration.
As an example, steps B10 to B20 include: calculating the product of the initial speed and the initial acceleration, and taking the product of the initial speed and the initial acceleration as an acceleration mutation parameter of the object to be planned; and if the acceleration abrupt change parameter is determined to be smaller than the maximum deceleration in the acceleration constraint parameter, determining that the sinusoidal acceleration and deceleration curve cannot be planned, and if the acceleration abrupt change parameter is determined to be larger than or equal to the maximum deceleration in the acceleration constraint parameter, determining that the sinusoidal acceleration and deceleration curve can be planned.
As another example, steps B10 to B20 include: calculating the product of the initial speed and the initial acceleration, and taking the product of the initial speed and the initial acceleration as an acceleration mutation parameter of the object to be planned; and if the acceleration abrupt change parameter is determined to be larger than the maximum acceleration in the acceleration constraint parameter, determining that the sinusoidal acceleration and deceleration curve cannot be planned, and if the acceleration abrupt change parameter is determined to be smaller than or equal to the maximum acceleration in the acceleration constraint parameter, determining that the sinusoidal acceleration and deceleration curve can be planned.
By setting the product of the initial speed and the initial acceleration as a judging condition when determining whether the sinusoidal acceleration and deceleration curve can be planned, and further judging whether the sinusoidal acceleration and deceleration curve can be planned according to the magnitude relation between the product of the initial speed and the initial acceleration and the acceleration and deceleration constraint, whether the acceleration and deceleration mutation of the object to be planned on the sinusoidal acceleration and deceleration curve meets the standard specification can be accurately judged, so that the accuracy of judging whether the sinusoidal acceleration and deceleration curve can be constructed is improved.
The motion reconstruction parameters comprise initial reconstruction acceleration, the second constraint parameters comprise jerk constraint parameters and distance constraint parameters, and the step of planning the object to be planned to obtain the second curve according to the motion reconstruction parameters and the second constraint parameters comprises the following steps:
step C10, when the initial reconstructed acceleration is not a preset acceleration, determining a first distance variation of the object to be planned under the common constraint of the initial reconstructed acceleration and the jerk constraint parameter;
step C20, detecting whether the distance difference between the first distance variation and the distance constraint parameter is smaller than a preset distance difference threshold;
And step C30, if yes, iteratively adjusting the reconstructed jerk corresponding to the initial reconstructed acceleration, and returning to the execution step: determining a first distance variation of the object to be planned under the common constraint of the initial reconstruction acceleration and the jerk constraint parameter until the distance difference value is greater than or equal to the preset distance difference value threshold value;
and step C40, if not, planning the object to be planned to obtain the second curve according to the motion reconstruction parameters and the second constraint parameters.
In this embodiment, it should be noted that, when the sinusoidal acceleration and deceleration curve cannot be normally constructed, the motion parameters of the object to be planned need to be reconstructed, but the obtained motion reconstruction parameters do not necessarily meet the sinusoidal acceleration and deceleration curve specification, and further before the sinusoidal acceleration and deceleration standard curve is constructed, the motion reconstruction parameters still need to be determined, for example, assuming that the initial reconstruction speed in the motion reconstruction parameters is a 1 Since the sine acceleration and deceleration standard curve requires that the initial velocity must be zero, then at a 1 When not zero, a is needed to be firstly carried out 1 To zero, wherein the manner of lowering may specifically be that of lowering by controlling the device, at a 1 Drop to zero due to a 1 The motion reconstruction parameters are changed, other motion reconstruction parameters are changed at the moment, whether the changed motion reconstruction parameters are reasonable is further determined, and because the sine acceleration and deceleration curve still has reverse risk when the motion reconstruction parameters are unreasonable, the adaptive adjustment of relevant parameters is still required under the unreasonable condition to ensure that the construction of the sine acceleration and deceleration curve meets the actual application requirements, and when the first initial reconstruction speed is zero, the determination of whether the given speed and the given distance are reasonable is required to avoid the problem of the reverse direction of the sine acceleration and deceleration curve, for example, in one embodiment, the method is assumed that a 1 Above, the initial reconstruction speed and initial reconstruction distance are as follows:
wherein J' max For jerk limitation in the second constraint parameter, v' 0 For the initial reconstruction speed, x' is the initial reconstruction distance (the distance difference between the first distance variation and the distance constraint parameter), a 1 For initial reconstructed acceleration, x is a distance constraint parameter.
Additionally, it should be noted that the jerk constraint parameter is used to represent a jerk constraint value, the distance constraint parameter is used to represent a distance constraint specific value, and the first distance variation is used to characterize the distance that the object to be planned moves from the starting position to the ending position, i.e. the initial reconstructed acceleration a 1 Under jerk constraint values in the second constraint parameters J' max The following straight-down displacement, wherein the straight-down displacement specifically may be:
since the object to be planned will move in the opposite direction when the direct-falling displacement is greater than the distance constraint specific value, the reconstructed jerk corresponding to the initial reconstructed acceleration needs to be adjusted at this time so that the direct-falling displacement is smaller than the distance constraint specific value, and the specific adjustment mode may be a newton iteration method, for example, in one implementation mode, it is assumed that the reconstructed jerk is iteratively adjusted by the newton iteration method, that is, the jerk J 1 As an independent variable, a distance difference between the first distance variation and the distance constraint parameter is a dependent variable, and the independent variable and the dependent variable are substituted into the following formula:
the residual displacement difference is obtained by using the initial motion variable as one point, the residual displacement obtained by using the mechanical constraint maximum jerk is obtained by using the other point, the residual displacement function between the two points is a monotonically decreasing function of the maximum jerk, and the function value, i.e. the independent variable value when the residual displacement difference is 0 or close to 0, is the actual maximum jerk, for example, in an implementation manner, the jerk with the first displacement difference larger than zero is taken as the actual maximum jerk, and referring to fig. 2, fig. 2 is a schematic diagram of the front-back comparison of the sinusoidal acceleration and deceleration curve for adjusting the initial reconstructed jerk.
As an example, steps C10 to C40 include: determining whether the initial reconstructed acceleration is zero, and determining a first distance variation of the object to be planned according to the initial reconstructed acceleration and the jerk constraint parameter when the initial reconstructed acceleration is not zero; the first distance variation and the distance constraint parameter are subjected to difference to obtain a distance difference value, and whether the distance difference value is smaller than a preset distance difference value threshold value is detected; if the distance difference value is detected to be smaller than the preset distance difference value threshold value, the reconstructed jerk corresponding to the initial reconstructed acceleration is adjusted through a Newton iteration method, the adjusted reconstructed jerk is used as the reconstructed jerk, and the execution steps are returned: determining a first distance variation of the object to be planned under the common constraint of the initial reconstruction acceleration and the jerk constraint parameter until the distance difference value is greater than or equal to the preset distance difference value threshold value; and if the distance difference value is detected to be larger than or equal to a preset distance difference value threshold value, planning the object to be planned to obtain the second curve according to the motion reconstruction parameter and the second constraint parameter.
The step of planning the object to be planned to obtain the second curve according to the motion reconstruction parameter and the second constraint parameter includes the steps of:
step D10, detecting whether to reconstruct the motion reconstruction parameters secondarily according to the initial reconstruction speed;
step D20, if yes, performing secondary reconstruction on the initial reconstruction speed to obtain a secondary initial reconstruction speed, and performing secondary reconstruction on the initial reconstruction distance to obtain a secondary initial reconstruction distance, wherein the secondary initial reconstruction speed is smaller than or equal to the speed constraint parameter;
step D30, determining the ending reconstruction speed of the object to be planned under the initial reconstruction acceleration when the secondary initial reconstruction distance is larger than a preset distance threshold value;
step D40, adjusting the initial reconstruction acceleration according to the corresponding relation between the initial reconstruction speed and the final reconstruction speed to obtain an adjusted acceleration;
and D50, constructing the second curve according to the secondary initial reconstruction speed, the secondary initial reconstruction distance, the adjustment acceleration and the second constraint parameter.
In this embodiment, it should be noted that, after the adaptive adjustment jerk algorithm is set, it may be determined that the reconstructed acceleration meets the requirement of the sinusoidal acceleration and deceleration standard curve, that is, the degree of jump is controlled within a reasonable range, so as to avoid the problem of sinusoidal inversion caused by unreasonable degree of jump, but the problem of sinusoidal inversion caused by the initial reconstruction speed and the initial reconstruction distance still exists, so that it is required to determine whether there is a problem of curve inversion through the reconstruction of the initial speed, and perform secondary reconstruction on the motion reconstruction parameters when there is a problem of curve inversion, specifically, it may be determined according to the range to which the initial reconstruction parameters belong, if secondary reconstruction is performed, it is determined whether there is a curve inversion risk of the sinusoidal acceleration and deceleration curve after secondary reconstruction according to the secondary initial reconstruction distance, and after determining that there is a curve inversion risk, performing acceleration adaptive adjustment through the initial reconstruction speed and the termination of reconstruction speed, so as to obtain the adjusted acceleration, and finally construct the sinusoidal acceleration and deceleration curve depending on the adjusted acceleration.
As an example, step D10 to step D50 include: detecting whether the motion reconstruction parameters are secondarily reconstructed according to the range of the initial reconstruction speed; if the motion reconstruction parameter is detected to be secondarily reconstructed, secondarily reconstructing the initial reconstruction speed into a secondary initial reconstruction speed and secondarily reconstructing the initial reconstruction distance into a secondary initial reconstruction distance, wherein the secondary initial reconstruction speed is smaller than or equal to the speed constraint parameter; when the secondary initial reconstruction distance is larger than a preset distance threshold value, calculating the termination reconstruction speed of the object to be planned under the initial reconstruction acceleration; according to the corresponding relation between the initial reconstruction speed and the final reconstruction speed, the initial reconstruction acceleration is adjusted to obtain an adjustment acceleration; and constructing the second curve according to the secondary initial reconstruction speed, the secondary initial reconstruction distance, the adjustment acceleration and the second constraint parameter.
The step of adjusting the initial reconstruction acceleration according to the correspondence between the initial reconstruction speed and the final reconstruction speed to obtain an adjusted acceleration may be:
if the initial reconstruction speed is smaller than the final reconstruction speed, the initial reconstruction acceleration is adjusted to be:
the step of adjusting the initial reconstruction acceleration according to the correspondence between the initial reconstruction speed and the final reconstruction speed to obtain an adjusted acceleration may also be:
if the initial reconstruction speed is greater than the end reconstruction speed and the end reconstruction speed is greater than or equal to zero, the initial reconstruction acceleration is adjusted to be:
the step of adjusting the initial reconstruction acceleration according to the correspondence between the initial reconstruction speed and the final reconstruction speed to obtain an adjusted acceleration may further include:
if the initial reconstruction speed is greater than the final reconstruction speed and the final reconstruction speed is less than zero, and at the same time, the distance sum of the first distance from which the initial reconstruction speed drops to zero and the second distance from which the final reconstruction speed drops to zero is less than or equal to the movement distance x, the initial reconstruction acceleration is adjusted to be:
It will be appreciated that the sinusoidal acceleration and deceleration profile does not suffer from profile reversal when the distance sum of the first distance at which the initial reconstruction speed drops to zero and the second distance at which the final reconstruction speed drops to zero is greater than the movement distance x.
Wherein, according to the initial reconstruction speed, the step of detecting whether to reconstruct the motion reconstruction parameter secondarily includes:
step E10, determining whether to reconstruct the motion reconstruction parameters secondarily according to the direction between the initial reconstruction speed and the initial reconstruction distance; and/or
And E20, determining whether to reconstruct the motion reconstruction parameters secondarily according to the magnitude relation between the initial reconstruction speed and the speed constraint parameters.
As an example, steps E10 to E20 include: determining not to perform secondary reconstruction on the motion reconstruction parameters when the initial reconstruction speed and the initial reconstruction distance are consistent in direction, and determining to perform secondary reconstruction on the motion reconstruction parameters when the initial reconstruction speed and the initial reconstruction distance are inconsistent in direction; and/or
And when the initial reconstruction speed is greater than the speed constraint parameter, determining to perform secondary reconstruction on the motion reconstruction parameter, and when the initial reconstruction speed is less than or equal to the speed constraint parameter, determining not to perform secondary reconstruction on the motion reconstruction parameter.
In one embodiment, when determining the motion reconstruction parameter in a direction between the initial reconstruction speed and the initial reconstruction distance, performing a secondary reconstruction, a speed and a distance obtained by the secondary reconstruction are as follows:
v′ 0 =0
and determining the secondary reconstruction of the motion reconstruction parameters according to the size relation between the initial reconstruction speed and the speed constraint parameters, wherein the speed and the distance obtained by the secondary reconstruction are as follows:
v′ 0 =v max
the embodiment of the application provides a curve track planning method, namely, a first constraint parameter for planning a first curve for an object to be planned is obtained; converting the first constraint parameter into a second constraint parameter of a second curve, wherein the second curve is more conductive than the first curve; and planning a curve track of the object to be planned according to the initial motion parameter of the object to be planned and the second constraint parameter to obtain the second curve. Compared with the first curve, the second curve has strong conductivity, and the second curve is used as an acceleration and deceleration curve for planning an object to be planned, so that the speed and the acceleration of the object to be planned in the actual motion process are more continuous, namely, the second curve replaces the first curve to perform acceleration and deceleration control on the object to be planned, the speed mutation and the acceleration mutation problem of the object to be planned in the track motion process can be reduced, and meanwhile, the aim of flexibly planning different types of acceleration and deceleration curves for the object to be planned on the premise of simplifying the curve planning process can be realized by switching constraint parameters of the first curve and constraint parameters of the second curve. Instead of always controlling the object to be planned to perform track motion through a single acceleration and deceleration curve planned. Therefore, the technical defects that a large number of speed abrupt changes exist in the movement process due to different smoothness of different acceleration and deceleration curves, so that severe vibration, noise and other conditions easily occur in the movement process are overcome, and the control effect of performing movement control by using the acceleration and deceleration curves is improved.
Example two
Further, referring to fig. 3, in another embodiment of the present application, the same or similar content as that of the first embodiment may be referred to the description above, and will not be repeated. On the basis, the step of constructing the second curve according to the secondary initial reconstruction speed, the secondary initial reconstruction distance, the adjustment acceleration and the second constraint parameter comprises the following steps:
step F10, determining whether the object to be planned has reverse motion or not under the secondary initial reconstruction speed and the secondary initial reconstruction distance;
f20, if so, carrying out secondary adjustment on the adjustment acceleration according to the termination reconstruction speed to obtain a target acceleration;
and F30, constructing the second curve according to the secondary initial reconstruction speed, the secondary initial reconstruction distance, the target acceleration and the second constraint parameter.
In this embodiment, it should be noted that, after the motion parameters such as the speed, the acceleration, the jerk and the like are determined, the curve reversal problem of the sinusoidal acceleration and deceleration curve is not caused by the rationality problem of the setting, the total relative displacement of the object to be planned in a certain period needs to be synchronously controlled within a reasonable range, otherwise, the reversal motion still occurs, that is, after the initial motion parameters are reconstructed secondarily, the distance x from the initial reconstruction speed to the final reconstruction speed needs to be calculated continuously 2 And judging whether the object to be planned can move reversely according to the difference value between the object to be planned and the motion distance difference dx, wherein the condition that the reverse movement occurs is that the total relative distance is smaller than the displacement from the initial speed to the final speed.
As an example, steps F10 to F30 include: determining a total relative distance from the secondary initial reconstruction speed to a corresponding secondary final reconstruction speed under the secondary initial reconstruction speed and the secondary reconstruction distance, and carrying out difference on the total relative distance and the secondary reconstruction distance to obtain a difference value, wherein when the difference value is greater than or equal to zero, the object to be planned does not have reverse motion, and when the difference value is less than zero, the object to be planned has reverse motion; if the object to be planned is determined to have reverse motion, carrying out secondary adjustment on the adjustment acceleration according to the termination reconstruction speed to obtain a target acceleration; and constructing the second curve according to the secondary initial reconstruction speed, the secondary initial reconstruction distance, the target acceleration and the second constraint parameter.
The secondary adjustment of the adjustment acceleration according to the termination reconstruction speed may specifically be performed to obtain the target acceleration:
If the end reconstruction speed is zero, calculating a straight-down displacement:
when x-dx is less than 0, the target acceleration obtained by secondary adjustment is as follows:
the secondary adjustment of the adjustment acceleration according to the termination reconstruction speed may specifically be performed to obtain the target acceleration, where:
if the end reconstruction speed is less than zero, calculating a straight-down displacement:
when x-dx is less than 0, the target acceleration obtained by secondary adjustment is as follows:
the step of secondarily adjusting the adjustment acceleration according to the termination reconstruction speed to obtain a target acceleration may be specifically:
if the end reconstruction speed is greater than zero and less than the secondary initial reconstruction speed, calculating a direct-falling displacement as:
when x-dx is less than 0, the target acceleration obtained by secondary adjustment is as follows:
the step of secondarily adjusting the adjustment acceleration according to the termination reconstruction speed to obtain a target acceleration may be specifically:
if the end reconstruction speed is greater than zero and greater than the secondary initial reconstruction speed, calculating a direct drop displacement as:
when x-dx is less than 0, the target acceleration obtained by secondary adjustment is as follows:
in one embodiment, referring to fig. 4, fig. 4 is a front-to-back comparison schematic diagram of the secondary adjustment of the adjustment acceleration.
Wherein the step of constructing the second curve according to the secondary initial reconstruction speed, the secondary initial reconstruction distance, the adjustment acceleration and the second constraint parameter includes:
g10, when the secondary initial reconstruction speed is equal to the speed constraint parameter, determining a first curve segment number corresponding to the second curve;
step G20, when the secondary initial reconstruction speed is smaller than or equal to the speed constraint parameter, determining a speed extremum of the object to be planned under the common constraint of the secondary initial reconstruction speed, the secondary initial reconstruction distance and the target acceleration;
g30, determining a second curve segment number corresponding to the second curve according to the magnitude relation between the speed extreme value and the speed constraint parameter;
and G40, constructing the second curve according to the first curve segment number or the second curve segment number.
In this embodiment, it should be noted that, the number of curve segments of the sinusoidal acceleration/deceleration curve under different parameter constraints is different, and the velocity v can be reconstructed specifically by the secondary initial reconstruction 2 And a maximum speed constraint v' in a second constraint parameter " max The magnitude relationship between the two values is compared, and the speed extremum may be the maximum attainable speed, for example, in one embodiment, if the speed v is reconstructed from the second initial reconstruction 2 Equal to the maximum speed constraint v' max The curve is divided into two sections of a constant speed section and a deceleration section; if the secondary initial reconstruction speed v 2 Constraint v' less than maximum speed " max Calculating the maximum reachable speed under the current parameters; if the calculated maximum achievable speed is greater than the maximum speed constraint v' max If the final speed is less than 0, two sections exist from the maximum reachable speed section to the final speed, and the curve is divided into four sections; if the calculated maximum reachable speed is less than or equal to the maximum speed constraint v' max And if the final speed is less than 0, the maximum reachable speed section to the final speed are two sections, and the curve is divided into three sections.
As an example, steps G10 to G40 include: when the secondary initial reconstruction speed is equal to the speed constraint parameter, taking a preset curve segment number as a first curve segment number corresponding to the second curve; when the secondary initial reconstruction speed is smaller than or equal to the speed constraint parameter, calculating a speed extremum of the object to be planned under the common constraint of the secondary initial reconstruction speed, the secondary initial reconstruction distance and the target acceleration; determining a second curve segment number corresponding to the second curve according to the magnitude relation between the speed extreme value and the speed constraint parameter; and constructing the second curve through the first curve segment number or the second curve segment number.
The embodiment of the application provides a second curve construction method, namely, determining whether the object to be planned has reverse motion or not under the secondary initial reconstruction speed and the secondary initial reconstruction distance; if yes, carrying out secondary adjustment on the adjustment acceleration according to the termination reconstruction speed to obtain a target acceleration; and constructing the second curve according to the secondary initial reconstruction speed, the secondary initial reconstruction distance, the target acceleration and the second constraint parameter. Compared with the method for avoiding the reverse problem of the sinusoidal curve by adjusting the jerk and the acceleration, and further obtaining the mode of constructing and obtaining the second curve, in the embodiment of the application, when the second curve is constructed, whether the object to be planned can move reversely on the displacement is judged through the secondary reconstruction speed and the secondary initial reconstruction distance, so that when the reverse movement exists, the purpose of completely avoiding the reverse problem of the curve in the construction process of the second curve can be realized by adaptively adjusting the adjustment acceleration, and further, the technical defect of curve planning reversal caused by unreasonable given initial speed and given displacement is overcome, and a foundation is laid for improving the control effect of motion control by the acceleration and deceleration curve.
Example III
The embodiment of the application also provides a curve track planning device, referring to fig. 5, the curve track planning device includes:
an obtaining module 101, configured to obtain a first constraint parameter for planning a first curve for an object to be planned;
a conversion module 102, configured to convert the first constraint parameter into a second constraint parameter of a second curve, where the second curve is more conductive than the first curve;
and the planning module 103 is configured to perform curve track planning on the object to be planned according to the initial motion parameter and the second constraint parameter of the object to be planned, so as to obtain the second curve.
Optionally, the planning module 103 is further configured to:
detecting whether the second curve can be planned according to the initial motion parameter and the second constraint parameter;
if yes, planning the object to be planned to obtain the second curve according to the initial motion parameter and the second constraint parameter;
if not, reconstructing the initial motion parameters to obtain motion reconstruction parameters;
and planning the object to be planned to obtain the second curve according to the motion reconstruction parameters and the second constraint parameters.
Optionally, the initial motion parameter includes an initial velocity and an initial acceleration, the second constraint parameter includes an acceleration constraint parameter, and the planning module 103 is further configured to:
determining acceleration mutation parameters of the object to be planned according to the initial speed and the initial acceleration;
and determining whether the second curve can be planned or not by comparing the magnitude relation between the acceleration abrupt change parameter and the acceleration constraint parameter.
Optionally, the motion reconstruction parameters include an initial reconstruction acceleration, the second constraint parameters include a jerk constraint parameter and a distance constraint parameter, and the planning module 103 is further configured to:
when the initial reconstructed acceleration is not the preset acceleration, determining a first distance variation of the object to be planned under the common constraint of the initial reconstructed acceleration and the jerk constraint parameter;
detecting whether a distance difference between the first distance variation and the distance constraint parameter is smaller than a preset distance difference threshold;
if yes, iteratively adjusting the reconstructed jerk corresponding to the initial reconstructed acceleration, and returning to the execution step: determining a first distance variation of the object to be planned under the common constraint of the initial reconstruction acceleration and the jerk constraint parameter until the distance difference value is greater than or equal to the preset distance difference value threshold value;
If not, the second curve is obtained for the object to be planned according to the motion reconstruction parameters and the second constraint parameters.
Optionally, the motion reconstruction parameters include an initial reconstruction speed, an initial reconstruction acceleration, and an initial reconstruction distance, the second constraint parameters include a speed constraint parameter, and the planning module 103 is further configured to:
detecting whether to perform secondary reconstruction on the motion reconstruction parameters according to the initial reconstruction speed;
if yes, the initial reconstruction speed is secondarily reconstructed to be a secondary initial reconstruction speed, and the initial reconstruction distance is secondarily reconstructed to be a secondary initial reconstruction distance, wherein the secondary initial reconstruction speed is smaller than or equal to the speed constraint parameter;
when the secondary initial reconstruction distance is larger than a preset distance threshold value, determining the termination reconstruction speed of the object to be planned under the initial reconstruction acceleration;
according to the corresponding relation between the initial reconstruction speed and the final reconstruction speed, the initial reconstruction acceleration is adjusted to obtain an adjustment acceleration;
and constructing the second curve according to the secondary initial reconstruction speed, the secondary initial reconstruction distance, the adjustment acceleration and the second constraint parameter.
Optionally, the planning module 103 is further configured to:
determining whether to reconstruct the motion reconstruction parameters secondarily according to the direction between the initial reconstruction speed and the initial reconstruction distance; and/or
And determining whether to reconstruct the motion reconstruction parameters secondarily according to the magnitude relation between the initial reconstruction speed and the speed constraint parameters.
Optionally, the planning module 103 is further configured to:
determining whether the object to be planned has reverse motion or not under the secondary initial reconstruction speed and the secondary initial reconstruction distance;
if yes, carrying out secondary adjustment on the adjustment acceleration according to the termination reconstruction speed to obtain a target acceleration;
and constructing the second curve according to the secondary initial reconstruction speed, the secondary initial reconstruction distance, the target acceleration and the second constraint parameter.
Optionally, the planning module 103 is further configured to:
when the secondary initial reconstruction speed is equal to the speed constraint parameter, determining a first curve segment number corresponding to the second curve;
when the secondary initial reconstruction speed is smaller than or equal to the speed constraint parameter, determining a speed extremum of the object to be planned under the common constraint of the secondary initial reconstruction speed, the secondary initial reconstruction distance and the target acceleration;
Determining a second curve segment number corresponding to the second curve according to the magnitude relation between the speed extreme value and the speed constraint parameter;
and constructing the second curve according to the first curve segment number or the second curve segment number.
The curve track planning device provided by the invention adopts the curve track planning method in the embodiment, and solves the technical problem that the control effect of motion control by an acceleration and deceleration curve is poor. Compared with the prior art, the beneficial effects of the curve track planning device provided by the embodiment of the invention are the same as those of the curve track planning method provided by the embodiment, and other technical features in the curve track planning device are the same as those disclosed by the method of the embodiment, so that the description is omitted herein.
Example IV
The embodiment of the invention provides electronic equipment, which comprises: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the curve track planning method of the first embodiment.
Referring now to fig. 6, a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 6 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 6, the electronic device may include a processing apparatus 1001 (e.g., a central processing unit, a graphics processor, etc.), which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage apparatus 1003 into a Random Access Memory (RAM) 1004. In the RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, the ROM1002, and the RAM1004 are connected to each other by a bus 1005. An input/output (I/O) interface 1006 is also connected to the bus.
In general, the following systems may be connected to the I/O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, and the like; an output device 1008 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage device 1003 including, for example, a magnetic tape, a hard disk, and the like; and communication means 1009. The communication means may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While electronic devices having various systems are shown in the figures, it should be understood that not all of the illustrated systems are required to be implemented or provided. More or fewer systems may alternatively be implemented or provided.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 1009, or installed from the storage device 1003, or installed from the ROM 1002. The above-described functions defined in the method of the embodiment of the present disclosure are performed when the computer program is executed by the processing device 1001.
The electronic equipment provided by the invention adopts the curve track planning method in the embodiment, and solves the technical problem of poor control effect of motion control by an acceleration and deceleration curve. Compared with the prior art, the beneficial effects of the electronic device provided by the embodiment of the invention are the same as those of the curve track planning method provided by the embodiment, and other technical features of the electronic device are the same as those disclosed by the method of the embodiment, so that the description is omitted herein.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the description of the above embodiments, particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Example five
The present embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon for performing the curve trajectory planning method in the above-described embodiment.
The computer readable storage medium according to the embodiments of the present invention may be, for example, a usb disk, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this embodiment, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The above-described computer-readable storage medium may be contained in an electronic device; or may exist alone without being assembled into an electronic device.
The computer-readable storage medium carries one or more programs that, when executed by an electronic device, cause the electronic device to: acquiring a first constraint parameter for planning a first curve for an object to be planned; converting the first constraint parameter into a second constraint parameter of a second curve, wherein the second curve is more conductive than the first curve; and planning a curve track of the object to be planned according to the initial motion parameter of the object to be planned and the second constraint parameter to obtain the second curve.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented in software or hardware. Wherein the name of the module does not constitute a limitation of the unit itself in some cases.
The computer readable storage medium provided by the invention stores the computer readable program instructions for executing the curve track planning method, and solves the technical problem of poor control effect of motion control by an acceleration and deceleration curve. Compared with the prior art, the beneficial effects of the computer readable storage medium provided by the embodiment of the invention are the same as those of the curve track planning method provided by the above embodiment, and are not described herein.
Example six
The present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of a curve track planning method as described above.
The computer program product provided by the application solves the technical problem that the control effect of motion control by an acceleration and deceleration curve is poor. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present invention are the same as those of the curve track planning method provided by the above embodiment, and are not described herein.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the claims, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application, or direct or indirect application in other related technical fields are included in the scope of the claims.

Claims (10)

1. The curve track planning method is characterized by comprising the following steps of:
acquiring a first constraint parameter for planning a first curve for an object to be planned;
converting the first constraint parameter into a second constraint parameter of a second curve, wherein the second curve is more conductive than the first curve;
and planning a curve track of the object to be planned according to the initial motion parameter of the object to be planned and the second constraint parameter to obtain the second curve.
2. The method for planning a curved track according to claim 1, wherein the step of planning the curved track of the object to be planned according to the initial motion parameter of the object to be planned and the second constraint parameter to obtain the second curve comprises:
detecting whether the second curve can be planned according to the initial motion parameter and the second constraint parameter;
if yes, planning the object to be planned to obtain the second curve according to the initial motion parameter and the second constraint parameter;
if not, reconstructing the initial motion parameters to obtain motion reconstruction parameters;
And planning the object to be planned to obtain the second curve according to the motion reconstruction parameters and the second constraint parameters.
3. The curvilinear trajectory planning method of claim 2, wherein the initial motion parameters include an initial velocity and an initial acceleration, the second constraint parameters include acceleration constraint parameters,
the step of detecting whether the second curve can be planned according to the initial motion parameter and the second constraint parameter includes:
determining acceleration mutation parameters of the object to be planned according to the initial speed and the initial acceleration;
and determining whether the second curve can be planned or not by comparing the magnitude relation between the acceleration abrupt change parameter and the acceleration constraint parameter.
4. The curvilinear path planning method of claim 2, wherein the motion reconstruction parameters comprise initial reconstructed acceleration, the second constraint parameters comprise jerk constraint parameters and distance constraint parameters,
the step of planning the object to be planned to obtain the second curve according to the motion reconstruction parameter and the second constraint parameter comprises the following steps:
when the initial reconstructed acceleration is not the preset acceleration, determining a first distance variation of the object to be planned under the common constraint of the initial reconstructed acceleration and the jerk constraint parameter;
Detecting whether a distance difference between the first distance variation and the distance constraint parameter is smaller than a preset distance difference threshold;
if yes, iteratively adjusting the reconstructed jerk corresponding to the initial reconstructed acceleration, and returning to the execution step: determining a first distance variation of the object to be planned under the common constraint of the initial reconstruction acceleration and the jerk constraint parameter until the distance difference value is greater than or equal to the preset distance difference value threshold value;
if not, the second curve is obtained for the object to be planned according to the motion reconstruction parameters and the second constraint parameters.
5. The curvilinear trajectory planning method of claim 2, wherein the motion reconstruction parameters include an initial reconstruction speed, an initial reconstruction acceleration and an initial reconstruction distance, the second constraint parameters include a speed constraint parameter,
the step of planning the object to be planned to obtain the second curve according to the motion reconstruction parameter and the second constraint parameter comprises the following steps:
detecting whether to perform secondary reconstruction on the motion reconstruction parameters according to the initial reconstruction speed;
if yes, the initial reconstruction speed is secondarily reconstructed to be a secondary initial reconstruction speed, and the initial reconstruction distance is secondarily reconstructed to be a secondary initial reconstruction distance, wherein the secondary initial reconstruction speed is smaller than or equal to the speed constraint parameter;
When the secondary initial reconstruction distance is larger than a preset distance threshold value, determining the termination reconstruction speed of the object to be planned under the initial reconstruction acceleration;
according to the corresponding relation between the initial reconstruction speed and the final reconstruction speed, the initial reconstruction acceleration is adjusted to obtain an adjustment acceleration;
and constructing the second curve according to the secondary initial reconstruction speed, the secondary initial reconstruction distance, the adjustment acceleration and the second constraint parameter.
6. The method of curve trajectory planning of claim 5, wherein said step of detecting whether to perform a secondary reconstruction of said motion reconstruction parameters based on said initial reconstruction speed comprises:
determining whether to reconstruct the motion reconstruction parameters secondarily according to the direction between the initial reconstruction speed and the initial reconstruction distance; and/or
And determining whether to reconstruct the motion reconstruction parameters secondarily according to the magnitude relation between the initial reconstruction speed and the speed constraint parameters.
7. The method of curve trajectory planning of claim 5, wherein said constructing said second curve based on said secondary initial reconstruction speed, said secondary initial reconstruction distance, said adjustment acceleration, and said second constraint parameter comprises:
Determining whether the object to be planned has reverse motion or not under the secondary initial reconstruction speed and the secondary initial reconstruction distance;
if yes, carrying out secondary adjustment on the adjustment acceleration according to the termination reconstruction speed to obtain a target acceleration;
and constructing the second curve according to the secondary initial reconstruction speed, the secondary initial reconstruction distance, the target acceleration and the second constraint parameter.
8. The method of curve trajectory planning of claim 7, wherein said constructing said second curve based on said secondary initial reconstruction speed, said secondary initial reconstruction distance, said adjustment acceleration, and said second constraint parameter comprises:
when the secondary initial reconstruction speed is equal to the speed constraint parameter, determining a first curve segment number corresponding to the second curve;
when the secondary initial reconstruction speed is smaller than or equal to the speed constraint parameter, determining a speed extremum of the object to be planned under the common constraint of the secondary initial reconstruction speed, the secondary initial reconstruction distance and the target acceleration;
determining a second curve segment number corresponding to the second curve according to the magnitude relation between the speed extreme value and the speed constraint parameter;
And constructing the second curve according to the first curve segment number or the second curve segment number.
9. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the curve track planning method of any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a program for realizing a curve trajectory planning method, the program for realizing a curve trajectory planning method being executed by a processor to realize the steps of the curve trajectory planning method according to any one of claims 1 to 8.
CN202311532129.2A 2023-11-15 2023-11-15 Curve track planning method, electronic equipment and storage medium Pending CN117369370A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311532129.2A CN117369370A (en) 2023-11-15 2023-11-15 Curve track planning method, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311532129.2A CN117369370A (en) 2023-11-15 2023-11-15 Curve track planning method, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117369370A true CN117369370A (en) 2024-01-09

Family

ID=89391141

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311532129.2A Pending CN117369370A (en) 2023-11-15 2023-11-15 Curve track planning method, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117369370A (en)

Similar Documents

Publication Publication Date Title
US11107294B2 (en) Adaptive labeling of network graphs
CN114647248B (en) Robot obstacle avoidance method, electronic device and readable storage medium
CN114987546A (en) Training method, device and equipment of trajectory prediction model and storage medium
CN116073718A (en) Motor noise suppression method, apparatus and readable storage medium
CN117369370A (en) Curve track planning method, electronic equipment and storage medium
CN115319760B (en) Mechanical arm tail end jitter suppression method and device, electronic equipment and storage medium
CN117544856A (en) Target tracking method, device, electronic equipment and readable storage medium
CN114593151A (en) Magnetic suspension bearing stopping method and device, electronic equipment and storage medium
CN115563810A (en) Lead screw service life prediction method and device, electronic equipment and readable storage medium
CN114407884B (en) Automatic driving optimization method, device, electronic equipment and readable storage medium
CN114952867A (en) Control method and device for industrial robot, electronic equipment and readable storage medium
CN114363766A (en) Equipment rotation control method and device, electronic equipment and readable storage medium
CN113378670B (en) Intelligent construction method and device and electronic equipment
CN114884420A (en) Motor voltage injection method, electronic device and storage medium
CN116372942B (en) Robot joint compensation method and device, electronic equipment and readable storage medium
CN117997208B (en) Method and device for estimating rotating speed of permanent magnet synchronous motor, electronic equipment and storage medium
CN114724528B (en) Display control method and device of display device, electronic device and storage medium
CN117997206B (en) Rotating speed control method and device of permanent magnet synchronous motor, electronic equipment and storage medium
CN116665566A (en) High-pressure injector parameter display method and device, electronic equipment and storage medium
CN116253222A (en) Door machine control method and device, electronic equipment and storage medium
CN115826500A (en) Track smoothing method, electronic device and readable storage medium
US9001125B2 (en) Operation chart rescaling
CN117341800A (en) Pose adjusting method and device of steering wheel, electronic equipment and storage medium
CN114863650B (en) Obstacle early warning method and device, electronic equipment and readable storage medium
CN117811452A (en) Inertia identification method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination