google-code-export / bullet

Automatically exported from code.google.com/p/bullet
0 stars 0 forks source link

btFixedConstraint arbitrary rotation not locked #769

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to attach a btFixedConstraint (in the manner given in the Voroni 
fracture demo) between two objects with arbitrary rotations, as in the modified 
BasicDemo.cpp file below.
2. Start the demo
3. Grab either of the objects. While orientations are kept relatively 
equivalent they are not locked. They both appear to allow rotations about their 
local x-axes

What is the expected output? What do you see instead?
The objects should be locked at the same relative position and orientation no 
matter what external force or torque is applied. Instead I see the behavior 
described above .

What version of the product are you using? On what operating system?
Latest SVN build r2712. Windows 7 64-bit with VS2010 compiler.

Please provide any additional information below.
See the attached BasicDemo.cpp

Original issue reported on code.google.com by tamaynar...@gmail.com on 16 Nov 2013 at 3:46

Attachments:

GoogleCodeExporter commented 9 years ago
Just to note I tried substituting the method ODE uses to calculate the angular 
error for its fixed joint into btFixedConstraint::getInfo2, and that seemed to 
work for any combination of rotations. However the drawback is that that method 
simply locks the objects in their current positions, ideally I'd like it to 
take an offset into account like other Bullet constraints to allow for greater 
control over how locked objects are positioned and oriented with respect to one 
another. It's probably not hard to add this modification, but unfortunately I 
don't have the time or motivation since btGeneric6DofConstraint with all dofs 
locked is adequate for my needs for now.

Original comment by tamaynar...@gmail.com on 28 Nov 2013 at 1:13

GoogleCodeExporter commented 9 years ago
The rotation correction in btFixedConstraint was wrong indeed. It should be 
fixed in latest svn revision, can you double-check?

https://code.google.com/p/bullet/source/detail?r=2719

Thanks for the report,
Erwin

Original comment by erwin.coumans on 4 Dec 2013 at 7:07

GoogleCodeExporter commented 9 years ago
Looks like the demo case I submitted is working now. I'll check it in our 
software once I finish some refactoring I'm in the middle of, although I 
suspect it should be fine.

Original comment by tamaynar...@gmail.com on 5 Dec 2013 at 2:50

GoogleCodeExporter commented 9 years ago
I can confirm btFixedConstraint now works as expected; thanks again for the 
prompt fix.

Original comment by tamaynar...@gmail.com on 9 Dec 2013 at 2:40