diff --git a/data/mjcf/humanoid_symmetric.xml b/data/mjcf/humanoid_symmetric.xml new file mode 100644 index 000000000..de2fee3f5 --- /dev/null +++ b/data/mjcf/humanoid_symmetric.xml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/ExampleBrowser/OpenGLGuiHelper.cpp b/examples/ExampleBrowser/OpenGLGuiHelper.cpp index b26dfbf59..5c0e995af 100644 --- a/examples/ExampleBrowser/OpenGLGuiHelper.cpp +++ b/examples/ExampleBrowser/OpenGLGuiHelper.cpp @@ -243,7 +243,10 @@ void OpenGLGuiHelper::removeAllGraphicsInstances() void OpenGLGuiHelper::removeGraphicsInstance(int graphicsUid) { - m_data->m_glApp->m_renderer->removeGraphicsInstance(graphicsUid); + if (graphicsUid>=0) + { + m_data->m_glApp->m_renderer->removeGraphicsInstance(graphicsUid); + }; } diff --git a/examples/pybullet/examples/humanoid_benchmark.py b/examples/pybullet/examples/humanoid_benchmark.py new file mode 100644 index 000000000..2a9c0cf68 --- /dev/null +++ b/examples/pybullet/examples/humanoid_benchmark.py @@ -0,0 +1,20 @@ +import pybullet as p +import time +p.connect(p.GUI) +p.setGravity(0,0,-10) +p.setPhysicsEngineParameter(numSolverIterations=5) +p.loadMJCF("mjcf/humanoid.xml") + +#first let the humanoid fall +p.setRealTimeSimulation(1) +time.sleep(3) +p.setRealTimeSimulation(0) + +#now do a benchmark +print("Starting benchmark") +logId = p.startStateLogging(p.STATE_LOGGING_PROFILE_TIMINGS,"pybullet_humanoid_timings.json") +for i in range(1000): + p.stepSimulation() +p.stopStateLogging(logId) + +print("ended benchmark") \ No newline at end of file