allow to control of powered joints after loading a URDF file, through shared memory

more refactor of shared memory joint control API
This commit is contained in:
Erwin Coumans
2015-07-20 23:35:29 -07:00
parent 68b53feb9c
commit 8e163c984d
10 changed files with 279 additions and 118 deletions

View File

@@ -211,7 +211,18 @@ void PhysicsClientExample::stepSimulation(float deltaTime)
if (m_physicsClient.isConnected())
{
m_physicsClient.processServerStatus();
ServerStatus status;
bool hasStatus = m_physicsClient.processServerStatus(status);
if (hasStatus && status.m_type == CMD_URDF_LOADING_COMPLETED)
{
for (int i=0;i<m_physicsClient.getNumPoweredJoints();i++)
{
PoweredJointInfo info;
m_physicsClient.getPoweredJointInfo(i,info);
b3Printf("1-DOF PoweredJoint %s at q-index %d and u-index %d\n",info.m_jointName.c_str(),info.m_qIndex,info.m_uIndex);
}
}
if (m_physicsClient.canSubmitCommand())
{