Speed planning method, device and equipment for mobile robot and storage medium

By dividing the movement process of the mobile robot into multiple stages and building the correspondence between displacement and speed, the problem of acceleration step in the prior art is solved, and the effect of extending service life and reducing failure rate is achieved.

CN119575974APending Publication Date: 2025-03-07HUBEI JIUZHOU YUNZHI TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411726520.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The speed planning method of mobile robots in the prior art leads to a step in acceleration, increasing wear between gears, shortening service life and increasing failure rate.

Method used

The movement process of the mobile robot is divided into multiple stages in time sequence, including acceleration stage, uniform acceleration stage, deceleration stage, etc., and by determining the speed and displacement expression of each stage, the corresponding relationship between displacement and speed is constructed to achieve continuous acceleration and deceleration control.

Benefits of technology

It effectively avoids the acceleration step, extends the service life of the mobile robot, reduces the failure rate, and allows microcontrollers with average performance to achieve smooth and efficient acceleration and deceleration control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119575974A_ABST
    Figure CN119575974A_ABST
Patent Text Reader

Abstract

The invention discloses a speed planning method and device for a mobile robot, equipment and a storage medium. The moving process of the mobile robot from the starting point to the terminal point is divided into a plurality of stages according to the time sequence, acceleration step is avoided, the service life of the mobile robot can be effectively prolonged, and the failure rate is reduced; besides, the corresponding relation between the displacement and the speed is constructed, so that speed control can be directly carried out on the movement process of the mobile robot subsequently based on the corresponding relation, complex calculation is not needed, and smooth and efficient acceleration and deceleration control can also be realized by a microcontroller with general performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automation technology, and in particular to a speed planning method, device, equipment and computer-readable storage medium for a mobile robot. Background Art

[0002] In the process of controlling the mobile robot from the starting point to the end point, if the conventional speed planning method is used, the speed of the mobile robot is controlled to increase linearly first, then maintain a constant speed, and finally decrease linearly. According to this speed planning method, there are two steps in acceleration, indicating that the force on the mobile robot will have two steps. This unbuffered force change will increase the wear between the gears. If this force change is applied to the mobile robot for a long time, it will shorten the service life and increase the failure rate. Summary of the invention

[0003] In order to solve the above technical problems, the present application provides a speed planning method, device, equipment and computer-readable storage medium for a mobile robot.

[0004] In a first aspect, an embodiment of the present application provides a speed planning method for a mobile robot, the speed planning method for a mobile robot comprising:

[0005] The moving process of the mobile robot from the starting point to the end point is divided into the acceleration stage, the uniform acceleration stage, the deceleration stage, the uniform speed stage, the acceleration and deceleration stage, the uniform deceleration stage and the deceleration and deceleration stage according to the time sequence, wherein the duration of the other stages except the uniform speed stage is T, the rate of change of acceleration in the acceleration stage is J, the acceleration in the uniform acceleration stage is unchanged, the rate of change of acceleration in the deceleration and acceleration stage is -J, the acceleration in the uniform speed stage is zero, the rate of change of deceleration in the acceleration and deceleration stage is -J, the deceleration in the uniform deceleration stage is unchanged, and the rate of change of deceleration in the deceleration and deceleration stage is J;

[0006] Determine the velocity expression and displacement expression corresponding to each stage, wherein the independent variable of the velocity expression is time and the dependent variable is velocity, and the independent variable of the displacement expression is time and the dependent variable is displacement;

[0007] For each target displacement, determining the target stage of the target displacement;

[0008] Combining the target displacement, the target speed expression corresponding to the target stage and the target displacement expression, the target speed corresponding to the target displacement is obtained;

[0009] By integrating all target displacements and their corresponding target velocities, the corresponding relationship between displacement and velocity is obtained.

[0010] In a second aspect, an embodiment of the present application provides a speed planning device for a mobile robot, the speed planning device for a mobile robot comprising:

[0011] A division module is used to divide the movement process of the mobile robot from the starting point to the end point into an acceleration stage, a uniform acceleration stage, a deceleration stage, a uniform speed stage, an acceleration / deceleration stage, a uniform deceleration stage and a deceleration / deceleration stage in a time sequence, wherein the duration of other stages except the uniform speed stage is T, the rate of change of acceleration in the acceleration stage is J, the acceleration in the uniform acceleration stage is constant, the rate of change of acceleration in the deceleration / acceleration stage is -J, the acceleration in the uniform speed stage is zero, the rate of change of deceleration in the acceleration / deceleration stage is -J, the deceleration in the uniform deceleration stage is constant, and the rate of change of deceleration in the deceleration / deceleration stage is J;

[0012] The first determination module is used to determine the speed expression and displacement expression corresponding to each stage, wherein the independent variable of the speed expression is time and the dependent variable is speed, and the independent variable of the displacement expression is time and the dependent variable is displacement;

[0013] A second determination module is used to determine the target stage of each target displacement;

[0014] A calculation module, used for combining the target displacement, the target speed expression corresponding to the target stage and the target displacement expression to obtain the target speed corresponding to the target displacement;

[0015] The planning module is used to integrate all target displacements and their corresponding target velocities to obtain the corresponding relationship between displacement and velocity.

[0016] In a third aspect, an embodiment of the present application provides a speed planning device for a mobile robot, the speed planning device for a mobile robot comprising a processor, a memory, and a speed planning program for a mobile robot stored in the memory and executable by the processor, wherein when the speed planning program for the mobile robot is executed by the processor, the steps of the speed planning method for a mobile robot as described in the first aspect are implemented.

[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a speed planning program for a mobile robot is stored. When the speed planning program for a mobile robot is executed by a processor, the steps of the speed planning method for a mobile robot as described in the first aspect are implemented.

[0018] The beneficial effects brought by the technical solution provided in the embodiments of the present application include:

[0019] In the embodiment of the present application, the movement process of the mobile robot from the starting point to the end point is divided into multiple stages in time sequence, which avoids step-jumps in acceleration and can effectively increase the service life of the mobile robot and reduce the failure rate; in addition, a correspondence between displacement and speed is constructed, so that the speed of the movement process of the mobile robot can be directly controlled based on the correspondence without the need for complex calculations, so that a microcontroller with average performance can also achieve smooth and efficient acceleration and deceleration control. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 This is a schematic diagram of speed planning in an embodiment of the present application;

[0021] Figure 2 A schematic diagram of a scenario for dividing acceleration;

[0022] Figure 3 It is a schematic diagram comparing the S-shaped speed curve and the trapezoidal speed curve;

[0023] Figure 4 This is a schematic diagram comparing the planned situation with the actual situation;

[0024] Figure 5 It is a schematic diagram for mirroring the deceleration section;

[0025] Figure 6 This is a schematic diagram of functional modules of an embodiment of a speed planning device for a mobile robot of the present application;

[0026] Figure 7 This is a schematic diagram of the hardware structure of a speed planning device for a mobile robot involved in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only 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 ordinary technicians in this field without creative work are within the scope of protection of this application.

[0028] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0029] In a first aspect, an embodiment of the present application provides a velocity planning method for a mobile robot.

