Erwin Coumans
90f002e07d
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-10-05 19:41:10 -07:00
Erwin Coumans
8a0d96edce
tweaks in pybullet/examples for Mac OSX
2018-10-05 19:40:52 -07:00
erwincoumans
9a7cc7bcd7
add getCameraImageTest.py to compare GUI (with OpenGL3 GLInstancingRenderer), TinyRenderer and DIRECT+eglPlugin (with OpenGL3 GLInstancingRenderer)
2018-10-05 19:31:03 -07:00
erwincoumans
2c13e70d1a
make projective textures work in DIRECT+eglPlugin (see examples/pybullet/examples/projective_texture.py)
2018-10-05 19:24:44 -07:00
erwincoumans
111ffc784d
Use 2560x2048 as default window/framebuffer size for eglPlugin.
2018-10-05 18:28:37 -07:00
erwincoumans
40d7e292f2
fix depth image for eglPlugin, also fix setRGBA color for eglPlugin.
2018-10-05 18:25:51 -07:00
erwincoumans
67954a873e
Merge pull request #1917 from erwincoumans/master
...
reverse ER_SEGMENTATION_MASK to ER_NO_SEGMENTATION_MASK so segmentation
2018-10-04 18:41:16 -07:00
Erwin Coumans
24ca5afe95
reverse ER_SEGMENTATION_MASK to ER_NO_SEGMENTATION_MASK so segmentation
...
mask is rendered by default
2018-10-04 14:14:24 -07:00
Wenlong Lu
24f5b819cf
fix a memory leak
2018-10-02 10:58:23 -07:00
erwincoumans
8aff1fbd49
removed flags from loadURDF command. The flags are already available in m_data->m_flags in BulletUrdfImporter.cpp
2018-10-02 08:39:47 -07:00
bla
0f8b8388a6
eglPlugin, one more fix, remove graphics instances at resetAll
2018-10-02 08:13:51 -07:00
erwincoumans
da37f1d559
add glViewport after call to startRendering (some renderers call glViewport)
2018-10-02 07:49:13 -07:00
erwincoumans
c9bd997acf
Merge pull request #1910 from WenlongLu/create_status
...
Two minor updates for PhysicsServerCommandProcessor
2018-10-01 18:53:13 -07:00
bla
7cd962467e
fix EGL issue related to glViewport in startRender method
2018-10-01 18:51:02 -07:00
Wenlong Lu
085984f003
update complete status for removing collision shape
2018-10-01 17:54:23 -07:00
Wenlong Lu
167520a5e6
pass plane constant
2018-10-01 17:38:24 -07:00
erwincoumans
bfafd9b0ae
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-09-30 20:02:32 -07:00
erwincoumans
6d89413336
scaling striding is 4 (scaling+object uid) instead of 3, also for transparent objects
2018-09-30 20:02:12 -07:00
erwincoumans
0ffa9a97bd
scaling striding is 4 (scaling+object uid) instead of 3, also for transparent objects
2018-09-30 19:52:19 -07:00
Erwin Coumans
42ae4e81a8
apply clang-format (on Mac, slightly different than running it on Windows)
2018-09-30 11:43:57 -07:00
erwincoumans
5bcd43711a
PyBullet OpenGL/EGL hardware getCameraImage: use glViewport to reduce the glReadPixels calling cost dramatically for small images
...
PyBullet Allow OpenGL/EGL hardware to render segmentation mask. Use pybullet.ER_SEGMENTATION_MASK_OBJECT_AND_LINKINDEX or pybullet.ER_SEGMENTATION_MASK
PyBullet.removeBody fix indexing bug (use foundIndex, not i)
PyBullet bump up version to 2.2.3
2018-09-30 07:10:40 -07:00
erwincoumans
254edb61cb
Merge remote-tracking branch 'bp/master'
2018-09-29 10:35:01 -07:00
erwincoumans
00ed0dce24
Merge pull request #1900 from crewmatt/master
...
Update URDF Importer to process Sensor elements.
2018-09-28 17:06:27 -07:00
erwincoumans
39bca74041
Merge remote-tracking branch 'bp/master'
2018-09-28 10:14:45 -07:00
mbennice
6655bd60c8
Update stb_image.h import
2018-09-27 14:09:00 -07:00
mbennice
99dbedab6e
Update import
2018-09-27 12:49:39 -07:00
mbennice
7485999254
Clang Format Change
2018-09-27 10:00:39 -07:00
mbennice
30d4c4136a
Piping through the flag to parse sensors
2018-09-27 09:49:59 -07:00
Cloud Wu
8ff4b5187a
fix mingw build
2018-09-27 11:48:12 +08:00
Wenlong Lu
8cdb514ffb
missed one
2018-09-26 17:46:39 -07:00
Wenlong Lu
2681f5cd9f
add const qualifiers to all double* inputs in PhysicsClientC_API
2018-09-26 17:24:40 -07:00
mbennice
173cc2538f
Correct header update
...
Revert the header update change.
2018-09-26 16:38:59 -07:00
mbennice
f79b04357f
Update URDF Importer to process sensor elements.
...
Update the URDF Importer to add sensors as 0 mass 0 inertia elements
attached by a fixed joint. This way their states can be read as links.
2018-09-26 16:35:22 -07:00
Wenlong Lu
3c0e57e025
add const qualifier to double [] inputs
2018-09-26 15:02:22 -07:00
Erwin Coumans
cd2f111a10
update pybullet version, include *.* from OpenGLWindow
2018-09-25 17:06:32 -07:00
Erwin Coumans
f20b7bb07c
tweak pole IK demo
2018-09-25 06:22:06 +00:00
erwincoumans
c1ba89a01c
Fix eglPlugin
2018-09-24 08:06:28 -07:00
Julian Viereck
219dfc757a
Adding support for lateral friction to getContactPoints()
2018-09-24 10:03:43 -04:00
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
erwincoumans
b73b05e9fb
add getClosestPoints.py example.
...
allow to perform a getClosestPoints query with a collisionShape and world transform (position, orientation) that isn't part of the world.
(use createCollisionShape to create it)
add optional removeCollisionShape, for collision shapes only used in a query (and not used to create a body)
2018-09-22 14:18:21 -07:00
erwincoumans
cdf8c908ad
add getClosestPoints.py example.
...
allow to perform a getClosestPoints query with a collisionShape and world transform (position, orientation) that isn't part of the world.
(use createCollisionShape to create it)
2018-09-22 13:17:09 -07:00
erwincoumans
64a7a3d82f
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-09-21 17:33:31 -07:00
erwincoumans
278454ae17
allow to disable self-collision for a link-pair
2018-09-21 17:33:13 -07:00
Erwin Coumans
350adb5c7c
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-09-21 09:56:25 -07:00
Erwin Coumans
47efe66017
disable eglPlugin from setup.py / pip pybullet on Windows and Mac (only enable on Linux)
2018-09-21 09:55:57 -07:00
erwincoumans
1ec616362c
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-09-20 09:08:46 -07:00
erwincoumans
616192f80a
use grpc port -1 by default in PyBullet. add grpcClient.py and grpcServer.py
2018-09-20 09:07:47 -07:00
Erwin Coumans
0de99f224a
fix compilation on ARM (Ubuntu 18.04, NVIDIA Xavier)
2018-09-19 16:18:06 -07:00
erwincoumans
0b08881ab8
wait until a frame is rendered, when using the COV_ENABLE_SINGLE_STEP_RENDERING command (Windows and Linux only)
2018-09-15 14:22:31 -07:00
erwincoumans
81f6a63490
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-09-14 17:17:20 -07:00
erwincoumans
e6d74580c1
add single step rendering feature:
...
while (1):
stepSimulation()
pybullet.configureDebugVisualizer(pybullet.COV_ENABLE_SINGLE_STEP_RENDERING, 1)
disable single step using
pybullet.configureDebugVisualizer(pybullet.COV_ENABLE_SINGLE_STEP_RENDERING, 0)
2018-09-14 17:17:11 -07:00
Erwin Coumans
b0971b4beb
fix our internal build
2018-09-13 10:20:38 -07:00
Erwin Coumans
d909448ee3
bump up pybullet version again
2018-09-12 21:03:07 -07:00
erwincoumans
9553892770
PyBullet / BulletRobotics:
...
Implement collisionFilterPlugin, use setCollisionFilterPair to enable or disable collision detection between specific pairs of objects.
Also, expose setCollisionFilterGroupMask as PyBullet API and in urdf using the tag <collision group="1" mask="2"/>.
See examples/pybullet/examples/collisionFilter.py for an example.
PyBullet default: Lower the warmstarting factor, for maximal coordinates rigid bodies for more stable simulation.
Add btCollisionWorld::refreshBroadphaseProxy to easier recreate the broadphase proxy without adding/removing objects to the world.
2018-09-12 19:30:49 -07:00
erwincoumans
bf3399d0e3
Merge remote-tracking branch 'bp/master'
2018-09-12 09:18:25 -07:00
Erwin Coumans
1efee29c27
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-09-12 08:20:03 -07:00
Erwin Coumans
c83fa30daa
use numpy to reshape image data to matplotlib compatible format
...
fixes issue #1871
2018-09-12 08:19:30 -07:00
erwincoumans
2a3a60ac64
Merge pull request #1874 from erwincoumans/master
...
more egl plugin fixes, create stb_image_write.cpp (instead of magic defines in various source files)
2018-09-11 14:14:40 -07:00
Erwin Coumans
23ecbab7b3
fix setup.py and pybullet to work better with eglPlugin on Linux
2018-09-11 13:24:35 -07:00
Tigran Gasparian
58699258dd
Change b3GetLinkState to use numLinks in status handle
...
Changes the b3GetLinkState function to use numLinks from the
SharedMemoryStatus returned from RequestActualState instead of the
cached number of link value returned by b3GetNumJoints.
The cached value can be outdated when a new body is added and
SyncBodyInfo isn't used, while using the value in the status is always
up-to-date.
2018-09-11 14:44:06 +02:00
erwincoumans
5b1588fc3f
fix createProtobufs.bat script
2018-09-10 23:32:51 -07:00
Erwin Coumans
9fa3e44539
fixes related to egl plugin
2018-09-10 23:31:54 -07:00
Erwin Coumans
3b0a44e1be
fix createProtobufs.sh script
2018-09-10 23:24:00 -07:00
erwincoumans
684a9f6a99
move stb_image/stb_image_write.cpp into a cpp file instead of random files with the magic 'STB_IMAGE_WRITE_IMPLEMENTATION' define
...
move setup.py back to eglRenderer extension, use pkgutil.get_loader('eglRenderer').get_filename()
disable dlmopen by default, unless B3_USE_DLMOPEN is defined.
2018-09-10 23:18:34 -07:00
Erwin Coumans
f26d4fdc4c
pybullet eglPlugin: fix Mac OSX build
2018-09-10 08:55:47 -07:00
bla
6992195ba8
add pybullet example for eglRendererPlugin, will use EGL in a plugin on Linux, Win32OpenGLWindow in a plugin on Windows
2018-09-09 23:03:07 -07:00
bla
8f711462e0
fix setup.py to work better on Windows and Linux (with default eglPlugin static built-in,
...
just use pybullet.loadPlugin("eglRendererPlugin") before loading/creating any objects.
use end/startRendering (swap buffers) before the rendering in the eglPlugin
2018-09-09 22:58:08 -07:00
erwincoumans
9698c3d600
PyBullet setup.py: only enable BT_USE_EGL on Linux, but allow to run the eglPlugin on Windows and Mac as well (using their default opengl window).
...
postpone the 'loadPlugin' for static eglPlugin, so that the init and exit happen in the same thread.
When you don't call unloadPlugin, the program may crash when exiting in SHARED_MEMORY_SERVER mode.
2018-09-09 21:08:47 -07:00
erwincoumans
7369005402
pybullet, use eglPlugin statically instead of dynamic loading an Extension -DSTATIC_EGLRENDERER_PLUGIN
...
Fix compile errors of pybullet on Windows.
2018-09-09 15:23:26 -07:00
erwincoumans
adb5c049c7
Thanks to @dchichkov for some of the fixes in the eglRendererPlugin!
...
Rename tinyRenderer -> eglRenderer in the eglRendererPlugin.
Allow to run the eglRendererPlugin to run on Windows (not in EGL mode but Win32OpenGLWindow mode)
Here is a script I tested on Windows:
~~~~~~~~~~~~
mport pybullet as p
import time
p.connect(p.DIRECT)
plugin = p.loadPlugin("e:/develop/bullet3/bin/pybullet_eglRendererPlugin_vs2010_x64_debug.dll","_eglRendererPlugin")
print("plugin=",plugin)
p.setGravity(0,0,-10)
p.loadURDF("plane.urdf",[0,0,-1])
p.loadURDF("r2d2.urdf")
pixelWidth = 320
pixelHeight = 220
while (1):
p.stepSimulation()
viewMatrix = [1.0, 0.0, -0.0, 0.0, -0.0, 0.1736481785774231, -0.9848078489303589, 0.0, 0.0, 0.9848078489303589, 0.1736481785774231, 0.0, -0.0, -5.960464477539063e-08, -4.0, 1.0]
projectionMatrix = [1.0825318098068237, 0.0, 0.0, 0.0, 0.0, 1.732050895690918, 0.0, 0.0, 0.0, 0.0, -1.0002000331878662, -1.0, 0.0, 0.0, -0.020002000033855438, 0.0]
#img_arr = p.getCameraImage(pixelWidth, pixelHeight, viewMatrix,projectionMatrix, shadow=1,lightDirection=[1,1,1])#,renderer=pybullet.ER_BULLET_HARDWARE_OPENGL)
img_arr = p.getCameraImage(pixelWidth, pixelHeight, shadow=1,lightDirection=[1,1,1])#,renderer=pybullet.ER_BULLET_HARDWARE_OPENGL)
#print("img_arr=",img_arr)
time.sleep(1)
~~~~~~~~~~~~~
2018-09-09 13:37:49 -07:00
erwincoumans
dc7feb9027
Merge remote-tracking branch 'bp/master'
2018-09-09 10:48:58 -07:00
erwincoumans
233a7083d1
Merge pull request #1790 from BlGene/egl-plugin
...
OpenGL render plugin
2018-09-09 09:27:15 -07:00
Joshua Aduol
cc4c02edc7
Fixed bugs mistaking forearm_roll_joint for upper_arm_roll_joint
2018-09-09 00:17:06 +01:00
erwincoumans
63f4a63e15
since parent collision is always disabled by default for self-collision, we add a new flag
...
URDF_USE_SELF_COLLISION_INCLUDE_PARENT, to force self-collision between direct parent/child (not recommended in general)
2018-09-08 14:46:43 -07:00
Erwin Coumans
7376c26e4b
remove gl libs from openvr
2018-09-07 16:06:42 -07:00
erwincoumans
5164f2f9a7
remove pre-build proto/grpc files (they differ for each platform and proto/grpc version)
2018-09-07 15:44:33 -07:00
erwincoumans
0efc67841d
allow pybullet to connect to GRPC server. (need to use flag --enable_grpc in premake build system)
...
add grpcPlugin, it can work in GUI, SHARED_MEMORY_SERVER, DIRECT and other modes.
example script to start server from pybullet:
import pybullet as p
p.connect(p.GUI)
#if statically linked plugin
id = p.loadPlugin("grpcPlugin")
#dynamics loading the plugin
#id = p.loadPlugin("E:/develop/bullet3/bin/pybullet_grpcPlugin_vs2010_x64_debug.dll", postFix="_grpcPlugin")
#start the GRPC server at hostname, port
if (id>=0):
p.executePluginCommand(id, "localhost:1234")
Only in DIRECT mode, since there is no 'ping' you need to call to handle RCPs:
numRPC = 10
while (1):
p.executePluginCommand(id, intArgs=[numRPC])
2018-09-05 17:58:14 -07:00
Erwin Coumans
31b06f508a
only add notifications if there is a plugin that needs them
...
call the 'reportNotifications' in GRPC server main
2018-09-04 19:24:31 -07:00
Erwin Coumans
18b782847d
make GRPC work on Linux,
2018-09-04 16:56:34 -07:00
Erwin Coumans
51f9a6fd0d
make grpc work on Mac OSX with premake
2018-09-04 14:49:12 -07:00
erwincoumans
710e660763
Merge pull request #1855 from erwincoumans/master
...
more work on grpc/proto/pybullet.proto
2018-09-04 12:11:03 -07:00
erwincoumans
c4842220a8
Merge pull request #1852 from RanTig/remove-visual-shape
...
Removes visual shape data when a body gets removed.
2018-09-04 09:42:48 -07:00
erwincoumans
9b66074949
add some missing GRPC files
2018-09-04 09:10:57 -07:00
erwincoumans
9e2f6c7935
more GRPC work
2018-09-03 23:13:15 -07:00
Tigran Gasparian
a670041793
Small fix in executePluginCommand, now you can pass int arguments while keeping floats null without errors.
2018-09-03 10:41:38 +02:00
Tigran Gasparian
93145f3979
Adding space to make compiler happy.
2018-09-03 10:37:22 +02:00
erwincoumans
23e84ca9b6
more work on proto/pybullet.proto
2018-09-01 13:49:56 -07:00
Tigran Gasparian
9799f356de
.
2018-08-31 15:35:35 +02:00
Tigran Gasparian
f132b4d16b
Only make the change for Linux, since OSX doesn't have dlmopen()
2018-08-31 15:33:08 +02:00
Tigran Gasparian
c062bfc2d5
Removes visual shape data when a body gets removed.
...
Problem description:
When you add a body, remove it and then add a new
body, the body id may be reused by Bullet.
Because the visual shape data was not being removed when a body was
removed, requesting the visual shape data for a 'recycled' body id
results in both the visual shape data of the new body as well as the old
one.
Removing the visual shape data when the body gets removed fixes this.
Changes the btAlignedObjectArray for visual shapes to a hashmap, so
that removing is faster. Additionally, functions like getNumVisualShape
don't perform a linear search anymore.
2018-08-31 15:12:28 +02:00
Tigran Gasparian
6036c027bf
Uses dlmopen() instead of dlopen() in b3PluginManager.cpp. This allows plugins to be loaded in a separate namespace, avoiding symbol conflicts.
2018-08-31 10:53:46 +02:00
Erwin Coumans
40a15053bd
add createProtobufs.sh script for Mac/Linux (only tested on Mac so far)
2018-08-30 10:09:00 -07:00
Max Argus
425ecbd3e6
fix cmake, linux only (patch egl)
2018-08-30 13:24:25 +02:00
Max Argus
964a5116eb
fix cmake + apple (patch egl)
2018-08-30 13:24:25 +02:00
Max Argus
902818894c
fix cmake (patch egl)
2018-08-30 13:24:25 +02:00
Max Argus
c1d6c6b07d
clean test scripts
2018-08-30 13:24:25 +02:00
Max Argus
bdc0f82a8b
added syncronized render test script
2018-08-30 13:24:25 +02:00
Max Argus
e15fb0866c
rendertest + parallel pip + no debug for plugin
2018-08-30 13:24:25 +02:00
Max Argus
35b30359e3
nearly working
2018-08-30 13:24:25 +02:00
Max Argus
5f71aa859f
wip
2018-08-30 13:24:25 +02:00
Max Argus
21462d1c02
update GLIR camera
2018-08-30 13:24:25 +02:00
Max Argus
a6a8b091ca
wip
2018-08-30 13:24:25 +02:00
Max Argus
05f82e8867
egl plugin working
2018-08-30 13:24:25 +02:00
Max Argus
f80f0c76a4
added egl plugin commit
2018-08-30 13:24:25 +02:00
Max Argus
2707b7acb4
apple issue
2018-08-30 13:24:25 +02:00
Max Argus
1b95961617
fix build
2018-08-30 13:24:25 +02:00
Max Argus
9328d0bb5f
fix build
2018-08-30 13:24:25 +02:00
Max Argus
a9ba3eb8cc
fixed cmake
2018-08-30 13:24:25 +02:00
Max Argus
f0e7f266ef
switched to new glad2
2018-08-30 13:24:25 +02:00
Max Argus
5dbf2373ad
load gl with egl not glx
2018-08-30 13:24:25 +02:00
Max Argus
6e828688e7
activate EGL + add rendertest.py
2018-08-30 13:24:25 +02:00
Max Argus
5e8ee98f2e
fix OpenGL3App argument order
2018-08-30 13:24:25 +02:00
a
3d499c8a7a
pybullet: added EGL render device and window_backend option.
...
EGL review.
EGL dynamic loading, windowType to int
moved to glad2
Require GL 3.3 as GLInstancingRenderer.cpp uses glVertexAttribDivisor
glad2 update with dynamic X11 added
removed old file
build fix
fix mac/win
EGL w/o c++11, off by default
fix premake
fixup: premake fix 2
2018-08-30 13:24:25 +02:00
erwincoumans
4f7dfc2069
Add preliminary GRPC server for PyBullet and BulletRobotics.
...
Will add GRPC client and PyBullet GRPC server plugin.
Will cover most/all SharedMemoryCommand/SharedMemoryStatus messages.
Run the server, then test using the pybullet_client.py
2018-08-29 21:12:13 -07:00
Erwin Coumans
72c48870b0
after picking in a multibody demo, allow sleeping for rigid bodies
2018-08-26 18:07:28 -07:00
Erwin Coumans
186ddb81d8
fix tab/space issue in Python file
...
fix determinism issue introduced in previous commit
2018-08-26 17:17:42 -07:00
Erwin Coumans
6ab6cf0bdb
test if different broadphase maintains determinism
2018-08-26 16:49:17 -07:00
Erwin Coumans
ff43cea263
Fix some deactivation issues with btMultiBodyDynamicsWorld, should also improve performance for PyBullet with larger worlds
...
(even when sleeping is disabled, islands are split)
2018-08-26 16:14:36 -07:00
Erwin Coumans
3036a6d2bc
also drop 'model://' from URDF file names (like we drop package://)
2018-08-26 09:33:51 -07:00
erwincoumans
78946c8ca7
Merge pull request #1842 from crewmatt/crewmatt-ikoriginalpositions
...
Allow current positions for Calculate IK.
2018-08-23 23:07:48 -07:00
Erwin Coumans
61b7591b8e
expose choice of contraint solver in PyBullet, with switchConstraintSolver example
2018-08-23 23:04:17 -07:00
mbennice
780b280181
Allow current positions for Calculate IK.
...
Allows the user to specify the current positions of joints when
calculating Inverse Kinematics.
2018-08-23 13:19:15 -07:00
Erwin Coumans
6d53f1a6d9
fix parameter mismatch in SerialChains.cpp
2018-08-09 17:15:54 -07:00
Erwin Coumans
90e08b41a5
bump up pybullet version
2018-08-09 16:53:11 -07:00
Erwin Coumans
15e831ab99
revert default linear slop, need to handle restitution separately
2018-08-09 16:49:25 -07:00
Erwin Coumans
d6cf60ab83
Merge remote-tracking branch 'bp/master'
2018-08-09 16:48:55 -07:00
Erwin Coumans
07b21ca4a2
add missing SerialChains.cpp file to premake4.lua
2018-08-09 16:30:20 -07:00
Jeongseok Lee
3627407041
Remove Lemke from SerialChains demo
2018-08-07 15:27:54 -07:00
Jeongseok Lee
48e5a3a9ed
Cleanup SerialChains demo
2018-08-07 15:18:58 -07:00
Jeongseok Lee
777ffac5c2
Fix typo in demo name: MultiDofCreateFunc --> MultiDof
2018-08-06 10:42:25 -07:00
Jeongseok Lee
e8e97d39fe
Merge remote-tracking branch 'upstream/master' into multibody_mlcp_solver_v2
2018-08-06 10:34:43 -07:00
Erwin Coumans
56e7333941
bump up pybullet version
2018-08-04 09:58:15 -07:00
erwincoumans
961d8adad1
Merge pull request #1806 from erwincoumans/master
...
prepare build system(s) for collisionFilterPlugin
2018-08-03 17:43:13 -07:00
Jeongseok Lee
89c6a83ae9
Add MLCP constraint solver for multibody
2018-08-02 22:53:30 -07:00
Tigran Gasparian
d93980f89f
Adds a simulation stepped notification
...
This notification is called when the simulation is stepped, regardless
of whether any objects have moved.
2018-08-01 17:49:58 +02:00
Erwin Coumans
08b5e6d766
add collisionFilterPlugin to pybullet plugin, also apply quat->euler fix for singular cases
2018-07-30 17:53:37 +02:00
Erwin Coumans
e75178181d
safe normalize on degenerate triangles
2018-07-30 12:21:02 +02:00
Erwin Coumans
2cab56d6ef
prepare build system(s) for collisionFilterPlugin
2018-07-27 15:48:24 +02:00
erwincoumans
8b27a7311c
Merge pull request #1801 from RanTig/TickPlugins
...
Notify plugins on certain events (e.g. body added).
2018-07-27 14:58:55 +02:00
Erwin Coumans
a696bd6a46
fix memory leak reported in Issue #1800
...
avoid access to array elements outside of range
2018-07-25 19:59:29 +02:00
Tigran Gasparian
35a55b2056
Changes tickPlugins to reportNotifications and only calls the processNotifications function on the plugins when there are actually notifications available. tickPlugins will to into a separate PR.
2018-07-25 14:47:34 +02:00
Tigran Gasparian
f745eafb36
Changes dynamic_cast<> to c-style cast.
2018-07-24 16:04:16 +02:00
Tigran Gasparian
c59afb88c4
Notify plugins on certain events (e.g. body added).
...
This also adds a periodic tick function to plugins, giving them periodically control over the simulation thread, even when the simulation is paused.
2018-07-24 14:12:16 +02:00
erwincoumans
defd961f60
Merge pull request #1798 from erwincoumans/master
...
Change constraint solver threshold-based termination condition on res…
2018-07-22 12:28:32 +02:00
Erwin Coumans
b5495e789d
Change constraint solver threshold-based termination condition on residual of velocity threshold, not on residual of impulse threshold.
...
This avoids issues with systems with large mass ratios.
Test: add this to BasicDemo/BasicExample.cpp in initPhysics
m_dynamicsWorld->getSolverInfo().m_numIterations = 1000;
m_dynamicsWorld->getSolverInfo().m_leastSquaresResidualThreshold = 1e-4;
2018-07-22 11:30:16 +02:00
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
Jeongseok Lee
6323309f89
Fix c++11-narrowing errors in multibody examples
2018-07-10 09:22:41 -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
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
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
Erwin Coumans
ac59886960
fix hidden API
2018-06-27 07:39:56 -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
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
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
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
42c9d9aa3c
lazy creation of batch scheduler, it causes issues with the physics.
2018-06-16 13:59:03 -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
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
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
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 bea468fb93
)
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
erwincoumans
25c5e87dc2
PyBullet.loadURDF, expose flags=URDF_INITIALIZE_SAT_FEATURES
2018-06-13 15:35:56 -07:00
Erwin Coumans
c27fb4003e
path -> const
2018-06-12 21:26:34 -07:00
erwincoumans
4f0959a136
Update b3RobotSimulatorClientAPI_NoDirect.h
2018-06-12 21:17:43 -07:00
Erwin Coumans
e24da97140
revert GJK change yet again, some degenerate case / regression
2018-06-12 19:52:38 -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
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
38469deec7
getNumLinks -> getNumDofs, to make sure fixed objects don't transfer activation state
2018-06-11 11:41:33 -07:00
erwincoumans
6fb3cf7a43
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-06-11 08:34:37 -07:00
Erwin Coumans
e74f86d148
remove ANYmal meshes
2018-06-11 07:44:05 -07:00
erwincoumans
3eebcd40ca
exposed a few more methods in the C++ b3RobotSimulatorClientAPI (_NoDirect base class)
2018-06-09 19:40:12 -07:00
erwincoumans
7ac3e263ab
add saveStateToMemory/restoreStateFromMemory/setAdditionalSearchPath/getAPIVersion to Bullet Robotics API.
2018-06-09 13:54:22 -07:00
erwincoumans
0cec85626f
enable more unit tests in PyBullet.
...
return Py_None if no user data found, to pass the test.
enable m_deterministicOverlappingPairs by default.
if m_deterministicOverlappingPairs, sort the collision pairs.
2018-06-09 12:19:29 -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
Erwin Coumans
6ca3fe18f5
fix previous commit
2018-06-06 16:33:52 -07:00
Erwin Coumans
1bcb54dc29
remove some warnings
2018-06-06 16:10:20 -07:00
Erwin Coumans
dd444fc6c4
reshuffle args
2018-06-05 21:09:00 -07:00
erwincoumans
cb6d76d6b5
fix another parameter name in header, in enableJointForceTorqueSensor
2018-06-05 19:59:00 -07:00
erwincoumans
dff04c7f59
fix parameter name in header, computeForwardKinematics
2018-06-05 19:57:21 -07:00
erwincoumans
72d3f45b05
use new API b3CreateInProcessPhysicsServerFromExistingExampleBrowserAndConnect3 (not 2)
2018-06-05 19:54:08 -07:00
erwincoumans
4083088a3a
people are actually using this internal API, add a new one and keep old one backward compatible
...
b3CreateInProcessPhysicsServerFromExistingExampleBrowserAndConnect3 is the new one,
b3CreateInProcessPhysicsServerFromExistingExampleBrowserAndConnect2 old
2018-06-05 19:44:33 -07:00
erwincoumans
5ede227e94
Update robot_bases.py
...
remove print
2018-06-05 19:33:28 -07:00
Erwin Coumans
ad35beb61f
fix typo
2018-06-05 16:25:43 -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
erwincoumans
49eb83c24e
Avoid static multibody to activate/wake up sleeping objects.
...
Couldn't reproduce an issue related to this.
2018-06-05 12:20:42 -07:00
erwincoumans
fa648a028e
fix a few problems introduced in #1730
...
https://github.com/bulletphysics/bullet3/pull/1730
2018-06-05 09:16:00 -07:00
erwincoumans
d7cbe8dd26
Merge remote-tracking branch 'bp/master'
2018-06-05 08:15:11 -07:00
Tigran Gasparian
aefd5a9d66
Uses SHARED_MEMORY_SERVER instead of GUI_SERVER when starting a bullet server in the unit test.
2018-06-05 09:28:38 +02: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
e4cd88e24f
PyBullet: allow to choose the shared memory key when starting SHARED_MEMORY_SERVER
2018-06-05 11:36:54 +10:00
Tigran Gasparian
c49e060e81
Starts bullet server when testsuite is ran, uses pybullet_utils to manage clients.
2018-06-04 19:40:16 +02:00
Tigran Gasparian
bb72a91080
Clears the user data cache when syncUserData is called.
...
Adds unit test for the UserData functons.
Changes the char pointer in btHashString to std::string. There were
problems where the object owning the string memory would deallocate the
string, making the btHashString object invalid.
2018-06-04 15:10:48 +02:00
erwincoumans
4997eb8da2
add new file related to PyBullet userData
2018-06-02 13:52:00 -07:00
erwincoumans
b6120e760a
PyBullet.addUserData / getUserData / removeUserData / getUserDataId / getNumUserData / getUserDataInfo
...
See examples/pybullet/examples/userData.py how to use it. TODO: add to PyBullet Quickstart Guide.
Thanks to Tigran Gasparian for the contribution!
2018-06-02 13:40:08 -07:00
erwincoumans
cb6b7a7c38
PyBullet: expose flags to createMultiBody
2018-06-02 11:37:14 -07:00
Erwin Coumans
39c9ffa4c3
PyBullet IK: backward compatible changes related to joint damping
2018-06-01 23:25:47 -07:00
erwincoumans
68ea22bfd0
undo git merge conflict mess-up with IK
2018-06-01 22:50:06 -07:00
erwincoumans
92579f9196
Merge branch 'master' of https://github.com/erwincoumans/bullet3
...
# Conflicts:
# examples/SharedMemory/PhysicsServerCommandProcessor.cpp
2018-06-01 09:35:15 -07:00
erwincoumans
2d40a18315
picking shouldn't activate (wakeup) sleeping objects
2018-06-01 09:34:18 -07:00
Erwin Coumans
e74cd05e37
add space
2018-05-31 21:21:50 -07:00
erwincoumans
4c75e022c8
Use dofCount and not numJoints in PyBullet.calculateInverseKinematics, fixes null space demo
...
See baxter_ik_demo at https://github.com/erwincoumans/pybullet_robots
2018-05-31 21:07:04 -07:00
Erwin Coumans
70b3d4d0f4
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-05-31 18:16:57 -07:00
Erwin Coumans
76e88dddc5
add space to make conversion work
2018-05-31 18:16:40 -07:00
erwincoumans
309a07c21b
Merge branch 'master' into master
2018-05-31 18:05:50 -07:00
Erwin Coumans
378de87286
Merge remote-tracking branch 'bp/master'
2018-05-31 18:03:56 -07:00
Erwin Coumans
93a51e19d9
fix different arg name in header versus cpp
2018-05-31 17:58:12 -07:00
erwincoumans
75eaaecf49
Merge pull request #1722 from erwincoumans/master
...
implement accurate inverse kinematics in C++, exposed through PyBullet.calculateInverseKinematics
2018-05-31 16:50:52 -07:00
erwincoumans
3463d0a879
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-05-31 16:06:33 -07:00
erwincoumans
edc70582dd
implement accurate inverse kinematics in C++. PyBullet.calculateInverseKinematics gets "maxNumIterations=20", "residualThreshold=1.04" to tune
...
allow to provide current joint positions in IK, overriding the body joint positions, also IK target will be in local coordinates.
expose b3ComputeDofCount in C-API
2018-05-31 16:06:15 -07:00