diff --git a/examples/RobotSimulator/b3RobotSimulatorClientAPI.cpp b/examples/RobotSimulator/b3RobotSimulatorClientAPI.cpp index 65692358d..224014b76 100644 --- a/examples/RobotSimulator/b3RobotSimulatorClientAPI.cpp +++ b/examples/RobotSimulator/b3RobotSimulatorClientAPI.cpp @@ -539,7 +539,7 @@ bool b3RobotSimulatorClientAPI::getJointState(int bodyUniqueId, int jointIndex, b3SharedMemoryCommandHandle command = b3RequestActualStateCommandInit(m_data->m_physicsClientHandle,bodyUniqueId); b3SharedMemoryStatusHandle statusHandle = b3SubmitClientCommandAndWaitStatus(m_data->m_physicsClientHandle, command); int statusType = b3GetStatusType(statusHandle); - if (statusType != CMD_ACTUAL_STATE_UPDATE_COMPLETED) + if (statusType == CMD_ACTUAL_STATE_UPDATE_COMPLETED) { if (b3GetJointState(m_data->m_physicsClientHandle, statusHandle, jointIndex, state)) {