Commit Graph

54 Commits

Author SHA1 Message Date
Andrew Hundt
1e83630c1d cmake minor fixes 2017-05-21 09:32:00 -04:00
Andrew Hundt
655def023e python versions can vary by default unless EXACT_PYTHON_VERSION=ON
Still ensures library version matches interpreter version exactly.
2017-05-20 21:58:03 -04:00
Andrew Hundt
263ccec18a cmake python config bugs fixed
Python and pybullet remain optional with these changes.
A specific python version can now be selected by setting PYTHON_VERSION_PYBULLET.
The python library version must now match the interpreter version exactly.
If all required python dependencies are found, pybullet is now enabled by default.
Changes incorporate the following BSD licensed cmake code:
32bf5c7ad8/CMakeScripts/FindNumPy.cmake
https://github.com/NikolausDemmel/CMake/pull/2/files
86578eccf2/Modules/SelectLibraryConfigurations.cmake
2017-05-20 20:47:46 -04:00
erwincoumans
92a3444076 Update CMakeLists.txt
remove 'experimental' from Python bindings, since it has been in use for quite a while without issues.
2017-04-11 13:07:29 -07:00
Erwin Coumans
fe199bea09 fix typo 2017-04-11 12:24:17 -07:00
Erwin Coumans
0a42ad6a88 pybullet: add support for Anaconda install on Mac OSX, for pip install pybullet, python setup.py install and cmake.
Usage:

Also updated pypi to latest, see https://pypi.python.org/pypi?:action=display&name=pybullet&version=0.1.7
Here are a few options for Mac OSX + Anaconda:

1) In the root of the Bullet Physics SDK source tree, run
CFLAGS="-DB3_NO_PYTHON_FRAMEWORK" python setup.py install

2) cmake, add the flag -DBUILD_PYBULLET_MAC_USE_PYTHON_FRAMEWORK=OFF

3) Globally, just use pip or pip3:
CFLAGS="-DB3_NO_PYTHON_FRAMEWORK" pip install pybullet

Option (3) may have an out-of-date pybullet/bullet version.
2017-04-11 12:17:08 -07:00
Erwin Coumans
7503418c72 Split Bullet/src/LinearMath/btSerializer.cpp into btSerializer64.cpp to make it easier to rebuild serialization structure.
Add several MSVC optimization flags to cmake.
Bump up VERSION because serialization format changed
Expose btScalar& jointMaxForce, btScalar& jointMaxVelocity to 'getJointInfo2' API, add backwards compatibility to examples\Importers\ImportURDFDemo\URDFImporterInterface::getJointInfo.

pybullet: expose 4 more fields to getJointInfo: jointLowerLimit/jointUpperLimit/jointMaxForce/jointMaxVelocity
fix performance issue in CMD_ACTUAL_STATE_UPDATE_COMPLETED
2017-03-26 13:06:46 -07:00
Erwin Coumans
ed6530264f enable USE_MSVC_SSE2 for MSVC by default, AVX for MSVX disabled by default. 2017-03-25 12:03:40 -07:00
Erwin Coumans
a4f1e34899 expose timeout in pybullet/shared memory API
add RobotSimulator, a C++ API similar to pybullet. (work-in-progress, only part of API implemeted)
2017-02-24 15:34:11 -08:00
Erwin Coumans
5c74b0a199 add cmake support for TCP / clsocket in pybullet 2017-02-20 20:55:37 -08:00
Erwin Coumans
04b3e88cde Attempt to use VERSION string for CMakeLists.txt
See Issue 953, https://github.com/bulletphysics/bullet3/issues/953
2017-02-07 19:15:22 -08:00
erwincoumans
e35129ceaf Merge branch 'master' of https://github.com/erwincoumans/bullet3 2016-11-04 13:16:30 -07:00
erwincoumans
d62ac01d14 work-in-progress
add UDP network connection for physics client <-> server.
also set spinning friction in rolling friction demo (otherwise objects may keep on spinning forever)
2016-11-04 13:16:25 -07:00
Lunkhound
1c3686ca51 MultiThreaded Demo:
- fixing various race conditions throughout (usage of static vars, etc)
 - addition of a few lightweight mutexes (which are compiled out by default)
 - slight code rearrangement in discreteDynamicsWorld to facilitate multithreading
 - PoolAllocator::allocate() can now be called when pool is full without
     crashing (null pointer returned)
 - PoolAllocator allocate and freeMemory, are OPTIONALLY threadsafe
     (default is un-threadsafe)
 - CollisionDispatcher no longer checks if the pool allocator is full
     before calling allocate(), instead it just calls allocate() and
     checks if the return is null -- this avoids a race condition
 - SequentialImpulseConstraintSolver OPTIONALLY uses different logic in
     getOrInitSolverBody() to avoid a race condition with kinematic bodies
 - addition of 2 classes which together allow simulation islands to be run
   in parallel:
    - btSimulationIslandManagerMt
    - btDiscreteDynamicsWorldMt
 - MultiThreadedDemo example in the example browser demonstrating use of
   OpenMP, Microsoft PPL, and Intel TBB
 - use multithreading for other demos
 - benchmark demo: add parallel raycasting
