Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed May 30, 2012 5:25 am 
Offline

Joined: Wed Mar 28, 2012 10:55 pm
Posts: 9
Hello Everyone,

I'm trying to get the angle of each axis of a 6DOF constraint, so I can pass to my program. The code is below:

Code:
btTypedConstraint* articulacao = mundoDinamico -> getConstraint(i);
btUniversalConstraint* articulacaoUni = (btUniversalConstraint *)(btGeneric6DofConstraint *) articulacao;

float anguloX, anguloY, anguloZ;

anguloX = articulacaoUni -> getAngle(1);
anguloY = articulacaoUni -> getAngle(0);
anguloZ = articulacaoUni -> getAngle(2);


Imagine a example where I have two links with a 6DOF joint, and the second link makes an angle of 45 degrees with the first link.
Well, the strange behavior is that the getAngle returns zero after I start the simulation. Also, the getAngle method is not documented, so I want to understand exactly what is the range of values for the parameter of this method, and why its using YXZ. This method returns the absolute value, or the difference between each integration?

Thanks for the help!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group