xbpeng / DeepMimic

Motion imitation with deep reinforcement learning.
https://xbpeng.github.io/projects/DeepMimic/index.html
MIT License
2.27k stars 485 forks source link

Initialization of characters during training #154

Closed EricVoll closed 3 years ago

EricVoll commented 3 years ago

Hi @xbpeng

I am still working through your code to find out how a character's pose & velocity is initialized at the beginning of episodes. It seems to me, that the first pose & velocity from one of the provided motion files is picked (which motion seems to be random) and that initial pose is kept for the complete training.

The pose seems to be reset in cCharacter::Reset()

Could you point me to the code that actually picks which motion is used etc?

That would be great. Thanks!

xbpeng commented 3 years ago

Here's the code used to initialize the character to states from the ref motion is here: https://github.com/xbpeng/DeepMimic/blob/eec9fa500a2d06249875f4db8965a804058a1db4/DeepMimicCore/scenes/SceneImitate.cpp#L353 Note that the kin_char is the one that keeps track of the ref motions. The kinematic motions are stored in a kinematic controller: https://github.com/xbpeng/DeepMimic/blob/master/DeepMimicCore/anim/ClipsController.cpp which will select which motion clip to play.

EricVoll commented 3 years ago

Great, thanks!