Commit Graph

1303 Commits

Author SHA1 Message Date
Tigran Gasparian
2403a22ebf Bump up shared memory magic number. 2020-01-23 16:58:32 +01:00
Tigran Gasparian
34db76d263 Adds an option to syncUserData to specify the bodies for which to sync. 2020-01-23 14:46:33 +01:00
Tigran Gasparian
899d53ee29 Added null check. 2020-01-21 19:40:22 +01:00
Tigran Gasparian
68d3fb28e0 Adds support for loading user data from URDF files. 2020-01-17 11:55:42 +01:00
erwincoumans
66ffa329c8
Merge pull request #2577 from xhan0619/master
Add position error into deformable vs. rigid contact
2020-01-11 16:05:15 -08:00
erwincoumans
a9615258d3
Merge pull request #2580 from erwincoumans/master
add --mp4fps=30 command line parameter for ExampleBrowser, various other fixes
2020-01-11 15:14:11 -08:00
Erwin Coumans
2336dfcb9e Remove a temporary global static work matrix in the BussIK, since it conflicts with multithreaded applications.
Instead, let the user pass it in explicitly.
2020-01-11 12:43:27 -08:00
erwincoumans
88826da6b5
Merge pull request #2576 from dmcconachie/DeformableGravity
[BUGFIX] Update existing deformable gravity forces on gravity change.
2020-01-09 21:30:48 -08:00
Erwin Coumans
8ebdf7862c fix b3RobotSimulatorClientAPI_NoDirect::changeConstraint API 2020-01-09 17:56:21 -08:00
Dale McConachie
b526c01bec Update existing deformable gravity forces on gravity change. 2020-01-09 16:24:32 -05:00
Erwin Coumans
5cd4647943 fix submitProfileTiming API in b3RobotSimulatorClientAPI_NoDirect 2020-01-09 10:40:14 -08:00
Erwin Coumans
07cdae8c6e also apply TinyRenderer remove shape fix for rigid body and soft body/deformable 2020-01-08 14:02:32 -08:00
Erwin Coumans
6fde189735 fix indexing issue removing graphics shape in tinyrenderer plugin (use getUserIndex3 instead of broadphase uid) 2020-01-08 13:49:41 -08:00
Xuchen Han
78a8ddb466 change default damping model for mass spring to the angular momentum conserving one 2019-12-31 14:08:21 -08:00
erwincoumans
830f0a9565
Merge pull request #2550 from xhan0619/master
Group deformable constraint solves by islands
2019-12-20 16:26:32 -08:00
Xuchen Han
6a8973d2f4 address PR comment and tune parameters for cloth 2019-12-19 21:51:54 -08:00
Erwin Coumans
7a4023430a fix pybullet.submitProfileTiming 2019-12-19 18:05:41 -08:00
Erwin Coumans
9c7e6d6a48 enable programmatic creation of spherical joint 2019-12-19 16:56:09 -08:00
Xuchen Han
4ab0387262 Merge remote-tracking branch 'origin/master'
merge origin/master
2019-12-18 23:18:16 -08:00
erwincoumans
7584847f33
Merge pull request #2537 from erwincoumans/master
fix pybullet_envs path, pybullet version to 2.6.0, allow clang-cl on Windows
2019-12-17 19:06:11 -08:00
Xuchen Han
f65a8b03c0 separate deformable contact solve by islands WIP 2019-12-17 18:27:23 -08:00
Chuyuan Fu
0f477e27ae add link index to setdamping C APIs. If link index is not set, the command is igored for rigidbody 2019-12-17 13:48:34 -08:00
Xuchen Han
d38ea87027 add gripper with deformable cloth demo 2019-12-13 14:33:54 -08:00
Erwin Coumans
202cf18995 allow to compile using clang-cl on visual studio (disable SSE) 2019-12-11 13:07:53 -08:00
erwincoumans
44f21e462a
Merge pull request #2509 from xhan0619/separate-bending-stiffness
Separate in-plane and bending stiffness for mass spring model
2019-12-04 07:34:28 -08:00
Erwin Coumans
cf67e7af0a Merge remote-tracking branch 'bp/master' 2019-11-29 08:06:53 -08:00
Xuchen Han
8fde74ecea update SHARED_MEMORY_MAGIC_NUMBER 2019-11-28 12:14:40 -08:00
Xuchen Han
7bce5d61f4 separate in-plane and bending stiffness for mass spring model for easier parameter tuning 2019-11-27 11:40:10 -08:00
Xuchen Han
39df98465e set a smaller dt for deformable_ball.py for stability and typo fix 2019-11-25 17:07:00 -08:00
Xuchen Han
abd7a556e1 Merge remote-tracking branch 'origin/master' 2019-11-25 15:29:25 -08:00
Erwin Coumans
d9ab536682 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2019-11-21 19:37:11 -08:00
Erwin Coumans
824fd6410f Use -> Set in API 2019-11-21 19:07:11 -08:00
erwincoumans
574343405d
Merge pull request #2499 from xhan0619/fix-render-mesh
Fix render mesh
2019-11-21 16:38:54 -08:00
Xuchen Han
fa7cb25c95 revert the default world to SOFT_MULTIBODY_WORLD 2019-11-20 23:47:15 -08:00
Chuyuan Fu
593fc872ab get correct AABB for softbody 2019-11-20 16:42:04 -08:00
Xuchen Han
00add5490f fix separate render and sim mesh 2019-11-19 23:10:08 -08:00
Xuchen Han
64e5e007e3 load render mesh from command 2019-11-19 21:07:26 -08:00
Erwin Coumans
96deb42aa5 pybullet.createSoftBodyAnchor 2019-11-19 19:20:08 -08:00
Erwin Coumans
d42cf2d0ca enable compilation without deformables/soft bodies (for some unit tests
in premake)
2019-11-19 12:20:33 -08:00
Xuchen Han
6c34c91ca7 load render mesh from command 2019-11-18 23:37:23 -08:00
Erwin Coumans
e5ed15c3b2 fix memory issues in btSparseSDF.h
(hash function on structure with uninitialized padding, and  Reset not called in destructor)
expose sparseSdfVoxelSize in PyBullet.setPhysicsEngineParameter
don't call deformable wireframe drawing in the wrong thread/place (it can cause crashes)
2019-11-18 23:37:23 -08:00
Xuchen Han
22fb2cfb5e add python binding to allow loading deformable objects 2019-11-18 23:37:22 -08:00
Erwin Coumans
655981c6ad fix load_soft_body.py example.
add optional flags in pybullet.resetSimulation.
fix compile issue due to SKIP_DEFORMABLE_WORLD
fix issue in .obj importer (todo: replace with tiny_obj_loader)
todo: replace std::ifstream fs; by fileIO usage.
2019-11-18 23:37:22 -08:00
Erwin Coumans
1f6d504e44 fix memory issues in btSparseSDF.h
(hash function on structure with uninitialized padding, and  Reset not called in destructor)
expose sparseSdfVoxelSize in PyBullet.setPhysicsEngineParameter
don't call deformable wireframe drawing in the wrong thread/place (it can cause crashes)
2019-11-18 10:22:56 -08:00
Xuchen Han
a86710c5b6 add python binding to allow loading deformable objects 2019-11-15 21:25:11 -08:00
Erwin Coumans
72e0e7c223 fix load_soft_body.py example.
add optional flags in pybullet.resetSimulation.
fix compile issue due to SKIP_DEFORMABLE_WORLD
fix issue in .obj importer (todo: replace with tiny_obj_loader)
todo: replace std::ifstream fs; by fileIO usage.
2019-11-14 21:20:42 -08:00
Xuchen Han
2edd94c722 add option to approximate face contact with collision quadrature points 2019-11-12 17:10:39 -08:00
Xuchen Han
362bc6d9a3 fix the bug that prevents the pd control forces/torques being added 2019-11-08 17:08:59 -08:00
Chuyuan Fu
74571d79e7 add compute softbody com 2019-10-31 12:53:12 -07:00
Chuyuan Fu
618c85325c give softbody name 2019-10-31 12:53:12 -07:00
Chuyuan Fu
913400eba1 add SOLVER_USE_ARTICULATED_WARMSTARTING option and APIs
fix compile
2019-10-23 21:36:26 -07:00
Xuchen Han
3ae193ff15 bool->int 2019-10-15 15:43:26 -07:00
Xuchen Han
45c4497711 fix compile 2019-10-15 13:50:13 -07:00
Xuchen Han
992e1454b6 turn on SKIP_DEFORMABLE 2019-10-15 13:50:13 -07:00
Xuchen Han
c808bb78c7 delete lagrangian force when deleting dynamics world from command processor 2019-10-15 13:50:13 -07:00
Xuchen Han
94facf0029 typo fix 2019-10-15 13:50:13 -07:00
Xuchen Han
0cb7cb2445 bool->int 2019-10-15 13:47:55 -07:00
Xuchen Han
e13578fee3 add option to turn self-collision on/off 2019-10-15 13:47:55 -07:00
Xuchen Han
d0e4bbf04d fix gravity set up 2019-10-15 13:47:54 -07:00
Xuchen Han
ec91a0ffa4 configure damping coefficients for neohookean models 2019-10-15 13:47:54 -07:00
Xuchen Han
5a55374d85 pass render nodes instead of simulated nodes to renderer 2019-10-01 14:48:34 -07:00
Xuchen Han
187019268c enable deformable vs. deformable and self-collision in deformable loading 2019-09-28 15:10:06 -07:00
Chuyuan Fu
cd27ffd8b0 add body type info to dynamics info 2019-09-28 14:44:42 -07:00
Xuchen Han
3dcfcda19a typo fix 2019-09-28 14:44:41 -07:00
Xuchen Han
f813cb1c88 modify loadSoftBody to enable separate render mesh from simulation mesh 2019-09-28 14:44:41 -07:00
Erwin Coumans
0549fd4ecc PyBullet eglPlugin:
use -1 as default egl render device
clear m_cachedVisualShapes at reset
2019-09-27 17:14:36 -07:00
Erwin Coumans
391411b660 fix use of uninitialized variable 2019-09-25 13:49:11 -07:00
Erwin Coumans
2e5455def1 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2019-09-25 09:10:44 -07:00
Erwin Coumans
677fe1a368 fix define SKIP_DEFORMABE_BODY -> SKIP_DEFORMABLE_BODY 2019-09-25 09:08:48 -07:00
Erwin Coumans
bdf24bd4e7 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2019-09-24 13:43:20 -07:00
Erwin Coumans
32c38cd3dc remove 'disableVRCamera' to fix issue #2390 2019-09-24 13:42:45 -07:00
Erwin Coumans
275a2aecb0 fix compile issues 2019-09-13 09:37:23 -07:00
Erwin Coumans
db9bc4f835 PyBullet: write body sync data to larger shared memory 2019-09-09 18:05:29 -07:00
Erwin Coumans
64ea8e9f27 PyBullet createMultiBody(Batch), return all body unique ids
PyBullet: fix crash: always check for existance m_multibodyWorld in ::render method
2019-09-09 16:41:25 -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
erwincoumans
bcc7ea31ff
Merge pull request #2386 from xhan0619/newton
Newton solver
2019-09-06 10:32:59 -07:00
Erwin Coumans
74abd99192 fix asan int overflow in hash 2019-09-05 17:42:18 -07:00
Xuchen Han
1ded85e62e remove extra gravity field 2019-09-04 18:49:44 -07:00
Xuchen Han
3d2f945f9c address PR comments 2019-09-04 18:49:44 -07:00
Xuchen Han
f392d8ceb1 clean up memory when exiting 2019-09-04 18:49:43 -07:00
Xuchen Han
482458c9df improve deformable objects loading 2019-09-04 18:49:43 -07:00
Xuchen Han
0b391798b7 hook deformable world into the physics server 2019-09-04 18:48:00 -07:00
erwincoumans
85ba3ba957
Merge pull request #2396 from fuchuyuan/bodytypeAPI
Add body type to dynamics info
2019-09-04 09:37:31 -07:00
Michel Breyer
c374d01587 Deallocate importer in RestoreState 2019-09-04 13:10:34 +02:00
Chuyuan Fu
e4a5f9e06e add body type info to dynamics info 2019-09-03 14:27:19 -07:00
erwincoumans
9a7b89c95a
Update PhysicsServerCommandProcessor.cpp
also allow to extract collision info (pybullet. getCollisionShapeData ) for concave meshes. Thanks to Brent.
2019-08-22 07:38:23 -07:00
Erwin Coumans
f09cefabe8 Merge remote-tracking branch 'bp/master' 2019-08-14 21:14:56 -07:00
erwincoumans
6feb1b25db
Merge pull request #2365 from fuchuyuan/updateLoadingSoftBody
update loading softbody
2019-08-14 21:14:10 -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
erwincoumans
75df77611a
Merge pull request #2366 from fuchuyuan/tinyObjUpdate
update obj loader
2019-08-14 13:37:14 -07:00
Chuyuan Fu
10108cd3ea update obj loader 2019-08-13 16:53:51 -07:00
Chuyuan Fu
b90097803e update loading softbody 2019-08-13 14:56:26 -07:00
Erwin Coumans
f9b232b153 pybullet: allow programmatic creation of heightfield. See https://github.com/erwincoumans/bullet3/tree/master/examples/pybullet/examples/heightfield.py
premake4: allow to build example browser without C++11, re-enable stable PD control plugin using --enable_stable_pd=True
2019-08-11 13:59:24 -07:00
Erwin Coumans
54111f7023 PyBullet: add support for internal edge filtering for height field terrains 2019-08-09 10:14:14 -07:00
Tigran Gasparian
ebe6d2df86 Don't reset user data on SyncBodyInfo() 2019-08-08 13:20:44 +02:00
Tigran Gasparian
cf25b6183d . 2019-08-08 10:53:23 +02:00
Tigran Gasparian
822c24e867 Clears body and user data caches when syncBodyInfo and syncUserData are called 2019-08-08 09:50:32 +02:00
erwincoumans
666e1a8bad
Merge pull request #2357 from fuchuyuan/setWarmStartFactor
API and pybullet bindings for setting warmstarting factor
2019-08-07 17:34:58 -07:00
erwincoumans
cc7a450a3b
Merge pull request #2354 from fuchuyuan/loadRigidbody
add support to load rigidbody
2019-08-07 17:30:46 -07:00
Chuyuan Fu
2e64b27a31 bindings for setting warmstarting factor
fix space
2019-08-06 15:53:31 -07:00
Erwin Coumans
098cde55fd sync graphics server at resetSimulation, load* and resetJointState 2019-08-06 10:56:21 -07:00
Chuyuan Fu
1cb3655f71 add support to load rigidbody 2019-08-05 13:38:43 -07:00
Erwin Coumans
7263439c4b improved for inserting profile timings from Python, to analyzer performance of pybullet programs.
See examples/pybullet/examples/profileTiming.py for an example. Note that python and c++ is properly interleaved.
Open a timings with a name, close the timing without a name. Note that timings can be recursive, added/popped as a stack.
2019-08-01 19:12:16 -07:00
erwincoumans
1feb186204
Update PhysicsClientC_API.cpp
use B3_PI definition
2019-07-30 17:43:24 -07:00
Erwin Coumans
4429c6dc9e avoid Mac OSX bus error -> no large static arrays 2019-07-29 22:20:45 -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
36f3adc03f copy/move heightfield files around (part of pybullet_data)
prepare for heightfield support in pybullet (first step, needs a bit more)
2019-07-25 13:01:26 -07:00
Erwin Coumans
b2825724d4 only if SPD is enabled 2019-07-21 22:03:23 -07:00
Erwin Coumans
8f220c1b23 fix memory leak in previous commit 2019-07-21 21:48:51 -07:00
Erwin Coumans
39a4e8dcd9 Implement faster array versions of PyBullet: getJointStatesMultiDof, getLinkStates, setJointMotorControlMultiDofArray, resetJointStatesMultiDof,
Implement StablePD in C++ through setJointMotorControlMultiDofArray method for pybullet_envs.deep_mimic, see testHumanoid.py and examples/pybullet/examples/humanoidMotionCapture.py
Minor fix in ChromeTraceUtil in case startTime>endTime (why would it happen?)
2019-07-21 13:08:22 -07:00
Erwin Coumans
31688ffb34 fix in multi-endeffector IK, calculate jacobian uses dofs without base, fix premake build of some projects 2019-07-11 22:22:35 -07:00
erwincoumans
8cc13efd2b
Merge pull request #2323 from erwincoumans/master
fix issue in previous commit (need to reserve instead of resize)
2019-07-10 20:53:22 -07:00
Erwin Coumans
7a7f944e39 fix issue in previous commit (need to reserve instead of resize) 2019-07-10 20:52:45 -07:00
erwincoumans
d220101c5a
Merge pull request #2322 from erwincoumans/master
PyBullet.calculateInverseKinematics2 for IK with multiple end-effector locations
2019-07-10 19:58:17 -07:00
Erwin Coumans
ee9575167d expose PyBullet.calculateInverseKinematics2 that allows to specify multiple IK end effector locations (not multiple orientations)
usage example:
jointPoses = p.calculateInverseKinematics2(bodyUniqueId, [endEffectorLinkIndices], [endEffectorTargetWorldPositions])
2019-07-10 17:21:18 -07:00
erwincoumans
9ac2261557
Update PhysicsServerCommandProcessor.cpp
set alpha default to 1, just in case.
2019-07-09 08:42:52 -07:00
Andreas Christiansen
8c8a7fa0c9 Fix memory sanitizer warning on potential reading of uninitialized memory. This can happen for the RGB values that are only conditionally set in TinyRendererVisualShapeConverter::addVisualShape. 2019-07-09 11:52:42 +02:00
Erwin Coumans
9db6acd97d support changeVisualShape(rgbaColor) through GraphicsServer/Client
support getCameraInfo through GraphicsServer/Client
2019-07-02 09:48:34 -07:00
Chuyuan Fu
d5e028c673 take out unused variable 2019-07-01 13:31:00 -07:00
Chuyuan Fu
4da456054c Update PhysicsServerCommandProcessor and plugins to support render 2019-06-25 17:59:15 -07:00
Erwin Coumans
d4aac235fc Merge branch 'master' of https://github.com/erwincoumans/bullet3 2019-06-19 12:08:52 -07:00
Erwin Coumans
16542aa740 tweak Mini Cheetah URDF/MTL
use /tmp/timings on Linux/Mac as default location to save profile timings (when you press 'p' in example browser)
fix in Graphics Server Example when rendering is disabled
2019-06-19 12:07:26 -07:00
Erwin Coumans
ed4515ae17 for the GraphicsServer, expose a sync transform interval: only synchronize the transform once the stepSimulation exceeds this time interval.
(for example, run the simulation at 1kHz but sync the graphics transforms to remove graphics server at 30Hz)
2019-06-19 09:45:29 -07:00
Erwin Coumans
c3b7f39aaf expose shadowMapResolution (texture resolution) and shadowMapWorldSize (size in meters in world space)
expose pybullet.ConfigureOpenGLVisualizerRequest(lightPosition=[x,y,z], shadowMapWorldSize=10.5, shadowMapResolution=16384)
See examples/pybullet/examples/configureDebugVisualizer.py for an example.
This reimplements https://github.com/bulletphysics/bullet3/pull/2295 but without creating a new command/status and explicitly referring to the debug visualizer
(since the 'getCameraImage' also has a lightPosition)
2019-06-19 09:01:16 -07:00
Erwin Coumans
7e76ee0ad7 make pybullet.getMeshData work for softbody 2019-06-17 21:43:38 -07:00
Erwin Coumans
20d9ad5f24 Merge remote-tracking branch 'bp/master' 2019-06-17 20:37:34 -07:00
Chuyuan Fu
229e87c3c9 get mesh data api
fix compile