2016-10-30 12:47:27 -07:00
yunfeibai
7630bf62d5 Add USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD option. 2016-10-18 17:38:43 -07:00
Jamie Snape
9f42cf27ed Fix typo 2016-09-14 17:22:54 -04:00
Jamie Snape
b0ace4509a Enable rpath on OS X when the CMake version supports it 2016-09-14 13:00:51 -04:00
Erwin Coumans
7df9b69039 pybullet: add option to use NumPy to speed up, thanks to moof2k
option is disabled by default. When using cmake, use
cmake -DBUILD_PYBULLET=ON -DBUILD_PYBULLET_NUMPY=ON
then both testrender.py and testrender_np.py will work
without numpy only testrender.py works.
The numpy.reshape is likely a no-op when using numpy array,
so we could remove testrender_np.py...

See https://github.com/bulletphysics/bullet3/pull/774
2016-09-11 11:35:12 +01:00
erwin coumans
c5164e503f fix in structure alignment of btMultiBodyLinkDoubleData and btMultiBodyDoubleData
causing serialization issue in  URDF/SDF loading in double-precision mode on Windows 32bit.
(it was fine on Mac/Linux 64bit)
bump serialization version to 2.85, as we change the file format
fix in name clash in makesdna.cpp -> intptr_t is already defined.
2016-08-26 10:00:29 -07:00
hujiajie
23868ebfb6 [WIP] Suppress compiler warnings.
Disable a few Visual Studio warnings:

C4244: conversion from 'type1' to 'type2', possible loss of data
C4267: conversion from 'size_t' to 'type', possible loss of data

