Physics Simulation Forum


All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Mesure force and torque
PostPosted: Thu Apr 20, 2017 4:23 pm 

Joined: Thu Apr 20, 2017 11:21 am
Posts: 1

I'm currently trying to do some simulations of a humanoid robot (for the moment I'm just experimenting on hinges).

My robot will only use hinge constraints (for the moment I'm experimenting with only one, between a static lower part of the leg and a dynamic upper part connected by one hinge (the knee)).

I used the enableAngularMotor method of the class btHingeConstraint to command the angle (using a PD control (for the moment without D)). Up to this point it works quite well (even if I can't make out what exactly is the last argument ( btScalar maxMotorImpulse )).

Now I would like to know how much torque the motor is providing. For that, I use a btJointFeedback, and I read the m_appliedTorqueBodyB field. However, the results doesn't seem coherent : once the upper part of the leg reaches its target, the torque becomes 0, even if the upper part of the leg is horizontal (it weights 10kg for a length of 40cm, so it should be a torque of 10kg*9.81N/kg*0.4m/2 = 20 N.m).

Do you have some idea what may be going wrong? Or How to get my motor's torque?

I also tried to get the total forces and torques applied on the rigid bodies (using the getTotalForce/Torque methods of the class btRigidBody), but I get 0 on all axis all the time (even when the upper leg is acting like a pendulum (ie there are clearly a non 0 total force and a non zero torque). Any Idea what I'm doing wrong? In particular, I would like to measure the ground reaction for each feet : is it possible?

Thank you very much in advance

PS : there is my code
BasicExample.cpp [10.53 KiB]
Downloaded 14 times

BasicExample.h [1.07 KiB]
Downloaded 14 times

(it's compiling as a standalone app with GUI ; I'm printing lots of measures on std::cout (witch are also put in a .cvs file for plotting)

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: Bing [Bot], Exabot [Bot], Google [Bot] and 12 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