[0030] In one embodiment, a velocity planning method for a mobile robot includes:

[0031] Step S10, dividing the movement process of the mobile robot from the starting point to the end point into an acceleration stage, a uniform acceleration stage, a deceleration stage, a uniform speed stage, an acceleration / deceleration stage, a uniform deceleration stage and a deceleration / deceleration stage in a time sequence, wherein the duration of the other stages except the uniform speed stage is T, the rate of change of acceleration in the acceleration stage is J, the acceleration in the uniform acceleration stage is constant, the rate of change of acceleration in the deceleration / acceleration stage is -J, the acceleration in the uniform speed stage is zero, the rate of change of deceleration in the acceleration / deceleration stage is -J, the deceleration in the uniform deceleration stage is constant, and the rate of change of deceleration in the deceleration / deceleration stage is J;

[0032] Step S20, determining a velocity expression and a displacement expression corresponding to each stage, wherein the independent variable of the velocity expression is time and the dependent variable is velocity, and the independent variable of the displacement expression is time and the dependent variable is displacement;

[0033] In this embodiment, the mobile robot takes the tunnel material box robot as an example. The tunnel material box robot is an automated equipment that can directly pick up and put goods on the shelf without changing layers. Its walking and translation are driven by 4 400-watt servo motors to drive 4 walking wheels respectively, and the car lifting is driven by 2 750-watt servo motors to synchronously drive 2 sets of lifting modules respectively. There are two optional configurations inside the car: hook rolling mode and hook telescopic mode. Taking the hook telescopic mode as an example, the telescopic movement is driven by a 400-watt servo motor to drive the gear and chain to make the fork do the telescopic movement, and the 4 servos complete the hooking action. Among them, the walking, lifting and telescopic mechanisms are controlled in real time and synchronously by the main control unit through the CAN bus, and work in speed mode and position mode respectively. The 4 servos control the rotation angle through RS485 single-step.

[0034] The control logic of the lifting and telescopic mechanism is relatively simple. It only needs to give the target position value during communication, and then the main control unit will judge whether the action is completed through the returned current position value and status word. The single-step control of the other four servos is also very simple. It only needs to package the target angle value into the agreed protocol message.

[0035] The following focuses on the speed control of the four traveling wheels. When the process starts, the data obtained include: target displacement distance, current position coordinate value, and the set parameters include: maximum speed allowed, maximum acceleration and deceleration, start and stop speed. Calculation is performed based on these data, and finally a corresponding sequence of displacement and speed values ​​is obtained, and the sequence length is, for example, 100. This corresponding sequence will be used as a reference in the subsequent acceleration and deceleration implementation, and the current speed value that should be fed will be quickly calculated in each control cycle (25 milliseconds).

[0036] Then let's explain the most important part of this control process: displacement-speed planning. Displacement-speed planning, as the name suggests, means that we need to find a corresponding relationship based on the current displacement feedback value to get the current feed speed. This corresponding relationship can be in two ways:

[0037] 1. Either the function correspondence v = f(s), as long as the displacement feedback value s is substituted into this function, the corresponding speed v can be calculated;

[0038] 2. Either for the corresponding sequence {Sn}, {Vn}, find out the interval s∈(Si,Si+1) of the displacement feedback value in the corresponding sequence, and directly use the object value v=Vi or Vi+1 corresponding to the upper or lower limit of the interval, or more precisely, use linear fitting to find a more reasonable value between the two corresponding values.

[0039] This embodiment selects the second method. The reason is related to computational efficiency and will be explained later.

[0040] Why do we need to find this correspondence? Because the feedback value we use is the current position coordinates, and the difference between the position coordinates and the coordinates at the beginning of the process can get the current displacement relative to time 0; and our driving mode is speed mode, so we must get this displacement-speed correspondence. The reason why the current position coordinates are used as the feedback value is that the purpose of our walking control is to reach the target position, so the current position coordinates are the most direct, objective and reliable feedback parameters. As for how to get this feedback value, see the detailed explanation below.

[0041] In kinematics, for the simplest linear motion, we believe that the velocity v of an object is a variable that changes in real time with time t, and their relationship is recorded as v(t). For a function graph of velocity changing with time, then obviously for any moment tm, the differential of velocity with respect to time is the tangent of the point on the graph corresponding to tm, that is, the velocity change or acceleration a(tm) at this moment. Similarly, it is not difficult for us to obtain the accumulation or integration of velocity v in the time period (t0, t1), that is, the displacement S generated from time point t0 to t1, then geometrically, it is the area between the image of v(t) and the horizontal axis t of the coordinate. Therefore, when we have determined the time point t0 and the initial displacement S0, the displacement s(t) of the object at any subsequent time t (t>t0) can be obtained by integrating v(t) in the time period (t0, t):

[0042] At this point, we can get that both velocity v and displacement s can be related to time t:

[0043] v=v(t) ①

[0044] s = s(t) ②

[0045] Then there is also a corresponding relationship between the natural displacement s and the velocity v. And we know that on the premise that v does not change direction, s must be a quantity that increases with time t. That is to say, s(t) is a monotonic function. Then according to the existence of the inverse function for monotonic functions, equation ② can be transformed into:

[0046] t = s-1(s)

[0047] Substituting it into equation ①, we get:

[0048] v = v(s-1(s))

[0049] The above has confirmed the existence of the corresponding relationship between the displacement s and the velocity v. Then specifically for the calculation of our corresponding sequence, we can take any value 0 < Sn < S within the target displacement distance S. If we have obtained the complete continuous function expressions for the relationship between the velocity v and time t as v = v(t) and the relationship between the displacement s and time t as s = s(t), first we get the theoretical time duration Tn = s-1(Sn) experienced when the object's displacement reaches Sn from t = s-1(s), and then substitute this time duration into v = v(t) to get the velocity Vn = v(Tn) that should be fed in currently. In this way, a sequence {Vn, Vn = v(s-1(Sn))} corresponding to the given sequence {Sn, 0 < Sn < S} with any length can be generated.

[0050] Then comes the key question. What kind of corresponding relationship between the velocity v and time t do we need, and what kind of corresponding relationship between s and time t? In other words, what kind of v = v(t) and s = s(t) is better? From the previous analysis, we already know that as long as we have v(t), then s(t) can be obtained by integrating v(t). So the fundamental problem is how to obtain the function of v(t).

[0051] When we say a v(t) is "better", its essential meaning includes:

[0052] 1. It is computable, derivable, has a theoretical basis and is convenient for calculation, and tries to have low hardware requirements;

[0053] 2. It runs safely and smoothly, and minimizes the wear on the machine;

[0054] 3. On the basis of satisfying 2, it tries to exert the mechanical efficiency as much as possible and execute as fast as possible.

[0055] Based on the above considerations, referring to Figure 1 , Figure 1 is the schematic diagram of velocity planning in an embodiment of this application. As Figure 1As shown in the figure, the area between the velocity-time curve and the horizontal axis in the coordinate diagram is divided into several parts by different colors. Their time intervals are all T, which are also different stages of acceleration and deceleration:

