-
Notifications
You must be signed in to change notification settings - Fork 42
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
Implement XDisplacement function for checking x displacement for all nodes #411
Implement XDisplacement function for checking x displacement for all nodes #411
Conversation
Implements XDisplacement function, function which looks all nodes for possible XDisplacement. Signed-off-by: Onur Berk Tore <otore19@ku.edu.tr>
Signed-off-by: Onur Berk Tore <otore19@ku.edu.tr>
Signed-off-by: Onur Berk Tore <otore19@ku.edu.tr>
Codecov Report
@@ Coverage Diff @@
## gz-common5 #411 +/- ##
==============================================
+ Coverage 80.38% 80.54% +0.16%
==============================================
Files 85 85
Lines 9944 9956 +12
==============================================
+ Hits 7993 8019 +26
+ Misses 1951 1937 -14
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
add some test
Signed-off-by: Onur Berk Tore <otore19@ku.edu.tr>
common::NodeAnimation *rootNode = skelAnim->NodeAnimationByName(rootNodeName); | ||
EXPECT_EQ(nullptr, rootNode); | ||
auto xDisplacement = skelAnim->XDisplacement(); | ||
ASSERT_TRUE(xDisplacement); |
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.
can we add another example below with that return xDisplacement=false?
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.
Doing it, but might take a while, I need to understand how to remove animations from collada file format.
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.
@ahcorde,
Can I create just an empty animation and test the function with that?
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.
yes,
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.
Done, added new test file for skeletonAnimation because we are not using any mesh for the new test.
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.
@ahcorde ,
One question, I added new test file and re-compile everything using colcon, when I tried to make test, make didnt see any new test, I had to remove gz-common build and re-compile everything. Took me 30min, is there a easier way? Refreshing cache for test?
Signed-off-by: Onur Berk Tore <otore19@ku.edu.tr>
common::SkeletonAnimation* skelAnim = | ||
new common::SkeletonAnimation("emptyAnimation"); | ||
auto xDisplacement = skelAnim->XDisplacement(); | ||
ASSERT_TRUE(!xDisplacement); |
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.
ASSERT_TRUE(!xDisplacement); | |
ASSERT_FALSE(xDisplacement); |
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.
Done.
Signed-off-by: Onur Berk Tore <otore19@ku.edu.tr>
@osrf-jenkins run tests please! |
Closed and reopened again, Github actions were stuck |
@j-rivero @mjcarroll something is broken in the ABI checker |
Log of the ABI checker is:
Note that the file described there is available via Jenkins workspace at https://build.osrfoundation.org/job/ignition_common-abichecker-any_to_any-ubuntu_auto-amd64/ws/abi_checker/logs/ign-common/X/log.txt/*view*/
Something seems to have broken the compilation in the |
Did you try to use this function on an actual animated model that has no X displacement (i.e. this)? |
@luca-della-vedova, |
@luca-della-vedova, |
Hi @iche033, This PR makes it check every node for x interpolation. But I dont know, whether this is something correct. |
🦟 Bug fix
Related to #393
Summary
During actor's trajectory creation, createActor function only looks for the root node's x displacement while setting the trajectory interpolation flag.
If root node does not have any animation, this results with a segmentation fault. While with the previous mesh loaders, this seg fault never happened, recent introduction of assimp loader create cases where root node does not have animation and results with segmentation fault during actor creation.
This patch introduces new function called XDisplacement to check all nodes inside the skelAnim for possible X displacement. This function will be utilized during the actor's trajectory creation.
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.