Home | Tutorials | Wiki | Issues
Ask Your Question
0

why some links didn't move with the whole model [closed]

asked 2013-03-16 23:37:20 -0500

lugd1229 gravatar image

updated 2013-03-17 11:37:21 -0500

AndreiHaidu gravatar image

image description
I move the model( including 7 links) up and down using

std::map<std::string,> common::NumericAnimationPtr> anim0;

, but 3 links separate with other links and cannot move with others at same time, they are connected with revolute type joint each other, and the model use a "prismatic" joint to connect with world, it was very Strange, why happen this? thank you best gd renew:the program as follow sdf joint:

> <joint name="my_joint0"
> type="prismatic">
>         <parent>world</parent>
>         <child>test_link0</child>
>          <pose>0.025 0.15 0.05 0.0000 0.000000 0.000000</pose>
>         <axis>
>           <xyz>0 0 1</xyz>
>             <dynamics>
>               <friction> 0.1 </friction>
>             </dynamics>
>               <limit>
>                 <lower>0</lower>
>                 <upper>1</upper>
>               </limit> 
>         </axis>
>            
>       </joint>
> <joint name="my_joint6"
> type="revolute">
>         <parent>test_link0</parent>
>         <child>test_link5</child>
>         <pose>0 0.05 0.05 0.000000 0.000000 0.000000</pose>
>         <axis>
>           <xyz>1 0 0</xyz>
>             <dynamics>
>               <friction> 0.1</friction>
>            </dynamics>
>                 <limit>
>                 <lower>-1.57</lower>
>                 <upper>1.57</upper>
>               </limit>
>         </axis>
>       </joint>
> 
> std::map<std::string,
> common::NumericAnimationPtr> anim0;
>      anim0["box::my_joint0"].reset(new common::NumericAnimation("my_animation0",
> 25.0, false));
>       common::NumericKeyFrame *key0 = anim0["box::my_joint0"]->CreateKeyFrame(10.01);
>       key0->SetValue(0.0);
>       key0 = anim0["box::my_joint0"]->CreateKeyFrame(15);
>      key0->SetValue(0.1);
>       key0 = anim0["box::my_joint0"]->CreateKeyFrame(20.0);
>       key0->SetValue(0.0);
>       key0 = anim0["box::my_joint0"]->CreateKeyFrame(25.0);
>       key0->SetValue(0.0);
>      _model->SetJointAnimation(anim0);
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by nkoenig
close date 2013-07-23 18:23:06.307805

Comments

Hi, you should also post the sdf file, most probably you are missing something in there.

AndreiHaidu gravatar imageAndreiHaidu ( 2013-03-17 07:13:14 -0500 )edit

who can help me about this problem? thanks a lot

lugd1229 gravatar imagelugd1229 ( 2013-03-24 10:29:33 -0500 )edit

Most probably you have made some mistake in the sdf file, which you did not really post correctly, you could give a link to it, or just re-post it, use ctrl+k when you copy is to it is more visible. And you could start debugging by commenting out the links and the joints, and then gradually put them back until it doesn't work as expected. And then you should get an idea of where the problem might be, Cheers

AndreiHaidu gravatar imageAndreiHaidu ( 2013-03-24 10:52:18 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-04-08 15:19:23 -0500

nkoenig gravatar image

Joint animation only works with static models.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-03-16 23:37:20 -0500

Seen: 137 times

Last updated: Apr 08 '13