Disclosure of Invention
Aiming at the technical problems in the prior art, the invention provides a lower limb gait prediction method based on attitude sensors and dynamic capture template data, position information of main parts of lower limbs is obtained through one attitude sensor, the whole gait process is predicted, the purpose of reasonably predicting the whole lower limb movement by using a small number of sensors is realized, and the cost of pattern recognition is reduced.
The invention is realized by the following technical scheme: the lower limb gait prediction method based on the attitude sensor and the dynamic capture template data comprises the following steps:
step S1, collecting Euler angle data of the right thigh, the right calf and the right foot of the human body in the walking process, and taking the corresponding relation of the Euler angle data of the thigh, the right calf and the right foot in one gait cycle as dynamic capturing template data;
s2, fixing the attitude sensor on the front side of the thigh of the right leg of the human body, and obtaining the Euler angle of the thigh on the right side in real time;
step S3, based on the Euler angle of the right thigh and the dynamic capturing template data, obtaining the Euler angles of the right shank and foot corresponding to the current right thigh angle, and storing the Euler angles as right real-time dynamic capturing template data;
step S4, based on the phase corresponding relation of the left leg and the right leg, according to the stored data of the right real-time dynamic capturing template, the Euler angles of the left thigh, the left leg and the left foot are obtained;
and step S5, predicting the motion of the lower limbs in real time according to the Euler angle data of the thighs, the calves and the feet on the left and right sides.
In a preferred embodiment, step S3 is to not update the data for the right calf and foot when the angle of the right thigh exceeds the thigh angle in the kinetic capture template data while updating the euler angle data for the calf and foot based on the euler angle of the right thigh and the kinetic capture template data.
In a preferred embodiment, step S4 is to store the angle change data of the previous right leg model rod in a gait cycle, which is called real-time model data, through a buffer; and according to the real-time predicted gait cycle, based on the real-time model data, taking the data of the latter half of the predicted gait cycle of the current position of the right leg as the data of each model rod piece of the left leg.
Compared with the prior art, the invention has the following beneficial effects: according to the attitude sensor data of the right thigh, the dynamic capture template data measured by the motion capture system and the symmetry of the left and right foot step state phases, the position information of the right shank and foot and the left thigh, shank and foot, namely Euler angle data, is deduced according to the angle of the right thigh. The invention obtains the position information of the main part of the lower limb through one attitude sensor, realizes the prediction of the whole gait process, realizes the purpose of reasonably predicting the whole lower limb movement by using a small number of sensors, and reduces the cost of pattern recognition.
Detailed Description
The following describes in detail embodiments of the present invention with reference to the drawings and examples, but the embodiments of the present invention are not limited thereto.
Examples
FIG. 1 shows an abstract projection of a human body in the sagittal plane, using a total of θ1-θ7Seven angles represent the pose of each model rod. The model rods included in the virtual lower limbs include linear rods and triangular rods. The upper body, thigh, and calf are all represented by straight bar members. For a straight rod, the vertical direction is defined as the starting line, and the angle of the rod is defined as the included angle between the model straight line and the vertical starting line. If the angle from the vertical starting line to the rod piece is anticlockwise, the angle is positive, otherwise, the angle is negative. Since the virtual lower extremities only study the movement of the lower extremities, by default the entire upper body is stationary during walking, the angle θ of the model bar that will represent the upper body7Defined as a constant of 0. For the triangle rod piece, namely the abstract of the foot, the vertical direction is also taken as the starting line, and the included angle between the normal of the straight line at the bottom of the triangle rod piece and the starting line is taken as the angle of the triangle model rod piece. Similarly, if the angle from the start line to the lever is counterclockwise, the angle is positive, whereas the angle is negative. Except the model rod piece of the upper body, the angles of the other six model rod pieces are respectively theta1-θ6。
The lower limb gait prediction method based on the attitude sensor and the dynamic capture template data in the embodiment as shown in fig. 2 comprises the following steps:
step S1, as shown in fig. 3, the euler angle data of the thigh, the calf, and the foot on the right side are collected by using the motion capture system, and the correspondence relationship between the euler angle data of the thigh, the calf, and the foot in one gait cycle is used as the motion capture template data.
And step S2, fixing the attitude sensor on the front side of the thigh of the right leg of the human body, and obtaining the Euler angle of the thigh on the right side in real time.
In the step, an attitude sensor capable of detecting the Euler angle, the angular velocity and the acceleration is fixed on the front side of the right thigh of the human body. The real-time Euler angle of the right thigh can be collected in real time when the human body moves. The coordinate axis of the Euler angle is static relative to the ground, and can well reflect the motion of the lower limbs of the human body in space.
And step S3, acquiring Euler angle data of right crus and feet corresponding to the current right thigh angle based on the Euler angle of the right thigh and the dynamic capture template data, and storing the Euler angle data as right real-time dynamic capture template data.
The angle relation of the thigh, the calf and the foot on the right side in the walking process of the human body is measured by using the motion capture system, so that the angle change relation of the thigh, the calf and the foot on the right side in the whole gait cycle, namely the dynamic capture template data, is obtained. Therefore, after the euler angles of the right thigh are measured by the attitude sensor, the euler angle data of the lower leg and the foot measured in the dynamic capture template data corresponding to the thigh angles can be obtained through the euler angles of the right thigh and the dynamic capture template data measured by the motion capture system.
In this step, since walking gait is still unstable, when euler angle data of the lower leg and foot are updated according to euler angle of right thigh and kinetic capture template data, occasionally, the angle of the upper leg may exceed the angle of the upper leg in the kinetic capture template data, and the strategy adopted in the method is to abandon updating for the frame, namely, not updating data of the right lower leg and foot. There is also a case where the gait often ends up in 100% of the cycle, and therefore the angle of the knee joint and the ankle joint obtained by the transformation often changes abruptly, resulting in "leg and foot jump"; thus at this timeAnd buffering the ankle joint and knee joint angle data at the position where the sudden change occurs by using a buffering method. As shown in FIG. 4, the pre-mutation value is x, and the post-mutation angle data is x'iThe buffered value is yiThen the linear buffering yields the value:
yi=x′i+(x-x′i)×(1-i/bmax)
wherein i is a buffer counter, bmaxThe total buffer time (number of frames).
And step S4, based on the phase corresponding relation of the left leg and the right leg, according to the stored right real-time dynamic capture template data, obtaining Euler angle data of the left thigh, the left shank and the left foot.
In this step, since the phases of the left leg and the right leg are different by a half cycle and the swing amplitudes of the left and right legs are kept the same during walking, the position prediction of each lower limb rod of the left leg is given based on the prediction data of the right leg according to the symmetric relationship of the left and right legs.
In this step, in order to make the virtual lower limb have a more natural follow-up effect in the dynamic change of the gait, the angle change data of the former model rod piece of the right leg in one gait cycle is stored through a cache region, which is called as real-time model data. And then according to the real-time predicted gait cycle, based on the real-time model data, taking the data of the latter half of the predicted gait cycle of the current position of the right leg as the data of each model rod piece of the left leg. Therefore, when the thigh angle and the gait cycle are obviously changed, the left leg and the right leg can still generate symmetrical motion, so that the motion of the virtual lower limb is more stable.
And step S5, predicting the motion of the lower limbs in real time according to Euler angle data of six lower limb rod pieces including the left and right thighs, the lower legs and the feet.
In a continuous gait, a complete gait is considered to be between two adjacent heel strikes of the right foot. The plantar pressure sensor of the portable experimental system worn by the experimental subject can provide plantar pressure information, and the time of a complete gait cycle can be known in real time through two adjacent heel touchdowns. However, in an actual real-time data acquisition scenario, this cycle capture method cannot be implemented, and it can be determined that one gait cycle starts by heel strike, but the position of the lower limb in the gait cycle cannot be determined before the next heel strike, so that the length of the gait cycle can only be accurately known when the current gait cycle ends. It is important to be able to estimate the length of the gait cycle at the beginning of the gait cycle. When heel strike is detected, the average is taken as a prediction of the length of the current gait cycle by averaging the lengths of the first five gait cycles. Because walking is a relatively smooth process, the length of the current period can be effectively estimated by averaging the first five gait periods, and the average value can reduce the disturbance of walking sudden change gait periods to a certain extent.
However, when the gait changes significantly, the gait cycle and the range of the change of the angle of the thigh will both change significantly, so that if the angle of the model rod of the left leg extends half a cycle behind the right leg according to the gait data collected by the dynamic capture template, the left and right leg gait will be uncoordinated. In order to enable the virtual lower limb to have a more natural follow-up effect in the dynamic change of the gait, angle change data of the previous model rod piece of the right leg in one period is stored through a buffer area and is called as real-time model data. And then according to the real-time predicted period, based on the real-time model data, taking the data of the latter half of the predicted period of the current position of the right foot as the data of each model rod piece of the left leg. Therefore, when the thigh angle and the gait cycle are obviously changed, the left leg and the right leg can still generate symmetrical motion, so that the motion of the virtual lower limb is more stable.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.