Considering the GCC/Clang counterpart '-Wconversion'
(https://gcc.gnu.org/wiki/NewWconversion) is not covered by '-Wall', it
seems to make more sense to disable these two warnings in Visual Studio,
rather than fixing these warnings with hundreds of static_cast<> in the
source code.
2016-07-12 21:16:55 +08:00
erwincoumans
6523df336e Fix pybullet Windows build errors: C99 requires variables to be defined at the start of the function.
Improve CMake Windows support to build PyBullet (BUILD_PYBULLET)
Implement b3LoadSdfCommandInit in shared memory API
Implement pybullet SDF loading binding, in loadSDF API
TODO for SDF support is provide way to query object/link/joint information.
2016-06-13 10:11:28 -07:00
erwin coumans
99073e03f7 Allow to compile pybullet on Windows, using CMake
(got it to run, rename pybullet.dll into pybullet.pyd and copy in c:\python34\dlls)
Update test.py
Allow to compile pybullet using Python 3.x and 2.7
2016-05-10 00:57:54 -07:00
Erwin Coumans
85368973a1 When using cmake -DBUILD_PYBULLET=ON, force BUILD_SHARED_LIBS option 2016-05-04 13:46:55 -07:00
Erwin Coumans
b0a4e126bf use cmake FIND_PACKAGE(PythonLibs 2.7 REQUIRED) if pybullet is build 2016-05-04 13:24:06 -07:00
Erwin Coumans
f0b9037cd2 tweak cmake, add option BUILD_PYBULLET 2016-05-03 23:42:19 -07:00
erwincoumans
83c560262b Merge pull request #548 from AndrewMeadows/fix-cmake-whitespace
fix whitespace formatting in cmake files
2015-12-07 15:06:59 -08:00
Andrew Meadows
c0c1691c25 fix whitespace formatting in cmake files 2015-12-07 14:08:04 -08:00
Andrew Meadows
a860fff3ad fix cmake to succeed with -DBUILD_BULLET3=0 2015-12-07 13:43:17 -08:00
erwincoumans
e387baf213 add collision and inverse dynamics unit tests to cmake, .travis.yml and appveyor.yml
(more unit tests will follow, once this setup works)
2015-11-24 16:13:21 -08:00
Erwin Coumans
03cc4f0554 add InverseDynamics example for example browser
add CMake support for BulletInverseDynamics and BulletInverseDynamicsUtils
2015-11-24 11:12:02 -08:00
Erwin Coumans
0da584a42d allow to compile and run the ExampleBrowser on older Mac OSX versions (without OpenGL3)
using the 'NO_OPENGL3' preprocessor definition
both premake/cmake has support for this now
needs some testing
2015-05-06 10:35:14 -07:00
Erwin Coumans
c2006f31e4 don't build any demos on older Mac OS versions <10.9
use btCompoundCompoundCollisionShape to determine maximum collision algorithm size
2015-05-06 08:27:01 -07:00
erwincoumans
c99ac6cfa1 cmake with 2 examples (HelloWorld, BasicDemo) 2015-04-16 18:11:22 -07:00
erwincoumans
5e78feb4cb Merge pull request #253 from TimothyGu/patch-1
Install pkg-config file on MinGW systems as well
2015-03-04 16:11:03 -08:00
erwin coumans
aaaf8dc4e2 Enable CMake support for Windows Phone (_WIN32+_M_ARM) and Windows Store Apps,
Use this recent cmake version (http://cmakems.codeplex.com/) or future cmake that has the Windows Phone/Store App support
Use the following defines in CMake:
-DCMAKE_SYSTEM_NAME=WindowsPhone or -DCMAKE_SYSTEM_NAME=WindowsStore
-DCMAKE_SYSTEM_VERSION=8.0 or -DCMAKE_SYSTEM_VERSION=8.1
Thanks to Microsoft OSS group for the patch!
2014-10-24 15:44:33 -07:00
Timothy Gu
11ab85a4bb Install pkg-config file on MinGW systems as well 2014-10-01 19:56:54 -07:00
Erwin Coumans
ec3650acc4 CMake: remove CMAKE_INSTALL_PREFIX from CMakeLists.txt it is automagically used
See also https://github.com/bulletphysics/bullet3/pull/227
remove pthread from OpenGL/GlutStuff.cpp for now (it breaks CMake build)
2014-08-31 12:36:02 -07:00
Erwin Coumans
3c558ec995 explicitly deserialize btCapsuleShape date (margin, scaling, halfextents), because the API modifies them 2014-08-26 17:21:08 -07:00
Erwin Coumans
a0778a1d49 CMakeLists.txt: OSX check is below 10.9 (not below 10.10), and add new files 2014-08-26 11:37:00 -07:00
Erwin Coumans
954d488756 cmake+premake disable OpenGL 3 demos on Mac OSX versions below 10.9
See also http://www.bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=10073
Move ConstraintPhysicsSetup to Demos3/bullet3/ConstraintDemo
2014-08-22 14:41:21 -07:00
erwincoumans
cd22ccdbcf Merge pull request #187 from filipwasil/subproject_build_fix
fix: path resolving was wrong when built as a subproject
2014-08-19 08:34:48 -07:00
Jukka Jylänki
1054fd1992 Fix CMakeLists.txt to not unconditionally add include paths to native system headers in /usr/include and /usr/local/include, which contain include files for the host architecture, and not the target architecture that is being compiled for. 2014-07-12 13:50:12 +03:00
Filip Wasil
2d30c6e735 fix: path resolving was wrong when built as a subproject
Signed-off-by: Filip Wasil <filip.wasil@gmail.com>
2014-06-19 21:48:25 +02:00
Erwin Coumans
f213b00022 fix BUILD_SHARED_LIBS and add it as an OPTION (cross fingers that CMake lets you expose existing vars as OPTION)
this should fix issue 176, thanks to Stephen Peters!
2014-05-19 20:50:10 -07:00
Erwin Coumans
1e2b907562 update version to 2.83 for an intermediate release (2014 will be a transition year to Bullet 3.x) 2014-05-16 16:20:07 -07:00
Erwin Coumans
934df75ea6 more fixes in the build, related to CMake and some error (don't delete a void* pointer!)
revert BasicDemo.cpp to original Bullet 2.82 state
2014-05-13 21:52:46 -07:00
Erwin Coumans
9ab755fc07 fix build (missing glut include path, #include <algorithm> for std::max in hacdICHull.cpp) 2014-05-13 12:59:32 -07:00
Erwin Coumans
dc491936a2 rename ObsoleteDemos back to Demos
fix some relative path issues for loading assets
2014-05-12 16:12:01 -07:00
erwincoumans
a1febdcf3d Merge pull request #169 from erwincoumans/master
fix name 'BulletCollisions' -> BulletCollision
2014-05-05 08:34:17 -07:00
erwin coumans
7328ed900b fix type, BulletCollisions -> BulletCollision
Thanks to pfanne for the report: https://github.com/bulletphysics/bullet3/issues/168
2014-05-05 08:29:01 -07:00