Commit Graph

159 Commits

Author SHA1 Message Date
Erwin Coumans
27fbbfee7f pybullet removeAllParameters (sliders, buttons)
pybullet addUserDebugParameter adds button instead of slider, if min > max.
2020-03-16 21:29:30 -07:00
Erwin Coumans
5a3c60c709 PyBullet: Fix syncBodyInfo for over 512 bodies.
PyBullet: Fix issue related to recent change in drawDebugDrawerLines (soft body)
2019-09-09 14:56:26 -07:00
Xuchen Han
0b391798b7 hook deformable world into the physics server 2019-09-04 18:48:00 -07:00
Erwin Coumans
88d1788ee5 PyBullet: allow to update an existing heightfield shape
Also, use flags = p.GEOM_CONCAVE_INTERNAL_EDGE to enable internal edge filtering for heightfield (disabled by default)
See https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/examples/heightfield.py
2019-08-14 21:06:10 -07:00
Erwin Coumans
51fba6f78d export btHeightfieldTerrainShape to PyBullet. Note that tinyrenderer doesn't support rendering it (it would be too slow on CPU)
fix rare getKeyboardEvents threading issue
change texture color to default plane.urdf blue
2019-07-29 20:23:38 -07:00
Erwin Coumans
ee3680765e fixes for RemoteGUIHelper 2019-06-14 14:34:56 -07:00
Erwin Coumans
6160b52fd7 graphicsServer to workaround OpenGL issues on some servers. 2019-06-13 23:24:22 -07:00
erwincoumans
71b1191947 texture caching and geometry caching (PhysX) for much faster loading of many same objects, helps benchmarking/comparison.
add command-line args for PhysX (numCores=..., solver=tgs, )
2019-02-21 19:24:18 -08:00
Erwin Coumans
ac18c95ea1 fix some race conditions 2018-11-05 10:04:19 -08:00
Erwin Coumans
f6ea2a7379 fix a potential data race condition.
remove createObstacleCourse programmatic creation part until we can steam vertices/indices.
2018-11-01 10:20:54 -07:00
Erwin Coumans
438e082b33 PyBullet: remove a potential race condition 2018-11-01 07:27:37 -07:00
erwincoumans
bb305c6ebc allow to provide rayCastBatch in local 'from'/'to' with a parent/link index, b3RaycastBatchSetParentObject
If parentObjectUniqueId provided, convert local from/to into world space coordinates
AddUserDebugLins: don't block when replacing an item
Fix examples/pybullet/examples/inverse_kinematics.py
2018-10-10 23:31:50 -07:00
erwincoumans
dba239fe8d First pass of load files through an interface (to allow loading from memory, zip file etc). So instead of posix fopen/fread, using CommonFileIOInterface.
A fileIO plugin can override custom file IO operations. As a small test, load files from a zipfile in memory.
Default fileIO implementation is in examples/Utils/b3BulletDefaultFileIO.h
Affects URDF, SDF, MJCF, Wavefront OBJ, STL, DAE, images.
2018-10-08 21:27:08 -07: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
erwincoumans
0b08881ab8 wait until a frame is rendered, when using the COV_ENABLE_SINGLE_STEP_RENDERING command (Windows and Linux only) 2018-09-15 14:22:31 -07:00
Tigran Gasparian
35a55b2056 Changes tickPlugins to reportNotifications and only calls the processNotifications function on the plugins when there are actually notifications available. tickPlugins will to into a separate PR. 2018-07-25 14:47:34 +02:00
Tigran Gasparian
c59afb88c4 Notify plugins on certain events (e.g. body added).
This also adds a periodic tick function to plugins, giving them periodically control over the simulation thread, even when the simulation is paused.
2018-07-24 14:12:16 +02:00
Erwin Coumans
b5495e789d Change constraint solver threshold-based termination condition on residual of velocity threshold, not on residual of impulse threshold.
This avoids issues with systems with large mass ratios.

Test: add this to BasicDemo/BasicExample.cpp in initPhysics

	m_dynamicsWorld->getSolverInfo().m_numIterations = 1000;
	m_dynamicsWorld->getSolverInfo().m_leastSquaresResidualThreshold = 1e-4;
