tweaks in pybullet and shared memory C-API:

allow to reset the state of a single joint
allow to set the target/mode for a single joint motor at a time
rename pybullet API: initializeJointPositions -> resetJointState
This commit is contained in:
Erwin Coumans (Google)
2016-06-24 07:31:17 -07:00
parent 2cd0eba257
commit 6d1948e79e
7 changed files with 463 additions and 413 deletions

View File

@@ -85,9 +85,9 @@ void testSharedMemory(b3PhysicsClientHandle sm)
b3SharedMemoryStatusHandle statusHandle;
b3SharedMemoryCommandHandle commandHandle;
double jointAngle = 0.f;
int jointIndex;
commandHandle = b3CreatePoseCommandInit(sm, bodyUniqueId);
for (int jointIndex=0;jointIndex<numJoints;jointIndex++)
for (jointIndex=0;jointIndex<numJoints;jointIndex++)
{
b3CreatePoseCommandSetJointPosition(sm, commandHandle, jointIndex, jointAngle);
}