[0056] The first stage is the acceleration stage, that is, the speed increases with time, but not linearly; and the amplitude of the acceleration increases linearly with time until the last moment of this stage t = T;

[0057] The second stage is the uniform acceleration stage, that is, the speed increases linearly with time until the last moment of this stage t = 2T;

[0058] The third stage is the deceleration stage, that is, the speed increases with time, but the increase decreases linearly with time until the last moment of this stage when t=3T, the speed no longer increases;

[0059] The fourth stage is the uniform speed stage. During the uniform speed stage, the speed remains constant until the last moment of this stage.

[0060] The 5th, 6th and 7th stages are the acceleration and deceleration stage, the uniform deceleration stage and the deceleration and acceleration stage respectively. They are axially symmetrical with the previous 3rd, 2nd and 1st stages respectively, and the axis of symmetry is the vertical line formed by the middle moment of the uniform speed segment.

[0061] In these 7 stages, the duration of acceleration segments 1, 2, 3 and deceleration segments 5, 6, 7 are all T, while the duration of uniform segment 4 is variable with respect to T, and the minimum can be 0, in order to adapt to different walking parameter conditions. Since the acceleration segment and deceleration segment are symmetrical in shape, as long as the acceleration segments 1, 2, and 3 are studied clearly, the deceleration segment can be completely deduced from them. Then let's study the motion laws of these three segments:

[0062] As we mentioned before, in the acceleration phase, the speed increases with time and the speed also increases linearly with time. Similarly, in the deceleration phase, the speed increases with time and the speed also decreases linearly with time. That is to say, for phase 1, the change in acceleration or the differential is is a constant and > 0, we may assume:

[0063] Similarly, for phase 3: If in these two stages The amplitudes are exactly the same, so J a =-J b , so here we can make (acceleration phase), then (Deceleration and acceleration section), where J>0, we call this acceleration J. So why is it set like this? Because of symmetry, it is convenient for calculation:

[0064] It can be understood that as long as the straight line representing the uniform acceleration segment is extended to both sides, the extended parts on both sides and the areas sandwiched by the curves representing the acceleration segment and the deceleration segment are exactly the same in shape and size, and complement each other. Then according to symmetry, the three deceleration segments also have corresponding properties.

[0065] In addition, setting the duration of the three acceleration stages and the three deceleration stages to the same T also has the same effect, which is easy to deduce and calculate. The effect of such a definition will be seen in the subsequent mathematical derivation.

[0066] Before we start the derivation, there is a question about the beginning that needs to be clarified: Why is the velocity not 0 but an initial velocity V0 at the starting time t = 0? Doesn't this increase the difficulty of calculation? Because this constant offset must be taken into account every time. To explain this problem, we must start from the feedback characteristics and causal relationship of this application. Note that we adjust the velocity output through the feedback displacement. Indeed, from the perspective of the tv change relationship, even when t = 0, v = 0, as time t continues to increase, the velocity v will increase and decrease accordingly, which is not a problem. However, for the case where v is determined by displacement feedback s, time t, as we have said before, is only an intermediate variable or parameter used to solve the sv change relationship. From a physical point of view, it can be imagined that if v = 0, then s = 0 and will not increase automatically, then there will be no subsequent changes in s to correspond to the size of v. Because v = 0 cannot integrate s > 0 over time t, then s = 0 can only correspond to v = 0 forever. An effective method is to set v(0) = V0>0, which can solve the above problem well. In reality, when an initial speed is given (not too large, of course), the servo motor will drive the wheel to rotate, and the displacement s will change, so v will also change accordingly, and everything else will happen. This speed is both the starting speed and the final stop speed approaching the target position. Of course, this arrangement is also for symmetry and ease of calculation. Obviously, this V0 cannot be too large, and we generally give a range of 0.01 to 0.05 m / s. Having clarified this issue, let's carry out our derivation:

[0067] Phase 1:

[0068] Initial conditions:

[0069] Then we have:

[0070]

[0071] The final state (i.e. the initial condition for the next stage) is:

[0072] A1=a(T)=JT

[0073]

[0074] It should be noted that the intermediate variable t in the above and following derivation processes represents the duration of the calculation starting from 0 in this stage, that is, t = 0 at the beginning of this stage. Why is it arranged like this? This is because the purpose of segmentation is to make the change relationship or function expression single, so that the equation can be simplified in the subsequent program segmentation calculation.

[0075] Phase 2:

[0076] Initial conditions: A1, V1, S1 have been obtained above, and

[0077] Then we have:

[0078] a(t)=A1=JT

[0079]

[0080] The final state (i.e. the initial condition for the next stage) is:

[0081] A2=a(T)=A1=JT

[0082]

[0083] Phase 3:

[0084] Initial conditions: A2, V2, S2 have been obtained above, and but:

[0085]

[0086] The final state (i.e. the final state of the entire three-stage acceleration) is:

[0087] A3=a(T)=JT-JT=0

[0088]

[0089] At this point, we not only get the functional relationship between the time variable t and the three linear motion indicators a, v, s in each stage of the acceleration process, but also get the relationship between the final speed V3, displacement S3 and stage duration T when the three acceleration processes are completed. As we mentioned earlier, the 5th, 6th, and 7th stages of the three deceleration stages are symmetrical to the 3rd, 2nd, and 1st stages of the three acceleration stages, and the initial state of each stage is the final state of the corresponding stage. Therefore, the acceleration a, speed v, and displacement s corresponding to any time t in the three deceleration stages can be completely obtained by using symmetry.

[0090] It can be seen that the above derivation process does not involve very complicated calculations, and the results obtained, especially the expressions of the final state of each stage, are relatively simple and regular.

[0091] Note that, except for the time variable t, all the expressions above are only related to J, T, and V0, and V0 is a pre-set parameter, so the only thing left is how to choose J and T. We know that the acceleration section and the deceleration section are axially symmetrical, so the displacement S3 (the area swept by the velocity v in the acceleration section) caused by the acceleration must be equal in quantity to the displacement caused by the deceleration, so there must be: S7-S4=S3, where S7 and S4 are the final displacements of the 7th section (the 3rd section of deceleration) and the 4th section (the uniform speed section), respectively. Obviously, S7-S4 is the sum of the displacements of the entire deceleration section. If we temporarily put aside the displacement of the uniform speed section, the sum of the displacements of the acceleration and deceleration sections is 2S3=6JT 3 +6V0T.

[0092] The selection of J and T must meet the following conditions: ① The final displacement generated during acceleration and deceleration cannot exceed the set displacement value S set ;②The final speed generated cannot exceed the set speed upper limit V max ; ③ The final acceleration generated cannot exceed the set acceleration upper limit A max , and the resulting final deceleration cannot exceed the set deceleration lower limit D max .

[0093] Let's assume that J has been determined. Now we need to determine T. We will talk about how J is determined later. For now, we will treat it as a constant, such as J = 1.0. So first we have to satisfy the first rule - distance limit. According to the previous analysis, geometrically speaking, the displacement in the tv relationship diagram represents the area swept by the velocity v on the time axis t. So when we set a distance S set , which can be understood as a rectangular area on a plane image, and its area is S set Then the area between the speed curve we plan and the time axis t should be the same as this area S setEqual in quantity, that is, S7=S set .