2018-07-22 11:30:16 +02:00
erwincoumans
49b0ec08e1 PyBullet: allow to replace existing debug lines in addUserDebugLine through the replaceItemUniqueId argument
See batchRayCast.py for example usage
2018-06-22 16:47:20 -07:00
Erwin Coumans
0b2c9ea645 PyBullet: avoid a crash in SHARED_MEMORY_SERVER 2018-05-20 12:20:06 +10:00
Erwin Coumans
28b86ba0a4 fix some tsan issues (thread sanitizer) 2018-05-16 08:32:21 -07:00
Erwin Coumans
d17d496f97 fix potential asan/tsan issue 2018-05-15 13:24:28 -07:00
Erwin Coumans
7383843b24 expose PyBullet.SHARED_MEMORY_SERVER
connect from 1 different PyBullet client using PyBullet.SHARED_MEMORY)
(don't use more than 1 other client to submit commands in parallel)
2018-05-07 15:57:36 -07:00
erwincoumans
3a5f778b70 expose lsMemory destroy function to release thread memory 2018-05-02 14:32:43 -07:00
erwincoumans
d7e81590b5 fix a memory leak 2018-05-02 12:24:31 -07:00
yunfeibai
6b97e1e604 Expose API to set projective texture instead of using global. 2018-03-20 21:28:47 -07:00
yunfeibai
37696dd87e Add Bullet C API and pybullet API to set projective texture matrices. 2018-03-18 18:45:54 -07:00
Erwin Coumans
159fef5818 PyBullet: explicit sync transform right before hardware OpenGL getCameraImage 2018-03-09 09:56:03 -08:00
erwincoumans
73a4334e30 explicitly remove textures during resetSimulation
move glViewport to Win32Window
2018-02-21 23:22:16 -08:00
erwincoumans
9ffb05eb3b fix double->float issue by cast, fixes issue #1510
fix possible out-of-bounds access in btMultiBody
2018-01-15 11:59:00 -08:00
Erwin Coumans
79d78a325a Start of a urdfEditor.py, limited support to extract a URDF from a PyBullet body.
Use btCylinderShapeZ for URDF cylinder, instead of converting it to a btConvexHullShape.
Implement PyBullet.getCollisionShapeData
Extend PyBullet.getDynamicsInfo / b3GetDynamicsInfo, remove flag (don't rely on API returning a fixed number of elements in a list!)
Extend PyBullet.getJointInfo: add parentIndex
2018-01-03 19:17:28 -08:00
Erwin Coumans
5517cbc4e0 add segmask_linkindex.py example using p.getCameraImage(320,200,flags=p.ER_SEGMENTATION_MASK_OBJECT_AND_LINKINDEX)
to extract object unique id and link index from segmentation mask in getCameraImage
2017-12-28 12:37:07 -08:00
Erwin Coumans
afd1066c50 pybullet.getCameraImage: preparation to expose link index in segmentation mask buffer 2017-12-28 10:18:35 -08:00
Erwin Coumans
88289c032e fix canvas issues from previous commit 2017-11-18 17:20:21 -08:00
erwincoumans
099a6f65f3 tweak zbuffer visualization, show targetpos in example browser 2017-11-18 15:18:46 -08:00
erwincoumans
81146a4090 pybullet: move RGB,depth, segmentation mask preview windows to the right
remove some dead code from PhysicsServerCommandProcessor.cpp
2017-11-18 13:21:20 -08:00
erwincoumans
e2d29d4048 also enable depth and segmentation mask preview window in example browser/pybullet
You can disable/enable all preview windows using:

p.configureDebugVisualizer(p.COV_ENABLE_RGB_BUFFER_PREVIEW,0/1)
p.configureDebugVisualizer(p.COV_ENABLE_DEPTH_BUFFER_PREVIEW,0/1)
p.configureDebugVisualizer(p.COV_ENABLE_SEGMENTATION_MASK_PREVIEW,0/1)
2017-11-17 13:33:27 -08:00
erwincoumans
ed8de36ffa pybullet: allow to replace existing text, to avoid flickering (remove/add)
allow texture caching (disable using the disable file caching)
2017-10-25 08:15:01 -07:00
erwincoumans
de44e4811a fix pybullet.addUserDebugText borders around letters
bump up pybullet version
In a few pybullet examples, first connect to SHARED_MEMORY, if not connected use GUI mode
2017-10-10 22:11:32 -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
erwincoumans
e5d4c73c40 fix very rare threading issue, let main thread compute the UID for user debug items
add collision model to cartpole.urdf
2017-10-09 22:40:53 -07:00
erwincoumans
2f2f070ab5 allow changeVisualShape (rgbaColor, specularColor and texture) for maximal coordinates rigid body (btRigidBody)
Make the examples\pybullet\examples\createVisualShape.py a bit more interesting
2017-10-08 11:34:42 -07:00
Erwin Coumans
027178ae6f fix some compile issues/bugs 2017-10-06 15:34:25 -07:00
Erwin Coumans
26d32f2aa8 improve loading performance of large textures:
option to disable tinyrenderer, use p.configureDebugVisualizer(p.COV_ENABLE_TINY_RENDERER,0)
also make sure to use p.configureDebugVisualizer(p.COV_ENABLE_RENDERING,0) before loadURDF, and enable rendering afterwards using p.configureDebugVisualizer(p.COV_ENABLE_RENDERING,1)
reorder 2 loops, making the flip texels twice as fast (cache coherency),
single memcpy of entire texture in tinyrenderer, instead of per-pixel copy (memory layout is the same)
add lots of B3_PROFILE timings, to see where time is going
2017-10-06 13:46:24 -07:00
erwincoumans
b572fe43f9 fix signal handling in ExampleBrowser on linux/mac on termination
expose all analogue axes from OpenVR (5 controllers, each x,y -> 10 floats) in pybullet.getVREvents(allAnalogAxes=1)
2017-10-05 12:59:58 -07:00
Erwin Coumans
3f21e528f0 revert name 'v' -> 'u' (backward compatibility) and 'u' -> 't'
make vr_kuka_setup.py load faster, by disabling rendering during loading
allow to setRealTimeSimulation(0) in VR
2017-09-02 11:35:54 -07:00
Erwin Coumans
88897cc744 implement pybullet.changeTexture. For now, the width/height has to match the target texture unique id, otherwise crashes may happen (a check for width/height match will be added)
See also examples\pybullet\examples\changeTexture.py
2017-06-30 19:11:43 -07:00
Erwin Coumans
dd3d55610b fixes in pybullet.loadTexture, changeVisualShape replacing texture.
(also works for OpenGL3 renderer now)
2017-06-30 13:35:07 -07:00
Erwin Coumans
2e6f8c271e allow to disable/enable default keyboard shortcuts ('w', 'd' 's' etc) and default mouse picking
pybullet.getMouseEvents / b3RequestMouseEventsCommandInit
2017-06-17 13:29:14 -07:00
Erwin Coumans
ee8fd56c5e prepare to train racecar using ZED camera pixels (CNN+DQN) 2017-06-13 16:04:50 -07:00