forked from bulletphysics/bullet3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add HelloBulletRobotics C++ example with similar API to PyBullet
Add ANYmal quadruped robot URDF to pybullet_data
- Loading branch information
Erwin Coumans
committed
May 24, 2018
1 parent
8ace925
commit ff4d0b1
Showing
26 changed files
with
162,202 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
#include "b3RobotSimulatorClientAPI_NoGUI.h" | ||
|
||
int main(int argc, char* argv[]) | ||
{ | ||
b3RobotSimulatorClientAPI_NoGUI* sim = new b3RobotSimulatorClientAPI_NoGUI(); | ||
|
||
bool isConnected = sim->connect(eCONNECT_SHARED_MEMORY); | ||
if (!isConnected) | ||
{ | ||
printf("Using Direct mode\n"); | ||
isConnected = sim->connect(eCONNECT_DIRECT); | ||
} else | ||
{ | ||
printf("Using shared memory\n"); | ||
} | ||
//remove all existing objects (if any) | ||
sim->resetSimulation(); | ||
|
||
int planeUid = sim->loadURDF("plane.urdf"); | ||
printf("planeUid = %d\n", planeUid); | ||
|
||
int r2d2Uid = sim->loadURDF("r2d2.urdf"); | ||
printf("r2d2 #joints = %d\n", sim->getNumJoints(r2d2Uid)); | ||
|
||
b3Vector3 basePosition = b3MakeVector3(0,0,1); | ||
b3Quaternion baseOrientation = b3Quaternion(0,0,0,1); | ||
|
||
sim->resetBasePositionAndOrientation(r2d2Uid, basePosition, baseOrientation); | ||
sim->setGravity(b3MakeVector3(0,0,-10)); | ||
|
||
while (sim->isConnected()) | ||
{ | ||
sim->stepSimulation(); | ||
} | ||
delete sim; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
examples/pybullet/gym/pybullet_data/quadruped/ANYmal/anymal_base_2.mtl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Blender MTL File: 'None' | ||
# Material Count: 1 | ||
|
||
newmtl None.001 | ||
Ns 0.000000 | ||
Ka 0.000000 0.000000 0.000000 | ||
Kd 0.800000 0.800000 0.800000 | ||
Ks 0.800000 0.800000 0.800000 | ||
Ke 0.000000 0.000000 0.000000 | ||
Ni 1.000000 | ||
d 1.000000 | ||
illum 2 |
Oops, something went wrong.