[0094] Consider the extreme case first. If S set Given a large enough value, then even if V max , A max At least one has been reached, and the total displacement of acceleration and deceleration cannot reach the set value S set , which means that the method of increasing displacement by continuing to increase the stage length T is no longer feasible. In other words, the total displacement of the acceleration and deceleration stages has reached the limit, so the required displacement value can only be achieved by increasing the uniform speed stage. In other words, the value of T at this time is to make V max , A max The value when one of the two is reached, as for which one is reached, of course, the smaller T is the standard. According to the previous derivation, it is not difficult to know that in the entire acceleration stage, the maximum value that a(t) can reach is A1=JT, so we have:

[0095] A max = JT, so T = A max / J, let T am =A max / J, and in the entire acceleration stage, the maximum value that v(t) can reach is V3=V0+2JT 2 , so we can let V max =V0+2JT 2 , which can be solved as make Take the smaller of Tam and Tvm.

[0096] As for why we choose the smaller one? Because JT and V0+2JT 2 All of them increase with the increase of T value, so the smaller T must be able to prevent the other limit condition from being exceeded. After determining T, the remaining steps are very easy. According to our deduction, S1, S2, and S3 can be obtained in sequence. Then according to symmetry, S5-S4, S6-S4, and S7-S4 can also be obtained in sequence. So the rest are all uniform speed segments S4-S3, that is, S4-S3 = S set -2S3, what is the uniform speed? Of course, it is determined by the obtained T V3=V0+2JT 2 .

[0097] Next, let us consider another extreme case when S set The given value is relatively small. How do we determine the T value at this time? We still take the above state as the starting point, which just satisfies the larger S set , the value of T has made A1 = JT, V3 = V0 + 2JT2 One of the two reaches the upper limit, and by adding a constant speed segment, S has been reached. set So now S set Suddenly it becomes smaller, how do we transform to reach the new S set How can we cut the speed of the vehicle? It can only be cut, of course you can also say shrink, degenerate or degrade it. The key is how to cut it? In order to ensure the efficiency of acceleration and deceleration, we can only cut the uniform speed segment and reduce it horizontally, that is, keep the size and shape of the acceleration and deceleration segment unchanged, and only shorten the uniform speed segment horizontally. If the area of ​​the uniform speed segment has not been reduced to 0 (that is, S3 and S4 have not overlapped), the new S has been reached. set , then this situation is different from the previous S set The situation given is relatively large, but S set The value of is not small enough to change the acceleration and deceleration stage. T is still obtained in the same way and is equal in magnitude. It is just that the uniform speed stage S4-S3 is smaller than before. It is still calculated by the formula S4-S3=S set -2S3 obtained.

[0098] Then if S set The value of is further reduced, then the area of ​​the uniform speed section S4-S3=S set -2S3 is further reduced until S4-S3=S set -2S3=0, that is, the area of ​​the uniform speed section is 0, at this time S4 ​​coincides with S3. If this happens to meet the requirements, then S set =2S3, that is, S set The area is exactly equal to the maximum displacement (or area) that can be produced by the acceleration and deceleration stages. At this time, T is still calculated in the same way as before, except that there is no uniform speed stage.

[0099] Next, if we let S set The value of continues to decrease. At this time, the area of ​​the uniform speed section is 0. There is no more compression. We can only consider compressing the area of ​​the acceleration and deceleration section until the compressed area is exactly the same as S. set In order to ensure that the acceleration and deceleration characteristics remain consistent regardless of the distance traveled, it is necessary to consider which parameters are related to the displacement caused by acceleration and deceleration. According to the previous derivation, the displacement ultimately caused by acceleration is: S3 = 3JT 3 +3V0T, and the displacement produced by deceleration and acceleration is 2S3=6JT 3 +6V0T, so 2S3>S set If we want to make the two equal, since J and V0 are already determined, we can only reduce the value of T to achieve this goal. set =2S3=6JT 3 +6V0T.

[0100] Then in terms of algorithm, the problem is transformed into "when the condition S is met set =6JT 3 What is the value of T at +6V0T? "This is a cubic equation problem. To be more precise, it is a cubic equation lacking a quadratic term, or the Cardano equation, which can be solved by an approximate interpolation algorithm or a coefficient formula method.

[0101] We have analyzed it from an intuitive perspective. So how do we implement it in terms of algorithm? We can't just cut and scale the graph like this, right? The starting point is still based on the three conditions satisfied by J and T. We can describe it in mathematical language as follows:

[0102] ①6JT 3 +6V0T≤S set ; ②V0+2JT 2 ≤V max ; ③JT≤A max / JT≤D max

[0103] Solve the above inequalities (that is, solve the positive real roots of the equations formed by the above three inequalities) and take the intersection of the solutions of the inequalities, that is: if T sm Satisfying equation 6JT 3 +6V0T=S set ; T vm Satisfies the equation V0+2JT 2 =V max ; T am Satisfies the equation JT=A max , then take T=min(T sm ,T vm ,T am ), min() is the minimum value operator.

[0104] There is only one thing to explain in the above algorithm: the meaning of inequality ① is different from the principle of the previous intuitive demonstration. It means that the entire displacement is regarded as a motion process without a uniform speed segment. Then, as long as the distance S is set set Large enough, by function 6JT 3 +6V0T incrementality, the obtained T sm It must also be large enough so that the final T can only be determined by ② and ③, so the recalculated 6JT 3 +6V0T must be smaller than S set , the rest must be the uniform speed segment. Conversely, if the distance S is set set Small enough to obtain T sm Less than T vm and T am, then the natural T sm At the same time, three conditions are satisfied, and there is no uniform speed section at this time.

[0105] After solving the value of T in this way, according to the conclusions and symmetries derived from the previous three sections, S1, S2, S3(S4), S5, S6, and S7 can be obtained in sequence.

[0106] So far, in fact, under specific parameter conditions (V0, J, V max , A max ) S set For all cases, from sufficiently large to infinitesimal, the stage duration T of the symmetric S-curve acceleration and deceleration and the displacement values of each stage can be obtained.

[0107] After the planning is completed, the implementation of control follows. Since at any moment during the walking process, the displacement S P of the controlled object relative to the walking starting coordinate can be obtained as feedback, then to obtain the current feed speed, it is first necessary to determine the planning interval section where S P is located. For example: when 0 < S P < S1, according to the results derived previously, this belongs to the first stage: Let A cubic equation about the variable t is obtained, and the intermediate variable t can be solved. Then, according to the current feed speed value v can be obtained. Similarly, when S1 < S P < S2, the quadratic equation is solved according to the derivation formula of the second stage to obtain t, and then v is obtained from t; when S2 < S P < S3, the method is the same as above. However, in the deceleration three sections, the situation is different. Because it is symmetric, a transformation needs to be made: change S P in the above equation to S7 - S P . For example, when S6 < S P < S7, let v is obtained by the same algorithm. This is done because in the deceleration section, we need to obtain the absolute value of the displacement of S P relative to S7 to correspond to the symmetric value in the acceleration section.

