# Humanoid motion

## Multiscale dynamics of human motion

To represent and understand human motion mathematically is a fundamental issue for studying the motor intelligence.

The computation and control of humanoid systems is difficult due to the following three dynamical properties.
First, the human body comprises **a number of moving parts and actuators (motors)**.
Not only the number concerns, but the causality between the motor actuation and the resultant movement is quite complex.
It is due to the second property that the human dynamics is **passive in nature**.
Namely, the human needs to be pushed back from the external world by the reaction force in order to initiate the motion.
During the body movement, the points of action at which the reaction forces are applied also move.
This is the third property that the human body is **structure-varying**.

In spite of the above complicated properties, the following partial dynamics become hints to understand the human motion.

- Translational motion of the center of mass and the total external force
- Rotational motion about the center of mass and the total external torque
- Motion of motors
- The contact points with the external world

The relationship between the center of mass (**COM**) and the total external force is regarded as **the macroscopic dynamics**, while the phenomena happening around motors and contact points are **the microscopic dynamics**.

This study deals with **the mesoscopic dynamics** bridging the macroscopic and microscopic dynamics, which are considered in another study.
While it is easy to compute COM from the movement of the whole motors, the inverse problem is not.

## COM Jacobian matrix

The endpoint velocity of a robotic arm is related with the motion rate of motors by Manipulator Jacobian Matrix (Whitney 1969).
**COM Jacobian matrix** relates the motion rate of motors to the COM velocity in an analogous way (Boulic et al. 1995, Tamiya et al. 1997, Hirano et al. 1998).

Some techniques are required to compute COM Jacobian matrix of a humanoid since it is a passive and structure-varying system not the same as robotic arms.
We solved this problem by marshalling the dynamical constraints which depend on the contact conditions.
Thanks to it, **the inverse kinematics** (**IK**), which is also referred as **the motion resolution**, is applied to compute the motion of motors inversely from the desired COM motion as well as robotic arms.
This method is broadly utilized in many robots.

[References]

- T. Sugihara and Y. Nakamura, Whole-body Cooperative Reaction Force Manipulation on Legged Robots with COG Jacobian involving Implicit Representation of Unactuated Coordinates (in Japanese), Journal of Robotics Society of Japan, Vol.24, No.2, pp.222-231, 2006. 21st Best Paper Award of the Robotics Society of Japan

## Robust IK

COM Jacobian matrix is not enough to discribe the motion of humanoids.
In addition to COM, the orientation of trunk, motion of feet, angular momentum, etc. are coordinated into the whole body motion.
It is the problem of **IK** as mentioned above.

IK of humanoids is hard to solve not only by analytical way but also numerical way since (1) the number of variables (joints) is many, (2) the number of variables doesn't necessarily coincide with the number of equations, (3) the number of equations frequently varies, and (4) the existence of solutions is not guaranteed. A naive numerical solver often runs into an endless loop or abnormally aborts.

In this study,
Levenberg-Marquardt method (Levenberg 1944, Marquardt 1963)
and an automatic adjustment of the damping factor are utilized
to achive **a numerical IK solver which is never bankrupted**.
Further enhancement of this method enables robust prioritized IK solution (Hanafusa et al. 1983).

It is implemented on a software to design humanoid motion in an on-going project.

[References]

- T. Sugihara, Robust Solution of Prioritized Inverse Kinematics Based on Multiplier Method, in Proceedings of 19th Robotics Symposia, Arima Grand Hotel, 3A2, pp.215-220, 2014. 3.15. Best paper award of 19th Robotics Symposia
- T. Sugihara, Solvability-Unconcerned Inverse Kinematics by the Levenberg-Marquardt Method, IEEE Transaction on Robotics, Vol.27, Issue.5, pp.984-991, 2011. (English version of the following article)
- T. Sugihara, Solvability-Unconcerned Inverse Kinematics by the Levenberg-Marquardt Method, Journal of Robotics Society of Japan, Vol.29, No.3, pp.269-277, 2011. 27th Best paper award of Robotics Society of Japan

## Forward dynamics computation with collision and contact

To simulate the human and robot behaviors in the computor world is more significant than just saving time for experiments; we can understand what's happening in the world and the body inside quantitatively.
Dynamics is computed based on the equation of motion under the causality that force induces acceleration, acceleration induces velocity, and velocity induces displacement.
Simulation needs **the forward dynamics**, in which the acceleration due to the force is computed, and **the numerical solution of ordinary differential equations** to track the changes of velocity and displacement.

As mentioned above, the three properties of human dynamics are a number of motors, passive dynamics in nature, and structure variability.
The structure variability is the biggest problem in the simulation mathematics, which implies **frequent collisions and contacts during motions**.
* Though a number of moving parts also has another problem, we don't discuss it here.

Collision and contact drastically changes the motions of bodies in a quite short time, so that it is the largest source of the error amplification between the simulated result and the real behavior.
In the real world, motions would converge to a certain stationary state since the kinetic energy of a moving object dissipates due to collisions.
In the computer world, however, **an inevitable quantization error causes various strange results**, and in the worst case, the computation will be bankrupted.

In this study, a novel contact model and computation method were proposed with an aim to relax the numerical ill-posedness and stable simulations. It unifies the local object deformation and the global change of impulse to complement drawbacks of each other.

[References]

- N. Wakisaka and T. Sugihara, On the Stable Dynamics Simulation of Rigid Multibodies via Collision Time Estimation, in Proceedings of 19th Robotics Symposia, Arima Grand Hotel, 3A3, pp.221-226, 2014. 3.15.
- N. Wakisaka and T. Sugihara, Fast and Stable Forward Dynamics Computation of Rigid Multibody By Relaxed Contact Constraint and Velocity-based Penetration Compensation, in Proceedings of 31st Annual Conference of Robotics Society of Japan, Tokyo Metropolitan University, 2G2-04, 2013. 9. 5.
- T. Sugihara and Y. Nakamura, Improvement of Numerical Ill-posedness of Contact Force Computation in Forward Dynamics of Multibody based on Balanced Micro/Macro-Collision Model (in Japanese), Journal of Robotics Society of Japan, Vol.26, No.7, pp.767-777, 2008.
- T. Sugihara and Y. Nakamura, Balanced Micro/Macro Contact Model for Forward Dynamics of Rigid Multibody, 2006 IEEE International Conference on Robotics and Automation, pp.1880-1885, Orlando, May, 2006