-
Notifications
You must be signed in to change notification settings - Fork 39
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
Introduces remove scene node env var, renames func #424
Conversation
Assimp creates additional scene node for the skeleton, this commit introduces a flag for removing that. Users also allowed to set this flag through environment variable. Furthermore renames a previous func to fix its naming. Signed-off-by: Onur Berk Tore <[email protected]>
Signed-off-by: Onur Berk Tore <[email protected]>
Signed-off-by: Onur Berk Tore <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #424 +/- ##
==========================================
- Coverage 81.07% 81.00% -0.07%
==========================================
Files 79 79
Lines 9679 9687 +8
==========================================
Hits 7847 7847
- Misses 1832 1840 +8
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@onurtore and @luca-della-vedova what is the status of this (and the other few Assimp-related PRs? |
Hi @mjcarroll, Current integration of the Assimp library creates additional root node for the Gazebo skeleton. This root node generated by Assimp and can not be found in the file that user trying to load and creates segmentation faults during loading of actor.sdf. I will refer to this node as root node, and the actual root node which is the root node defined in the file (actor.sdf) as actual root node. Segmentation fault happens during the XDisplacement check in src/rendering/SceneManager.cc during actor creation. Related code snippet is here. What happens is, Gazebo tries to access rootNode animation, however the rootNode does not have any animation because it is not the actual root node, it is a dummy root node generated by assimp. To solve this, I suggest to remove this node by just assigning root node to it is child (PR [here])(#410). I am aware this sound dangerous, as it stated by @luca-della-vedova below:
Luca suggest adding dummy animation because if root node have more than one actual root node, As an alternative solution, I created a PR where we check not just the root node, but all the skeleton nodes for XDisplacement (PR), This way we can sure whether there is XDisplacement or not by checking all the nodes. However, this might increase the number of positives as it stated by @luca-della-vedova :
So with this new information, I do not have any alternative. I suggest to assign the root node to its child, because I do not see any cases where dummy root node have more than one real child. However creating a PR for this functionality will make at least one test fails because we created a specific test for checking dummy root node. And no one accepts former intern's PR with failed test cases. (Just a joke :D) Inaction is also a possible choice for this problem, because Assimp will use a new skeleton class in future, and this will remove the dummy root node, however we dont know when will this be available. And will require significant re-writing of the code. I am open to any advise or a roadmap from you and @luca-della-vedova for this problem, and can try implement this in my spare time (Just got an job, so it might be little slow, however I would love to implement the final PRs for the functionality because this was my GSoC project.) There are some more functionalities planned as well. One is replacing the bvhAnimation loader with assimp but they are relatively small compared to this. |
Hi @mjcarroll, |
Hello! I agree that it is a hairy issue which might not have a full answer, since creating the dummy root node will fix the segfault but break the I think the option of adding an environment variable might seem to help but it's just a somewhat obscure option to keep track of for a very narrow edge case, specifically:
So overall my 2c is that I would go for the "noop" approach, as much as I would have personally liked pushing for a single loader to use for all the asset formats it seems that might not happen for some time because of issues like this, so we can just stick with using the other loaders for previously supported formats, while revisiting regularly the state of upstream |
@luca-della-vedova after reading your comment, my understanding is that we should close this PR and keep using the old Collada loader for all dae files. Is that the case? If so, do we need to revert/modify #393? |
Hi! Yea agree with the approach. #393 does not override the previous behavior and we still use the collada loader for all dae files so there is no need to revert anything. I'll close this then |
🦟 Bug fix
Fixes #393
Summary
Assimp creates additional scene node for the skeleton, this commit introduces a flag for removing that. Users also
allowed to set this flag through environment variable. Furthermore renames a previous func to fix its naming.
This commit does not implement the actual operation but prepares the necessary env var. The actual base implementation already inside #410, and will move from there.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.