[0108] This seems to be feasible, but please consider the real-time nature of the operation. For an application based on a real-time operating system, multiple tasks run concurrently, and each task has its own operating cycle. For example, if we control walking, if the speed value is updated once every 50 milliseconds, then the above solution process must be performed every 50 milliseconds. Solving equations is very time-consuming, especially solving cubic equations. The solution to cubic equations includes a variety of mathematical operations such as square root, power operation, trigonometric, and anti-trigonometric operations, and these operations consume a particularly long clock cycle. If it is a device with strong computing power such as PLC or DSP, this level of operation should not be a problem, but the price is also very expensive; but if it is a single-chip microcomputer with average performance and several threads are running at the same time, it is very likely to have a response lag or a system crash. This explains why the displacement-speed planning mentioned above cannot choose the first method.

[0109] Step S30, for each target displacement, determining the target stage of the target displacement;

[0110] Step S40, combining the target displacement, the target speed expression corresponding to the target stage and the target displacement expression to obtain the target speed corresponding to the target displacement;

[0111] Step S50, synthesizing all target displacements and their corresponding target velocities to obtain a corresponding relationship between displacement and velocity.

[0112] In this embodiment, in order to address the problems existing in the first method and to reduce costs, a microcontroller with average performance can also achieve smooth and efficient acceleration and deceleration control. The acceleration segment can be divided into several segments according to the size of S3, and the speed value corresponding to the boundary value of each segment can be calculated. Figure 2 , Figure 2 Figure 1 is a schematic diagram of the acceleration classification scenario. Figure 2 As shown, these segments are the same in area, but different in width. The closer to the right, the denser the dividing lines are. This is because the larger the v(t) value is, the faster the integral value increases. As an illustration, the number of segments is set to 100, then there is a two-dimensional sequence: {S[n], V[n]}, n = 0, 1, 2, 3...100. And all S[n] are obtained in this way:

[0113]

[0114] This divides the acceleration section into 100 equal parts. Next, we need to correspond to all V[n] values ​​one by one. This process is the same as the control implementation mentioned above based on the feedback displacement S P The method of obtaining the feed speed value v is the same, except that S[n] is treated as S P, and save the solved v as the current corresponding V[n]. This completes our multi-stage displacement-speed planning, and the calculation will be much easier when it comes to specific implementation.

[0115] Furthermore, in one embodiment, after step S50, the method further includes:

[0116] In each control cycle of controlling the mobile robot to move from a starting point to an end point, the real-time displacement of the mobile robot relative to the starting point is determined; based on the corresponding relationship between the displacement and the speed, the real-time speed corresponding to the real-time displacement is determined; and the mobile robot is controlled to move at the real-time speed.

[0117] In this embodiment, there are two ways to determine the real-time displacement of the mobile robot relative to the starting point:

[0118] Method 1: determine an approximate displacement closest to the real-time displacement from the corresponding relationship between the displacement and the speed; and use the speed corresponding to the approximate displacement as the real-time speed corresponding to the real-time displacement.

[0119] Method 2: determine two approximate displacements closest to the real-time displacement from the corresponding relationship between the displacement and the speed; construct a linear equation based on the two approximate displacements and their corresponding speeds; substitute the real-time displacement into the linear equation to obtain the real-time speed.

[0120] The same conditions as those implemented above are used to obtain the displacement feedback S in any control cycle. P , first lock S P In the interval, since {S[n]} is uniformly distributed, then n=[S P / S3] is S P The serial number of the lower limit of the interval where [] is the rounding operation, so S P ∈(S n ,S n+1 ). We know that sv is an increasing relationship (because st and vt are both increasing relationships, so sv is an increasing relationship), so V must be P ∈(V n ,V n+1 ). Then generally speaking, V P Take V n or V n+1 All are possible, as long as the number of segments is fine enough, the error will be small enough. Of course, if you want to further improve the accuracy, you can also use the linear fitting method: assume that v is in (S n ,S n+1 ) changes linearly, so according to the algorithm of equal points, V P : In this way, the whole process only involves basic operations of addition, subtraction, multiplication and division, which ensures accuracy and improves efficiency. Even a microcontroller with ordinary performance has basic computing functions, so such a large amount of computing is not a problem at all.

