Commit Graph

55 Commits

Author SHA1 Message Date
Erwin Coumans
e97b751781 further work on urdfEditor.py, fix some serialization issues 2018-01-08 12:25:56 -08:00
Erwin Coumans
0326fa93a8 made some progress in saving and restoring the state during the simulation, with identical results.
Option to de/serialize btPersistentContactManifolds and fix lossy conversion during btMultiBody de/serialization of base world transform
(serialize the quaternion, not the converted 3x3 matrix)
There are still several caches not taken into account, and btMultiBody links/constraints are not deserialized yet etc.
See examples\pybullet\examples\saveRestoreState.py for an example.
2017-12-30 14:19:13 -08:00
erwincoumans
29aa9cb789 Bullet bump up to version 2.88
add preliminary support to import btMultiBody from a .bullet file (will help save/restore state)
fix some Windows char/widechar issues
2017-11-22 18:12:02 -08: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
erwincoumans
c0a9b9cf44 Update btSerializer.cpp 2017-01-28 12:23:01 -08:00
erwincoumans
735568d3ee Update btSerializer.cpp
accidently added an additional line in btSerializer.cpp
2017-01-28 12:19:35 -08:00
erwin coumans
f74a35bacb serialization structures update, needed to be done since
recent addition of src/BulletCollision/CollisionDispatch/btCollisionObject.h
recent (since august 26, 2016) serialization dumps my be corrupt.
2016-11-03 07:11:31 -07: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
erwincoumans
fe92de3e50 add infrastructure float btMultiBodyLink m_jointDamping, m_jointFriction (actual damping/friction is in a separate commit)
add door.urdf for testing damping/friction
2016-03-17 14:54:46 -07:00
erwincoumans
f6f76901fd First draft of btMultiBody serialization, including optional names for base, link and joints (see ImportURDFDemo/ImportURDFSetup.cpp how this is done)
Bump up version number to 2.84 because of new serialization data.
2015-07-09 17:36:00 -07:00
Gabor Puhr
98e1334a64 Auto limitation of spring stiffness and damping in btGeneric6DofSpring2Constraint is now optional.
Fix: spring stiffness limitation used the mass incorrectly in btGeneric6DofSpring2Constraint.
2015-05-22 12:58:28 +02:00
erwincoumans
89aeae9102 Add serialization support for btGeneric6DofSpring2Constraint
Attempt to re-order serialization data so it can be serialized in-memory (for deep copy)
2014-09-16 09:22:35 -07:00
erwin.coumans
c28652de37 add serialization for btGearConstraint
support 'linearFactor' and 'angularFactor' for btRigidBody world importer
2013-09-14 17:51:09 +00:00
erwin.coumans
6fd4738a9e use the old data structures for single precision serialization, to make it backwards compatible
So files created by the new double precision serialization of Bullet 2.82 cannot be read by old Bullet versions,
but double precision serialized file generated by older Bullet versions can be read by Bullet 2.82 or newer.
2013-09-14 16:49:31 +00:00
erwin.coumans
e22a11c021 update serialization structures 2013-09-14 06:22:22 +00:00
erwin.coumans
1aac33f6b6 refactor constraint serialization, so that double precision is maintained,
changes are backwards compatible (btBulletWorldImporter can load old .bullet files)
but not forwards compatible (constraints in new .bullet files are ignored/unrecognized by old Bullet SDK)
This commit is for Issue 734. Some more work needs to be done for btGImpactMeshShapeDoubleData and thus btStridingMeshInterfaceDoubleData and btMeshPartDoubleData
2013-09-14 06:08:50 +00:00
erwin.coumans
e94a2137b0 minor update manual
fix vehicle demo (heightfield is broken, when using very large scaling factor)
add btConeShape serialization, see Issue 725
add btGearConstraint get/set, see Issue 685 and Issue 671
2013-09-13 16:34:39 +00:00
erwin.coumans
197e17780a replace 'float' by 'double' in btHingeConstraintDoubleData. See Issue 734 2013-09-03 16:46:18 +00:00
erwin.coumans
f2c9cdfb11 add m_rollingFriction to serialization structures
add btContactSolverInfo and gravity to serialization structures
(actual serialization code will follow soon)
2012-09-21 23:37:24 +00:00
erwin.coumans
d99d9779a2 cast to char to avoid C++11 issue
Fixes Issue 716.
2012-09-11 03:58:11 +00:00
erwin.coumans
1b7642f0f5 Prepare for 2.81 release, increase version numbers
Fixed DNA serialization for C++11: avoid negative char values
Fixes 617. (needs to be tested)
2012-09-11 03:49:50 +00:00
erwin.coumans
28de5ea030 unsigned char -> char for serialization data structures.
See Issue 604
2012-03-05 23:38:36 +00:00
erwin.coumans
710954d772 Constraints can override their own number of solver iterations (either more or less than the default) or leave it default (-1)
Bump version to 2.80
2012-03-03 03:07:18 +00:00
erwin.coumans
7c3db274c2 add support for btScaledBvhTriangleMeshShape serialization (export and import through btBulletWorldImporter) 2011-03-12 20:25:03 +00:00
erwin.coumans
bcb08a93f8 update serialization structures 2011-03-12 04:39:24 +00:00
erwin.coumans
4ba9cfa5a4 trim some un-needed data from softbody joint serialization 2010-12-16 02:54:11 +00:00
erwin.coumans
dd7ee6919e serialize btGeneric6DofSpringConstraint
serialize btSoftBody::Joint
See also Issue 456
2010-12-16 02:35:44 +00:00
erwin.coumans
ba5012973d Make argument to btDefaultSerializer optional, and use zero by default. This will dynamically allocate data, so there is no need to guess the maximum size anymore.
Remove some cached data from SoftBodyLinkData, to reduce serialization file size.
2010-12-04 01:23:31 +00:00
erwin.coumans
6173a30bce Improved BulletSoftBody serialization, added cluster support. Joints and copying data from GPU back to softbody are the main todo.
Updated the Bullet/Demos/SerializeDemo to load .bullet files with the softbody data.

