lsw9021 / MASS

Apache License 2.0
582 stars 109 forks source link

Get nan from ConstraintSolver in training with backflip.bvh #17

Closed meaten closed 4 years ago

meaten commented 5 years ago

Hi! Thanks for the great repo!

When I tried to train an agent with backflip.bvh, I got an error like this.

python3 python/main.py -d data/metadata.txt Human(DOFs : 56) Ground(DOFs : 0) Human(DOFs : 56) Ground(DOFs : 0) Human(DOFs : 56) Ground(DOFs : 0) Human(DOFs : 56) Ground(DOFs : 0) Human(DOFs : 56) Ground(DOFs : 0) Human(DOFs : 56) Ground(DOFs : 0) Human(DOFs : 56) Ground(DOFs : 0) Human(DOFs : 56) Ground(DOFs : 0) Human(DOFs : 56) Ground(DOFs : 0) Human(DOFs : 56) Ground(DOFs : 0) Human(DOFs : 56) Ground(DOFs : 0) Human(DOFs : 56) Ground(DOFs : 0) Human(DOFs : 56) Ground(DOFs : 0) Human(DOFs : 56) Ground(DOFs : 0) Human(DOFs : 56) Ground(DOFs : 0) Human(DOFs : 56) Ground(DOFs : 0) save simulation nn ../nn/current.pt save muscle nn ../nn/current_muscle.pt save simulation nn ../nn/0.pt save muscle nn ../nn/0_muscle.pt num states: 130, num actions: 50 Error [BoxedLcpConstraintSolver.cpp:291] [BoxedLcpConstraintSolver] The solution of LCP includes NAN values: Error [BoxedLcpConstraintSolver.cppnan nan:291] nan [BoxedLcpConstraintSolver] The solution of LCP includes NAN values: nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan. We're setting it zero for safety. Consider using more robust solver such as PGS as a secondary solver. If this happens even with PGS solver, please report this as a bug. nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan. We're setting it zero for safety. Consider using more robust solver such as PGS as a secondary solver. If this happens even with PGS solver, please report this as a bug.

I just modified the metadate.txt as follows bvh_file /data/motion/walk.bvh true -> bvh_file /data/motion/backflip.bvh true

I think I have the same environment as yours because I followed your docker instruction. docker build . -t mass bash docker.sh

Thanks!!

zigui-ps commented 5 years ago

Changing 'core/Character.cpp' file's 188th line from return std::make_pair(p,(p1-p)/dt); to return std::make_pair(p,mSkeleton->getPositionDifferences(p1, p)/dt); will work well.

meaten commented 5 years ago

Thanks! errors are fixed:)

meaten commented 4 years ago

Training Success! I would close this!