mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-05 01:50:05 +00:00
Quaternion to Euler correction
This commit is contained in:
parent
6bb8d1123d
commit
2c7918423d
@ -12360,9 +12360,10 @@ bool PhysicsServerCommandProcessor::processInverseDynamicsCommand(const struct S
|
||||
q[4] = pos[1];
|
||||
q[5] = pos[2];
|
||||
}
|
||||
int quatToEulerCorrection = baseDofQ ? -1 : 0; // The conversion to Euler angles drops the DOF by one
|
||||
for (int i = 0; i < num_dofs; i++)
|
||||
{
|
||||
q[i + baseDofQ] = clientCmd.m_calculateInverseDynamicsArguments.m_jointPositionsQ[i + baseDofQ];
|
||||
q[i + baseDofQ + quatToEulerCorrection] = clientCmd.m_calculateInverseDynamicsArguments.m_jointPositionsQ[i + baseDofQ];
|
||||
}
|
||||
for (int i = 0; i < num_dofs + baseDofQdot; i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user