[0121] Further, see Figure 3 , Figure 3 Figure 2 is a schematic diagram comparing the S-shaped speed curve and the trapezoidal speed curve. Figure 3 As shown, from the shape point of view, the trapezoidal speed curve (such as Figure 3 The speed change shown by the S-shaped speed curve (as shown on the right) is also continuous. Figure 3 Compared with the two (shown on the left), there is not much difference except for the inflection point. However, if we consider the changes in their respective accelerations, we can see the difference, such as Figure 3 The green curve shows the change in acceleration.

[0122] from Figure 3 It can be clearly seen that the acceleration change of the S-shaped speed curve is still continuous, while the acceleration change of the trapezoidal curve produces a step change. The acceleration jumps from greater than 0 to 0 when entering the uniform speed segment, and then jumps from 0 to less than 0 at the end of the uniform speed segment. We can imagine that when the distance S is set set In the case of a relatively small speed without a uniform speed segment, the jump will be more drastic. At the turning point of acceleration and deceleration, the acceleration jumps directly from a positive value to a negative value, while the acceleration change of the S-shaped speed curve is still continuous.

[0123] It is easy to understand that according to Newton's second law F = ma, if a has a step change, then theoretically it can be considered that Then accordingly This means that the force on the object will jump. Mechanically speaking, at the turning points of acceleration, uniformity and deceleration mentioned above, this step in force means that the force will suddenly disappear and suddenly appear, or even suddenly change from a forward force to an equal backward force. In terms of power transmission, this unbuffered force change will increase the wear between gears. If this force change is applied to our equipment for a long time, it will shorten the service life and increase the failure rate.

[0124] Electrically speaking, the driving force F of the walking wheel is generated by the force of the magnetic field in the servo motor on the energized coil. It is essentially an Ampere force, and its relationship with the current can be simplified as: F = ε·I, where ε represents the influence of other factors such as magnetic field strength, coil shape and length, transmission mechanism, etc. as a constant. Then there must be Thus there is A step in the current in the coil will generate a higher induced electromotive force in a short period of time, which will also cause the drive circuit to bear a higher load.

[0125] Although ∞ is only a theoretical abstraction, it actually reflects some extreme working conditions, such as large changes in force and current. Moreover, from F=ma, we also know that when the mass of the object is larger, such an effect will be more intense. So this explains the superiority of this embodiment over conventional technology.

[0126] Furthermore, in one embodiment, after controlling the mobile robot to move at the real-time speed, the method further includes:

[0127] Based on the actual movement data of the mobile robot, a curve of speed variation over time is determined; based on the curve of speed variation over time, a new corresponding relationship between displacement and speed is obtained.

[0128] In this embodiment, the actual movement data of the mobile robot is collected during the process of controlling the movement of the mobile robot based on the corresponding relationship between displacement and speed, so that the speed of the mobile robot at each time point in the actual movement process can be known, thereby determining the curve of the speed change over time (actual situation). Figure 4 , Figure 4 This is a schematic diagram comparing the planned situation with the actual situation. Figure 4 As shown, the solid line is the curve of the planned speed changing with time (i.e., the S-shaped speed curve mentioned above), and the dotted line is the curve of the speed changing with time in the actual situation determined based on the actual movement data of the mobile robot. It can be clearly seen that there is a response lag in the actual operation: the acceleration is relatively slow, while the deceleration is relatively fast. The reason can be understood from the control process: the system obtains the current position feedback → calculates the current feed value according to the planning law → gives the control equivalent through the bus → the driver changes the closed-loop control object value according to the control equivalent → the closed-loop control makes the control object reach the target value → the mechanical transmission changes the power output. Each step in this is not completed instantly, and there will be a relative delay. And according to F=ma, the larger the mass of the object, the slower the force changes its motion state, and the more serious the lag will be.

[0129] To improve this defect, we can still start from intuition. Figure 4 It is not difficult to find that although its shape has changed, the change trends of acceleration and deceleration are still the same. The acceleration section has been lengthened and the deceleration section has been shortened. In this case, as long as we compress the part that will definitely be lengthened in the future and extend the part that will definitely be compressed in the future when planning, we can offset this lag to a certain extent.

[0130] After talking about the intuitive method, the following is the theoretical calculation and derivation. Since we need to extend and compress, the previous assumption that the acceleration and deceleration sections are axially symmetrical to each other in our planning must be broken.max And deceleration lower limit D max can be different, but the upper speed limit is still V max , and the final velocity of the acceleration section is still equal to the initial velocity of the deceleration section. Then the first thing to study is the relationship between the displacements generated by the acceleration section and the deceleration section. Only by clarifying this issue can we calculate the given S as before. set To make it easier to understand, we first make a transformation: mirror the deceleration segment to make it a symmetrical acceleration process starting from time 0. Since our purpose is to calculate the area, this does not affect the final result. Figure 5 , Figure 5 is a schematic diagram of the mirror image of the deceleration section. Figure 5 As shown, let the acceleration of the acceleration section be Ja and the acceleration of the mirror acceleration section be Jd, and their stage durations are Ta and Td respectively. Since their final speeds are equal, we have:

[0131] Va3=V0+2JaTa 2 =V0+2JdTd 2 =Vd3

[0132] then:

[0133]

[0134] The above methods for selecting the jerk J are:

[0135] and

[0136] So we get: set up but

[0137] Then, according to the previous derivation, the displacements generated by the acceleration section and the mirror acceleration section are:

[0138] Sa3=3JaTa 3 +3V0Ta

[0139] Sd3=3JdTd 3 +3V0Td

[0140] Jd = Ja / K 2 ,Td=KTa into the above formula to get:

[0141]

[0142] thereby: That is to say, the displacement ratio produced by the acceleration section and the deceleration section is inversely proportional to the acceleration limit value and the deceleration limit value.

[0143] So how to plan this asymmetric S-shaped speed curve? Referring to the above description, in the symmetric S-shaped speed curve planning, the total displacement generated by the acceleration section and the deceleration section is 2S3 = 6JT 3 +6V0T, this is because symmetry makes the displacements of the two segments equal, and now the displacements of the two segments are Sa3+Sd3=(K+1)Sa3. Transform ① of the 3 approximate planning constraints obtained before, and keep the rest unchanged, so that: ①S set =(K+1)S a3 =(K+1)(3JaTa 3 +3V0Ta);②V0+2JaTa 2 ≤V max ; ③JaTa≤A max , and obtain Ta determined by them respectively sm 、 vm 、 am , and then take their minimum value: Ta = min (Ta sm ,Ta vm ,Ta am ), Ta is found, and the subsequent solution of the three-segment displacement values ​​and the assignment of the planning sequence are the same as before.

[0144] After solving the acceleration stage, since Td = KTa, Td can also be easily obtained, so the mirror planning sequence of the three deceleration stages can also be easily obtained according to the previous method. It should be noted that since the mirror planning sequence of the deceleration stage is to calculate the deceleration stage according to the acceleration stage, when the displacement feedback value enters the deceleration interval in the control implementation, the corresponding law of the corresponding speed value must be reversed.

[0145] Further, in one embodiment, determining the real-time displacement of the mobile robot relative to the starting point includes:

[0146] Determine the time interval from the moment the code reader on the mobile terminal scans the target code to the moment the controller determines the coordinate cumulative value; calibrate the coordinate cumulative value based on the time interval and the current speed to obtain the real-time displacement of the mobile robot relative to the starting point.

[0147] In this embodiment, since the control is based on displacement as feedback value to determine the speed, the feedback value of the real-time coordinate must be as accurate as possible. Otherwise, even if the planning is good and the implementation is perfect, it will be a waste of time and even dangerous. The "accuracy" we are talking about actually has two meanings: one is precision; the other is timeliness.

[0148] In an actual application scenario, the positioning method of code reader + magnetic encoder is adopted. The magnetic encoder is used for the main distance accumulation function, and the code reader is used for cumulative value calibration and plays an auxiliary role. The maximum position accuracy of the code reader's lateral recognition is 1mm, while the distance resolution of the magnetic encoder is 3.77μm / pulse, so this accuracy should be sufficient for moving a distance of several meters or more than ten meters.

[0149] Back to the specific application scenario, when at a certain moment, it is the scanning cycle of the code reader, and the pattern of the QR code appears under its lens, whether it is an array code or a bar code at this time, it will go through the following process: 1 optical sampling → 2 image processing → 3 calculate the coordinate result → 4 pass the result to the main controller through the bus according to the agreed protocol → 5 program reversely parses the coordinate result according to the protocol and calibrates the coordinate accumulation value. It should be noted that when going through the above process, it is very likely that the controlled object is moving at high speed. And these processes are all time-consuming. 1 to 3 can be obtained from the code reading rate in the code reader manual, 3 to 4 can be calculated from the communication baud rate and the length of the transmission message, and only 4 to 5 are uncertain. Since our application is based on a real-time operating system (RTOS), each thread runs alternately under the control of response priority, conditional blocking and system delay. It is difficult to count how many task alternations occur in a certain period of time, such as the gap between two events, and how much time each alternation takes. 4 to 5 can be considered as the gap between two events, namely "the control system receives the scan data of the code reader" and "the controller starts to process the received data". Fortunately, RTOS provides the function of reading the system tick count at any time, so we use the concept of timestamp here: when receiving a complete data message, read the system time once as a mark or timestamp of the receiving time, and when it comes to the processing stage, read the system time again as the current time. The difference between the current time and the timestamp is their interval time. This duration plus other determined time consumption is the time it takes from the target code appearing in the lens to the controller processing the scan result. According to this time consumption, the current movement speed and the scan result, the dynamic deviation value is calculated to finally calibrate the distance accumulation value.

[0150] Furthermore, in one embodiment, 0.5<J<1.5.

[0151] In this embodiment, referring to the above derivation conclusion: during walking, the maximum value of acceleration that can be achieved is A2=JT, and the maximum value of speed that can be achieved is V3=V0+2JT 2 , to make V max and A max can be achieved, then:

[0152] A2=JT=A max①

[0153] V3=V0+2JT 2 =V max ②

[0154] From formula ①, we get: T = A max / J is substituted into formula ② to obtain: Of course, the value of J also has a range. If J is too small, the acceleration and deceleration will change too slowly, and the speed will change slowly accordingly, so the efficiency of acceleration and deceleration will be very low. On the contrary, if J is too large, the acceleration and deceleration time will be too short, the instantaneous impact will be very large, and the wear on the machine will be increased. In this embodiment, 0.5<J<1.5 is set.

[0155] Furthermore, in one embodiment, the control architecture of the mobile robot is described as follows:

[0156] Generally speaking, it is a control architecture with independent hierarchical management structure. The main control thread and each action thread and network thread exchange information in an independent manner. Each action thread represents walking, lifting, retracting and hooking actions, and the network thread is used to respond to external needs, external docking matters, receive external instructions and tasks, etc.

[0157] The upload and download data interaction between the main thread and each action thread, and between the main thread and the network thread are all completed by independent message mailboxes or queues. This ensures that the memory blocks in each thread are not crossed or involved, which is safer. For example, if action thread A wants to call the COM1 interface, it will notify the device thread COM1 of the specific operations to be performed through the message mailbox, and the device thread COM1 will eventually disassemble these operations into data and configurations to be written to the peripheral registers, and then receive the return data of the peripheral through the hardware interrupt, and then feedback to the action thread A through the message mailbox after parsing.

[0158] In addition, public device threads only accept single access, not multiple access. At this time, it is necessary to establish an access mechanism to avoid this conflict - a mutually exclusive access mechanism: that is, each thread that wants to use the same resource must first obtain the right to use the resource before using it, and then release the right to use it to compete for it after use. Whether to obtain the right depends on the order of application and the priority of the thread. Then it is obvious that this tool has been provided in RTOS, which is the mutual exclusion semaphore. And another important function of the mutual exclusion semaphore is to prevent thread interlocking, which is also a guarantee of real-time and security.

[0159] Although all the above threads run concurrently, at the beginning of the thread scheduler startup, the operation of some threads needs to meet certain conditions, and these conditions depend on the results of the operation of some other threads. In specific applications, the initialization of each servo drive by the CAN bus thread depends on the reading of parameter records by the network thread, and the main thread must wait for the CAN bus thread to complete the initialization of each servo drive before it can proceed with subsequent work. Before powering on the servo, the main thread must wait for the network thread to receive the start command from the host computer, and so on. Here we introduce a mechanism called token blocking, which is implemented by lightweight synchronization mechanisms such as semaphores or event flags.

[0160] In addition, some status data, such as the current horizontal coordinates and car floor height data, various operating states, error states, etc., need to be uploaded regularly; and some judgment and assignment work also needs to be done regularly. So here we use the software timer function of RTOS to complete these calculations, judgments and assignments in a fixed period (such as 500 milliseconds) in the timing callback function.

[0161] The above is an introduction to the control process architecture. In general, each thread competes for priority, runs independently and synchronously, the relationship between each level is clear, and efficiency is pursued as much as possible under the premise of ensuring safety.

[0162] Another advantage of the independent and hierarchical architecture is that it facilitates debugging and troubleshooting, function modification, and code maintenance. For example, if you want to change the device model, you only need to modify the communication protocol in the device thread without changing other parts; for example, if you want to modify the action flow, add or modify the action steps, change the action synchronization and step-by-step order, you only need to modify the process part of the main thread.

[0163] In a second aspect, an embodiment of the present application also provides a speed planning device for a mobile robot.

[0164] In one embodiment, referring to Figure 6 , Figure 6 This is a functional module diagram of an embodiment of a speed planning device for a mobile robot in this application. Figure 6 As shown, the speed planning device for the mobile robot includes:

[0165] A division module 10 is used to divide the movement process of the mobile robot from the starting point to the end point into an acceleration stage, a uniform acceleration stage, a deceleration stage, a uniform speed stage, an acceleration and deceleration stage, a uniform deceleration stage and a deceleration and deceleration stage in a time sequence, wherein the duration of other stages except the uniform speed stage is T, the rate of change of acceleration in the acceleration stage is J, the acceleration in the uniform acceleration stage is constant, the rate of change of acceleration in the deceleration and acceleration stage is -J, the acceleration in the uniform speed stage is zero, the rate of change of deceleration in the acceleration and deceleration stage is -J, the deceleration in the uniform deceleration stage is constant, and the rate of change of deceleration in the deceleration and deceleration stage is J;

[0166] A first determination module 20 is used to determine a velocity expression and a displacement expression corresponding to each stage, wherein the independent variable of the velocity expression is time and the dependent variable is velocity, and the independent variable of the displacement expression is time and the dependent variable is displacement;

[0167] A second determination module 30 is used to determine the target stage of each target displacement;

[0168] A calculation module 40 is used to combine the target displacement, the target speed expression corresponding to the target stage and the target displacement expression to obtain the target speed corresponding to the target displacement;

[0169] The planning module 50 is used to integrate all target displacements and their corresponding target velocities to obtain a corresponding relationship between the displacements and the velocities.

[0170] Furthermore, in one embodiment, the speed planning device for a mobile robot further includes a control module, which is used to:

[0171] In each control cycle of controlling the mobile robot to move from a starting point to an end point, determining a real-time displacement of the mobile robot relative to the starting point;

[0172] Determining the real-time speed corresponding to the real-time displacement based on the corresponding relationship between the displacement and the speed;

[0173] Control the mobile robot to move at the real-time speed.

[0174] Furthermore, in one embodiment, the control module is used to:

[0175] Determine the time interval from the moment when the code reader on the mobile terminal scans the target code to the moment when the controller determines the coordinate accumulation value;

[0176] The coordinate accumulation value is calibrated based on the time interval and the current speed to obtain the real-time displacement of the mobile robot relative to the starting point.

[0177] Furthermore, in one embodiment, the control module is used to:

[0178] Determine an approximate displacement closest to the real-time displacement from the corresponding relationship between the displacement and the velocity;

[0179] The speed corresponding to the approximate displacement is used as the real-time speed corresponding to the real-time displacement.

[0180] Furthermore, in one embodiment, the control module is used to:

[0181] Determine two approximate displacements closest to the real-time displacement from the corresponding relationship between the displacement and the velocity;

[0182] Construct a linear equation based on two approximate displacements and their corresponding velocities;

[0183] Substituting the real-time displacement into the linear equation, the real-time velocity is obtained.

[0184] Furthermore, in one embodiment, the speed planning device for a mobile robot further includes a correction module, which is used to:

[0185] Based on the actual movement data of the mobile robot, a curve of speed variation over time is determined;

[0186] Based on the curve of the velocity changing with time, a new corresponding relationship between displacement and velocity is obtained.

[0187] Furthermore, in one embodiment, 0.5<J<1.5.

[0188] Among them, the functional implementation of each module in the above-mentioned speed planning device for a mobile robot corresponds to the steps in the above-mentioned speed planning method embodiment for a mobile robot, and its functions and implementation processes will not be repeated here one by one.

[0189] In a third aspect, an embodiment of the present application provides a speed planning device for a mobile robot.

[0190] Reference Figure 7 , Figure 7 Schematic diagram of the hardware structure of the speed planning device for a mobile robot involved in the embodiment of the present application. In the embodiment of the present application, the speed planning device for a mobile robot may include a processor, a memory, a communication interface and a communication bus.

[0191] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.

[0192] The communication interface includes input / output (I / O) interface, physical interface and logical interface, etc., which are used to realize the interconnection of devices inside the speed planning device, and the interface used to realize the interconnection of the speed planning device with other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.; the user device can be a display, a keyboard, etc.

[0193] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0194] The processor may be a general-purpose processor, and the general-purpose processor may call the speed planning program for the mobile robot stored in the memory, and execute the speed planning method for the mobile robot provided in the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the speed planning program for the mobile robot is called may refer to the various embodiments of the speed planning method for the mobile robot of the present application, which will not be repeated here.

