From 40d07139a9d4af5c4617945c11739db6f7710732 Mon Sep 17 00:00:00 2001 From: erwin coumans Date: Fri, 4 Sep 2015 10:28:32 -0700 Subject: [PATCH] fix build --- test/SharedMemory/test.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/SharedMemory/test.c b/test/SharedMemory/test.c index 4896cbdd9..05dd847d7 100644 --- a/test/SharedMemory/test.c +++ b/test/SharedMemory/test.c @@ -22,6 +22,8 @@ int main(int argc, char* argv[]) double gravx=0, gravy=0, gravz=-9.8; double timeStep = 1./60.; double startPosX, startPosY,startPosZ; + int imuLinkIndex = -1; + SharedMemoryCommand_t command; SharedMemoryStatus_t status; b3PhysicsClientHandle sm; @@ -54,7 +56,7 @@ int main(int argc, char* argv[]) timeout = MAX_TIMEOUT; while ((timeout-- > 0) && b3ProcessServerStatus(sm, &status)==0) {} b3Printf("timeout = %d\n",timeout); - int imuLinkIndex = -1; + numJoints = b3GetNumJoints(sm); for (i=0;i=0) { - ret = b3CreateSensorEnableIMUForLink(&command, imuLinkIndex, 1); + ret = b3CreateSensorEnableIMUForLink(&command, imuLinkIndex, 1); } if (sensorJointIndexLeft>=0) { - ret = b3CreateSensorEnable6DofJointForceTorqueSensor(&command, sensorJointIndexLeft, 1); + ret = b3CreateSensorEnable6DofJointForceTorqueSensor(&command, sensorJointIndexLeft, 1); } if(sensorJointIndexRight>=0) {