-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only load bones if model has animations
- Loading branch information
1 parent
1795314
commit ce4cfc8
Showing
3 changed files
with
60 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ce4cfc8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@luca-della-vedova,
are you sure this is the right way to create skeletons ? There might be a change that some meshes do not have skeletons, but this will create a node for them as well.
ce4cfc8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! I'm not sure what you mean? Previously without the check the skeleton would always be created, now it will only be done for meshes that have an animation (since skeletons are only used for animations anyway).
Apart from skipping a lot of unnecessary computation and skeleton creation, this change fixed a lot of meshes that were having trouble being loaded because of duplicated bone names, even though they didn't actually have animations.
Some examples are the reflective table in the edifice demo and the ground vehicle (forgot the name) that didn't render before this change.
ce4cfc8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@luca-della-vedova,
Sorry for unclear message.
This commit still generates segmentation fault (Stack shows that error comes from ignition::common::NodeAnimation::FrameCount() ) when I use actor.sdf. I was wondering whether this was related to just a problem on my side.
ce4cfc8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope the segmentation fault is unrelated, it happens in
CreateActor
in gz-sim. I have had quite good behavior with all the actor models we use internally (i.e. https://app.gazebosim.org/OpenRobotics/fuel/models/MaleVisitorPhone) but the one in the actor world still doesn't quite work, some of the animations are good, some are deformed and the whole demo world just segfaults.