Commit Graph

2738 Commits

Author SHA1 Message Date
Erwin Coumans
1452cae641 * add textured models of ball.vtk (obj/mtl) and torus (obj/mtl) and cloth.
1) allow to render deformables in 'getCameraImage', for TinyRenderer (tested OK) and EGL (untested)
2) allow to have textures for deformables. See deformable_ball.py, deformable_anchor.py and deformable_torus.py for examples
3) deformables: allow to request simulation mesh data (even if there is a render mesh) See deformable_anchor.py for an example usage
   data = p.getMeshData(clothId, -1, flags=p.MESH_DATA_SIMULATION_MESH)
4) fix deletion of deformables, thanks to Fychuyan, https://github.com/bulletphysics/bullet3/pull/3048
5) allow to enable and disable double-sided rendering, p.changeVisualShape(objectUid, linkIndex, flags=p.VISUAL_SHAPE_DOUBLE_SIDED)
6) fix GripperGraspExample, model not found
7) Fix deformable anchor not attaching to multibody with object unique id of 0
8) Fix issue with assignment of unique ids in TinyRenderer/EGL renderer (always use broadphase uid)
9) Avoid crash/issue of simulation with pinned vertices (mass 0) in btDeformableBackwardEulerObjective::applyExplicitForce
10) Store uv/normal in btSoftBody::RenderNode to allow textured meshes
11) (uncomment in btSoftBodyHelpers.cpp): dump vertices and indices in obj wavefront format, when loading a VTK file, for quicker creation of a (textured) surface mesh
12) allow interpolateRenderMesh also for old position-based soft bodies (not only the shiny new FEM deformables)
13) fix a few premake targets
14) update build_visual_studio_vr_pybullet_double_cmake.bat so it suits c:\python37 and installs locally
    for local install of Bullet, see also this example https://github.com/erwincoumans/hello_bullet_cmake
