Pedestrian motion centroid model based on robot dynamics

In recent years, with the rapid development of computer vision technology, image-based human body research has become an important task, such as pedestrian target detection, trajectory tracking, posture estimation and behaviour recognition. The centre of mass is one of the important characteristics that can reflect the phenomenon of pedestrian movement. This paper first introduces the biped robot model in robotics, starting from forward and inverse kinematics, to find the mapping relationship between the position of each joint and the pose of the end effector. Then, corresponding to the skeleton model of the human joint points, the characteristics of the bone posture and joint angle are determined. The moment of inertia factor is introduced, and the motion superposition of different joint points is considered to establish a pedestrian motion centroid model. By calculating the equivalent dynamic centroid, the pedestrian kinematics law can be explored and the pedestrian movement mechanism can be more deeply recognized.


Introduction
In recent years, biped robots have been extensively studied due to their appearance features and functions similar to humans. It is a complex system with nonlinearity, multiple degrees of freedom, and strong coupling. Kinematics is to describe the law of changes in the pose of an object over time, regardless of the physical properties of the object itself and the influence of the force, which is the foundation of robotics research [1]. Inverse kinematics in robotics corresponds to the bottom-up method in human posture recognition, which can provide a reference for the study of pedestrian motion.
Human body posture is one of the important biological characteristics, and there are many application scenarios, such as: gait analysis, video surveillance, augmented reality, human-computer interaction, entertainment and games, sports science, etc. [2]. The coordinate of the mass centre is an important feature, which can reflect the posture and behaviour of pedestrians to a certain extent. Through video image technology, identify the skeleton model of the human body joint points, consider the angle and distance between the key bone nodes, use the concept of moment of inertia, and finally establish the pedestrian motion centroid model.

Joint-link model of Biped robot
The biped robot is mainly composed of legs that can walk, arms that can operate, and corresponding control systems. In order to facilitate the analysis of the biped robot, each part of the biped robot's body is simplified into a connecting rod with uniform mass and no deformation. Adjacent links are connected by joints to form a joint-link model, and it is stipulated that there is no friction in each joint [3]. The joint-link model of the biped robot can be shown in Figure 1.

Kinematics in biped robots
In order to express the state of the biped robot in the three-dimensional space, the two words of position and posture are usually used to represent [4], and the position and posture are collectively referred to as pose. In order to correctly express the pose, the base coordinates must be defined first, and the corresponding reference coordinates shall be established on each mechanism of the robot, and then the pose of a certain point under the base coordinates can be expressed through the homogeneous transformation method.

Position vector
In a three-dimensional coordinate system, the position of point P in space can be expressed through a three-dimensional vector, as formula (1).
where A P represents the position of the point P in the coordinate {A} of the reference system, where P x , P y , and P z respectively represent the X-axis, Y-axis, and Z-axis corresponding values.

Rotation matrix
Suppose the position of point P in the coordinate system {A} is (X A , Y A , Z A ), then the position of point P in the coordinate system {B} is (X B , Y B , Z B ), and the reference coordinate {B} is used to represent the reference {A}. The coordinates can be written as B , the vector is composed of a 3*3 matrix, as shown in formula (2).
where B A R is called the rotation matrix, that is, the rotation matrix is the transformation matrix of the same point in different coordinate systems, so that the point can quickly express its pose in different coordinate systems.

Forward kinematics
Forward kinematics refers to obtaining the pose of the corresponding target according to the known joint angle and link length. Forward kinematics is not only widely used in industrial manufacturing robots, but also often used to calculate the centroid of biped robots, space state description, environmental collision identification, etc., it is the basis of robot research. The forward kinematics solution methods include D-H method and Craing's improved D-H method [5]. The common advantage of these two solutions is that the relative offset position and rotation matrix of each reference coordinate system can be solved first, and then calculated together.

Inverse kinematics
Inverse kinematics is to solve the angle between the connecting links according to the post. The common solving methods of inverse kinematics are numerical method and analytical method. The numerical method has a slower analytical speed due to the iterative nature of the solution, and is not suitable for occasions with high real-time performance.

