New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quaternion Based 6DOF Spring Joint Constraint #4316
base: master
Are you sure you want to change the base?
Quaternion Based 6DOF Spring Joint Constraint #4316
Conversation
Quaternion Based 6DOF Spring Joint Constraint. by PHOBOSS (Kim Obordo) on 2022 August The btGeneric6DofSpringConstraintQuaternion class is based on btGeneric6DofSpring2Constraint. This class was made to provide more control over spring joint "equilibrium" rotation using quaternions instead of Euler Axes. This makes it useful for "puppeteering" joint controlled active ragdolls.
If there's anything I missed, I'd be happy to comply. |
oops forgot to add the example setup
oops, forgot to add the example setup
something is wrong with that space on line 156, imma try and delete it
I tried deleting the other empty line on 154 as well... it didn't work so I guess I'll put it back. I'll add a space in line 157, hope this gets rid of the red
added the "../CommonInterfaces/CommonExampleInterface.h" header. Trying to resolve the AppVeyor issue.
Retrying AppVeyor compile
got rid of the "../CommonInterfaces/CommonExampleInterface.h" include
I almost forgot to attribute where I got the quaternion calculation
added btGeneric6DofSpringConstraintQuaternion.cpp directory
added btGeneric6DofSpringConstraintQuaternion.cpp directory
Thanks for the PR. From Appveyor failed build, it looks like the build is broken. Some cmake or premake build files need updating, adding the new c++ file? |
…-6DOF-Spring-Joint-Constraint
Hello. Sorry for the late reply. I hope I'm not too late to get this PR accepted. I'm not sure what part of the cmake file to update or what c++ file I should add to resolve this. What should I do? |
added `DOF6SpringQuatSetup` to examples/ExampleBrowser/CMakeLists.txt
noice, it worked! |
@erwincoumans, please review :) |
Hello, I saw that there was a "demand" for Quaternion Based 6DOF Spring Joint Constraint calculation:
#4162
https://pybullet.org/Bullet/phpBB3/viewtopic.php?t=8153
So I made a new class:
btGeneric6DofSpringConstraintQuaternion
Based on btGeneric6DofSpring2Constraint.
This class was made to provide more control over spring joint "equilibrium" rotation using quaternions instead of Euler Axes. This makes it useful for "puppeteering" joint controlled active ragdolls.
I also took the liberty of adding in a new example scene in the explorer.
(Quaternion Based Joints (left, center); Euler Axis Based Joint (right))
Per the image, the set equilibrium angles are as follows: X:0° Y:90° Z:45°
More rotation settings are available in the DOF6SpringQuatSetup.cpp file. Change the following macro definitions as you see fit:
USE_6DOF(Q, ,2)
ROTATION_([1-6])