fix typo
2019-06-17 19:00:53 -07:00
Erwin Coumans
d888c50f15 avoid getting stuck in RemoteGUIHelper when graphics server isn't started first. 2019-06-17 18:30:39 -07:00
Erwin Coumans
e286fbd9f2 fixes for RemoteGUIHelper 2019-06-15 10:30:48 -07:00
Erwin Coumans
ee3680765e fixes for RemoteGUIHelper 2019-06-14 14:34:56 -07:00
Erwin Coumans
708f66ac42 add RemoteGUIHelper to communicate between graphics client/server 2019-06-14 08:06:21 -07:00
Erwin Coumans
6160b52fd7 graphicsServer to workaround OpenGL issues on some servers. 2019-06-13 23:24:22 -07:00
Erwin Coumans
2b9bece2c8 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2019-05-08 12:03:46 -07:00
Erwin Coumans
577dd16299 fix test compilation 2019-05-08 12:03:23 -07:00
mbennice
1d2a1c093d Update GRPC conversion of SDF and State Update 2019-05-07 11:18:11 -07:00
mbennice
cf16c5c51f Reduces wait in the gRPC plugin, fix state bug.
Updates the gRPC plugin to gather messages in its own thread, and
corrects the state details not being correctly added to shared memory.
2019-05-07 11:11:01 -07:00
Erwin Coumans
defa172d39 improve grpc support 2019-05-07 08:13:27 -07:00
erwincoumans
5734035094
Merge pull request #2239 from erwincoumans/master
fix CallData::CallStatus
2019-05-06 19:55:50 -07:00
Erwin Coumans
e6918b9cd4 fix CallData::CallStatus 2019-05-06 17:30:07 -07:00
erwincoumans
9f28a27323
Merge pull request #2238 from erwincoumans/master
fix exceeding shared memory usage, return of member of deleted class.
2019-05-06 17:15:13 -07:00
Erwin Coumans
688df2c60b fix exceeding shared memory usage, return of member of deleted class. 2019-05-06 17:13:42 -07:00
Tigran Gasparian
ee99abfc45 Fixes bug in getNumUserData in the physics Direct client. This was inconsistent with the shared memory client 2019-05-06 16:26:46 +02:00
Chuyuan Fu
ee10d47b17 fix space
fix space
2019-05-02 14:15:18 -07:00
Chuyuan Fu
3fb0a7c19b add set starting position and orientation to softbody 2019-05-01 16:56:40 -07:00
Chuyuan Fu
55f9f1eb89 add LoadSoftbody C API 2019-05-01 16:56:40 -07:00
Erwin Coumans
a1f0685271 Merge remote-tracking branch 'bp/master' 2019-04-27 14:54:44 -07:00
erwincoumans
f71aea0b66
Update PhysicsServerCommandProcessor.cpp 2019-04-27 14:24:01 -07:00
Erwin Coumans
efe73670ef Merge remote-tracking branch 'bp/master' 2019-04-27 14:19:58 -07:00
erwincoumans
62e01c7a33
Update PhysicsServerCommandProcessor.cpp 2019-04-27 12:21:45 -07:00
Erwin Coumans
ef9570c315 add yapf style and apply yapf to format all Python files
This recreates pull request #2192
2019-04-27 07:31:15 -07:00