Add measured joint motor force to joint sensor state.

This commit is contained in:
yunfeibai 2016-04-19 10:44:59 -07:00
parent f05bef2ea3
commit f9719e2405
2 changed files with 2 additions and 0 deletions

View File

@ -218,6 +218,7 @@ void b3GetJointState(b3PhysicsClientHandle physClient, b3SharedMemoryStatusHandl
for (int ii(0); ii < 6; ++ii) {
state->m_jointForceTorque[ii] = status->m_sendActualStateArgs.m_jointReactionForces[6 * jointIndex + ii];
}
state->m_jointTorque = status->m_sendActualStateArgs.m_jointMotorForce[jointIndex];
}
}

View File

@ -94,6 +94,7 @@ struct b3JointSensorState
double m_jointPosition;
double m_jointVelocity;
double m_jointForceTorque[6]; /* note to roboticists: this is NOT the motor torque/force, but the spatial reaction force vector at joint */
double m_jointTorque;
};
struct b3DebugLines