mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-10-05 16:35:29 +00:00
clean up: reverted some unnecessary changes
This commit is contained in:
@@ -18,8 +18,7 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
|
||||
//remove all existing objects (if any)
|
||||
// sim->resetSimulation();
|
||||
sim->resetSimulation(RESET_USE_REDUCED_DEFORMABLE_WORLD);
|
||||
sim->resetSimulation();
|
||||
sim->setGravity(btVector3(0, 0, -9.8));
|
||||
sim->setNumSolverIterations(100);
|
||||
b3RobotSimulatorSetPhysicsEngineParameters args;
|
||||
@@ -27,12 +26,11 @@ int main(int argc, char* argv[])
|
||||
|
||||
int planeUid = sim->loadURDF("plane.urdf");
|
||||
printf("planeUid = %d\n", planeUid);
|
||||
|
||||
int r2d2Uid = sim->loadURDF("reduced_cube/reduced_cube.urdf");
|
||||
// int r2d2Uid = sim->loadURDF("r2d2.urdf");
|
||||
// printf("r2d2 #joints = %d\n", sim->getNumJoints(r2d2Uid));
|
||||
|
||||
btVector3 basePosition = btVector3(0, 3, 3);
|
||||
int r2d2Uid = sim->loadURDF("r2d2.urdf");
|
||||
printf("r2d2 #joints = %d\n", sim->getNumJoints(r2d2Uid));
|
||||
|
||||
btVector3 basePosition = btVector3(0, 0, 0.5);
|
||||
btQuaternion baseOrientation = btQuaternion(0, 0, 0, 1);
|
||||
|
||||
sim->resetBasePositionAndOrientation(r2d2Uid, basePosition, baseOrientation);
|
||||
@@ -42,7 +40,7 @@ int main(int argc, char* argv[])
|
||||
btVector3 basePos;
|
||||
btQuaternion baseOrn;
|
||||
sim->getBasePositionAndOrientation(r2d2Uid, basePos, baseOrn);
|
||||
// printf("r2d2 basePosition = [%f,%f,%f]\n", basePos[0], basePos[1], basePos[2]);
|
||||
printf("r2d2 basePosition = [%f,%f,%f]\n", basePos[0], basePos[1], basePos[2]);
|
||||
|
||||
sim->stepSimulation();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user