Hello,
I've seen the implementation of motor (is it Dantzig?) in bullet 2.74 beta for btConeTwistConstraint, but when I wanted to use it, it failed.
I've enabled to motor, set the target and the max motor impulse,
Body->getConstraint()->enableMotor(true);
Body->getConstraint()->setMaxMotorImpulse(10000);
Body->getConstraint()->setMotorTarget(myquat);
but there's no reaction to what I've done, looks as if there's no motor to drive the rigid body.
Can someone from the internal (or anyone who've done this) help me?
Thanks a dozen!!!
Edit:
Would be have a desired velocity for the btConeTwistConstraint just like that btHingeConstraint?
Question: How to use motor in btConeTwistConstraint
-
- Posts: 26
- Joined: Mon Feb 09, 2009 10:07 am
Question: How to use motor in btConeTwistConstraint
Last edited by thloh85 on Mon Feb 09, 2009 3:13 pm, edited 1 time in total.
-
- Posts: 26
- Joined: Mon Feb 09, 2009 10:07 am
Re: Question: How to use motor in btConeTwistConstraint
One more thing, I also noticed that btHingeConstraint have no longer use the obsolete method for solving the constraint. Does this means that it is now using Dantzig solver instead of the iterative solver?
Thanks a lot.
Thanks a lot.
-
- Posts: 56
- Joined: Sat Mar 08, 2008 12:37 am
Re: Question: How to use motor in btConeTwistConstraint
Hello,
Motor for the btConeTwistConstraint is still the work-in-progress.
It is only test implementation for the obsolete constraint solver.
You can try it by using
#define CONETWIST_USE_OBSOLETE_SOLVER false
You may also use the btGeneric6DofConstraint instead, it has all motors implemented
Hinge as well all other joints now use improved SIMD solver by default, but the obsolete solver should still work as well.
The new solver uses more generalized form of representation of constraint equation and faster calculations, but internally
it uses the same iterative sequential impulse method (or, more generally, projected Gauss-Seidel method)
Thanks,
Roman
Motor for the btConeTwistConstraint is still the work-in-progress.
It is only test implementation for the obsolete constraint solver.
You can try it by using
#define CONETWIST_USE_OBSOLETE_SOLVER false
You may also use the btGeneric6DofConstraint instead, it has all motors implemented
Hinge as well all other joints now use improved SIMD solver by default, but the obsolete solver should still work as well.
The new solver uses more generalized form of representation of constraint equation and faster calculations, but internally
it uses the same iterative sequential impulse method (or, more generally, projected Gauss-Seidel method)
Thanks,
Roman
-
- Posts: 8
- Joined: Wed Aug 26, 2009 2:40 am
Re: Question: How to use motor in btConeTwistConstraint
Thanks for the info above.
I also see this in btGeneric6DofConstraint.cpp:
Do I need to change that to make motors work with btGeneric6DofConstraint? Or are the motors implemented by default by better means now?
I also see this in btGeneric6DofConstraint.cpp:
Code: Select all
#define D6_USE_OBSOLETE_METHOD false
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Question: How to use motor in btConeTwistConstraint
This was an old issue. The motors for constraints should all be working fine now, btConeTwistConstraint and btGeneric6DofConstraint shouldn't require any modification (no 'obsolete' versions)
Some of the constraints in the Bullet/Demos/ConstraintDemo, and also the Bullet/Demos/ForkLiftDemo show how to use motors.
Did you have any problems getting motors to work?
Thanks,
Erwin
Some of the constraints in the Bullet/Demos/ConstraintDemo, and also the Bullet/Demos/ForkLiftDemo show how to use motors.
Did you have any problems getting motors to work?
Thanks,
Erwin
-
- Posts: 8
- Joined: Wed Aug 26, 2009 2:40 am
Re: Question: How to use motor in btConeTwistConstraint
No issues. I'm just trying to understand things a bit before I dig too deeply. Steep learning curve. Thanks for the tips (and the demos).