Commit Graph

133 Commits

Author SHA1 Message Date
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
2cab56d6ef prepare build system(s) for collisionFilterPlugin 2018-07-27 15:48:24 +02:00
Michael Beardsworth
3f03b41091 Renamed error_message and warning_message macros.
error_message and warning_message are common strings that are likely to
collide. Renamed to bt_id_{error,warning}_message to more strongly
uniquify.

grep -r error_message -l src/BulletInverseDynamics | \
  xargs sed -i -e "s/error_message/bt_id_error_message/g"

grep -r warning_message -l src/BulletInverseDynamics | \
  xargs sed -i -e "s/warning_message/bt_id_warning_message/g"
2018-07-24 11:32:08 -07:00
erwincoumans
046a86cd84 add premake4.lua build for BulletRobotics target, C++ API, similar to PyBullet. Use BulletRobotics target for App_HelloBulletRobotics (without GUI) and App_RobotSimulator 2018-06-08 19:14:03 -07:00
erwincoumans
b6f5cb4c34 enable pdControlPlugin by default (requires pdControlPlugin.cpp and b3RobotSimulatorClientAPI_NoDirect.cpp)
add pdControl.py example, make pdControlPlugin functional
reduce memory usage
fix examples/pybullet/gym/pybullet_data/random_urdfs/948/948.urdf, fixes issue #1704
2018-06-05 15:59:01 -07:00
Erwin Coumans
7bd84740d7 PyBullet / BulletRobotics: prepare for pdControlPlugin and collisionFilterPlugin
Split examples/SharedMemory/b3RobotSimulatorClientAPI_NoGUI.* and move to examples/SharedMemory/b3RobotSimulatorClientAPI_NoGUI.cpp and examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.cpp
2018-06-05 11:41:41 +10:00
Erwin Coumans
ff4d0b1777 add HelloBulletRobotics C++ example with similar API to PyBullet
Add ANYmal quadruped robot URDF to pybullet_data
2018-05-24 15:48:45 +10:00
nbelakovski
e6a5ff7d5a
Fixing include line of btMultibodyWorldImporter.h to work with installed bullet files
When running make install for Bullet, no "Extras/" folder is created, so the include line as is will fail. This modification should work since the relevant header is in the same folder as this header.
2018-04-17 11:59:04 -07:00
erwincoumans
dbb0318782 fixes related to tinyxml2 2018-04-12 12:46:43 -07:00
erwincoumans
9c77e07494 upgrade from tinyxml to tinyxml2 2018-04-12 00:09:44 -07:00
Alexey Anikeenko
feaa21e33c Fix import of spherical joint state
Spherical joints in btMultiBody have 4 positional variables.
2018-03-05 01:33:15 +07:00
Erwin Coumans
77ddc8a16f fix makesdna on Mac OSX 2018-02-14 15:41:10 -08:00
Erwin Coumans
508550c5e9 fix premake build for linux, thanks to @consultit
See also issue #1538
2018-02-09 18:46:26 -08:00
erwincoumans
b692ec87f7 fix #3 2018-02-02 20:22:53 -08:00
erwincoumans
f119cff516 fix #2 for pthread/dl 2018-02-02 19:38:39 -08:00
erwincoumans
329a1f5a74 PyBullet: move TinyRenderer into a plugin, default statically loaded. You can also dynamically load a render plugin, as shown in renderPlugin.py example. premake has a way to compile the tinyRendererPlugin. 2018-01-17 12:48:48 -08:00
erwincoumans
c4b1b84687 Enable 'global absolute velocities' by default for btMultiBody. See 8.3.2B Proposed resolution Jakub Stepien PhD Thesis
https://drive.google.com/file/d/0Bz3vEa19XOYGNWdZWGpMdUdqVmZ5ZVBOaEh4ZnpNaUxxZFNV/view?usp=sharing
Fixes crashes due to rendering of softbody wireframe in the wrong thread (needs to be in 'debug' rendering section)
Use btCapsuleShapeZ instead of btMultiSphereShape when converting MJCF MuJoCo capsules using fromto
2018-01-09 22:47:56 -08:00
erwincoumans
15a429f1bf premake build system fixes 2018-01-09 12:23:25 -08:00
Erwin Coumans
e97b751781 further work on urdfEditor.py, fix some serialization issues 2018-01-08 12:25:56 -08:00
Erwin Coumans
35b44f8a85 implement pybullet.saveState command, for in-memory storage of state.
bump up pybullet API version (SHARED_MEMORY_MAGIC_NUMBER) to 201801010
2017-12-31 15:37:16 -08:00
Erwin Coumans
f104765c47 added some template to restore (syncMultiBody, syncContactManifolds) for single float and double precision, in 'pybullet.restoreState' 2017-12-31 11:19:29 -08:00
Erwin Coumans
20e00d11d8 further work on saveRestoreState.py 2017-12-30 21:57:42 -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
Erwin Coumans
22e23d22d1 double/single precision compile fix 2017-12-28 12:55:47 -08:00
Erwin Coumans
97547eda0d preliminary work towards saveState/restoreState and saveRestoreState.py example (not implemented yet)
allow multiple options in connect, for example: p.connect(p.GUI, options="--width=640, --height=480")
2017-12-28 10:05:51 -08:00
Erwin Coumans
799d030874 restore multibody world transform and joint angles/velocities from a .bullet file. 2017-12-22 14:45:36 -08:00
erwincoumans
c8f1efe7dc fix case in include 2017-11-23 09:15:19 -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
erwincoumans
493d7bc94d obj2sdf, add option to merge shapes with same materials, add support for transparent objects
tiny_obj_loader, load the "d" and "Tr" transparant tag
2017-11-04 19:17:20 -07:00
Erwin Coumans
a5a73ba0d8 fix for issue 1400
use default output name for VHACD test binary
2017-10-26 08:11:58 -07:00
Erwin Coumans
41a1362bc5 perform IK in local body-fixed frame
For now, Jacobian, mass matrix and inverse dynamics return results in local coordinates of the tree.
2017-10-24 21:06:44 -07:00
erwincoumans
37cfce99b2 add arguments to plugin system 2017-09-23 07:52:10 -07:00
erwincoumans
2919e51d9d fix loading of empty file (after header)
remove debug printf
2017-09-17 15:44:14 -07:00
Erwin Coumans
c82131d16e cmake fixes 2017-09-06 14:18:35 -07:00
Erwin Coumans
7878f7ace9 Add Extras/BulletRobotics, will be installed as 'Extra Libs' using CMake
Reduce size of command-logfile (used in PhysicsServer (Logging) and PhysicsServer (Log Replay))
Make Bullet3Common and BulletInverseDynamics part of core Bullet libraries (not optional)
2017-09-06 13:18:39 -07:00
erwincoumans
9d0f875c5b fix compile issues due to API change (additional argument) 2017-08-15 09:34:44 -07:00
Erwin Coumans
af0e1d58ef obj2sdf -> don't crash when no name is given, remind user of --fileName=... 2017-06-17 10:24:47 -07:00
Erwin Coumans
87293e835c implement specular, URDF non-standard specular part (see sphere2.urdf) and SDF specular support.
pybullet.changeVisualShape(obUid,linkIndex,specularColor=[R,G,B]) and Bullet C-API b3UpdateVisualShapeSpecularColor
Bug fixes in b3ResourcePath::findResourcePath resolution.
add stadium.sdf and roboschool/models_outdoor/stadium assets https://github.com/openai/roboschool/tree/master/roboschool/models_outdoor/stadium
minor fixes to obj2sdf
2017-06-01 12:32:44 -07: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
Pavel
84fc9b5a98 remove using namespace ConvexDecomposition from library header file 2017-03-04 03:42:17 -08:00
Erwin Coumans
34fc2fb589 create premake/cmake file for Bullet/Extras/obj2sdf
add missing 1.sdf for Bullet/data/kitchens/1.sdf
add support for getting keyboard events (pybullet.getKeyboardEvents and b3RobotSimulatorClientAPI::getKeyboardEvents)
2017-03-02 12:33:22 -08:00
Erwin Coumans
2eb019cdc3 Created Wavefront obj to sdf converter, to make it easier to import complex obj models with many materials. See kitchen for example.
Fix in tinyobj, make sure material is initialized
Add fatihrmutfak kitchen model, for Virtual Reality and some research
2017-03-01 10:06:10 -08:00
Kibeom Kim
761275df28 Add and use BT_ID_* math functions for idScalar. 2017-01-26 11:40:09 -08:00
Erwin Coumans
95e25d9942 fix a few warnings 2017-01-24 08:36:46 -08:00
Erwin Coumans
93471a1c31 cmake Win32 fixes
fixed some more warnings
added alignment macros to some classes
btPersistentManifold from 128 to 16 bytes aligned
prepare command to select collision filter mode (SIM_PARAM_UPDATE_COLLISION_FILTER_MODE)
2017-01-16 13:05:26 -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
erwincoumans
e7cfb656c4 update bullet.h serialization header, matching the dna in Bullet/src/LinearMath/btSerialize.cpp 2016-11-05 11:36:52 -07:00
Erwin Coumans
ffee956dde add VHACD, with the addition of Wavefront .obj export 2016-09-26 07:16:18 -07:00
Matthew Woehlke
7e1d72dfe4 Remove useless const qualifiers from returns
Remove const qualifiers applied to POD return values, as these are
meaningless and ignored by the compiler and are therefore potentially
misleading. (They also trip -Wignored-qualifiers.)
2016-09-16 11:01:03 -04: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
Erwin Coumans
ba8964c4ac [InverseDynamics] Support for Jacobians & derivatives
This change adds support for calculating Jacobians and
dot(Jacobian)*u terms, along with the required support for
the 3xN matrices in the standalone math library.
It also adds functions to compute kinematics only (position, velocity, accel).
To facilitate tests, the Cl also adds a RandomTreeCreator to create
randomized multibody trees.
Thanks to Thomas Buschmann for this contribution!
2016-08-25 16:24:28 -07:00
hujiajie
c9c837cc67 [WIP] Suppress compiler warnings.
Fix Visual Studio warning C4373: previous versions of the compiler did
not override when parameters only differed by const/volatile qualifiers.
2016-07-18 23:09:44 +08: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
f469a2cb49 update to tinyrenderer synthetic camera 2016-05-31 22:55:13 -07:00
erwin coumans
2fc0358750 Expose a better API to allow any render engine to be used for the physics simulation when loading URDF/SDF files.
See bullet3/examples/Importers/ImportURDFDemo/DefaultVisualShapeConverter.h
Give the kuka_iiwa/model.urdf some blue color, not just orange, to mimick the original a bit better
Preparation for the CMD_CAMERA_IMAGE_COMPLETED command, to expose a virtual camera to the robotics API
2016-05-19 18:37:15 -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
Erwin Coumans
aa3daaa8c6 turn test/SharedMemory/test.c into a gtest for CI unit testing in github
remove overly verbose printfs in importers
fix axis in r2d2.urdf
2016-03-15 22:47:53 -07:00
Erwin Coumans
52f074bcb2 Merge remote-tracking branch 'bp/master'
Conflicts:
	examples/ExampleBrowser/CMakeLists.txt
	examples/OpenGLWindow/CMakeLists.txt
