Search found 56 matches

by rponomarev
Thu Feb 16, 2012 10:09 pm
Forum: General Bullet Physics Support and Feedback
Topic: Division by zero in btConeTwistConstraint::calcAngleInfo2
Replies: 3
Views: 1865

Re: Division by zero in btConeTwistConstraint::calcAngleInfo

Hello, Looks like there is no need to solve the swing limit in this case. So I added an additional check to btConeTwistConstraint::calcAngleInfo2() I tested it, it seems OK Here is the change (marked with //------------- ) btVector3 swingAxis = btVector3(qDeltaAB.x(), qDeltaAB.y(), qDeltaAB.z()); //...
by rponomarev
Fri Nov 19, 2010 7:19 pm
Forum: General Bullet Physics Support and Feedback
Topic: 6DOF motors' forces and velocities depend on used timestep?
Replies: 10
Views: 4585

Re: 6DOF motors' forces and velocities depend on used timest

Hello, The maxMotorForce value is actually sets a limit for impulse, applied during one timestep. So if you scale timestep dt you should scale maxMotorForce as well, e.g. if you had maxMotorForce == 0.1 for dt == 1/60 sec , you should set it to 0.01 for dt == 1/600 sec This maybe confusing, we'll th...
by rponomarev
Wed Nov 03, 2010 9:24 pm
Forum: General Bullet Physics Support and Feedback
Topic: Using a constraint motor on a single body
Replies: 3
Views: 1780

Re: Using a constraint motor on a single body

Hello, Actually all Bullet constraints always have 2 frames. In the case when constraint is attached to the world, the second frame is in the world coordinate system. Try the following code - it is a slider-like Generic6Dof constraint with linear motor. You can see that one frame is attached to the ...
by rponomarev
Thu Oct 21, 2010 6:30 pm
Forum: General Bullet Physics Support and Feedback
Topic: Create a string with slider constraint
Replies: 1
Views: 1353

Re: Create a string with slider constraint

Hello, Unfortunately spring is not supported for the slider joint for now. But you can use the 6DOF joint with spring, this will give the same effect Try the following code: { // create a generic 6DOF constraint with springs btTransform tr; tr.setIdentity(); tr.setOrigin(btVector3(btScalar(-10.), bt...
by rponomarev
Tue May 18, 2010 7:07 pm
Forum: General Bullet Physics Support and Feedback
Topic: Pose matching with direct angular velocity control
Replies: 3
Views: 1707

Re: Pose matching with direct angular velocity control

Hello, You may try to use btGeneric6DofSpringConstraint or derive your own hinge constraint from btHingeConstraint and use code like btGeneric6DofSpringConstraint::internalUpdateSprings() to update motor parameters on each step depending on pose matching that you need Basically targetVelocity adds s...
by rponomarev
Tue Mar 23, 2010 12:27 am
Forum: General Bullet Physics Support and Feedback
Topic: Apply joint torques
Replies: 1
Views: 1719

Re: Apply joint torques

Hello, Actually only ODE hinge joint have the addTorque(dReal torque) method. This method gets hinge axis ant applied torque to both bodies that are connected by hinge. Some other joints have addTorques(...) methods, specific for each joint Bullet has no specific function for each joint type, but it...
by rponomarev
Fri Mar 19, 2010 11:38 pm
Forum: Research and development discussion about Collision Detection and Physics Simulation
Topic: Distance constraint
Replies: 4
Views: 4521

Re: Distance constraint

Hello, You are right, btPoint2PointConstraint is a ball joint So there is no distance constraint in Bullet for now. Fortunately it is easy to implement, like this: class btDistanceConstraint : public btPoint2PointConstraint { protected: btScalar m_distance; public: btDistanceConstraint(btRigidBody& ...
by rponomarev
Fri Mar 19, 2010 8:06 pm
Forum: Research and development discussion about Collision Detection and Physics Simulation
Topic: Distance constraint
Replies: 4
Views: 4521

Re: Distance constraint

Hello, It seems that you could use btPoint2PointConstraint. For example, If pivotInA is located in the center of mass of bodyA (i.e. it is (0, 0, 0)) and pivotInB is located in the center of mass of bodyB (i.e. it is (0, 0, 0)) , then this joint will keep the distance between pivotInA and pivotInB t...
by rponomarev
Fri Mar 19, 2010 7:52 pm
Forum: General Bullet Physics Support and Feedback
Topic: Joints feedback
Replies: 16
Views: 7327

Re: Joints feedback

Hello again, Looks like ODE keeps the sum of constraint forces applied by joint to bodies in world space, and not for each constraint axis. http://opende.sourceforge.net/wiki/index.php/Manual_(Joint_Types_and_Functions) typedef struct dJointFeedback { dVector3 f1; // force that joint applies to body...
by rponomarev
Fri Mar 19, 2010 6:42 pm
Forum: General Bullet Physics Support and Feedback
Topic: Joints feedback
Replies: 16
Views: 7327

Re: Joints feedback

Hello,

OK, I understand now what is needed.
I'll add this possibility soon and keep you posted.

Thanks,
Roman
by rponomarev
Wed Mar 17, 2010 7:27 pm
Forum: General Bullet Physics Support and Feedback
Topic: apply a force/impulse relative to a rigidbody
Replies: 7
Views: 8671

Re: apply a force/impulse relative to a rigidbody

Hello,

Try this to avoid extra calculations:

Code: Select all

btVector3 relativeForce = btVector3(0,10,0);
btMatrix3x3& boxRot = boxRigidBody->getWorldTransform().getBasis();
btVector3 correctedForce = boxRot * relativeForce;
boxRigidBody->applyCentralForce(correctedForce);
Hope this will help,
Roman
by rponomarev
Wed Mar 17, 2010 7:09 pm
Forum: General Bullet Physics Support and Feedback
Topic: Joints feedback
Replies: 16
Views: 7327

Re: Joints feedback

Hello, As of r2069 I've added several access functions to get velocities applied by solver to rigid body at one simulation step. These functions are defined as: const btVector3& btRigidBody::getDeltaLinearVelocity() const; const btVector3& btRigidBody::getDeltaAngularVelocity() const; const btVector...
by rponomarev
Wed Mar 17, 2010 12:32 am
Forum: General Bullet Physics Support and Feedback
Topic: Joints feedback
Replies: 16
Views: 7327

Re: Joints feedback

Hello,

Unfortunately for now there are no functions that return applied impulse in vector form.
However it looks like they could be added easily.
I'll do that soon and post a notice here.

Thanks,
Roman
by rponomarev
Wed Mar 03, 2010 9:53 pm
Forum: General Bullet Physics Support and Feedback
Topic: newbie btGeneric6DofSpringConstraint question
Replies: 2
Views: 3403

Re: newbie btGeneric6DofSpringConstraint question

Hello, FrameA and FrameB are constraint frames in local spaces A and B respectively Limits give the allowable range of movement if frameB in frameA space (or vice versa if useLinearReferenceFrameA == false) Try to play with the following snippet of code: { // create a generic 6DOF constraint with sp...
by rponomarev
Wed Mar 03, 2010 9:06 pm
Forum: Physics authoring tools, serialization, standards and related topics
Topic: Pivot point offsets when using Dynamica in Maya x64
Replies: 3
Views: 4001

Re: Pivot point offsets when using Dynamica in Maya x64

Hello, Unfortunately we cannot simply use existing transform for rigidBodyNode, because we should keep Maya shape node(and its transform) as well. It may be needed, for example, for high-quality rendering. Now rigid bodies have just very simplified polygonal rendering. Also we cannot just copy all d...