Code originated from CVPR 2022 paper "Physical Inertial Poser (PIP): Physics-aware Real-time Human Motion Tracking from Sparse Inertial Sensors". See Project Page.
-
Python-3.9
git clone https://github.com/TerryLiu007/pmp.git
pip install "torch-1.9.1+cpu-cp39-cp39-win_amd64.whl"
pip install "torchvision-0.10.1+cpu-cp39-cp39-win_amd64.whl"
pip install -r requirements.txt
git clone https://github.com/SlimeVRX/rbdl.git
python setup.py install
python evaluate.py
-
In
dynamics.py
, there are many disabled options for the physics optimization. You can try different combinations of the energy terms by enabling the corresponding terms. -
In Line ~44 in
net.py
:self.dynamics_optimizer = PhysicsOptimizer(debug=False)
set
debug=True
to visualize the estimated motions using pybullet. You may need to clean the cached results and rerun theevaluate.py
. (e.g., setflush_cache=True
inevaluate()
and rerun.) -
In Line ~244 in
dynamics.py
:if False: # visualize GRF (no smoothing) p.removeAllUserDebugItems() for point, force in zip(collision_points, GRF.reshape(-1, 3)): p.addUserDebugLine(point, point + force * 1e-2, [1, 0, 0])
Enabling this to visualize the ground reaction force. (You also need to set
debug=True
as stated above.) Note that rendering the force lines can be very slow in pybullet. -
The hyperparameters for the physics optimization are all in
physics_parameters.json
. If you setdebug=True
, you can adjust these parameters interactively in the pybullet window.