Joint skeleton model of human body
The research of human posture is mostly described by the spatial location of main joint points. A combination of joint points can form complex posture estimates for many behaviors, such as jumping, walking, and running. Two-dimensional multi-person real-time recognition can divide the human body into 15, 18 or 25 body key points [6]. Considering the calculation time and training complexity, the current research on selecting 18 joint points is more common, as shown in Figure 2 shown.

Bone posture characteristics
Pedestrian movement is generally regarded as the continuous evolution of spatial shape or body posture. For the rotation and scale invariant of human motion, the joint direction of each joint relative to the world coordinate is used to describe the human motion, rather than the position of the joint. The quaternion is usually accepted to express this direction. Compared with Euler angles, the quaternion is a compact and complete representation of rotation in three-dimensional space [7].
The quaternion is constructed by a four-dimensional tuple, and each quaternion is composed of four scalar numbers, including a real number dimension and three imaginary number dimensions. When quaternion is used to represent the rotation of the human body, the singularity is avoided, and a more effective and accurate representation of the rotation transformation is given. A quaternion q can be expressed as follows: where i, j, k are three imaginary dimensions orthogonal to each other, quaternion means rotating 180 degrees around the axis, j means rotating 180 degrees around the y axis, and k means rotating 180 degrees around the z axis.
The quaternion (a, b, c, d) usually represents an angle θ around the (x, y, z) axis, and: Compared with a 3×3 rotation matrix that requires 9 storage units, a quaternion requires only 4 storage units, which saves storage space and reduces the amount of calculation. The method of converting Euler angles to quaternions is as follows: In the formula, ℎ g corresponds to yaw angle; corresponds to pitch angle; corresponds to roll angle. They also completely fit the skeletal joint freedom of the laboratory humanoid robot NAO. The obtained feature vector is formed by concatenating 18 quaternions of each bone joint to form a column vector containing 72 elements.

Joint angle characteristics
There are usually two methods to calculate the angle of human joints, one is to use the traditional analytical geometry method, and the other is to solve it by the space vector method. Compared with the traditional analytical geometry method, the space vector method does not need to consider the processing conditions at the boundary. Therefore, the angle feature sequence of human joints is obtained by the space vector method [8].
Taking the angle of the elbow joint of the left arm as an example, the three joint points are located in the spatial plane and on the negative semi-axis of the z-axis in the coordinate system. The vector representation in the ordinary coordinate system after translation is shown in Figure 3. Therefore, when calculating the angle of the elbow joint, it can be obtained by calculating the angle between the space vectors ES and EH.

Moment of inertia theory
Momentum, in classical mechanics, is expressed as the product of the mass and speed of an object, P=mv, which refers to the tendency of the object to keep moving in its moving direction. Angular momentum is the product of the moment of inertia and angular velocity, L=Iw. It can be seen that the moment of inertia and mass are analogous quantities [9]. For a mass point, I=mr 2 , where m is its mass and r is the vertical distance between the mass point and the axis of rotation.
For a system composed of a series of mass points, its moment of inertia is: Obviously, when i=j=1, it is exactly the moment of inertia of the entire system about the x-axis.

Dynamic centroid calculation
The vector representation of dynamic centroid coordinate system is shown in Figure 4. According to the image processing technology, at a certain moment, the coordinate information of key joint points of the human body can be obtained as (xk, yk, zk) with k=1,2…18. The mass of each joint point is mk. The required dynamic centroid is equivalent as (xE, yE, zE).
Based on the analysis in the previous section, the moment of inertia describes the properties related to inertia. Once the object is determined and assuming that it will not be affected by external forces, it remains unchanged for the axis of mass. The static centroid position is identified as (x C , y C , z C ) through the outer rectangular frame of the pedestrian. I s is obtained by static centroid calculation.

Conclusion
This paper mainly studies the joint points of pedestrians on the basis of robotics, and uses the important parameter of dynamic centroid to describe the posture and movement of pedestrians. First, we analyze the kinetic equations of the biped robot to find the correlation with the human body; secondly, based on the expression of the quaternion of the pedestrian joint points, the concept of inertia is introduced and the inertia matrix is constructed under the condition of multiple mass points, focusing on the angle change; finally, the solution model of the dynamic centroid is established. This research has certain significance for pedestrian control in public places.