diff --git a/examples/pybullet/tensorflow/humanoid_running.py b/examples/pybullet/tensorflow/humanoid_running.py index b64310429..3eb71211e 100644 --- a/examples/pybullet/tensorflow/humanoid_running.py +++ b/examples/pybullet/tensorflow/humanoid_running.py @@ -10,7 +10,7 @@ if (cid<0): cid = p.connect(p.GUI) #DIRECT is much faster, but GUI shows the running gait p.setGravity(0,0,-9.8) -p.setPhysicsEngineParameter(fixedTimeStep=1.0/60., numSolverIterations=5, numSubSteps=2) +p.setPhysicsEngineParameter(fixedTimeStep=1.0/60.,solverResidualThreshold=1-10, numSolverIterations=50, numSubSteps=4) #this mp4 recording requires ffmpeg installed #mp4log = p.startStateLogging(p.STATE_LOGGING_VIDEO_MP4,"humanoid.mp4") @@ -180,11 +180,14 @@ def demo_run(): forces = [0.] * len(motors) for m in range(len(motors)): - forces[m] = motor_power[m]*actions[m]*0.082 + limit=15 + ac = np.clip(actions[m],-limit,limit) + print (ac) + forces[m] = motor_power[m]*ac*0.082 p.setJointMotorControlArray(human, motors,controlMode=p.TORQUE_CONTROL, forces=forces) p.stepSimulation() - time.sleep(0.01) + #time.sleep(0.01) distance=5 yaw = 0 humanPos, humanOrn = p.getBasePositionAndOrientation(human) diff --git a/setup.py b/setup.py index 86b07206a..ce61fb7d2 100644 --- a/setup.py +++ b/setup.py @@ -582,7 +582,7 @@ if 'BT_USE_EGL' in EGL_CXX_FLAGS: setup( name = 'pybullet', - version='2.3.3', + version='2.3.4', 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',