Commit Graph

72 Commits

Author SHA1 Message Date
Joey Liaw
1f564d5c57 only probe for python if PYBULLET explicitly specified 2017-10-27 16:32:35 -07:00
Andrew Hundt
96ee22eeaa Merge branch 'master' into cmake
* master: (35 commits)
  add __init__.py file in agents folder
  bump up pybullet version, instruction to visualize agents ppo:
  add TensorFlow Agents PPO training script for various pybullet environments:
  bump up pybullet version
  add minitaur environment randomizer, enable it by default this improves PPO training ( more stable)
  fix compile issue on MSVC
  expose gear erp/relative position target to C-API/pybullet finish much better C++ vrSyncPlugin, running in-the-loop with the physics at high frequency, see also vr_kuka_setup_vrSyncPlugin.py
  return -1 for debugDrawItems in DIRECT mode, instead of failing the API
  bump up shared memory version number add option to recompute forward kinematics, to be consistent with link velocities in pybullet.getLinkState (..., computeForwardKinematics=0/1), thanks to Jeff Bingham for bringing up this inconsistency
  add experimental vrSyncPlugin, that syncs the position/orientation of a vr controller to a gripper (through a constraint) This is in C++ and the sync runs at the simulation speed (240 Hz), so there is less lag than in Python. Modify the pybullet/examples/vr_kuka_setup.py at the end to do this:
  fix a bug in a changeVisualShape/texture selection, out-of-bounds check was using the wrong array. May fix some internal texture mug bug.
  fix a compile error on Windows (variables need to be declared together at the start of a block in C)
  fix compile warnings
  Update b3PluginManager.cpp
  tweak pybullet examples a bit (mac OSX OpenGL runs in mainloop, with python interpreter, so it needs some 'ping' command bump up pybullet to version 1.4.6
  [sharedmemory] Fill-out calculateJacobian command.
  add some missing files for premake, thanks to Jeff Bingham for the report
  add a few more contributors (the list is far from complete though)
  manually apply pull request 457 PR #457 Thanks to aaronmjacobs!
  Update pybullet.c
  ...

# Conflicts:
#	CMakeLists.txt
2017-09-27 16:18:00 -04:00
Andrew Hundt
1579b6a707 CMakeLists.txt search for any python version by default 2017-09-26 15:49:35 -04:00
Erwin Coumans
ebf78cb754 manually apply pull request 457 PR #457
Thanks to aaronmjacobs!
2017-09-24 10:45:08 -07:00
Andrew Hundt
ff15f2e702 cmake python fix for linux #1322
Search did not cover inconsistent lib location defined within python under linux versions
https://stackoverflow.com/questions/20582270/distribution-independent-libpython-path
2017-09-21 23:42:52 -04:00
Erwin Coumans
739728c8af revert to FIND_PACKAGE(PythonLibs), the new solution doesn't work with Travis 2017-09-19 10:50:24 -07:00
Erwin Coumans
420042c628 try to re-enable continuous integration 2017-09-19 10:28:52 -07:00
Erwin Coumans
2d3cd8d091 disable NUMPY build by default 2017-09-18 18:14:46 -07:00
Erwin Coumans
ee082396d1 fixes in libdl/DL cmake
minor tweaks in pybullet OpenAI gym locomotion envs (connect to shared memory before going GUI/DIRECT)
bump up pybullet version to 1.3.6
2017-09-10 16:22:45 -07:00
Erwin Coumans
c895bd244f track down DL/dl issue 2017-09-09 13:05:45 -07:00
Erwin Coumans
67eb59901a trigger travis again 2017-09-08 08:22:40 -07:00
Erwin Coumans
86840bf50d trigger travis 2017-09-07 17:24:17 -07:00
Erwin Coumans
03cde2ee9b fix build? (pybullet shouldn't be build by default) 2017-09-07 14:40:46 -07:00
Erwin Coumans
09ddd17339 don't build pybullet unless asked for it, see this:
https://travis-ci.org/bulletphysics/bullet3/jobs/273018723
2017-09-07 12:22:35 -07:00
Erwin Coumans
7a2de3ea08 fix cmake logic for BUILD_EXTRA_LIBS 2017-09-06 15:59:34 -07:00
Erwin Coumans
c82131d16e cmake fixes 2017-09-06 14:18:35 -07:00
Erwin Coumans
7878f7ace9 Add Extras/BulletRobotics, will be installed as 'Extra Libs' using CMake
Reduce size of command-logfile (used in PhysicsServer (Logging) and PhysicsServer (Log Replay))
Make Bullet3Common and BulletInverseDynamics part of core Bullet libraries (not optional)
2017-09-06 13:18:39 -07:00
Lunkhound
dfe184e8d3 Bullet 2 threading refactor: moved parallel-for calls into core libs 2017-05-23 01:01:20 -07:00
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