2020-09-12 01:03:04 -07:00
erwincoumans
ce81073ac3 Merge pull request #3020 from fuchuyuan/fixsegfault
Fixsegfault
2020-09-01 16:54:16 -07:00
erwincoumans
db9f989a66 Merge pull request #2938 from MomoDeve/patch-1
applied const modifiers to some RigidBody getters
2020-08-31 17:35:37 -07:00
DarkDefender
85a3cb0ed5 Add ability to get the original vertex index from the convex hull (#3018)
This makes it possible to know which input verticies were picked to
to define the hull.

With this information it is much easier to map certain features from the
input mesh/point cloud to the output convex hull.
2020-08-31 15:05:27 -07:00
Chuyuan Fu
4bc8a4ca79 fix segfault when removing softbody 2020-08-31 10:50:23 -07:00
erwincoumans
dda2075f2c Merge pull request #2984 from fuchuyuan/cachebarycenter
Cachebarycenter
2020-08-20 09:43:38 -07:00
Chuyuan Fu
2d42dea27f turn off cache prev collision by default 2020-08-17 10:52:07 -07:00
erwincoumans
0993c9a782 Merge pull request #2855 from asmaloney/fix-pointer-check
Fix parameter check in bFile::safeSwapPtr
2020-08-13 19:35:50 -07:00
Chuyuan Fu
07521869db format file
format

format
2020-08-12 10:46:26 -07:00
Chuyuan Fu
25aa0f5669 clean up code 2020-08-12 10:13:49 -07:00
Chuyuan Fu
c5fc913293 fix softbody v 2020-08-12 09:35:35 -07:00
Chuyuan Fu
086638d16e fix bug in multibody point contact with deformable 2020-08-12 09:35:22 -07:00
Chuyuan Fu
b8fd4a1060 added caching barycenters for static constraints, with lots of debugging lines 2020-08-12 09:33:49 -07:00
Xuchen Han
ae9fb3ca8f Change picking force to implicit for all integration schemes. 2020-08-03 23:04:47 -07:00
#Momo
092de325ae applied const modifiers to RigitBody getters
getPushVelocity and GetTurnVelocity should be marked as const
2020-07-16 13:31:16 +03:00
Erwin Coumans
c517c434e6 pybullet allow to enable/change joint limits:
pybullet.changeDynamicsInfo(objectUniqueId, linkIndex, jointLowerLimit=..., jointUpperLimit=...) # jointLowerLimit <= jointUpperLimit

and joint limit max force:
pybullet.changeDynamicsInfo(objectUniqueId, linkIndex, jointLimitForce=...)

For example:
p.changeDynamics(sphereUid,linkIndex, jointLowerLimit=1, jointUpperLimit=3, jointLimitForce=10.5)

add b3ChangeDynamicsInfoSetJointLimit/b3ChangeDynamicsInfoSetJointLimitForce
add getConstraintType for btMultiBodyConstraint
2020-07-07 19:42:23 -07:00
Xuchen Han
70a0ef65d8 fix bug in deformable replulsion force and adjust parameter in deformable self collision 2020-06-26 14:19:44 -07:00
Xuchen Han
4317ddc285 change dynamic_cast to static_cast 2020-06-26 11:47:40 -07:00
Xuchen Han
bf8cf19665 support implicit integration in picking force 2020-06-24 17:48:43 -07:00
Xuchen Han
7523861bf5 fix picking issue in Deformable Self Collision demo 2020-06-24 17:48:11 -07:00
Xuchen Han
3f34b6920f revert the max number of solver iteration to previous value 300 2020-06-19 17:26:03 -07:00
Xuchen Han
bfaaca81be bug fix in implicit predict motion 2020-06-19 17:04:02 -07:00
Xuchen Han
41210ca37f restore CMakelist and premake.lua 2020-06-19 17:02:36 -07:00
Xuchen Han
e0b554787f Merge remote-tracking branch 'origin/master' into implicit-contact 2020-06-19 15:05:34 -07:00
Xuchen Han
b969f14d21 run clang format 2020-06-19 14:52:44 -07:00
Xuchen Han
395f8c6117 add implicit point contact for corotated linear elasticity objects 2020-06-19 14:49:58 -07:00
Xuchen Han
92f2f56b3d add mass damping into damping model 2020-06-18 16:43:53 -07:00
Xuchen Han
f7354751a9 improve contact stability for implicit scheme 2020-06-17 18:43:49 -07:00
Xuchen Han
4594927d02 corotate the damping force for linear elasticity 2020-06-17 18:43:14 -07:00
Xuchen Han
f23e745666 clang format PhysicsServerCommandProcessor and BulletSoftBody 2020-06-17 17:20:39 -07:00
Xuchen Han
9cfe16abb4 add corotated linear elasticity 2020-06-16 15:57:58 -07:00
Andy Maloney
2197101bc5 Fix parameter check in bFile::safeSwapPtr
If either the source or destination pointers are nullptr, we shouldn't continue otherwise we dereference nullptr or memcpy with nullptr which is undefined.

(Also move the check to return as soon as possible.)
2020-06-13 10:59:16 -04:00
erwincoumans
da50438c3c Merge pull request #2826 from xhan0619/grav-factor
Deformable gravity factor
2020-06-05 10:07:27 -07:00
Erwin Coumans
c09007e005 Merge branch 'master' of github.com:erwincoumans/bullet3 2020-06-04 00:00:44 -07:00
Erwin Coumans
e6a0206d47 Allow to remove soft body anchors, using pybullet.removeConstraint (untested).
Usage example:
anchors = []
anchors.append(p.createSoftBodyAnchor(clothId  ,0,-1,-1))
anchors.append(p.createSoftBodyAnchor(clothId ,3,boxId,-1, [0.5,-0.5,0]))
for a in anchors:
  p.removeConstraint(a)
2020-06-04 00:00:19 -07:00
Xuchen Han
e89903a8ab support gravity factor for deformables 2020-05-26 16:48:50 -07:00
erwincoumans
5233b72160 Merge pull request #2800 from xhan0619/splitImpulseMulti
Stability improvements for deformable.
2020-05-21 09:47:33 -07:00
Xuchen Han
243aa4ac1f switch to a lower default threshold of CR solver for fewer iterations 2020-05-20 17:57:16 -07:00
Xuchen Han
d1d2dad2e6 do not apply deformable contact impulse to points and faces constrained in rigid/deformable solve 2020-05-20 17:56:20 -07:00
Xuchen Han
65978cb58b revert experimental changes to collision padding 2020-05-20 17:55:03 -07:00
Xuchen Han
a9030011e7 add and substract split impulse velocity after sleeping check 2020-05-18 15:23:57 -07:00
Stephen Gold
245bacd6ac btAlignedAllocator: filename args should be const char* 2020-05-17 23:18:02 -07:00
Stephen Gold
c1bc1a3688 btCollisionObject.h: add getters for m_objectsWithoutCollisionCheck 2020-05-13 03:24:49 -07:00
Xuchen Han
15f3e144f6 Merge remote-tracking branch 'origin/master' into splitImpulseMulti 2020-05-11 15:55:32 -07:00
Xuchen Han
5f2ac5e922 parameter tuning 2020-05-11 15:54:15 -07:00
Xuchen Han
607ddc25b7 make deformable collision detection wider 2020-05-11 15:53:54 -07:00
Xuchen Han
e4df217284 bug fix 2020-05-11 12:05:02 -07:00
Xuchen Han
cb1cd969a8 allow positive penetration to pose inactive constraints for more stability 2020-05-08 16:51:53 -07:00
Xuchen Han
7069d51eae Reduce deformable erp for more stability 2020-05-08 16:37:17 -07:00
Chuyuan Fu
9d6053a8ff Add writing surface mesh file for tetrahedron mesh 2020-05-07 17:23:12 -07:00