-
-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add skeleton import functionality to mesh_loader #1654
Conversation
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.
I don't yet see the use of this PR. Could you explain more, please?
According to the OGRE doc, skeleton definitions are loaded on demand, especially when referenced by a Mesh. So, do we really need to explicitly load them?
How do you intend animating a mesh based on the skeleton? The SkeletonPtr
isn't used yet.
Hi @rhaschke! Yes, sorry for not providing enough of a background. So, just as you say Ogre3D loads the skeleton definition on demand when being referenced by a mesh. Unfortunately due to the package://-URI Ogre3D has trouble autoloading the skeleton, and this PR remedies that issue by loading the .skeleton file if present, and then Ogre3D can find it in the default resource group. Let me show this more clearly by using an example: Then the developer will be met with the following error: And if the developer tries setting an animation state which isn't present Rviz will crash. This PR therefore remedies this by checking if there's an .skeleton mesh present, loading that into the default resource group, and assigning it to the mesh. So in summary, a small change, which makes the developer experience more seamless. The reason I kept loadSkeletonFromResource public is to enable others to manually assign other skeletons to meshes, if that is wanted. For example the _notifySkeleton method. |
Thanks for the clarification. |
Closing and reopening to re-trigger CI. |
Hi @rhaschke, just wanted to say thanks for implementing the code review change, and sorry for the late response. Please let me know if there's anything else I can do! :) |
Description
This adds the functionality of importing an animated mesh to RViz using the same resource_retriever as in mesh_loader.
Due to the way Ogre3D loads skeleton meshes a developer can automatically import an animated mesh using the same loadMeshFromResource method already present, but with the added functionality of assigning animation states.
The method is mostly the same as loadMeshFromResource but with changes to load the .skeleton file as well into the default resource group.
Happy to accept any constructive critiques or suggestions on how to make it better!
Checklist
YAML
orrosbag
file with aMarkerArray
msg.Due to the lack of active maintainers, we cannot provide support for older release branches anymore.