Allow current positions for Calculate IK.

Allows the user to specify the current positions of joints when
calculating Inverse Kinematics.
This commit is contained in:
mbennice
2018-08-23 13:19:15 -07:00
parent d44571a4b3
commit 780b280181
2 changed files with 6 additions and 2 deletions

View File

@@ -935,6 +935,10 @@ bool b3RobotSimulatorClientAPI_NoDirect::calculateInverseKinematics(const struct
b3CalculateInverseKinematicsSetJointDamping(command, args.m_numDegreeOfFreedom, &args.m_jointDamping[0]);
}
if (args.m_flags & B3_HAS_CURRENT_POSITIONS) {
b3CalculateInverseKinematicsSetCurrentPositions(command, args.m_numDegreeOfFreedom, &args.m_currentJointPositions[0]);
}
b3SharedMemoryStatusHandle statusHandle;
statusHandle = b3SubmitClientCommandAndWaitStatus(m_data->m_physicsClientHandle, command);