Root and IK problem with retargeting BVH animation to custom rig


I have a problem with my custom rig. I’m trying to retarget free custom BVH animations from a website. I’m using a custom .trg file based on the rigify rig. When I load and retarget an animation the root looks weird and it looks like my Inverse Kinematics aren’t working properly. It looks like the IK are holding the feet down and the hips are moving up and then the model is deforming weird. I read a lot of post on the forum but couldn’t solve my problem with them. Also I don’t know how to format the IK bones in the .trg file, I found several examples of custom .trg file, but not with IK values.

Is there a way to retarget the animations and to keep my IK? When I have to make adjustments after retargeting it’s quite annoying to do it without IK on the legs. I enclosed my model and a BVH animation that I want to retarget so you can see what’s going wrong. Also enclosed my custom .trg file that I put in my blender makehuman addon folder.

At first I had a character with a reverse hip and a root bone, but by removing those two it already got better to the point that blender is actually retargeting the animation, instead of giving an error: no candidate hip bone. I don’t know if it’s wise to delete those tow, but after that I came closer to making it work.

I hope someone can help me, because I have been trying myself for two days now without success. (1020 KB)

Nobody who maybe has a clue or knows of someone that had the same kind of problem? I’m retargeting animation now from a free mocap library, but without my IK on the legs it’s almost impossible to animatie the legs, since I cannot simply move them but have to animate the upperleg in order to influence the position of the foot. I’m thinking of keeping the mocap as example animation and then rebuilding it with my character that do has IK.

There has to be a mistake that I overlooked, when trying to retarget the animations right?