From 46519720eb75a1d914fbe20443305d8c4da8aa3c Mon Sep 17 00:00:00 2001 From: Nan Jiang Date: Tue, 15 Sep 2020 12:39:31 -0400 Subject: [PATCH 01/10] Update README.md --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index e0fb2af97..90f13cffa 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ You can download and install Bullet using the [vcpkg](https://github.com/Microso cd vcpkg ./bootstrap-vcpkg.sh ./vcpkg integrate install - vcpkg install bullet3 + ./vcpkg install bullet3 The Bullet port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository. @@ -91,9 +91,9 @@ p.connect(p.SHARED_MEMORY) #or (p.TCP, "localhost", 6667) or (p.UDP, "192.168.86 Make sure cmake is installed (sudo apt-get install cmake, brew install cmake, or https://cmake.org) In a terminal type: - - ./build_cmake_pybullet_double.sh - +``` +./build_cmake_pybullet_double.sh +``` This script will invoke cmake and build in the build_cmake directory. You can find pybullet in Bullet/examples/pybullet. The BulletExampleBrowser binary will be in Bullet/examples/ExampleBrowser. @@ -101,15 +101,15 @@ You can also build Bullet using premake. There are premake executables in the bu Depending on your system (Linux 32bit, 64bit or Mac OSX) use one of the following lines Using premake: ``` - cd build3 - ./premake4_linux --double gmake - ./premake4_linux64 --double gmake - ./premake4_osx --double --enable_pybullet gmake +cd build3 +./premake4_linux --double gmake +./premake4_linux64 --double gmake +./premake4_osx --double --enable_pybullet gmake ``` Then ``` - cd gmake - make +cd gmake +make ``` Note that on Linux, you need to use cmake to build pybullet, since the compiler has issues of mixing shared and static libraries. @@ -117,9 +117,9 @@ Note that on Linux, you need to use cmake to build pybullet, since the compiler **Mac OSX Xcode** Click on build3/xcode4.command or in a terminal window execute - - ./premake_osx xcode4 - +``` +./premake_osx xcode4 +``` ## Usage The App_ExampleBrowser executables will be located in the bin folder. From 7aff26b80d85937bb75033ade04f8007c43ab14e Mon Sep 17 00:00:00 2001 From: Alexander Turkin Date: Mon, 22 Feb 2021 07:30:16 +0300 Subject: [PATCH 02/10] one cmake option per one extra package --- Extras/CMakeLists.txt | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/Extras/CMakeLists.txt b/Extras/CMakeLists.txt index fc0d22604..3c9b4826d 100644 --- a/Extras/CMakeLists.txt +++ b/Extras/CMakeLists.txt @@ -1,5 +1,36 @@ -SUBDIRS( InverseDynamics BulletRoboticsGUI BulletRobotics obj2sdf Serialize ConvexDecomposition HACD GIMPACTUtils ) +OPTION(BUILD_INVERSE_DYNAMIC_EXTRA "Build InverseDynamic extra module, only applied when BUILD_EXTRAS is ON") +OPTION(BUILD_BULLET_ROBOTICS_GUI_EXTRA "Build BulletRoboticsGUI extra module, only applied when BUILD_EXTRAS is ON") +OPTION(BUILD_BULLET_ROBOTICS_EXTRA "Build BulletRobotics extra module, only applied when BUILD_EXTRAS is ON") +OPTION(BUILD_OBJ2SDF_EXTRA "Build obj2sdf extra module, only applied when BUILD_EXTRAS is ON") +OPTION(BUILD_SERIALIZE_EXTRA "Build Serialize extra module, only applied when BUILD_EXTRAS is ON") +OPTION(BUILD_CONVEX_DECOMPOSITION_EXTRA "Build ConvexDecomposition extra module, only applied when BUILD_EXTRAS is ON") +OPTION(BUILD_HACD_EXTRA "Build HACD extra module, only applied when BUILD_EXTRAS is ON") +OPTION(BUILD_GIMPACTUTILS_EXTRA "Build GIMPACTUtils extra module, only applied when BUILD_EXTRAS is ON") +IF(BUILD_INVERSE_DYNAMIC_EXTRA) + SUBDIRS( InverseDynamics ) +ENDIF() +IF(BUILD_BULLET_ROBOTICS_GUI_EXTRA) + SUBDIRS( BulletRoboticsGUI ) +ENDIF() +IF(BUILD_BULLET_ROBOTICS_EXTRA) + SUBDIRS( BulletRobotics ) +ENDIF() +IF(BUILD_OBJ2SDF_EXTRA) + SUBDIRS( obj2sdf ) +ENDIF() +IF(BUILD_SERIALIZE_EXTRA) + SUBDIRS( Serialize ) +ENDIF() +IF(BUILD_CONVEX_DECOMPOSITION_EXTRA) + SUBDIRS( ConvexDecomposition ) +ENDIF() +IF(BUILD_HACD_EXTRA) + SUBDIRS( HACD ) +ENDIF() +IF(BUILD_GIMPACTUTILS_EXTRA) + SUBDIRS( GIMPACTUtils ) +ENDIF() #Maya Dynamica plugin is moved to http://dynamica.googlecode.com From 6e2577ca598cbde68ccf3b066dd13253aeeea91e Mon Sep 17 00:00:00 2001 From: Chris Djali Date: Sun, 21 Mar 2021 15:07:01 +0000 Subject: [PATCH 03/10] Use drawTriangle instead of drawing three lines --- src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp b/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp index 71184f36a..7cc6b8ab0 100644 --- a/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp +++ b/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp @@ -1294,9 +1294,7 @@ public: btVector3 normalColor(1, 1, 0); m_debugDrawer->drawLine(center, center + normal, normalColor); } - m_debugDrawer->drawLine(wv0, wv1, m_color); - m_debugDrawer->drawLine(wv1, wv2, m_color); - m_debugDrawer->drawLine(wv2, wv0, m_color); + m_debugDrawer->drawTriangle(wv0, wv1, wv2, m_color, 1.0); } }; From c810edf483281cd73fdc296c58512f03184a10ec Mon Sep 17 00:00:00 2001 From: Kieren Date: Thu, 25 Mar 2021 21:00:27 +1000 Subject: [PATCH 04/10] Updating a misleading comment --- src/LinearMath/btIDebugDraw.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/LinearMath/btIDebugDraw.h b/src/LinearMath/btIDebugDraw.h index 82ec19a69..df4db2ff5 100644 --- a/src/LinearMath/btIDebugDraw.h +++ b/src/LinearMath/btIDebugDraw.h @@ -4,8 +4,8 @@ Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. @@ -21,7 +21,7 @@ subject to the following restrictions: ///The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations. ///Typical use case: create a debug drawer object, and assign it to a btCollisionWorld or btDynamicsWorld using setDebugDrawer and call debugDrawWorld. -///A class that implements the btIDebugDraw interface has to implement the drawLine method at a minimum. +///A class that implements the btIDebugDraw interface will need to provide non-empty implementations of the the drawLine and getDebugMode methods at a minimum. ///For color arguments the X,Y,Z components refer to Red, Green and Blue each in the range [0..1] class btIDebugDraw { From dcf9c8d6a5c4c76ade7823895d286b397c66b49b Mon Sep 17 00:00:00 2001 From: jaraujo98 Date: Tue, 6 Apr 2021 11:26:39 -0700 Subject: [PATCH 05/10] Replace xrange with range The xrange function was deprecated in Python 3. Removing it for compatibility. --- .../minitaur/envs/env_randomizers/minitaur_env_randomizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/pybullet/gym/pybullet_envs/minitaur/envs/env_randomizers/minitaur_env_randomizer.py b/examples/pybullet/gym/pybullet_envs/minitaur/envs/env_randomizers/minitaur_env_randomizer.py index 0fbfef36d..81b89f301 100644 --- a/examples/pybullet/gym/pybullet_envs/minitaur/envs/env_randomizers/minitaur_env_randomizer.py +++ b/examples/pybullet/gym/pybullet_envs/minitaur/envs/env_randomizers/minitaur_env_randomizer.py @@ -56,7 +56,7 @@ class MinitaurEnvRandomizer(env_randomizer_base.EnvRandomizerBase): leg_masses_upper_bound = np.array(leg_masses) * (1.0 + self._minitaur_leg_mass_err_range[1]) randomized_leg_masses = [ np.random.uniform(leg_masses_lower_bound[i], leg_masses_upper_bound[i]) - for i in xrange(len(leg_masses)) + for i in range(len(leg_masses)) ] minitaur.SetLegMasses(randomized_leg_masses) From 0a8e4f3f6c31555f6acfaefc41614c5312241539 Mon Sep 17 00:00:00 2001 From: erwincoumans Date: Sat, 10 Apr 2021 15:56:13 -0700 Subject: [PATCH 06/10] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e0fb2af97..4aec06f86 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,11 @@ This is the official C++ source code repository of the Bullet Physics SDK: real- ![PyBullet](https://pybullet.org/wordpress/wp-content/uploads/2019/03/cropped-pybullet.png) +## Issues ## +The Issue tracker was flooded with support questions and is closed until it is cleaned up. Use the [PyBullet forums](http://pybullet.org) to discuss with others. + ## PyBullet ## -New in Bullet 2.85: pybullet Python bindings, improved support for robotics and VR. Use pip install pybullet and checkout the [PyBullet Quickstart Guide](https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit#heading=h.2ye70wns7io3). +It is highly recommended to use PyBullet Python bindings for improved support for robotics, reinforcement learning and VR. Use pip install pybullet and checkout the [PyBullet Quickstart Guide](https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit#heading=h.2ye70wns7io3). Installation is simple: ``` From f26e85815479ec1f35d3b37beece20b09f0352a0 Mon Sep 17 00:00:00 2001 From: Alexander Turkin Date: Wed, 14 Apr 2021 13:42:43 +0300 Subject: [PATCH 07/10] added default ON values for cmake OPTIONS to fix linker errors on ci builds --- Extras/CMakeLists.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Extras/CMakeLists.txt b/Extras/CMakeLists.txt index 3c9b4826d..58a161a45 100644 --- a/Extras/CMakeLists.txt +++ b/Extras/CMakeLists.txt @@ -1,11 +1,11 @@ -OPTION(BUILD_INVERSE_DYNAMIC_EXTRA "Build InverseDynamic extra module, only applied when BUILD_EXTRAS is ON") -OPTION(BUILD_BULLET_ROBOTICS_GUI_EXTRA "Build BulletRoboticsGUI extra module, only applied when BUILD_EXTRAS is ON") -OPTION(BUILD_BULLET_ROBOTICS_EXTRA "Build BulletRobotics extra module, only applied when BUILD_EXTRAS is ON") -OPTION(BUILD_OBJ2SDF_EXTRA "Build obj2sdf extra module, only applied when BUILD_EXTRAS is ON") -OPTION(BUILD_SERIALIZE_EXTRA "Build Serialize extra module, only applied when BUILD_EXTRAS is ON") -OPTION(BUILD_CONVEX_DECOMPOSITION_EXTRA "Build ConvexDecomposition extra module, only applied when BUILD_EXTRAS is ON") -OPTION(BUILD_HACD_EXTRA "Build HACD extra module, only applied when BUILD_EXTRAS is ON") -OPTION(BUILD_GIMPACTUTILS_EXTRA "Build GIMPACTUtils extra module, only applied when BUILD_EXTRAS is ON") +OPTION(BUILD_INVERSE_DYNAMIC_EXTRA "Build InverseDynamic extra module, only applied when BUILD_EXTRAS is ON" ON) +OPTION(BUILD_BULLET_ROBOTICS_GUI_EXTRA "Build BulletRoboticsGUI extra module, only applied when BUILD_EXTRAS is ON" ON) +OPTION(BUILD_BULLET_ROBOTICS_EXTRA "Build BulletRobotics extra module, only applied when BUILD_EXTRAS is ON" ON) +OPTION(BUILD_OBJ2SDF_EXTRA "Build obj2sdf extra module, only applied when BUILD_EXTRAS is ON" ON) +OPTION(BUILD_SERIALIZE_EXTRA "Build Serialize extra module, only applied when BUILD_EXTRAS is ON" ON) +OPTION(BUILD_CONVEX_DECOMPOSITION_EXTRA "Build ConvexDecomposition extra module, only applied when BUILD_EXTRAS is ON" ON) +OPTION(BUILD_HACD_EXTRA "Build HACD extra module, only applied when BUILD_EXTRAS is ON" ON) +OPTION(BUILD_GIMPACTUTILS_EXTRA "Build GIMPACTUtils extra module, only applied when BUILD_EXTRAS is ON" ON) IF(BUILD_INVERSE_DYNAMIC_EXTRA) SUBDIRS( InverseDynamics ) From a923ce184e686c573acefccf2e32e83c56b5875d Mon Sep 17 00:00:00 2001 From: r-a-sattarov Date: Mon, 19 Apr 2021 23:32:57 +0300 Subject: [PATCH 08/10] examples/RobotSimulator/CMake: fixed warning (mis-matching arguments) --- examples/RobotSimulator/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/RobotSimulator/CMakeLists.txt b/examples/RobotSimulator/CMakeLists.txt index b2d6c2412..c17481f8c 100644 --- a/examples/RobotSimulator/CMakeLists.txt +++ b/examples/RobotSimulator/CMakeLists.txt @@ -149,7 +149,7 @@ ELSE() IF(NOT APPLE) FIND_PACKAGE(Threads) TARGET_LINK_LIBRARIES( App_HelloBulletRobotics ${CMAKE_THREAD_LIBS_INIT} ${DL} ) - ENDIF(APPLE) + ENDIF(NOT APPLE) ENDIF(WIN32) From 225fa2094472f05d2ba846d58334f24d37910765 Mon Sep 17 00:00:00 2001 From: Matt Bennice Date: Thu, 22 Apr 2021 15:32:38 -0700 Subject: [PATCH 09/10] Fix memory leak in BulletSoftBody. --- src/BulletSoftBody/btDeformableBodySolver.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/BulletSoftBody/btDeformableBodySolver.cpp b/src/BulletSoftBody/btDeformableBodySolver.cpp index 4b11fccec..e81680f01 100644 --- a/src/BulletSoftBody/btDeformableBodySolver.cpp +++ b/src/BulletSoftBody/btDeformableBodySolver.cpp @@ -405,6 +405,10 @@ void btDeformableBodySolver::predictMotion(btScalar solverdt) for (int i = 0; i < m_softBodies.size(); ++i) { btSoftBody* psb = m_softBodies[i]; + /* Clear contacts */ + psb->m_nodeRigidContacts.resize(0); + psb->m_faceRigidContacts.resize(0); + psb->m_faceNodeContacts.resize(0); if (psb->isActive()) { @@ -472,10 +476,6 @@ void btDeformableBodySolver::predictDeformableMotion(btSoftBody* psb, btScalar d { psb->updateFaceTree(true, true); } - /* Clear contacts */ - psb->m_nodeRigidContacts.resize(0); - psb->m_faceRigidContacts.resize(0); - psb->m_faceNodeContacts.resize(0); /* Optimize dbvt's */ // psb->m_ndbvt.optimizeIncremental(1); // psb->m_fdbvt.optimizeIncremental(1); From 1f6baad97465b115f7a71595d21bb9b1400c9d0f Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Thu, 22 Apr 2021 20:42:20 -0700 Subject: [PATCH 10/10] bump up pybullet version to 3.1.5 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 271d527a6..5b9a43dc9 100644 --- a/setup.py +++ b/setup.py @@ -501,7 +501,7 @@ if 'BT_USE_EGL' in EGL_CXX_FLAGS: setup( name='pybullet', - version='3.1.4', + version='3.1.5', description= 'Official Python Interface for the Bullet Physics SDK specialized for Robotics Simulation and Reinforcement Learning', long_description=