-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Environment
- OS Version: Ubuntu 24.04
- Source or binary build?
source , gz-common7
Description
- Expected behavior: The function should detect that the animation has no forward (X) displacement and handle it gracefully rather than looping forever.
- Actual behavior: looping forever
Steps to reproduce
- add a test in
SkeletonAnimation_TEST.cc
/////////////////////////////////////////////////
TEST_F(SkeletonAnimation, CheckPoseAtXLooping)
{
common::SkeletonAnimation skelAnim("testAnimation");
skelAnim.AddKeyFrame("node1", 1.0, math::Matrix4d::Identity);
auto pose = skelAnim.PoseAtX(2.0, "node1", true);
ASSERT_EQ(pose["node1"], math::Matrix4d::Identity);
}Propose Fix
Fix in SkeletonAnimation.cc
function PoseAtX
if (lastX > 1e-6) {
while (x > lastX)
x -= lastX;
} else {
x = 0;
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Inbox