BulletSoftBody should use getWorldTransform and not getInterpolationWorldTransform
Fix btBulletWorldImporter so that it creates a copy of the index/vertex data, this prevents crashes when deleting the .bullet file with triangle meshes.
2010-12-03 03:11:21 +00:00
erwin.coumans
032c6bfe2c add initial support for soft body / cloth serialization, and updated SerializeDemo to load soft bodies/cloth.
Serializes soft body nodes (vertices), links, faces, tetrahedra, materials, anchors with rigid bodies.
Some todo's are serialization of pose, constraints between soft bodies
2010-12-01 05:55:08 +00:00
erwin.coumans
81f04a4d48 fix: some file didn't have the svn:eol-style native yet 2010-03-06 15:23:36 +00:00
erwin.coumans
8fbe399ea4 Make .bullet serialization mode robust:
Deal with broken DNA serialization. Bullet 2.76 release revision 2035 - 2046 was broken, and this includes the Maya Dynamica plugin.
Added some workaround to deal with the broken .bullet files, instead of crashing.
2010-03-02 09:32:34 +00:00
erwin.coumans
d5ea1d569f for for btBvhTriangleMeshShape with short int indices serialization
disable bvh serialization, it has issues (needs testing)
2010-02-27 09:16:42 +00:00
erwin.coumans
8383d76c42 revert DNA change in previous commit 2010-02-25 20:18:40 +00:00
erwin.coumans
40dc18f604 remove Extras/obsolete/quickstep
improve serialization based on feedback: make it easier to serialize a single object, or single shape, or single bvh.
Modified Bullet/Demos/ConcaveDemo to use btSerializer to serialize the btOptimizedBvh (or optionally the trimesh+bvh)

