I'm designing a robot (which I intend to build), and I've been using Bullet via robotics sim called VREP to evaluate my design.
However, the problem I've run into with Bullet (and other physics engines), is that the motors I will be using aren't modelled well by the motorized constraints in Bullet. The real-world actuators are basically motorized screws. They can apply linear force to move, but when linear force is applied to them, they don't move.
Another way to express this is: Effective force on joint = MAX(0,Force applied by joint - Force applied against joint);
This behavior contrasts with the Bullet sliding/rotating joints, which allows no differentiation between forces applied by the joint, and forces applied to the joint (at least, I couldn't find any such functionality).
Any suggestions on how to approach this?
Simulating a locking joint
-
- Posts: 463
- Joined: Fri Nov 30, 2012 4:50 am
Re: Simulating a locking joint
Not all motors work that way, and in fact many servos are direct gearing that allow back torques. For those motors you can model servos pretty well in Bullet, I have them within 5% throughout without thorough optimization._Adam wrote: However, the problem I've run into with Bullet (and other physics engines), is that the motors I will be using aren't modelled well by the motorized constraints in Bullet. The real-world actuators are basically motorized screws. They can apply linear force to move, but when linear force is applied to them, they don't move.
For one way motors though, you'll need to create your own joint calculations to allow that type of dynamics. It's not impossible, but sure is annoying.
-
- Posts: 2
- Joined: Wed Sep 25, 2013 2:23 pm
Re: Simulating a locking joint
Hmm.. I feared that was the only alternative.
I'm assuming this is the file I would need to extend: http://bulletphysics.org/Bullet/BulletF ... ource.html
Is there someone I could message/talk to about this? I'm happy to do the work myself, but looking at the hinge constraint code I'm not sure exactly what does what and where to begin.
Any tips, or even just a symbolic equation would be really helpful.
I'm assuming this is the file I would need to extend: http://bulletphysics.org/Bullet/BulletF ... ource.html
Is there someone I could message/talk to about this? I'm happy to do the work myself, but looking at the hinge constraint code I'm not sure exactly what does what and where to begin.
Any tips, or even just a symbolic equation would be really helpful.
-
- Posts: 463
- Joined: Fri Nov 30, 2012 4:50 am
Re: Simulating a locking joint
The "core" code would be the buildJacobian, getInfo2Internal, and getInfo2InternalUsingFrameOffset. The Jacobian should be more or less self explanatory, but only applicable to the obsolete solver (according to the code). The getInfo2Internal works only with offset disabled, which is not default, so you're left looking at getInfo2InternalUsingFrameOffset. More than that, I hope someone with better knowledge can explain it to both of us 
