Open osrf-migration opened 6 years ago
Original comment by Lucas MCKENNA (Bitbucket: lukes3315).
When exporting the model with blender and reimporting it, blender Collada's exporter seems to have completely distorted the model and the animations. Will look into it. Will leave this open in case you guys want to show an error for an erroneous blender model instead of crash. Cheers.
Original comment by Roselle Carmen (Bitbucket: iamironcat).
Hi Lucas, I'm facing this issue and sent a bug report to the Blender dev team.
I've reported a seperate issue as the distortion happens when using a .dae animated Mixamo model (which works in Blender)
Gazebo bug report (#2516)
Original comment by Lucas MCKENNA (Bitbucket: lukes3315).
Hi Roselle,
I ended up writing a patch for Gazebo that fixed my crash. I wanted to share it with the community I just got caught up with other things. I added a checking condition in the ColladaLoader.cc file for Gazebo-9 which had solved my problem if I remember well.
This just fixed my crash but didn't run my animations, so there is still a problem in what blender generated, however it does work with the default humanoid models gazebo provides (walk.dae found here).
Essentially there was a nullptr for one of the joints and you can add a check for the joint (ColladaLoader.cc line 625):
if (animation[targetBone].find(times[i]) == animation[targetBone].end() && _skel->GetNodeById(targetBone) != nullptr)
animation[targetBone][times[i]] =
_skel->GetNodeById(targetBone)->GetTransforms();
You'll have to recompile gazebo until they release an official fix, maybe try downloading the latest Gazebo they could've fixed it.
Hope this helps.
Cheers.
Original comment by Lucas MCKENNA (Bitbucket: lukes3315).
Also if I remember well one of the issues I was having, was that I was trying to get animations working on a model
tag instead of an actor
tag in the sdf file.
Since I was trying to retrieve forces applied to different joints in motion from the humanoid animations (basically retrieve forces from walking motion).
I think that patch I had done was because the system doesn't load the bones nor joint transforms when trying to be loaded by the model
tag since the model
tag
doesn't support animations.
The only tag that handles animations is the actor
tag in which case gazebo loads the bones and joint transforms to prevent these types of crashes.
I think it would be a good feature to add in the future to be able to retrieve transformation forces from animated models. I attached an Inertial Measurement Unit to the chest of an animated humanoid model with scripted routes (for displacement purposes) and I couldn't retrieve any angular velocities or linear accelerations that were coherent with the model's motion from Gazebo as the actor
subsystem doesn't handle forces from the physics engine.
Hope the feedback helps.
Original comment by Lucas MCKENNA (Bitbucket: lukes3315).
I'll do a pull request when I get back to Gazebo next week.
Original comment by Roselle Carmen (Bitbucket: iamironcat).
Hi Lucas, did you managed to get the pull request up? Had a similar issue on a simpler model.
Original report (archived issue) by Lucas MCKENNA (Bitbucket: lukes3315).
The original report had attachments: test.dae
Hey,
I am trying to load a
dae
mesh in gazebo with attached animation frames to it. I use blender to export my mesh & animations into the collada format to input into Gazebo.If I do not attach any skeleton to the model, Gazebo loads it up fine, the problems only start occurring when I attach a skeleton & animation to it.
Gazebo fails and crashes gazebo with this error:
The
dae
model & animation load up fine if I use Apple's Preview.Any ideas?
Cheers.