[0195] Those skilled in the art will understand that Figure 7 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0196] In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium.

[0197] The computer-readable storage medium of the present application stores a speed planning program for a mobile robot, wherein when the speed planning program for a mobile robot is executed by a processor, the steps of the speed planning method for a mobile robot as described above are implemented.

[0198] Among them, the method implemented when the speed planning program for the mobile robot is executed can refer to the various embodiments of the speed planning method for the mobile robot in this application, and will not be repeated here.

[0199] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0200] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.

[0201] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.

[0202] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0203] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.

[0204] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.

[0205] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A velocity planning method for a mobile robot, characterized in that: The speed planning method for a mobile robot comprises: The moving process of the mobile robot from the starting point to the end point is divided into the acceleration stage, the uniform acceleration stage, the deceleration stage, the uniform speed stage, the acceleration and deceleration stage, the uniform deceleration stage and the deceleration and deceleration stage according to the time sequence, wherein the duration of the other stages except the uniform speed stage is T, the rate of change of acceleration in the acceleration stage is J, the acceleration in the uniform acceleration stage is unchanged, the rate of change of acceleration in the deceleration and acceleration stage is -J, the acceleration in the uniform speed stage is zero, the rate of change of deceleration in the acceleration and deceleration stage is -J, the deceleration in the uniform deceleration stage is unchanged, and the rate of change of deceleration in the deceleration and deceleration stage is J; Determine the velocity expression and displacement expression corresponding to each stage, wherein the independent variable of the velocity expression is time and the dependent variable is velocity, and the independent variable of the displacement expression is time and the dependent variable is displacement; For each target displacement, determining the target stage of the target displacement; Combining the target displacement, the target speed expression corresponding to the target stage and the target displacement expression, the target speed corresponding to the target displacement is obtained; By integrating all target displacements and their corresponding target velocities, the corresponding relationship between displacement and velocity is obtained.

