Open osrf-migration opened 6 years ago
Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).
We have no working examples of BVH files. The last time I tried loading one I had a similar result to yours, I also tried baking the BVH into a DAE in Blender like you did, and also got bad results. As a reference, here's the model I was working on.
I investigated a bit and it's not clear to me if it's an issue with our loader or if it's a matter of choosing the correct options when exporting in Blender.
Original comment by mingfei sun (Bitbucket: mingfeisun).
Thanks for your quick reply. I have investigated a little bit for this (Spent several days and got frustrated without solutions).
Basically, I found that the dae files provided in the gazebo examples (run.dae, walk.dae etc.) use a special skeleton definition different from CMU MoCap skeleton. In the examples, the bones are actually not connected, as shown in this pic. And all the bones are facing towards.
But in the standard skeleton or in BVH files, those bones are defined to be connected to each other (shown here), which means that move one bone will also cause other associated bones to move. However in the example files, move one bone will only cause this bone to move. I guess maybe this is the cause of the distortion, maybe from the loader.
Original comment by mingfei sun (Bitbucket: mingfeisun).
@chapulina Could you tell me how the example dae files (walk.dae, run.dae, etc) were made ?? Thank you very much for your efforts and time. I really want to create an animated actor in Gazebo.
Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).
Sorry, but I don't know... I'd also love to find out. The earliest use of actors I know of is in this video.
Original comment by mingfei sun (Bitbucket: mingfeisun).
Hi Louise, I solved this problem. I got inspired from sasabot's code here.
The point is before retargetting the BVH transformation to the dae file, it is required to do some pre-processing to the BVH transformation. Basically, it is needed to align the bone length, the initial posture, and the initial rotations. Accordingly, I made some changes to the Actor.cc and Actor.hh files. You can find my code here: Actor.cc and Actor.hh. I tested these codes on CMU MoCap bvh files and it works ok, as follows:
Thanks again for your previous help. Also, the biggest credit should be given to sasabot
Original comment by mingfei sun (Bitbucket: mingfeisun).
No problem. It's my pleasure. I will make a pull request. @chapulina
Original report (archived issue) by Anonymous.
The original report had attachments: 02_05.bvh
Dear developers, I am trying to load a sequence of animations to Actor from a BVH file. But after the loading, the Actor becomes distorted in Gazebo (in a weird shape but with correct actions, as shown in here). I tried to solve this by re-creating a dae file in Blender, but failed (Gazebo can't load the new dae file with animations). Could you tell me how to fix this issue?
The code I am using is as follows:
FYI, the BVH file for the animation can also be found in the attachment.
Thanks