Commit Graph

24 Commits

Author SHA1 Message Date
Erwin Coumans
c06859723b Embed graphics server (shared memory) in PyBullet. Use pybullet.connect(pybullet.GRAPHICS_SERVER) to enable it.
TODO: enable for Mac OSX on mainloop, add tcp bridges from and to shared memory.
2020-03-19 14:18:35 -07:00
erwincoumans
85ee4c2934 allow batch creation of objects through PyBullet.createMultiBody, see createMultiBodyBatch.py example.
expose minGraphicsUpdateTimeMs through PyBullet.connect(p.GUI, options="minGraphicsUpdateTimeMs=32000"), by default OpenGL rendering runs at 4000microseconds intervals.
allow a maximum of 128k objects
fix meshScale for PyBullet.createCollisionShape for custom mesh
expose Pybullet.setPhysicsEngineParameter(minimumSolverIslandSize=...), larger minimum batches group solver constraints together in the same island, to reduce calling overhead (even if they are not related)
2019-02-12 10:36:01 -08:00
erwincoumans
ab8f16961e Code-style consistency improvement:
Apply clang-format-all.sh using the _clang-format file through all the cpp/.h files.
make sure not to apply it to certain serialization structures, since some parser expects the * as part of the name, instead of type.
This commit contains no other changes aside from adding and applying clang-format-all.sh
2018-09-23 14:17:31 -07:00
Erwin Coumans
4a8ad1a54e fix posix memory release issues
fix compile problems on Mac OSX
reduce shared memory size on Mac (>512*1024 fails to allocate)
2018-05-02 15:39:16 -07:00
erwincoumans
3a5f778b70 expose lsMemory destroy function to release thread memory 2018-05-02 14:32:43 -07:00
erwincoumans
c155e105a5 unlock thread at exitPhysics
pybullet: don't crash in inverse kinematic if #dofs don't match due to free base
C-API: don't crash if status/statusHandle = 0
2017-10-10 11:10:42 -07:00
Erwin Coumans
60b60ef9fd add pybullet.connect(pybullet.GUI_SERVER) option. This allows shared memory connections, acting as a physics server. You can connect using SHARED_MEMORY to this GUI_SERVER. 2017-08-14 17:02:20 -07:00
Erwin Coumans
0df8887990 improve pybullet performance of loadURDF/SDF/MJCF and 'createCollisionShape'/'createMultiBody' for GUI/VR/SHARED_MEMORY,
use p.configureDebugVisualizer(p.COV_ENABLE_RENDERING,0) before loading and
p.configureDebugVisualizer(p.COV_ENABLE_RENDERING,1) afterwards
2017-07-14 23:12:16 +01:00
erwincoumans
83f910711a Prepare/allow for non-Bullet2-based physics command processor in pybullet/Bullet-C-API
!!! Make sure to add examples/SharedMemory/PhysicsServerExampleBullet2.cpp to your build system, if needed
Bump up pybullet to version 1.0.9
2017-05-30 19:54:55 -07:00
Erwin Coumans
63486a712c VR video recording, use command-line --mp4=videoname.mp4
tune gripper grasp example with tefal pan, 800Newton force.
URDF importer: if using single transform 1 child shape, don't use compound shape.
if renderGUI is false, don't intercept mouse clicks
add manyspheres.py example (performance is pretty bad, will look into it)
[pybullet] expose contactBreakingThreshold
2017-02-16 14:19:09 -08:00
Erwin Coumans
c0c4c8ba3f fix many warnings
remove btMultiSapBroadphase.*
make collisionFilterGroup/collisionFilterMark int (instead of short int)
2017-01-15 22:26:11 -08:00
Erwin Coumans
3d6584962a remove some memory leaks in example code. 2017-01-10 14:57:16 -08:00
Erwin Coumans
5e6cfd70b5 iOS platform and Android don't have __thread local storage, so avoid multi-threaded profiler on those (only on _WIN32, __linux__ and __APPLE__ and not TARGET_OS_IPHONE
Add a Sleep(0) for Windows to yield threads (and not Sleep(1))
2017-01-08 12:49:04 -08:00
Erwin Coumans
82995a8343 pybullet, more robust multi-server connections
Windows shared memory: allow to use custom key.
Improve GUI performance on Windows, submit letters in text as a batch (fewer draw-calls)
quadruped.py: first try to connect to SHARED_MEMORY, if it fails (<0) use GUI
increase Chrome about://tracing json export capacity (press 'p' in Example Browser)
UDP physics server: add --port and --sharedMemoryKey command-line arguments
PhysicsServerExample: add --sharedMemoryKey command-line option (for VR example too)
ExampleBrowser: sleep a few milliseconds if rendering is too fast, use --minUpdateTimeMicroSecs=0 to disable
2016-12-28 21:51:54 -08:00
erwin coumans
3bdcf23a05 Add sleep to avoid 100% busy CPU loop in PhysicsServerExample
Added btClock::usleep
Fix broken TinyRenderer example code.
2016-08-13 12:21:18 -07:00
erwin coumans
02582e3a78 shrink down cube size of BasicDemo 10 times (it looked ginormous in VR) from 2x2x2 meter to 0.2
add test for VR HUD/sub-titles
fix issue in previous commit, partial string use %.8s not %8.s
use long long int in b3Clock
fix warning/error in pointer alignment in serialization
Fix pybullet Windows compilation.
(thanks to bkeys/https://github.com/bulletphysics/bullet3/pull/687)
2016-07-09 15:09:09 -07:00
Erwin Coumans
7994a339ee disable RTC update for Physics Server by default 2016-05-18 16:21:40 -07:00
erwin coumans
6a9c54c4ef Remove unused ROS urdf (was replaced by Bullet UrdfParser.
Small refactoring for ExampleBrowser: move examples cpp files in the app/executable
Move ExtendedTutorials in its own app/executable as a test.
2016-05-12 23:03:12 -07:00
erwin coumans
8360e2e66d windows fixes 2016-05-04 00:16:53 -07:00
Erwin Coumans
938db633df fixes in build system 2016-05-03 23:34:48 -07:00
Erwin Coumans
2cbfeb9590 run GUI on main thread for Mac OSX/__APPLE__, due to OS limitation
add b3CreateInProcessPhysicsServerAndConnectMainThread to test.c
2016-04-14 08:51:20 -07:00
erwincoumans
efbb1edecc Allow InProcessExampleBrowser to use a malloc allocated memory block, instead of system shared memory.
Make shared memory client/server a bit more robust, in case the server is terminated early.
2016-03-10 14:36:46 -08:00
erwincoumans
9be978337f quick draft implementation for SharedMemoryInProcessPhysicsC_API 2016-03-07 14:56:16 -08:00
Erwin Coumans
b130be46f7 add InProcessExampleBrowser to make it easy to instantiate the ExampleBrowser in its own thread
example usage:

int main(int argc, char* argv[])
{

btInProcessExampleBrowserInternalData* data = btCreateInProcessExampleBrowser(argc,argv);

while (!(btIsExampleBrowserTerminated(data)))
{
}

btShutDownExampleBrowser(data);

        return 0;
}
2016-03-02 18:01:33 -08:00