You can also serialize trimesh without BVH, use:
serializer->setSerializationFlags(BT_SERIALIZE_NO_BVH);//	or BT_SERIALIZE_NO_TRIANGLEINFOMAP
2010-02-25 20:12:40 +00:00
erwin.coumans
9c1d134f2f add support for btTriangleInfoMap serialization (needs testing) 2010-02-24 03:22:34 +00:00
erwin.coumans
41e9115bca Add support to serialize btOptimizedBvh/btQuantizedBvh for a btBvhTriangleMeshShape (using the new btSerializer). This is a new implementation, with full cross-platform support.
So it is different from the in-place method (btQuantizedBvh::serializeInPlace/deserializeInPlace).

It is also possible to serialize/deserialize just the bvh, using the btSerializer (needs some code snippet/helper)
See also http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=4770
2010-02-23 09:03:46 +00:00
erwin.coumans
8594a0d8bd accidently removed 64bit serialization DNA in previous commit, re-adding 2010-02-19 23:39:55 +00:00
erwin.coumans
85724b5500 SerializeDemo: create a testFile.bullet if it is missing
Serialization: remove obsolete autogenerated headers
Minor changes in btSequentialImpulseConstraintSolver: split methods to make it easier to derive from the class and add functionality.
2010-02-19 23:24:04 +00:00
erwin.coumans
99d9fddc42 add name for collision shape and constraint serialization (to objects, shapes and constaints can be mapped to user data)
updated serialization structures and header files (for new 'm_name' field, replacing user pointer)
fix issue with  btGeneric6DofConstraint::setParam in headerfile
2010-02-04 05:28:17 +00:00
erwin.coumans
58c5630d7f Add new demos to cmake: SerializeDemo and InternalEdgeDemo
Fix in btShapeHull for previous commit
Add support to serialize name for objects
Updated serialization structures.
2010-02-04 01:07:07 +00:00
erwin.coumans
37f6df2c32 added serialization support for gimpact mesh
improved cmake build system for updating the serialization structures
2010-01-29 02:50:34 +00:00
erwin.coumans
00f58e5a91 added basic serialization for several constraints including btPoint2PointConstraint, btHingeConstraint, btSliderConstraint, btConeTwistConstraint, btGeneric6DofConstraint
(no motor support or advanced settings yet)
added btStaticPlaneShape serialization
Added toggle in cmake for BenchmarksDemo to enable/disable graphics rendering
2010-01-27 02:13:56 +00:00
erwin.coumans
44565d20f4 added serialization support for btCompoundShape, btCapsuleShapeX/Z, btCylinderShapeX,Z
make some serialization methods const
prepare for constraint serialization
2010-01-26 02:24:03 +00:00
erwin.coumans
362a0faf0f re-add 64bit serialization structures 2010-01-25 21:59:58 +00:00
erwin.coumans
a7a6ab8835 Add BulletWorldImporter: it takes the in-memory data from BulletFileLoader and instantiates objects in a BulletDynamicsWorld.
Note that BulletFileLoader is has no dependencies on BulletDynamics/BulletCollision.
Also added a custom build step to copy asset (.bullet and .obj file) into the executable folder
Made a few 'char*' 'const char*' to avoid compiler warnings
2010-01-25 21:58:32 +00:00
erwin.coumans
e7ff71d99b add support for double precision and 64bit serialization (and compatibility between all versions)
fix some issue in serialization of nested array data
add some tesing files
2010-01-25 19:42:51 +00:00
erwin.coumans
5d8e6dc3f3 improved btTriangleMeshShape/btBvhTriangleMeshShape serialization 2010-01-24 16:48:14 +00:00
erwin.coumans
9d7d1c3983 more work on serialization, initial for btTriangleMeshShape/btBvhTriangleMeshShape (only for floating point vertices, integer indices) work-in-progress 2010-01-23 20:59:41 +00:00
erwin.coumans
5378cf4c8a more work on Bullet serialization (added support for btConvexHullSupport) 2010-01-23 00:58:47 +00:00