From 18c83592f36a1a6061da36e2fa8a4da1acaab0e2 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Mon, 15 Jan 2018 12:53:41 -0800 Subject: [PATCH 1/3] bump up PyBullet to version 1.8.2 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8b12b4007..2ccfcc0b5 100644 --- a/setup.py +++ b/setup.py @@ -443,7 +443,7 @@ print("-----") setup( name = 'pybullet', - version='1.8.1', + version='1.8.2', 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', From af43e6465d451c77d52e73df8f2d2b2821895737 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Mon, 15 Jan 2018 15:13:11 -0800 Subject: [PATCH 2/3] fix wrong enum type --- data/multibody.bullet | Bin 18948 -> 16836 bytes .../PhysicsServerCommandProcessor.cpp | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/multibody.bullet b/data/multibody.bullet index 8d5019a7856d6654931c82c45f2ed89c0508bded..9f8e7ab893719b5d0e076f582540084391b20a3d 100644 GIT binary patch delta 1247 zcmZpf!g!>avEC`v$Hz4!O}EU*!onro$0dV-fq@B%^?)=Z5YL(^Y0tpWU_Wc-OuNpG z4jZ5l5G-&6iJd*;V+X<@5w7dXd(WOZV+&%>ni&bybHeG=C(lAIAYTM%5XjsHAO@KU z1rztP+bJ9baeSRzA`5^t8x)5EX^=vof%_O392|g57-#@8pt!+)vLmB{sQW|@+pdld z>ubSwVB0}1W175>Q8=Uos5TRb9fKSrH!w3Wumag291O%D_n?9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r4K7eYG;9252W|JQ<73<3x~TaVA-?Km7I?D zyYxAmE^7qa2uL|q{`tKRlpQ4`&=V^xEdtGMn0$tXLlTxheVu%qIe?jx184&XhfjXX zqHYkQP?a`s!83c?@D>maw-e?ZsJJ~$9nelSDMSVZDnl{ZnAK1hAkW>sU^*Rnaz{DXmq#&4V!!9zJgH3@K4rraAEe z3zAE)yB?C`nLwrAK)K!o>~c^l0O9b-wd_Q>{Loj8nEpe5K}lhtTrM+t0fz+d31Fb} z09_8k29u9+V7lH27V|(AD5-|U0a{_AB|dP>!jh2^Vcozm@PjLZDTmRBWCm0wp+H2M z5}AC0vkX{`hQJ*TGYdw8Jpv?Pd;|^5dm_bulletCollisionShape2UrdfCollision.find(colShape); - if (urdfCol && (urdfCol->m_geometry.m_type == GEOM_MESH)) + if (urdfCol && (urdfCol->m_geometry.m_type == URDF_GEOM_MESH)) { collisionShapeBuffer[0].m_collisionGeometryType = GEOM_MESH; collisionShapeBuffer[0].m_dimensions[0] = urdfCol->m_geometry.m_meshScale[0]; @@ -8283,7 +8283,7 @@ int PhysicsServerCommandProcessor::extractCollisionShapes(const btCollisionShape { //it could be a compound mesh from a wavefront OBJ, check it UrdfCollision* urdfCol = m_data->m_bulletCollisionShape2UrdfCollision.find(colShape); - if (urdfCol && (urdfCol->m_geometry.m_type == GEOM_MESH)) + if (urdfCol && (urdfCol->m_geometry.m_type == URDF_GEOM_MESH)) { collisionShapeBuffer[0].m_collisionGeometryType = GEOM_MESH; collisionShapeBuffer[0].m_dimensions[0] = urdfCol->m_geometry.m_meshScale[0]; From 055930817e64146df6bc52ac713418fe831f6663 Mon Sep 17 00:00:00 2001 From: erwincoumans Date: Tue, 16 Jan 2018 10:17:57 -0800 Subject: [PATCH 3/3] apply a maximum velocity for the KUKA arm, otherwise motion can become very unrealistic --- examples/pybullet/gym/pybullet_envs/bullet/kuka.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/pybullet/gym/pybullet_envs/bullet/kuka.py b/examples/pybullet/gym/pybullet_envs/bullet/kuka.py index 4c745cca1..f9752760d 100644 --- a/examples/pybullet/gym/pybullet_envs/bullet/kuka.py +++ b/examples/pybullet/gym/pybullet_envs/bullet/kuka.py @@ -15,7 +15,7 @@ class Kuka: def __init__(self, urdfRootPath=pybullet_data.getDataPath(), timeStep=0.01): self.urdfRootPath = urdfRootPath self.timeStep = timeStep - + self.maxVelocity = .35 self.maxForce = 200. self.fingerAForce = 2 self.fingerBForce = 2.5 @@ -146,7 +146,7 @@ class Kuka: if (self.useSimulation): for i in range (self.kukaEndEffectorIndex+1): #print(i) - p.setJointMotorControl2(bodyIndex=self.kukaUid,jointIndex=i,controlMode=p.POSITION_CONTROL,targetPosition=jointPoses[i],targetVelocity=0,force=self.maxForce,positionGain=0.3,velocityGain=1) + p.setJointMotorControl2(bodyUniqueId=self.kukaUid,jointIndex=i,controlMode=p.POSITION_CONTROL,targetPosition=jointPoses[i],targetVelocity=0,force=self.maxForce,maxVelocity=self.maxVelocity, positionGain=0.3,velocityGain=1) else: #reset the joint state (ignoring all dynamics, not recommended to use during simulation) for i in range (self.numJoints):