From 8750d4908200b8192a3122caa39215d7f0702f9b Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Fri, 13 Oct 2017 14:51:06 -0700 Subject: [PATCH] fix blocking plot.show() never terminating properly --- examples/pybullet/examples/inverse_dynamics.py | 10 +++++++--- setup.py | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/pybullet/examples/inverse_dynamics.py b/examples/pybullet/examples/inverse_dynamics.py index fecb4ad64..e6af3011b 100644 --- a/examples/pybullet/examples/inverse_dynamics.py +++ b/examples/pybullet/examples/inverse_dynamics.py @@ -1,5 +1,6 @@ import pybullet as bullet plot = True +import time if (plot): import matplotlib.pyplot as plt @@ -141,7 +142,10 @@ if plot: ax_tor.plot(t, q_tor[1], '-b', lw=2, label='Torque q1') ax_tor.set_ylim(-20., 20.) ax_tor.legend() - - plt.show() - \ No newline at end of file + plt.pause(0.01) + + +while (1): + bullet.stepSimulation() + time.sleep(0.01) diff --git a/setup.py b/setup.py index 4362b92a3..04e3c4cae 100644 --- a/setup.py +++ b/setup.py @@ -441,7 +441,7 @@ print("-----") setup( name = 'pybullet', - version='1.5.7', + version='1.5.8', description='Official Python Interface for the Bullet Physics SDK specialized for Robotics Simulation and Reinforcement Learning', long_description='pybullet is an easy to use Python module for physics simulation, robotics and deep reinforcement learning based on the Bullet Physics SDK. With pybullet you can load articulated bodies from URDF, SDF and other file formats. pybullet provides forward dynamics simulation, inverse dynamics computation, forward and inverse kinematics and collision detection and ray intersection queries. Aside from physics simulation, pybullet supports to rendering, with a CPU renderer and OpenGL visualization and support for virtual reality headsets.', url='https://github.com/bulletphysics/bullet3',