# Physics Simulation Forum

 All times are UTC

 Page 1 of 1 [ 1 post ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Mesure force and torquePosted: Thu Apr 20, 2017 4:23 pm

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

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
Felix

PS : there is my code
Attachment:
BasicExample.cpp [10.53 KiB]

Attachment:
BasicExample.h [1.07 KiB]

(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)

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 1 post ]

 All times are UTC

#### Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], Google [Bot] and 14 guests

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

Search for:
 Jump to:  Select a forum ------------------ BULLET PHYSICS LIBRARY USERS    General Bullet Physics Support and Feedback    Release Announcements    Applications, Games, Demos or Movies using Bullet PHYSICS AUTHORING TOOLS, SERIALIZATION AND STANDARDS    Physics authoring tools, serialization, standards and related topics RESEARCH AND DEVELOPMENT IN COLLISION DETECTION & PHYSICS. Don't post Bullet support questions here!    Research and development discussion about Collision Detection and Physics Simulation    Links, Papers, Libraries, Demos, Movies, Comparisons       Non-technical forum and license/patent discussion    Career Opportunities