Revision history [back]

how to solve the question when use poseanimate plugin?

I use a plugin to control a hand model with two fingers from a position(0,0,0) to a high position(0,0,0.5), and the model will shrink up and down, a finger should separate from the hand? the motion is not regular, would you please help me? thank you world file: <plugin name="animate_pose1" filename="libanimate_pose1.so"/> the animate_pose.cc:

  gazebo::common::PoseAnimationPtr anim(
new gazebo::common::PoseAnimation("box::my_joint5", 10.0, 0));

gazebo::common::PoseKeyFrame *key = anim->CreateKeyFrame(0.0);
key = anim->CreateKeyFrame(0);
key->SetTranslation(math::Vector3(0, 0, 0));
key = anim->CreateKeyFrame(2.0);
key->SetTranslation(math::Vector3(0, 0, 0.1));
key = anim->CreateKeyFrame(4.0);
key->SetTranslation(math::Vector3(0, 0, 0.2));
key = anim->CreateKeyFrame(6.0);
key->SetTranslation(math::Vector3(0, 0, 0.3));
key = anim->CreateKeyFrame(8.0);
key->SetTranslation(math::Vector3(0, 0, 0.4));
key = anim->CreateKeyFrame(10.0);
key->SetTranslation(math::Vector3(0, 0, 0.5));

_parent->SetAnimation(anim);


how to solve the question when use poseanimate plugin?

I use a plugin to control a hand model with two fingers from a position(0,0,0) to a high position(0,0,0.5), and the model will shrink up and down, a finger should separate from the hand? the motion is not regular, regular and not smooth, would you please help me? thank you world file: <plugin name="animate_pose1" filename="libanimate_pose1.so"/> the animate_pose.cc:

  gazebo::common::PoseAnimationPtr anim(
new gazebo::common::PoseAnimation("box::my_joint5", 10.0, 0));

gazebo::common::PoseKeyFrame *key = anim->CreateKeyFrame(0.0);
key = anim->CreateKeyFrame(0);
key->SetTranslation(math::Vector3(0, 0, 0));
key = anim->CreateKeyFrame(2.0);
key->SetTranslation(math::Vector3(0, 0, 0.1));
key = anim->CreateKeyFrame(4.0);
key->SetTranslation(math::Vector3(0, 0, 0.2));
key = anim->CreateKeyFrame(6.0);
key->SetTranslation(math::Vector3(0, 0, 0.3));
key = anim->CreateKeyFrame(8.0);
key->SetTranslation(math::Vector3(0, 0, 0.4));
key = anim->CreateKeyFrame(10.0);
key->SetTranslation(math::Vector3(0, 0, 0.5));

_parent->SetAnimation(anim);


how to solve the question when use poseanimate plugin?

I use a plugin to control a hand model with two fingers from a position(0,0,0) to a high position(0,0,0.5), and the model will shrink quiver up and down, a finger should separate from the hand? the motion is not regular and not smooth, would you please help me? thank you world file: <plugin name="animate_pose1" filename="libanimate_pose1.so"/> the animate_pose.cc:

  gazebo::common::PoseAnimationPtr anim(
new gazebo::common::PoseAnimation("box::my_joint5", 10.0, 0));

gazebo::common::PoseKeyFrame *key = anim->CreateKeyFrame(0.0);
key = anim->CreateKeyFrame(0);
key->SetTranslation(math::Vector3(0, 0, 0));
key = anim->CreateKeyFrame(2.0);
key->SetTranslation(math::Vector3(0, 0, 0.1));
key = anim->CreateKeyFrame(4.0);
key->SetTranslation(math::Vector3(0, 0, 0.2));
key = anim->CreateKeyFrame(6.0);
key->SetTranslation(math::Vector3(0, 0, 0.3));
key = anim->CreateKeyFrame(8.0);
key->SetTranslation(math::Vector3(0, 0, 0.4));
key = anim->CreateKeyFrame(10.0);
key->SetTranslation(math::Vector3(0, 0, 0.5));

_parent->SetAnimation(anim);

 4 No.4 Revision nkoenig 7468 ●8 ●43 ●69 http://gazebosim.org/

how How to solve the question when use poseanimate plugin?animate a hand using a plugin

I use a plugin to control a hand model with two fingers from a position(0,0,0) to a high position(0,0,0.5), and the model will quiver up and down, a finger should separate from the hand? the down. The motion is not regular and not smooth, would you please help me? thank you you

world file: file:

<plugin name="animate_pose1" filename="libanimate_pose1.so"/>


the animate_pose.cc:

  gazebo::common::PoseAnimationPtr anim(
new gazebo::common::PoseAnimation("box::my_joint5", 10.0, 0));

gazebo::common::PoseKeyFrame *key = anim->CreateKeyFrame(0.0);
key = anim->CreateKeyFrame(0);
key->SetTranslation(math::Vector3(0, 0, 0));
key = anim->CreateKeyFrame(2.0);
key->SetTranslation(math::Vector3(0, 0, 0.1));
key = anim->CreateKeyFrame(4.0);
key->SetTranslation(math::Vector3(0, 0, 0.2));
key = anim->CreateKeyFrame(6.0);
key->SetTranslation(math::Vector3(0, 0, 0.3));
key = anim->CreateKeyFrame(8.0);
key->SetTranslation(math::Vector3(0, 0, 0.4));
key = anim->CreateKeyFrame(10.0);
key->SetTranslation(math::Vector3(0, 0, 0.5));

_parent->SetAnimation(anim);