erwincoumans
c254768d1a
Merge pull request #1793 from jslee02/fix_build_clang6
...
Fix build errors with Clang 6 (also resolve #1510 )
2018-07-19 09:20:42 +02:00
Jeongseok Lee
8b26945f8f
Fix build errors with Clang 6 (also addresses #1510 )
2018-07-18 12:02:36 -07:00
Jeongseok Lee
8857638ded
Revert C++ code changes to make the PR small
2018-07-18 11:57:34 -07:00
erwincoumans
a8d81eb155
Merge pull request #1787 from jslee02/multibody_cleanup
...
Minor code optimization in multibody forward dynamics
2018-07-18 10:19:02 +02:00
Jeongseok Lee
6323309f89
Fix c++11-narrowing errors in multibody examples
2018-07-10 09:22:41 -07:00
Jeongseok Lee
6f27baf392
Revert "Fix c++11-narrowing errors in multibody examples"
...
This reverts commit 64db9af036 .
2018-07-10 09:21:49 -07:00
Jeongseok Lee
64db9af036
Fix c++11-narrowing errors in multibody examples
2018-07-10 09:20:00 -07:00
Jeongseok Lee
3d1cd749b4
Add Travis CI settings for Xenial and Bionic
2018-07-09 21:57:57 -07:00
Jeongseok Lee
deea2bb411
Use const reference for referencing existing members
2018-07-09 20:59:29 -07:00
Jeongseok Lee
6dbdf02808
Minor code optimization in multibody forward dynamics
2018-07-09 20:54:13 -07:00
Jeongseok Lee
15258fbdcc
Merge remote-tracking branch 'upstream/master' into multibody_cleanup
2018-07-09 14:58:23 -07:00
erwincoumans
3d5c921495
Merge pull request #1782 from RanTig/userdata
...
Changes UserData to use global identifiers and makes linkIndex optional.
2018-07-09 11:36:51 +02:00
erwincoumans
d6aae09290
Merge pull request #1780 from erwincoumans/master
...
PyBullet: preliminary DART and MuJoCo backend code (mostly empty placeholders)
2018-07-09 11:25:33 +02:00
Erwin Coumans
f8cc33f3a3
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-07-08 11:24:37 +02:00
Erwin Coumans
127b82ec1b
expose texture unique id after loading URD file, so you can restore to the original texture after changing it to a custom texture. See also getTextureUid.py example.
2018-07-08 11:23:12 +02:00
Tigran Gasparian
49684144dc
Some minor formatting fixes
2018-07-05 16:01:03 +02:00
Tigran Gasparian
8a6db042de
Removes int initializer in SharedMemoryUserDataHashKey, changes '>>' into '> >' for nexted templates.
2018-07-04 14:25:48 +02:00
Tigran Gasparian
7c7e8af717
Increases the shared memory magic number.
2018-07-04 10:22:44 +02:00
Erwin Coumans
2ce1e65b53
PyBullet: tweak in TCP server for VR - ROS bridge
2018-07-03 16:30:54 -07:00
Erwin Coumans
c0183d4834
Merge remote-tracking branch 'bp/master'
2018-07-03 16:28:45 -07:00
Tigran Gasparian
9c7aa3a863
Changes UserData to use global identifiers and makes linkIndex optional.
...
This removes the need to specify the body id/link index when retrieving a user data entry.
Additionally, user data can now optionally be set to visual shapes as well.
The following public pybullet APIs have changed (backwards incompatible)
addUserData and getUserDataId
Makes linkIndex parameter optional (default value is -1)
Adds optional visualShapeIndex parameter (default value is -1)
getUserData and removeUserData
Removes required parameters bodyUniqueId and linkIndex
getNumUserData
Removes required bodyUniqueId parameter
getUserDataInfo
Removes required linkIndex parameter
Changes returned tuple from (userDataId, key) to (userDataId, key, bodyUniqueId, linkIndex, visualShapeIndex)
2018-07-03 17:45:19 +02:00
erwincoumans
23f235e449
PyBullet: add example to enable another physics engine backend (DART, MuJoCo)
2018-07-01 14:49:34 -07:00
erwincoumans
98fc4b1510
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-07-01 14:42:48 -07:00
erwincoumans
0d8564db22
PyBullet: added preliminary DART and MuJoCo backend files, MuJoCo can loadMJCF, stepSimulation and getBasePositionAndOrientation, DART is empty.
...
PyBullet: add 2d biped example.,
2018-07-01 14:42:32 -07:00
Erwin Coumans
bfc85ff1fd
PyBullet: TCP connection, optimized getVREvents to allow faster Windows -> Linux Vive tracking state communication.
2018-06-27 23:43:42 -07:00
erwincoumans
04556502f0
Merge pull request #1778 from erwincoumans/master
...
fix hidden API
2018-06-27 09:21:11 -07:00
Erwin Coumans
ac59886960
fix hidden API
2018-06-27 07:39:56 -07:00
erwincoumans
c531234f3a
Merge pull request #1774 from erwincoumans/master
...
PyBullet: allow to replace existing debug lines in addUserDebugLine t…
2018-06-26 10:40:40 -07:00
Erwin Coumans
6549b0a586
re-enable optional tracking of memory allocations (disabled by default)
2018-06-26 09:19:10 -07:00
Erwin Coumans
dffff4d3b6
Merge remote-tracking branch 'bp/master'
2018-06-26 08:58:38 -07:00
erwincoumans
e023d94b32
Merge pull request #1775 from bingjeff/marios_fix_global_variables
...
remove some debug globals from third_party/bullet
2018-06-26 08:58:27 -07:00
Erwin Coumans
21b089b0d7
Merge remote-tracking branch 'bp/master'
2018-06-26 08:57:44 -07:00
erwincoumans
1b69e22df6
Merge pull request #1776 from YunfeiBai/master
...
Remove the pdController when maxForce = 0
2018-06-26 08:54:40 -07:00
YunfeiBai
812c229736
Remove the pdController when maxForce = 0
2018-06-24 17:06:16 -07:00
Jeffrey Bingham
f2afb4af35
remove some debug globals from third_party/bullet
...
There are some debug global variables that prevent using bullet safely on multi-threaded environments (tsan failures).
PATCH from marioprats@
2018-06-23 22:01:41 -07:00
Erwin Coumans
2c881d0b74
bump up pybullet version to 2.0.9
2018-06-23 11:53:12 -07: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
erwincoumans
6b2cae1b1d
Merge pull request #1769 from RanTig/parallel_raycast_fix
...
Several fixes for the parallel raycasts
2018-06-22 15:49:56 -07:00
Tigran Gasparian
618e3230a4
Fix: Use function context reference instead of value
2018-06-22 20:41:02 +02:00
erwincoumans
09751a0b6b
Merge pull request #1770 from erwincoumans/master
...
PyBullet urdfEditor use in example, PyBullet.setPhysicsEngineParameter: only update solverResidualThreshold if needed
2018-06-22 11:06:37 -07:00
erwincoumans
784f0fdc04
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-06-22 09:28:14 -07:00
erwincoumans
55e185fe39
PyBullet loadURDF in useMaximalCoordinated=True (btRigidBody), support lower/upper limits for revolute joints.
2018-06-22 09:28:07 -07:00
Erwin Coumans
092e39a9e5
PyBullet urdfEditor example, use the pybullet_utils version (more up-to-date)
2018-06-22 09:18:55 -07:00
Erwin Coumans
fcde193d52
PyBullet.setPhysicsEngineParameter: only update solverResidualThreshold if valid values is given
2018-06-20 13:18:08 -07:00
Tigran Gasparian
b84eb8af74
Several fixes for the parallel raycasts
...
- Limits the maximum number of threads to 64, since btThreadSupportPosix
and btThreadsupportWin32 don't support more than 64 bits at this moment,
due to the use of UINT64 bitmasks. This could be fixed by using
std::bitset or some other alternative.
- Introduces a threadpool class, b3ThreadPool, which is a simple wrapper
around btThreadSupportInterface and uses this instead of the global task
scheduler for parallel raycasting. This is actually quite a bit faster
than the task scheduler (~10-15% in my tests for parallel raycasts),
since the advanced features (parallelFor) are not necessary for the
parallel raycasts.
- Puts 16*1024 of MAX_RAY_INTERSECTION_MAX_SIZE_STREAMING in
parentheses, since it otherwise causes problems with other operators
of equal precedence and introduces a smaller constant for Apple targets.
- Refactors the parallel raycasts code and adds some more profiling.
2018-06-19 18:41:42 +02:00
erwincoumans
8c851a70c7
Merge pull request #1766 from erwincoumans/master
...
lazy creation of batch scheduler, it causes issues with the physics.
2018-06-16 14:02:11 -07:00
erwincoumans
42c9d9aa3c
lazy creation of batch scheduler, it causes issues with the physics.
2018-06-16 13:59:03 -07:00
erwincoumans
046d95b7e6
Merge pull request #1765 from erwincoumans/master
...
PyBullet: deal with backward compatibility of b3RaycastBatchAddRay
2018-06-16 13:09:17 -07:00
Erwin Coumans
9b0845a0f1
Merge remote-tracking branch 'bp/master'
2018-06-16 12:30:39 -07:00
erwincoumans
c55720fb41
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-06-16 12:28:38 -07:00
erwincoumans
7924d51665
PyBullet: deal with backward compatibility of b3RaycastBatchAddRay:
...
use b3RaycastBatchAddRays API to enable MAX_RAY_INTERSECTION_BATCH_SIZE_STREAMING num rays.
Old API (b3RaycastBatchAddRay) sticks to 256 rays, MAX_RAY_INTERSECTION_BATCH_SIZE.
2018-06-16 12:28:21 -07:00
Erwin Coumans
9326fff75a
PyBullet: bump up version to 2.0.8
2018-06-16 11:02:04 -07:00
erwincoumans
ec37495142
Merge pull request #1761 from erwincoumans/master
...
bump up pybullet version
2018-06-16 10:47:28 -07:00
Erwin Coumans
b94df12081
add missing pthread link in App_HelloBulletRobotics
2018-06-16 10:20:43 -07:00
erwincoumans
04d03d10be
Fix memory leak due to batchRayCast never deleting the btTaskScheduler.
...
(and issue with TaskScheduler/btTaskScheduler.cpp, add JobQueue::exit, call it first, since it uses the m_threadSupport which was deleted before the destrucor was called.
Use a hashmap to store user timers, to avoid allocating many identical strings.
2018-06-16 09:37:53 -07:00
erwincoumans
cb1fce7899
revert exposing getSharedMemoryStreamBuffer / adding to command structure
...
use 16k rays by default
add uploadRaysToSharedMemory method
2018-06-16 08:14:00 -07:00
erwincoumans
23f9250e04
Merge remote-tracking branch 'bp/master'
2018-06-16 06:58:10 -07:00
erwincoumans
d660042d76
Merge pull request #1763 from YunfeiBai/master
...
Add the pdControlPlugin to the joint control C API, and add the PD co…
2018-06-16 06:57:50 -07:00
erwincoumans
75ec8f3fd9
PyBullet: add batchRayCast.py example
2018-06-16 06:20:15 -07:00
erwincoumans
f517b03534
Expose pushProfileTimer / pop ProfileTimer in PhysicsClient API to benchmark Python parts of PyBullet.
...
reduce 'm_cooldownTime' from 1000 microseconds to 100 microseconds (overhead in raycast is too large)
If needed, we can expose this cooldown time.
Replace malloc by btAlignedObjectArray (going through Bullet's memory allocator)
2018-06-16 06:19:49 -07:00
erwincoumans
bb8cbcdaae
Merge remote-tracking branch 'bp/master'
2018-06-16 06:06:18 -07:00
erwincoumans
5b3e43d4d8
Merge pull request #1760 from RanTig/ParallelRaycasts
...
Adds multithreading support for batch ray casts.
2018-06-16 05:54:34 -07:00
erwincoumans
c9bbd80dc0
Merge pull request #1762 from alexis-jacq/patch-2
...
isAlive method forcing done=False for halfcheetah
2018-06-16 05:32:42 -07:00
Alexis David Jacq
6adea4964f
forgot one "isAlive" to change
2018-06-16 14:00:05 +02:00
Alexis David Jacq
50b5edd7b5
isDone instead of isAlive
2018-06-16 13:53:05 +02:00
Erwin Coumans
fbbd675ed6
expose PyBullet API to wakeup/put objects to sleep, enable/disable deactivation
...
fix wakeup -> reset deactivation clock
2018-06-15 21:26:26 -07:00
YunfeiBai
1c0de3c4cb
Add the pdControlPlugin to the joint control C API, and add the PD control mode (also available in pybullet). Modify the pdControl pybullet example to use the PD control mode with setJointMotorControl API.
2018-06-15 17:59:26 -07:00
Erwin Coumans
bb0d70d98b
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-06-15 10:27:37 -07:00
Erwin Coumans
1e559feb8f
add preliminary vision60 urdf model (no real sizes, no real masses etc)
2018-06-15 10:26:42 -07:00
Alexis David Jacq
292a3f1cf6
methode isAlive
...
Method def isAlive(self), which defaults to return self._alive < 0, and each environment can override this method (Half Cheetah would implement return False)
(In response to https://github.com/alexis-jacq/bullet3/commit/bea468fb93041149fb7dd0373a19000b1ba1ab52 )
2018-06-15 17:55:20 +02:00
Tigran Gasparian
54986593c5
.
2018-06-15 17:46:31 +02:00
Tigran Gasparian
0b1dca3d9c
Updates the documentation for the pybullet function rayTestBatch to include the numThreads parameter.
2018-06-15 17:46:12 +02:00
Alexis David Jacq
a57c480f28
Update gym_locomotion_envs.py
...
As suggested in https://github.com/bulletphysics/bullet3/pull/1759 . The default isDone lets done = alive<0, and a special case is made for halfcheetah, forcing done=False.
I had to pass the 'alive' condition as an additive parameter of WalkerBaseBulletEnv.
2018-06-15 17:38:35 +02:00
Erwin Coumans
976fea4eca
fix saveRestoreState.py example
2018-06-15 08:31:39 -07:00
Tigran Gasparian
d244cf6061
Changes the default number of rays per thread from 32 to 16, when the user lets Bullet decide.
2018-06-15 17:13:10 +02:00
Tigran Gasparian
08409cae9f
Adds multithreading support for batch ray casts.
...
To enable the feature, enable the BULLET2_MULTITHREADING option.
Increases the number of rays that can go in a batch request by storing
them in the shared memory stream instead of the shared memory command.
Adds the API b3RaycastBatchSetNumThreads to specify the number of
threads to use for the raycast batch, also adds the argument numThreads
to the pybullet function rayTestBatch.
Rays are distributed among the threads in a greedy fashion there's a shared
queue of work, once a thread finishes its task, it picks the next
available ray from the task. This works better than pre-distributing the
rays among threads, since there's a large variance in computation time per ray.
Some controversial changes:
- Added a pointer to PhysicsClient to the SharedMemoryCommand struct, this
was necessary to keep the C-API the same for b3RaycastBatchAddRay, while
adding the ray to the shared memory stream instead of the command
struct. I think this may be useful to simplify other APIs as well, that
take both a client handle and a command handle.
- Moved #define SHARED_MEMORY_MAX_STREAM_CHUNK_SIZE to
SharedMemoryPublic. This was necessary for the definition of
MAX_RAY_INTERSECTION_BATCH_SIZE.
2018-06-15 16:47:04 +02:00
Erwin Coumans
0080cf7ed1
bump up pybullet version to 2.0.7
2018-06-13 22:36:12 -07:00
erwincoumans
997211650e
Merge pull request #1757 from erwincoumans/master
...
PyBullet.loadURDF, expose flags=URDF_INITIALIZE_SAT_FEATURES
2018-06-14 02:35:09 +00:00
erwincoumans
25c5e87dc2
PyBullet.loadURDF, expose flags=URDF_INITIALIZE_SAT_FEATURES
2018-06-13 15:35:56 -07:00
erwincoumans
946a59f2fe
Merge pull request #1756 from bulletphysics/erwincoumans-patch-4
...
Update btConvexConvexAlgorithm.cpp
2018-06-13 15:30:58 +00:00
erwincoumans
5f203df65a
Update btConvexConvexAlgorithm.cpp
2018-06-13 07:47:14 -07:00
erwincoumans
b75c63f2a2
Merge pull request #1755 from erwincoumans/master
...
path -> const
2018-06-13 04:40:38 +00:00
Erwin Coumans
c27fb4003e
path -> const
2018-06-12 21:26:34 -07:00
erwincoumans
ce9f29e416
Merge pull request #1752 from bulletphysics/erwincoumans-patch-2
...
Update b3RobotSimulatorClientAPI_NoDirect.h
2018-06-13 04:18:26 +00:00
erwincoumans
4f0959a136
Update b3RobotSimulatorClientAPI_NoDirect.h
2018-06-12 21:17:43 -07:00
erwincoumans
6376197e5e
Merge pull request #1749 from erwincoumans/master
...
remove getLinkState from API, it automatically calculated forwardKine…
2018-06-13 03:38:36 +00:00
Erwin Coumans
e24da97140
revert GJK change yet again, some degenerate case / regression
2018-06-12 19:52:38 -07:00
erwincoumans
ce47fcc7f2
Merge pull request #1751 from bulletphysics/erwincoumans-patch-1
...
Update btOverlappingPairCache.h
2018-06-13 02:50:05 +00:00
erwincoumans
437d66f9b4
Update btOverlappingPairCache.h
...
processAllOverlappingPairs : don't call own method, call the default one without dispatchInfo. Thanks James Dolan, fixes Issue #1750
2018-06-12 19:04:31 -07:00
erwincoumans
08d84d6ce3
fix getLinkState usage
2018-06-12 17:00:16 -07:00
erwincoumans
4d6741f5cd
PyBullet: expose STATE_LOGGING_ALL_COMMANDS and STATE_REPLAY_ALL_COMMANDS
...
See examples/pybullet/examples/commandLogAndPlayback.py for an example.
2018-06-12 16:56:45 -07:00
erwincoumans
459d07a302
add example for enableSAT, using separating axis test (instead of GJK) for contact between polyhedral convex hull shapes (and convex hull vs triangle in a concave triangle mesh)
2018-06-12 16:10:49 -07:00
erwincoumans
97c6937388
Simplify GJK. Still needs double precision for large differences of feature scales.
...
Extract faces directly from btConvexHullComputer (in initializePolyhedralFeatures), instead of reconstructing them, thanks to Josh Klint in #1654
PyBullet: use initializePolyhedralFeatures for convex hulls and boxes (to allow SAT)
PyBullet: expose setPhysicsEngineParameter(enableSAT=0 or 1) to enable Separating Axis Test based collision detection for convex vs convex/box and convex versus concave triangles (in a triangle mesh).
2018-06-12 16:08:46 -07:00
erwincoumans
a342af0382
remove getLinkState from API, it automatically calculated forwardKinematics and propagates velocities, which is very expensive.
2018-06-11 23:49:34 -07:00
erwincoumans
9f79011582
Merge pull request #1748 from erwincoumans/master
...
different way of sorting pairs, exposed a few more methods in the C++ b3RobotSimulatorClientAPI
2018-06-12 01:00:04 +00:00
erwincoumans
62485abafe
PyBullet: disable deterministic pairs by default
...
PyBullet: Only set static when sleeping is enables (todo: figure out issue with determinism)
2018-06-11 17:32:44 -07:00
Erwin Coumans
ad0c7ecaa2
different way of sorting pairs (using indexing), don't 'clear' all pairs.
2018-06-11 14:42:26 -07:00
Erwin Coumans
38469deec7
getNumLinks -> getNumDofs, to make sure fixed objects don't transfer activation state
2018-06-11 11:41:33 -07:00
erwincoumans
fc61a3531e
Merge remote-tracking branch 'bp/master'
2018-06-11 08:35:14 -07:00
erwincoumans
6fb3cf7a43
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-06-11 08:34:37 -07:00