2015-12-07 16:42:45 -08:00
Andrew Meadows
c0c1691c25 fix whitespace formatting in cmake files 2015-12-07 14:08:04 -08:00
erwincoumans
0e247264ff use BT_ID_MAX as std::max is not portable (older Visual Studio versions break) 2015-11-24 17:34:43 -08:00
Erwin Coumans
4205e976f6 another fix for dynamic libs of BulletInverseDynamicsUtils 2015-11-24 12:20:59 -08:00
Erwin Coumans
1f4148d322 fix shared lib build 2015-11-24 12:05:50 -08:00
Erwin Coumans
03cc4f0554 add InverseDynamics example for example browser
add CMake support for BulletInverseDynamics and BulletInverseDynamicsUtils
2015-11-24 11:12:02 -08:00
erwincoumans
de763a26e7 fix portability of BulletInverseDynamics (usual issues: std::pow, M_PI, std::vector->idArray<T>::type, snprintf, pass vec3 and mat33 by const reference, not by value) 2015-11-17 21:51:02 -08:00
Erwin Coumans
aa4d119f98 add real-time safe Inverse Dynamics library+test+utils
an example for the example browser will follow.
thanks to Thomas Buschmann
2015-11-17 08:27:38 -08:00
Erwin Coumans
7d9365319c add InverseDynamics test/lib to premake 2015-11-17 08:26:27 -08:00
=
4041748f55 fix warning 2015-09-14 10:45:53 -07:00
=
3d10338ed5 fix warnings (thanks to Aaron!) 2015-09-10 17:52:41 -07:00
Erwin Coumans
2721d67634 remote unused TEST macro, conflicts with other libraries 2015-08-11 08:35:52 -07:00
Erwin Coumans
26531f3fbc fix some warnings, disable gimpact by default in world importer,
use DIRECTLY_UPDATE_VELOCITY_DURING_SOLVER_ITERATIONS by default for now,
until we find the issue with some failing test cases in btMultiBody
fix a crashing issue in MyMultiBodyCreator.cpp (uninitialized variable)
disable excessive debug printf in URDF2Bullet
2015-07-27 13:28:47 -07:00
erwincoumans
6c9ce344ea fix shadowmap crash on some Intel GPUs, see https://github.com/bulletphysics/bullet3/issues/4
remove targetdir from all libraries in premake, so it is much easier to create a separate folder for all binary+lib
transmit the serialized btMultiBody data back from server to client, after the server loads a URDF file. This includes base+link+joint names
tweak the serialization routines, so it is easier to skip pointers and to serialize directly to a shared memory buffer
also tweak the serialization code to allow to process data without 'DNA' schema data (assuming file-DNA = memory DNA)
2015-07-10 22:20:06 -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
Erwin Coumans
59b511a14e add .bullet extension in File/Open on Mac
add importer support for FIXED_CONSTRAINT_TYPE, to be replaced by btGeneric6DofSpring2Constraint
btFixedConstraint now derives from btGeneric6DofSpring2Constraint
2015-05-03 09:23:35 -07:00
erwincoumans
d50242fc27 add starting point for btGeneric6DofSpring2ConstraintData import, not all parameters are deserialized though
restore activation state after picking
add .bullet file import (only tested/available on Windows)
2015-05-01 16:27:09 -07:00
=
99637cbc1a fix HACD crash, thanks to gjaegy
See https://github.com/bulletphysics/bullet3/pull/277
2015-02-12 13:54:19 -08:00
erwin coumans
6e70f285e1 fix a 64-bit issue in the optional 'preSwapFilenameOut' method (this is only use when you want to export a copy of a .bullet file after loading with a different endian-ness) 2014-12-22 14:04:19 -08: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
3c558ec995 explicitly deserialize btCapsuleShape date (margin, scaling, halfextents), because the API modifies them 2014-08-26 17:21:08 -07:00
Erwin Coumans
9ab755fc07 fix build (missing glut include path, #include <algorithm> for std::max in hacdICHull.cpp) 2014-05-13 12:59:32 -07:00
Erwin Coumans
dc491936a2 rename ObsoleteDemos back to Demos
fix some relative path issues for loading assets
2014-05-12 16:12:01 -07:00
erwin coumans
f98f24b697 fix in Extras/Serialize/BulletFileLoader related to optional endian swap between 64bit and 32bit platforms 2014-05-07 08:55:25 -07:00
erwin coumans
2cf7806c87 add the 'extras' and Bullet 2 tests, to make it easier to create a new intermediate release 2014-05-07 08:54:08 -07:00