2. The velocity planning method for a mobile robot according to claim 1, characterized in that: After synthesizing all target displacements and their corresponding target speeds to obtain the corresponding relationship between the displacements and the speeds, the method further includes: In each control cycle of controlling the mobile robot to move from a starting point to an end point, determining a real-time displacement of the mobile robot relative to the starting point; Determining the real-time speed corresponding to the real-time displacement based on the corresponding relationship between the displacement and the speed; Control the mobile robot to move at the real-time speed.

3. The speed planning method for a mobile robot according to claim 2, characterized in that: Determining the real-time displacement of the mobile robot relative to the starting point includes: Determine the time interval from the moment when the code reader on the mobile terminal scans the target code to the moment when the controller determines the coordinate accumulation value; The coordinate accumulation value is calibrated based on the time interval and the current speed to obtain the real-time displacement of the mobile robot relative to the starting point.

4. The velocity planning method for a mobile robot according to claim 2, characterized in that: The determining the real-time speed corresponding to the real-time displacement based on the corresponding relationship between the displacement and the speed comprises: Determine an approximate displacement closest to the real-time displacement from the corresponding relationship between the displacement and the velocity; The speed corresponding to the approximate displacement is used as the real-time speed corresponding to the real-time displacement.

5. The speed planning method for a mobile robot according to claim 2, characterized in that: The determining the real-time speed corresponding to the real-time displacement based on the corresponding relationship between the displacement and the speed comprises: Determine two approximate displacements closest to the real-time displacement from the corresponding relationship between the displacement and the velocity; Construct a linear equation based on two approximate displacements and their corresponding velocities; Substituting the real-time displacement into the linear equation, the real-time velocity is obtained.

6. The velocity planning method for a mobile robot according to claim 2, characterized in that: After controlling the mobile robot to move at the real-time speed, the method further comprises: Based on the actual movement data of the mobile robot, a curve of speed variation over time is determined; Based on the curve of the velocity changing with time, a new corresponding relationship between displacement and velocity is obtained.

7. The velocity planning method for a mobile robot according to any one of claims 1 to 6, characterized in that: 0.5<J<1.5。 8. A speed planning device for a mobile robot, characterized in that: The speed planning device for the mobile robot comprises: A division module is used to divide the movement process of the mobile robot from the starting point to the end point into an acceleration stage, a uniform acceleration stage, a deceleration stage, a uniform speed stage, an acceleration / deceleration stage, a uniform deceleration stage and a deceleration / deceleration stage in a time sequence, wherein the duration of other stages except the uniform speed stage is T, the rate of change of acceleration in the acceleration stage is J, the acceleration in the uniform acceleration stage is constant, the rate of change of acceleration in the deceleration / acceleration stage is -J, the acceleration in the uniform speed stage is zero, the rate of change of deceleration in the acceleration / deceleration stage is -J, the deceleration in the uniform deceleration stage is constant, and the rate of change of deceleration in the deceleration / deceleration stage is J; The first determination module is used to determine the speed expression and displacement expression corresponding to each stage, wherein the independent variable of the speed expression is time and the dependent variable is speed, and the independent variable of the displacement expression is time and the dependent variable is displacement; A second determination module is used to determine the target stage of each target displacement; A calculation module, used for combining the target displacement, the target speed expression corresponding to the target stage and the target displacement expression to obtain the target speed corresponding to the target displacement; The planning module is used to integrate all target displacements and their corresponding target velocities to obtain the corresponding relationship between displacement and velocity.

9. A speed planning device for a mobile robot, characterized in that: The speed planning device for a mobile robot comprises a processor, a memory, and a speed planning program for a mobile robot stored in the memory and executable by the processor, wherein when the speed planning program for a mobile robot is executed by the processor, the steps of the speed planning method for a mobile robot as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a speed planning program for a mobile robot, wherein when the speed planning program for a mobile robot is executed by a processor, the steps of the speed planning method for a mobile robot as described in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Mobile robot motion control method with dynamic acceleration and deceleration constraints

    CN120595857A

  • A dynamic acceleration and deceleration constraint mobile robot motion control method

    CN120595857B