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
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
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
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
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
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
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
c1d6c6b07d
clean test scripts
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
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
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
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
15e831ab99
revert default linear slop, need to handle restitution separately
2018-08-09 16:49:25 -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
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
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
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
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
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
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
Tigran Gasparian
618e3230a4
Fix: Use function context reference instead of value
2018-06-22 20:41:02 +02: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
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
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
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
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
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
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
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
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
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
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
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
d7cbe8dd26
Merge remote-tracking branch 'bp/master'
2018-06-05 08:15:11 -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
e4cd88e24f
PyBullet: allow to choose the shared memory key when starting SHARED_MEMORY_SERVER
2018-06-05 11:36:54 +10: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
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
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
erwincoumans
150a0e050e
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-05-30 19:47:47 -07:00
Erwin Coumans
491ecf2a20
export object auto-deactivation (sleeping) to pybullet (needs some more testing/configuring)
2018-05-30 18:37:08 -07:00
Erwin Coumans
14c6dee6a3
const char* for path
2018-05-30 14:37:49 -07:00
erwincoumans
1dec33d44b
move default linearslop to 0
2018-05-30 12:31:29 -07:00
Erwin Coumans
8ace9251aa
pass by pointer instead of reference to satisy compiler
2018-05-23 14:22:22 +10:00
Erwin Coumans
77c332bd88
PyBullet: add option to cache graphics shapes for URDF files, handy for benchmarks with many duplicate robots
...
See https://github.com/erwincoumans/pybullet_robots ANYmal.py for an example.
PyBullet: Expose p.setPhysicsEngineParameter(solverResidualThreshold=1e-2) (b3PhysicsParamSetSolverResidualThreshold), increases solver performance a lot
PyBullet: Expose p.setPhysicsEngineParameter(contactSlop) Set it to zero, to avoid issues with restitution.
PyBullet: Expose isNumpyEnabled, return True is PyBullet was compiled with NUMPY support for 'getCameraImage'.
PyBullet: Expose p.ChangeDynamics(objectUid, linkIndex, contactProcessingThreshold), to avoid issues of speculative/predictive contacts with restitution.
See also http://twvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming%20Track/Vincent_ROBERT_Track_ADifferentApproach.pdf
2018-05-23 13:26:00 +10:00
Erwin Coumans
0b2c9ea645
PyBullet: avoid a crash in SHARED_MEMORY_SERVER
2018-05-20 12:20:06 +10:00
erwincoumans
8f4d1e722e
Merge pull request #1686 from yuchenericwu2/master
...
Expose CFM parameters
2018-05-16 16:18:45 -07:00
Yuchen Wu
f03ae5a857
Expose CFM parameters in PhysicsClient.
...
Add b3PhysicsParamSetDefaultGlobalCFM() and
b3PhysicsParamSetDefaultFrictionCFM().
2018-05-16 13:46:19 -07:00
erwincoumans
b432daed65
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-05-16 12:11:29 -07:00
erwincoumans
0ca2c5f925
use Bullet3Common/b3AlignedObjectArray.h instead of LinearMath version in SharedMemory/PhysicsClientSharedMemory
2018-05-16 12:10:34 -07:00
Erwin Coumans
28b86ba0a4
fix some tsan issues (thread sanitizer)
2018-05-16 08:32:21 -07:00
Erwin Coumans
d17d496f97
fix potential asan/tsan issue
2018-05-15 13:24:28 -07:00
erwincoumans
e5a9b42f9a
expose PyBullet.setPhysicsEngineParameter(jointFeedbackMode)
...
use p.JOINT_FEEDBACK_IN_JOINT_FRAME if you want the joint feedback expressed in joint frame (instead of link inertial frame)
use p.JOINT_FEEDBACK_IN_WORLD_SPACE if you want the joint feedback in world space coordinates, instead of local link/joint coordinates.
Example: p.setPhysicsEngineParameter(jointFeedbackMode=p.JOINT_FEEDBACK_IN_WORLD_SPACE+p.JOINT_FEEDBACK_IN_JOINT_FRAME)
2018-05-11 19:52:06 -07:00
erwincoumans
06a23ecd6d
PyBullet TinyRenderer, fix cylinder (don't add caps like a capsule), also convert colors stored in visual shapes, if needed.
2018-05-10 18:37:48 -07:00
Erwin Coumans
414b3ef9bb
PyBullet urdfEditor improvements: saveUrdf mesh scale, fix incorrect index, add getCameraImage in examples/combineUrdf.py
2018-05-09 10:28:12 -07:00
Erwin Coumans
0b5785421b
PyBullet: re-add API to header
2018-05-07 16:59:06 -07:00
Erwin Coumans
7bc85c7d43
PyBullet.SHARED_MEMORY_SERVER, use secondary key for server
2018-05-07 16:01:38 -07:00
Erwin Coumans
7383843b24
expose PyBullet.SHARED_MEMORY_SERVER
...
connect from 1 different PyBullet client using PyBullet.SHARED_MEMORY)
(don't use more than 1 other client to submit commands in parallel)
2018-05-07 15:57:36 -07:00
Erwin Coumans
84b20bda80
don't use the URDF inertia element, unless flag CUF_USE_URDF_INERTIA is set, not for the diagonal and also not for the inertial frame shift.
2018-05-03 14:24:16 -07:00
Erwin Coumans
4a8ad1a54e
fix posix memory release issues
...
fix compile problems on Mac OSX
reduce shared memory size on Mac (>512*1024 fails to allocate)
2018-05-02 15:39:16 -07:00
erwincoumans
1f6afcda30
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-05-02 14:32:59 -07:00
erwincoumans
3a5f778b70
expose lsMemory destroy function to release thread memory
2018-05-02 14:32:43 -07:00
erwincoumans
cee3ecde2b
Merge pull request #1664 from erwincoumans/master
...
PyBullet: fix some memory leaks
2018-05-02 13:54:07 -07:00
erwincoumans
d7e81590b5
fix a memory leak
2018-05-02 12:24:31 -07:00
Jan Matas
b1f85268f0
Check for null
2018-04-30 19:01:53 +01:00
Jan Matas
21418934e0
Reset sparsesdf to free memory.
2018-04-25 16:17:28 +01:00
erwincoumans
391b0e4061
Merge pull request #1588 from GaborPuhr/Fix-#1582
...
Fix for #1582
2018-04-12 13:32:51 -07:00
erwincoumans
25cb37a0d7
Merge remote-tracking branch 'bp/master'
2018-04-12 12:48:37 -07:00
Erwin Coumans
11008d8110
fixes, backwards compatibility
2018-04-12 09:28:30 -07:00
erwincoumans
b0d421fa11
Merge pull request #1632 from erwincoumans/master
...
upgrade from tinyxml to tinyxml2
2018-04-12 07:30:05 -07:00
erwincoumans
9c77e07494
upgrade from tinyxml to tinyxml2
2018-04-12 00:09:44 -07:00
erwincoumans
b53facfc25
Merge pull request #1629 from erwincoumans/master
...
Preparation to add signed distance field collision detection.
2018-04-12 00:02:25 -07:00
erwincoumans
ffc808784b
PyBullet: add planar reflection example,
...
See examples/pybullet/examples/addPlanarReflection.py
2018-04-11 01:03:36 -07:00
Erwin Coumans
0832d3fd22
disable velocity clamp (maxVelocity) in velocity control mode,
...
remove some warnings
2018-04-10 17:21:14 -07:00
erwincoumans
db4960b1ac
Merge pull request #1624 from ikalevatykh/master
...
Add VR/OpenVR support on Linux
2018-04-05 09:55:03 -07:00
Erwin Coumans
380e59be6a
explicit cast from double to float in TinyRendererVisualShapeConverter plugin
2018-04-04 16:34:28 -07:00
Igor Kalevatykh
7c163f2163
Add VR/OpenVR support on Linux
2018-04-05 00:14:08 +02:00
erwincoumans
ec68290497
PyBullet createVisualShape/createVisualShapeArray: postpone visual shape conversion until we know the link inertial transform
2018-03-28 19:08:18 -07:00
yunfeibai
6b97e1e604
Expose API to set projective texture instead of using global.
2018-03-20 21:28:47 -07:00
yunfeibai
37696dd87e
Add Bullet C API and pybullet API to set projective texture matrices.
2018-03-18 18:45:54 -07:00
yunfeibai
fd7aa8d0e1
Expose using projective texture as a flag in pybullet getCameraImage API.
2018-03-18 17:01:23 -07:00
jietan
f4ca3f5963
Fix a bug that createVisualShape(Array) does not have the correct color. Add urdfEditor.py to pybullet_utils. Remove all unnecessary changes of white spaces.
2018-03-14 21:14:44 -07:00
jietan
d91a58e050
Merge remote-tracking branch 'bp/master' into pullRequest
2018-03-14 20:19:31 -07:00
jietan
413be3547b
fix a bug that createVisualShape(Array) does not have the correct color. Add urdfEditor.py to pybullet_utils.
2018-03-12 21:06:19 -07:00
erwincoumans
b62501d04d
fix loadTexture for tinyrenderer
2018-03-12 19:40:13 -07:00
Erwin Coumans
69d343386d
PyBullet/C-API: implement createVisualShapeArray, with multiple visual shapes (require 1 texture max, since visual shapes are merged)
2018-03-09 18:02:06 -08:00
Erwin Coumans
159fef5818
PyBullet: explicit sync transform right before hardware OpenGL getCameraImage
2018-03-09 09:56:03 -08:00
Erwin Coumans
b578361acf
Use kF_UseGjkConvexCastRaytest by default for raycast in PyBullet (it is more robust/accurate, but a bit slower)
...
Use 10*EPSILON, as suggested in Gino's paper:
http://www.continuousphysics.com/ftp/pub/test/files/physics/papers/jgt04raycast.pdf
2018-03-07 14:51:51 -08:00
Erwin Coumans
e134dcdb0b
increase shared memory block size ( to reduce image copy steps)
...
reduce vertices in r2d2 finger stl files
bump up pybullet vesion
2018-03-07 09:47:28 -08:00
a
2348c6ba0a
Fix for #1582
2018-03-05 23:05:22 +01:00
erwincoumans
73a4334e30
explicitly remove textures during resetSimulation
...
move glViewport to Win32Window
2018-02-21 23:22:16 -08:00
Erwin Coumans
c2b59776ed
CMakeLists glew to glad
2018-02-20 21:09:31 -08:00
Erwin Coumans
b0984de046
preparation to replace glew by glad
2018-02-20 19:44:02 -08:00
erwincoumans
01f58f8f02
PyBullet: soft bodies are rendered, so we don't need to also render wireframes in regular mode.
...
Use glBufferSubData instead of glMapBuffer/glUnmapBuffer, much faster soft body vertex sync.
Don't use a separate btSoftBodyWorldInfo, use the existing one in btSoftMultiBodyDynamicsWorld.
2018-02-18 11:09:42 -08:00
erwincoumans
a6849de99c
Merge pull request #1555 from JanMatas/softBody-opengl-rendering
...
Implemented support for softbodies in OpenGL renderer
2018-02-18 10:48:46 -08:00
erwincoumans
ddf304ca78
PyBullet: expose internal edge utility, to adjust edge normals to prevent object penetrating along triangle edges of concave triangle meshes
...
(due to local convex-triangle collisions causing opposite contact normals, use the pre-computed edge normal)
PyBullet: expose experimental continuous collision detection for maximal coordinate rigid bodies, to prevent tunneling.
2018-02-16 19:44:33 -08:00
erwincoumans
d3fe21ef17
Add option GUI_MAIN_THREAD for running OpenGL in the main thread (Python thread). This already happens on Mac OSX by default.
...
Pass all argc/argc from options to InProcessPhysicsClientSharedMemoryMainThread
2018-02-14 16:49:44 -08:00
Jan Matas
817fb40fb5
Revert "Create a new pointer in btCollisionShape instead of just using userPtr."
...
This reverts commit d2d987a5ed
.
After discussion, we decided to use userPtr.
2018-02-12 11:26:39 +00:00
Erwin Coumans
c0781fa9f1
fix cmake build
2018-02-09 19:06:00 -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
Jan Matas
d2d987a5ed
Create a new pointer in btCollisionShape instead of just using userPtr.
2018-02-08 13:49:36 +00:00
Jan Matas
82214eb99f
Implemented support for softbodies in OpenGL renderer
2018-02-08 13:31:40 +00:00
erwincoumans
3fb26e4835
fix issue with plugin manager (store plugin uid instead of pointer)
2018-02-06 08:56:24 -08:00
erwincoumans
df0305462d
refactor b3RobotSimulatorClientAPI into a main part without GUI dependencies (no OpenGL, gwen, glew etc)
...
so that App_RobotSimulator_NoGUI can link against BulletRobotics and App_RobotSimulator links against BulletRobotics and some extra files.
2018-02-02 18:33:29 -08:00
Erwin Coumans
5776f61a73
fix issue that prevents p/invoke c# generation from PhysicsClientC_API.h
2018-01-29 19:16:01 -08:00
Erwin Coumans
bddbb3f9dd
TinyRenderer color pick: fix out-of-bounds issue
2018-01-25 16:02:47 -08:00
erwincoumans
a92423b6f7
minor clarification in UrdfRenderingInterface
2018-01-21 11:15:35 -08:00
erwincoumans
3073d60845
Update tinyRendererPlugin.cpp
2018-01-17 12:53:00 -08:00
erwincoumans
585f858842
PyBullet: bump up API version due to move of tinyrenderer into a plugin
2018-01-17 12:51:19 -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
df89ce6f92
small refactor of LinkVisualShapesConverter / TinyRendererVisualShapeConverter, it allows to use it in a Python module and in a PyBullet plugin.
2018-01-16 17:58:19 -08:00
erwincoumans
32d615565d
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2018-01-16 13:39:54 -08:00
erwincoumans
68c2253f82
reduce dependency: PhysicsServerCommandProcessor -> PhysicsCommandProcessorInterface
2018-01-16 13:39:37 -08:00
Erwin Coumans
af43e6465d
fix wrong enum type
2018-01-15 15:13:11 -08:00
erwincoumans
9ffb05eb3b
fix double->float issue by cast, fixes issue #1510
...
fix possible out-of-bounds access in btMultiBody
2018-01-15 11:59:00 -08:00
erwincoumans
9d405fde67
PyBullet: free cached textures
...
PyBullet: bool PhysicsServerCommandProcessor::pickBody, disable collision filtering to allow picking of all objects
2018-01-15 08:36:08 -08:00
erwincoumans
3c770e56fb
PyBullet/C-API: only free handle if we found it
2018-01-14 12:35:40 -08:00
erwincoumans
0919ce0f30
PyBullet: fix issue when picking an object while it is remove using PyBullet.removeBody
2018-01-14 11:01:57 -08:00
Erwin Coumans
79051b7611
allow to use colors from MJCF file as option (default to random Google colors), use p.loadMJCF(filename, flags=p.URDF_MJCF_COLORS_FROM_FILE
...
fix quadruped.py example.
add PyBullet.isConnected() API, more friendly than PyBullet.getConnectionInfo()["connected"]
2018-01-11 21:04:08 -08:00
erwincoumans
22b4809891
leave m_useGlobalVelocities to false, until enabled, for backward compatibility
...
use URDF_GLOBAL_VELOCITIES_MB flag in PyBullet loadURDF.
fix robot_bases.py due to new fields in getJointInfo.
backward compabitibility: BulletMJCFImporter, keep creating btMultiSphereShape for MJCF capsules with fromto, instead of shifted btCapsuleShapeZ, unless if CUF_USE_IMPLICIT_CYLINDER is used.
2018-01-10 11:16:50 -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
erwincoumans
e138e85bca
allow to enable/disable implicit cylinder conversion through an API
...
p.loadURDF("r2d2.urdf", flags=p.URDF_USE_IMPLICIT_CYLINDER)
allow to enable/disable deterministicOverlappingPairs through an API
p.setPhysicsEngineParameter(deterministicOverlappingPairs = False)
2018-01-09 10:10:36 -08:00
YunfeiBai
de3b8bf3c9
Merge branch 'master' into master
2018-01-08 18:13:03 -08:00
Erwin Coumans
e97b751781
further work on urdfEditor.py, fix some serialization issues
2018-01-08 12:25:56 -08:00
yunfeibai
d3bc98e245
Add filename as an argument in the softbody loading function.
2018-01-07 19:56:46 -08:00
yunfeibai
d077bdec07
Change the API names for loading softbody.
2018-01-07 19:24:37 -08:00
yunfeibai
e3e9546960
Load the deformable object through obj file. Modify the demo for two way coupling between multibody and softbody.
2018-01-07 19:06:09 -08:00
Erwin Coumans
a85a4f387b
more work on UrdfEditor.py
2018-01-06 15:00:20 -08:00
Erwin Coumans
9523df2519
warning fix (param name different in header/cpp)
2018-01-04 15:48:59 -08:00
Erwin Coumans
c59a3763e5
tweak ImportMJCFSetup.cpp example MJCF humanoid a bit, clamp target positions to be within joint limits to avoid solver problems (conflicting constraints)
...
add humanoid_manual_control.py PyBullet example which is similar to ImportMJCFSetup.cpp
2018-01-04 13:14:11 -08:00
Erwin Coumans
36c258fd3d
fix PhysicsLoopBack
2018-01-03 21:38:09 -08:00
Erwin Coumans
79d78a325a
Start of a urdfEditor.py, limited support to extract a URDF from a PyBullet body.
...
Use btCylinderShapeZ for URDF cylinder, instead of converting it to a btConvexHullShape.
Implement PyBullet.getCollisionShapeData
Extend PyBullet.getDynamicsInfo / b3GetDynamicsInfo, remove flag (don't rely on API returning a fixed number of elements in a list!)
Extend PyBullet.getJointInfo: add parentIndex
2018-01-03 19:17:28 -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
9c55b61315
pybullet.createVisualShape: process sphere radius, box half extents, capsule+cylinder radius/length
...
fixes issue #1427 , https://github.com/bulletphysics/bullet3/issues/1427
2017-12-30 17:42:13 -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
5517cbc4e0
add segmask_linkindex.py example using p.getCameraImage(320,200,flags=p.ER_SEGMENTATION_MASK_OBJECT_AND_LINKINDEX)
...
to extract object unique id and link index from segmentation mask in getCameraImage
2017-12-28 12:37:07 -08:00
Erwin Coumans
afd1066c50
pybullet.getCameraImage: preparation to expose link index in segmentation mask buffer
2017-12-28 10:18:35 -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
41f9bb89e5
expose API to change the local inertia diagonal, pybullet.ChangeDynamics(objectUid, linkIndex, localInertiaDiagonal=[xx,yy,zz])
2017-12-20 16:56:31 -08:00
erwincoumans
eb35cba740
expose local inertia diagonal in C-API, PyBullet, through the 'getDynamicsInfo'
...
render the inertia boxes in examples/pybullet/examples/quadruped.py and examples/pybullet/examples/reset_dynamic_info.py
fix an issue where the original margin (0.04) was used to compute the inertia, instead of latest margin
2017-12-20 14:54:32 -08:00
Erwin Coumans
c556ad651d
expose pybullet 'enableConeFriction' to switch between pyramid and cone friction model.
2017-12-01 10:07:07 -08:00
erwincoumans
8ff75e11cd
fixes related to torsional friction, due to recent cone friction update.
2017-11-28 20:09:56 -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
76772fd301
reduce stack usage
2017-11-22 15:30:56 -08:00
erwincoumans
ab843b26f0
expose a maximum velocity due to the joint motor in position control.
...
see also pybullet/examples/motorMaxVelocity.py
this fixes issue 1444
2017-11-21 17:05:28 -08:00
Erwin Coumans
3e17f3387a
reduce MAX_SDF_BODIES to 512, it causes stack overflow failures in some internal tests
2017-11-20 11:05:31 -08:00
Erwin Coumans
88289c032e
fix canvas issues from previous commit
2017-11-18 17:20:21 -08:00
erwincoumans
099a6f65f3
tweak zbuffer visualization, show targetpos in example browser
2017-11-18 15:18:46 -08:00
erwincoumans
81146a4090
pybullet: move RGB,depth, segmentation mask preview windows to the right
...
remove some dead code from PhysicsServerCommandProcessor.cpp
2017-11-18 13:21:20 -08:00
erwincoumans
b2a1eeb754
Merge remote-tracking branch 'bp/master'
2017-11-17 16:21:09 -08:00
erwincoumans
a9b59b4511
Finally refactored the PhysicsServerCommandProcessor::processCommand switch statements into over 50 separate functions.
...
Over time, some of those functions can be moved into separate plugins, similar to vrSyncPlugin (either statically/dynamically linked plugins or dynamically loaded at run-time)
2017-11-17 16:14:18 -08:00
erwincoumans
848be4710e
Merge pull request #1440 from erwincoumans/master
...
remove obsolete 'register' from BussIK
2017-11-17 14:13:16 -08:00
erwincoumans
e2d29d4048
also enable depth and segmentation mask preview window in example browser/pybullet
...
You can disable/enable all preview windows using:
p.configureDebugVisualizer(p.COV_ENABLE_RGB_BUFFER_PREVIEW,0/1)
p.configureDebugVisualizer(p.COV_ENABLE_DEPTH_BUFFER_PREVIEW,0/1)
p.configureDebugVisualizer(p.COV_ENABLE_SEGMENTATION_MASK_PREVIEW,0/1)
2017-11-17 13:33:27 -08:00
erwincoumans
f31f552ee3
Merge pull request #1439 from mbreyer/bugfix-TinyRenderer
...
Fix wrong depth values returned by TinyRenderer
2017-11-17 09:39:55 -08:00
Michel Breyer
f7e593f8e9
Simplify the depth value transformations to reduce the number of operations
2017-11-17 15:15:11 +01:00
Michel Breyer
bb2ee12b86
Initialize TinyRenderer's depth buffer properly.
2017-11-17 14:59:24 +01:00
Michel Breyer
5138fe2c55
Fix wrong depth values returned by TinyRenderer
2017-11-17 14:48:41 +01:00
erwincoumans
6be7e34dd6
pybullet vr_kuka_setup.py: add a gear joint, to keep the gripper centered,
...
vr_kuka_control.py: control all joints, use analogue button to close gripper
remove some debug warnings/prints
pybullet, avoid crash in changeUserConstraint if not passing a [list]
allow some gym environments (pybullet_pendulum and locomotors) to re-use an existing physics client connection.
2017-11-12 10:36:30 -08:00
erwincoumans
b5bf70cb80
fix potential memory leak when manually loading a texture (pybullet.loadTexture), due to URDF/SDF texture caching (manually loading textures are not cached)
2017-11-09 11:09:07 -08:00
Erwin Coumans
5701b5b152
expose COV_ENABLE_Y_AXIS_UP to pybullet
...
increase MAX_SDF_BODIES from 512 to 1024 (botlab needs it)
2017-11-04 12:51:13 -07:00
erwincoumans
6a9300809d
premake4 add option --enable_static_vr_plugin to statically link the VR sync plugin
...
fix texture caching from previous commit (what happened there?)
2017-10-25 10:00:45 -07:00
erwincoumans
7524e37124
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2017-10-25 08:15:14 -07:00
erwincoumans
ed8de36ffa
pybullet: allow to replace existing text, to avoid flickering (remove/add)
...
allow texture caching (disable using the disable file caching)
2017-10-25 08:15:01 -07:00
erwincoumans
c1ba04a580
Merge pull request #1404 from erwincoumans/master
...
perform IK in local body-fixed frame , add jointFrictionDamping.py example
2017-10-25 00:52:16 +00:00
Erwin Coumans
7a1dbf2e59
allow IK on a floating base, see video:
...
add inverse_kinematics_husky_kuka.py example
fix spacing in inverse_dynamics.py
2017-10-25 00:32:47 -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
Jonathan Tompson
cbc2732cbd
Also added fix for Direct.
2017-10-22 16:07:00 -07:00
Jonathan Tompson
03b2cfe991
Added gear info to getConstraintInfo return.
...
Fixed bug in GEAR constraint update.
2017-10-22 15:01:13 -07:00
erwincoumans
28ea41bfe6
Merge pull request #1393 from YunfeiBai/master
...
Expose IK solver options: DLS and SDLS.
2017-10-20 13:22:56 -07:00
yunfeibai
dda1b05f4a
Expose IK solver options including DLS and SDLS.
2017-10-19 14:00:53 -07:00
Erwin Coumans
c178c101a8
fix the pybullet.changeDynamics linear/angular damping
...
expose pybullet.getConstraintState
2017-10-18 19:15:35 -07:00
Erwin Coumans
10527e12eb
fix Mac OSX build, openvr 32bit/64bit was not selected, library out-of-date
2017-10-11 17:20:26 -07:00
erwincoumans
de44e4811a
fix pybullet.addUserDebugText borders around letters
...
bump up pybullet version
In a few pybullet examples, first connect to SHARED_MEMORY, if not connected use GUI mode
2017-10-10 22:11:32 -07:00
erwincoumans
c155e105a5
unlock thread at exitPhysics
...
pybullet: don't crash in inverse kinematic if #dofs don't match due to free base
C-API: don't crash if status/statusHandle = 0
2017-10-10 11:10:42 -07:00
erwincoumans
e5d4c73c40
fix very rare threading issue, let main thread compute the UID for user debug items
...
add collision model to cartpole.urdf
2017-10-09 22:40:53 -07:00
erwincoumans
6b4f69f733
Merge remote-tracking branch 'bp/master'
2017-10-09 21:09:23 -07:00
yunfeibai
55b60e90f7
Modify inverse kinematics to also support robot model with fixed joint.
2017-10-09 18:28:52 -07:00
Erwin Coumans
d48e2a20af
fix a string check issue
2017-10-09 12:28:39 -07:00
Jonathan Tompson
2dee1638f4
quick update to SAVE_WORLD for JOINT_GEAR.
2017-10-09 10:48:03 -07:00
erwincoumans
7d7f5ee7d4
Merge pull request #1371 from jonathantompson/userConstraintResultArgs_fix
...
Fixed setting of m_userConstraintResultArgs.
2017-10-08 22:56:56 -07:00
Jonathan Tompson
a57c7e7fcf
Fixed setting of m_userConstraintResultArgs (not sure how it ever worked for anyone). It was filling up the userConstraintData with stale memory.
2017-10-08 21:31:29 -07:00
erwincoumans
2f2f070ab5
allow changeVisualShape (rgbaColor, specularColor and texture) for maximal coordinates rigid body (btRigidBody)
...
Make the examples\pybullet\examples\createVisualShape.py a bit more interesting
2017-10-08 11:34:42 -07:00
erwincoumans
cec8da3d85
Implement first draft of pybullet.createVisualShape and add createVisualShape.py example
...
add normals to duck.obj for nicer appearance
fix plane100.urdf (so collision shape matches visual shape size)
2017-10-07 18:50:23 -07:00
Erwin Coumans
1034c7e720
reorder initializer
2017-10-06 17:30:10 -07:00
Erwin Coumans
dbd82f26ba
fix TinyRenderer activateShapeTexture
2017-10-06 17:19:14 -07:00
Erwin Coumans
027178ae6f
fix some compile issues/bugs
2017-10-06 15:34:25 -07:00
Erwin Coumans
26d32f2aa8
improve loading performance of large textures:
...
option to disable tinyrenderer, use p.configureDebugVisualizer(p.COV_ENABLE_TINY_RENDERER,0)
also make sure to use p.configureDebugVisualizer(p.COV_ENABLE_RENDERING,0) before loadURDF, and enable rendering afterwards using p.configureDebugVisualizer(p.COV_ENABLE_RENDERING,1)
reorder 2 loops, making the flip texels twice as fast (cache coherency),
single memcpy of entire texture in tinyrenderer, instead of per-pixel copy (memory layout is the same)
add lots of B3_PROFILE timings, to see where time is going
2017-10-06 13:46:24 -07:00
erwincoumans
b572fe43f9
fix signal handling in ExampleBrowser on linux/mac on termination
...
expose all analogue axes from OpenVR (5 controllers, each x,y -> 10 floats) in pybullet.getVREvents(allAnalogAxes=1)
2017-10-05 12:59:58 -07:00
erwincoumans
822ff077c7
expose some parameters through pybullet.getPhysicsEngineParameters (C-API: b3InitRequestPhysicsParamCommand + b3GetStatusPhysicsSimulationParameters)
2017-10-05 11:43:14 -07:00
erwincoumans
1262adeaec
build a named tuple for 'getConnectionInfo'
...
remove debug code
2017-10-05 09:57:17 -07:00
erwincoumans
9303891468
Allow to configure Y=up, default is Z=up, using pybullet.configureDebugVisualizer(COV_ENABLE_Y_AXIS_UP,0/1)
...
Implement pybullet.getConnectionInfo, returns [isConnected, connectionMethod], where isConnected=0 or 1
2017-10-05 09:02:33 -07:00
erwincoumans
f467f325f7
store mass matrix in streaming part of shared memory (no support for unlimited mass matrix sizes at the moment)
2017-10-05 08:23:10 -07:00
erwincoumans
a2d6a2e822
Merge pull request #1350 from bingjeff/add_mass_matrix
...
[pybullet] Add calculateMassMatrix.
2017-10-05 07:45:30 -07:00
erwincoumans
1b03871b4d
use explicit size for name, to avoid issue converting/marshalling data to C#
...
example to call b3VisualShapeInformation from C# and marshall b3VisualShapeData (after loadURDF)
See examples\pybullet\unity3d\examples\NewBehaviourScript.cs
2017-10-03 18:01:53 -07:00
erwincoumans
9577875fe9
remove debug printf
2017-10-03 16:16:09 -07:00
Erwin Coumans
acbe457d31
add option to statically link a plugin, select the postFix (to avoid naming conflict of multiple plugins functions ('initPlugin' becomes initPlugin_postFix)
...
pass events (keyboard, mouse, vr controllers etc) to the plugin, and clear them after the tick callback, so that it doesn't interfere with Python 'getEvents'
2017-10-03 15:00:52 -07:00
Jeffrey Bingham
d9782f953d
Add calculateMassMatrix to physics server command processor.
2017-09-30 13:56:40 -07:00
Jeffrey Bingham
7dfed65287
Add calculateMass to shared memory interface.
2017-09-30 13:39:11 -07:00
Jeffrey Bingham
31ee8bf8bc
Fix small typo in b3PluginArguments.
2017-09-30 13:17:48 -07:00
Jeffrey Bingham
d49fade704
fix some formatting.
2017-09-27 22:30:32 -07:00
Jeffrey Bingham
d8b80bce40
Fix the translation jacobian.
2017-09-27 22:25:39 -07:00
yunfeibai
85be3b43dd
Merge remote-tracking branch 'upstream/master'
2017-09-27 15:20:11 -07:00
yunfeibai
adcece7927
Adjust the IK setup to address the inverse kinematics issues mentioned in #1249 .
2017-09-27 14:14:57 -07:00
erwincoumans
8a265b8af2
expose gear erp/relative position target to C-API/pybullet
...
finish much better C++ vrSyncPlugin, running in-the-loop with the physics at high frequency, see also vr_kuka_setup_vrSyncPlugin.py
2017-09-26 19:54:36 -07:00
erwincoumans
b1f8eb74a4
bump up shared memory version number
...
add option to recompute forward kinematics, to be consistent with link velocities in pybullet.getLinkState (..., computeForwardKinematics=0/1), thanks to Jeff Bingham for bringing up this inconsistency
2017-09-26 10:05:17 -07:00
erwincoumans
270a036cd7
add experimental vrSyncPlugin, that syncs the position/orientation of a vr controller to a gripper (through a constraint)
...
This is in C++ and the sync runs at the simulation speed (240 Hz), so there is less lag than in Python.
Modify the pybullet/examples/vr_kuka_setup.py at the end to do this:
plugin = p.loadPlugin("e:/develop/bullet3/bin/pybullet_vrSyncPlugin_vs2010_x64_release.dll")
controllerId = 3
p.executePluginCommand(plugin ,"bla", [controllerId,pr2_cid],[50])
2017-09-25 18:14:50 -07:00
Erwin Coumans
d3d1b51c3a
fix compile warnings
2017-09-24 23:26:06 -07:00
erwincoumans
27674e5289
Update b3PluginManager.cpp
...
pre/post tick were wrong order in initializer list
2017-09-24 22:39:20 -07:00
Jeffrey Bingham
ee30ca93c5
[sharedmemory] Fill-out calculateJacobian command.
...
The server command processor actually didn't do anything with
the local point that was passed along with the calculateJacobian
command. Added in the necessary bit of math to return the
corresponding jacobian.
Also, fixed a typo in pybullet that was returning the same
jacobian for translation and rotation.
2017-09-24 18:57:48 -07:00
Erwin Coumans
97509dc9d0
add some missing files for premake, thanks to Jeff Bingham for the report
2017-09-24 16:10:14 -07:00
Erwin Coumans
70364445b8
Merge remote-tracking branch 'bp/master'
2017-09-24 09:49:53 -07:00
Erwin Coumans
63ee841bea
trigger build system
2017-09-23 21:01:56 -07:00
Jeffrey Bingham
1727e47beb
[pybullet] Add calculateJacobian.
...
* Add the calculateJacobian method to the pybullet API.
* Adjust the shared memory interface to handle fixed/floating bases
in the calculateJacobian method.
* Fix a few comments.
2017-09-23 19:58:59 -07:00
erwincoumans
8e496036c6
More work on the C/C++ plugin system for pybullet/C-API:
...
Add preTickPluginCallback/postTickPluginCallback
User pointer for b3PluginContext, to store objects (class/struct instances)
Pass ints and floats as optional argument for plugin executePluginCommand
2017-09-23 18:05:23 -07:00
erwincoumans
5373ca39e1
add example snippet for the testPlugin/testplugin.cpp
2017-09-23 09:26:51 -07:00
erwincoumans
815a56c9bc
Allow to load a urdf file in the testplugin.cpp, as first quick test, example pybullet script:
...
import pybullet as p
p.connect(p.GUI)
pluginUid = p.loadPlugin("E:/develop/bullet3/bin/pybullet_testplugin_vs2010_x64_debug.dll")
commandUid = 0
argument = "plane.urdf"
p.executePluginCommand(pluginUid,commandUid,argument)
p.unloadPlugin(pluginUid)
2017-09-23 09:25:00 -07:00
erwincoumans
37cfce99b2
add arguments to plugin system
2017-09-23 07:52:10 -07:00
erwincoumans
240fff575d
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2017-09-23 07:22:50 -07:00
Erwin Coumans
3783dccaa3
create a C/C++ plugin system for pybullet / C-API.
2017-09-22 19:17:57 -07:00
erwincoumans
312e35964f
make some code const correct.
2017-09-22 07:53:21 -07:00
Erwin Coumans
b9b1b2dbca
add B3_SHARED_API to the remaining PhysicsClientC_API APIs
2017-09-21 16:40:19 -07:00
Erwin Coumans
176c2512de
add B3_SHARED_API definition for Mac / Linux / gcc
2017-09-21 08:37:00 -07:00
erwincoumans
6a7efac4c3
Quick first prototype/test to integrate pybullet into Unity,
...
see readme.txt for details.
2017-09-20 23:18:18 -07:00
erwincoumans
2919e51d9d
fix loading of empty file (after header)
...
remove debug printf
2017-09-17 15:44:14 -07:00
Erwin Coumans
2e7c0cef38
pybullet/C-API: fix width/height when getCameraImage has a fallback from OpenGL hardware
...
to TinyRenderer
2017-09-14 15:39:22 -07:00
Erwin Coumans
c220513757
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2017-09-13 13:31:56 -07:00
Erwin Coumans
340a8f4704
add sigaction handler to Example Browser, to always shutdown shared memory
...
make GUI_SERVER more reliable
next attempt to connect to SHARED_MEMORY in Gym envs, if available, before DIRECT/GUI
allow software rendering fallback, even if ER_BULLET_HARDWARE_OPENGL is chosen in getCameraImage
2017-09-13 13:30:16 -07:00
Erwin Coumans
97a62b33c0
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2017-09-13 12:07:59 -07:00
Erwin Coumans
2eaac410b5
remove memory of loadTexture.
2017-09-13 12:07:19 -07:00
Erwin Coumans
c250a5f0b9
re-enable shared memory connection for pybullet Gym envs (with fallback to GUI or DIRECT)
...
suppress shared memory connection warnings
add fallback from ER_BULLET_HARDWARE_OPENGL to TinyRenderer if not available
2017-09-13 09:56:39 -07:00
erwincoumans
cc9995d44b
fix uninitialized camera position in 'VR' / 'camera rendering' mode (causing broken specular reflections in VR)
...
use debug visualizer camera viewmatrix/projection matrix if not provided, in ER_BULLET_HARDWARE_OPENGL mode.
fix broken changeRGBAColor implementation, thanks to Laura for the report!
2017-09-12 22:14:00 -07:00
erwincoumans
9d804cfb97
avoid crash if swRenderInstances are not available
2017-09-12 17:27:18 -07:00
Erwin Coumans
416c29daf7
fix with shared memory connection while disabling rendering
2017-09-11 09:30:39 -07:00
Erwin Coumans
ec18adbf0a
fix MJCF visual shape capsule conversion code (fromto case)
2017-09-10 07:48:43 -07:00
Erwin Coumans
cbe0d0aff2
pybullet fix: accidently enable self-collision
2017-09-07 14:27:00 -07:00
Erwin Coumans
9ecd345783
backwards compatibility...
2017-09-07 11:40:11 -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
Erwin Coumans
3f21e528f0
revert name 'v' -> 'u' (backward compatibility) and 'u' -> 't'
...
make vr_kuka_setup.py load faster, by disabling rendering during loading
allow to setRealTimeSimulation(0) in VR
2017-09-02 11:35:54 -07:00
erwincoumans
eb97e06280
fix minitaur.urdf: move lower-leg inertia to center, add missing collision for one of the motors, add contact parameters for friction_anchor, spinning friction, compliance (stiffness/damping)
...
fix in indexing for maximal coordinates (unused by default, still experimental, requires many iterations for Minitaur due to extreme mass-ratio, hence use of reduces/generalized coordinates)
modify quadruped.py to test maximal coordinates
wrap angular servo (positional) target within [-PI,PI] in btGeneric6DofSpring2Constraint
add 'j' key to show body frames in wireframe/debug mode
2017-09-02 01:05:42 -07:00
erwincoumans
ee30479a28
add option to log joint torques (due to user applied torques and/or motor torques)
...
See quadruped.py for an example:
p.startStateLogging(p.STATE_LOGGING_GENERIC_ROBOT, "genericlogdata.bin", maxLogDof = 16, logFlags = p.STATE_LOG_JOINT_TORQUES)
Thanks to JulianYG, in pull request https://github.com/bulletphysics/bullet3/pull/1273
2017-08-30 19:41:15 -07:00
erwincoumans
8dfa76e924
implement pybullet.createUserConstraint for maximalCoordinates (fixed, p2p, gear)
...
maximalCoordinates, make sure parent is bodyA, child is BodyB
2017-08-30 09:54:38 -07:00
erwincoumans
1f7db4519e
enable motor control for maximal coordinates robots (btRigidBody, btTypedConstraint) for force, velocity, position control.
2017-08-29 19:14:27 -07:00
Erwin Coumans
1569f3845c
more fixes in pybullet_gym envs/data.
...
implement pybullet.setAdditionalSearchPath
2017-08-27 19:34:00 -07:00
Erwin Coumans
5c5993edcb
fix potential memory leaks for concave triangle meshes (<concave=true> or createCollisionShape with flags=1)
2017-08-24 09:16:11 -07:00
Erwin Coumans
b80a387a1e
upgrade to latest OpenVR 1.0.9 ( https://github.com/ValveSoftware/openvr )
...
enable experimental Mac OSX OpenVR, tested using Apple External Graphics Development Kit.
2017-08-19 09:48:32 -07:00
Erwin Coumans
a66576f034
revert API to be backward compatible, add b3CreateInProcessPhysicsServerAndConnectSharedMemory
...
same for BulletURDFImporter constructor
2017-08-16 12:33:25 -07:00
erwincoumans
2e0a987750
pybullet only allow one GUI/GUI_SERVER instance.
...
Fix LINK_FRAME/WORLD_FRAME coordinate issue in pybullet applyExternalForce
2017-08-15 14:15:30 -07:00
Erwin Coumans
60b60ef9fd
add pybullet.connect(pybullet.GUI_SERVER) option. This allows shared memory connections, acting as a physics server. You can connect using SHARED_MEMORY to this GUI_SERVER.
2017-08-14 17:02:20 -07:00
Erwin Coumans
aafaa7e33e
Expose optional "globalScaling" factor to pybullet.loadURDF and pybullet.loadSDF. This will scale the visual, collision shapes and transform locations.
...
Fix two_cubes.sdf (was lacking collision shape for second cube)
2017-08-14 14:59:41 -07:00
erwincoumans
457312f94f
fix leak in loadSDF in case of visuals with duplicate/identical names that have a material.
...
fix GUI performance issue on Mac OSX
fix issue introduced in previous commit (in btConvexHullComputer.cpp)
2017-08-11 17:14:52 -07:00
Erwin Coumans
0df8887990
improve pybullet performance of loadURDF/SDF/MJCF and 'createCollisionShape'/'createMultiBody' for GUI/VR/SHARED_MEMORY,
...
use p.configureDebugVisualizer(p.COV_ENABLE_RENDERING,0) before loading and
p.configureDebugVisualizer(p.COV_ENABLE_RENDERING,1) afterwards
2017-07-14 23:12:16 +01:00
Erwin Coumans
88897cc744
implement pybullet.changeTexture. For now, the width/height has to match the target texture unique id, otherwise crashes may happen (a check for width/height match will be added)
...
See also examples\pybullet\examples\changeTexture.py
2017-06-30 19:11:43 -07:00
Erwin Coumans
dd3d55610b
fixes in pybullet.loadTexture, changeVisualShape replacing texture.
...
(also works for OpenGL3 renderer now)
2017-06-30 13:35:07 -07:00
Erwin Coumans
dcaaed9238
also generate TinyRendererVisualShapeConverter for programmatically generated collision shapes
...
use similar random colors for TinyRenderer (if rgba colors are not specified)
2017-06-29 22:06:27 -07:00
Erwin Coumans
65e22ba3e9
allow auxilary link to be used for gear btMultiBodyGearConstraint.
2017-06-23 20:24:04 -07:00
Erwin Coumans
8e9f5ef3f3
fix compile issue
2017-06-23 16:22:38 -07:00
Erwin Coumans
2ab56b4d62
Allow to create concave collision meshes. Note that this is only supported for static (mass 0) multibodies.
2017-06-23 14:43:28 -07:00
Erwin Coumans
97f6a161f1
fix stb_image.h include path to be consistent.
2017-06-22 08:09:33 -07:00
Erwin Coumans
71170d6384
reduce stack usage (cause some crashes in low-stack tests)
...
fix crashing bug in changeVisualShape
add differential gear version of racecar (only 2 back wheels are powered)
2017-06-20 20:22:14 -07:00
Erwin Coumans
61f27a5c72
also add baseInertialFramePositionObj and baseInertialFrameOrientationObj to pybullet.createMultiBody
...
updated createMultiBodyLinks.py example.
2017-06-19 17:13:20 -07:00
Erwin Coumans
7441515c0e
Preliminary version of pybullet.createMultiBody including links connected to parent by a joint.
...
See createMultiBodyLinks.py example.
2017-06-19 13:15:05 -07:00
Erwin Coumans
f3c11b6f31
add capsule, cylinder, plane, mesh support for pybullet.createCollisionShape
...
preparation to add links to pybullet.createMultiBody
2017-06-19 10:14:26 -07:00
Erwin Coumans
2e6f8c271e
allow to disable/enable default keyboard shortcuts ('w', 'd' 's' etc) and default mouse picking
...
pybullet.getMouseEvents / b3RequestMouseEventsCommandInit
2017-06-17 13:29:14 -07:00
Erwin Coumans
3a826a5997
getCameraImage: use debug visualizer camera viewmatrix/projection matrix if possible (only if view/proj matrix is not provided)
2017-06-17 11:21:10 -07:00
Erwin Coumans
23b155a2b4
add getAABB.py example.
...
fix getAABB / b3RequestCollisionInfoCommandInit to use less stack memory
2017-06-16 18:10:10 -07:00
Erwin Coumans
bb8cfe3c9a
pybullet.getAABB and getAPIVersion
...
fix btMultiBody::getLinkCollider
bump up Bullet C-API version
2017-06-15 19:46:27 -07:00
erwincoumans
3921ea88fa
Merge pull request #1177 from YunfeiBai/master
...
Bug fix. Only return friction coefficient when there is a valid link …
2017-06-14 08:11:57 -07:00
Erwin Coumans
ee8fd56c5e
prepare to train racecar using ZED camera pixels (CNN+DQN)
2017-06-13 16:04:50 -07:00
Erwin Coumans
0958e8f473
only show debug camera RGB pixels by default
2017-06-13 14:07:58 -07:00
Erwin Coumans
c84416d932
add debug view for getCameraImage (RGB, depth, segmentation mask)
2017-06-13 10:53:24 -07:00
Erwin Coumans
4a7469a1ba
fix uninitialized-variable issues (were unused initialized, but triggers some memory checking tools)
2017-06-09 21:19:02 -07:00
yunfeibai
037043467a
Bug fix. Only return friction coefficient when there is a valid link collider.
2017-06-08 18:59:11 -07:00
Erwin Coumans
c1e32e6428
fix potential memory leaks
2017-06-07 19:00:44 -07:00
Erwin Coumans
46f2f3db4e
implement 'mimic' joint constraint or 'gear' constraint for btMultiBody, add example in pybullet/examples/mimicJointConstraint.py
2017-06-07 16:22:02 -07:00
Erwin Coumans
60e3887456
enable btGearConstraint, expose 'changeDynamics' for gearRatio, only works for maximalCoordinates rigid bodies.
...
See examples\pybullet\examples\mimicJointConstraint.py
2017-06-07 13:44:34 -07:00
Erwin Coumans
d08f3e5f91
expose pybullet non-contact erp, friction erp and frictionAnchor, b3PhysicsParamSetDefaultNonContactERP / b3PhysicsParamSetDefaultFrictionERP / b3ChangeDynamicsInfoSetFrictionAnchor
2017-06-07 09:37:28 -07:00
Erwin Coumans
0c3a3cc466
pybullet.changeDynamicsInfo/b3ChangeDynamicsInfoSetContactStiffnessAndDamping expose contactStiffness/contactDamping
2017-06-07 08:37:42 -07:00
Erwin Coumans
adb938f30f
reduce memory usage
2017-06-05 08:01:11 -07:00
Erwin Coumans
a7aed37632
work on pybullet/C-API createMultiBody (still preliminary, only sphere/box collision shapes, no links/hierarchies yet, soon)
...
pybullet/C-API, expose linear/angular damping
fix some warnings (param name needs to be same in .h and .cpp)
fix potential startup threading issue (args were deleted in main thread while still possibly use in child thread)
fix for spinning/rolling friction in case of mixing maximal and reduced coordinate btMultiBody+btRigidBody
2017-06-04 22:04:16 -07:00
Erwin Coumans
b23cb1dd2c
pybullet.createCollisionShape, createVisualShape, createMultiBody, programmatic creation using ProgrammaticUrdfInterface
...
(still preliminary, not ready for commit yet, see examples\pybullet\examples\createSphereMultiBodies.py)
2017-06-03 10:57:56 -07:00
yunfeibai
bfcbb339cf
Merge remote-tracking branch 'upstream/master'
2017-06-02 18:26:04 -07:00
yunfeibai
0a29c8d9af
Get debug visualizer camera yaw, pitch, dist, and target.
2017-06-02 18:24:51 -07:00
yunfeibai
e2a9fc33dc
Remove debug code.
2017-06-02 17:40:50 -07:00
yunfeibai
3506603d60
Test conversion from view matrix to yaw pitch roll.
2017-06-02 16:56:05 -07:00
yunfeibai
f350a506a6
Enable rgba color update for TinyRender.
2017-06-01 23:32:26 -07:00
yunfeibai
e97bb9d494
Add utility function to convert view matrix to camera yaw pitch roll.
2017-06-01 21:44:02 -07:00
erwincoumans
3987bdd333
remove pose frame from SDF,
...
allow plane collision shape in SDF
load the Roboschool stadium.sdf in humanoid_knee_position_control.py
2017-06-01 20:13:39 -07:00
Erwin Coumans
030d723db6
fix some warnings
2017-06-01 16:48:07 -07:00
yunfeibai
e6d1a8cf97
Swap yaw and pitch in camera computation. Add functions to convert view matrix to camera position, and camera position to camera yaw pitch roll.
2017-06-01 15:30:37 -07:00
Erwin Coumans
aa40b8487f
bump up SHARED_MEMORY_MAGIC_NUMBER versioning tag, remove humanoid_running_3.py
...
bump up pybullet version to 1.1.0
2017-06-01 13:33:53 -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
erwincoumans
83f910711a
Prepare/allow for non-Bullet2-based physics command processor in pybullet/Bullet-C-API
...
!!! Make sure to add examples/SharedMemory/PhysicsServerExampleBullet2.cpp to your build system, if needed
Bump up pybullet to version 1.0.9
2017-05-30 19:54:55 -07:00
erwincoumans
4e03c36fa6
add pybullet.multiplyTransforms and pybullet.invertTransform
...
use btAssert instead of assert (glGetError is really slow)
shift default light-position a little bit, to make faces different color
2017-05-29 21:55:58 -07:00
erwincoumans
5436b8f048
print better error warning, in case the physics client/server version mismatch.
...
fix in b3HashString
remove many unused dependencies from kuka_grasp_block_playback.py (time,math, datetime ,numpy,pylab ,sys, os, fnmatch,argparse were not used!)
move block_grasp_log.bin from Bullet3/data to Bullet3/examples/pybullet/examples/data folder.
PhysicsServerCommandProcessor, derive from CommandProcessorInterface to prepare for different back-end implementation
2017-05-28 17:05:18 -07:00
Erwin Coumans
b645963879
expose pybullet changeDynamics(spinningFriction=..., rollingFriction=..., restitution=...)
...
Bullet C-API b3ChangeDynamicsInfoSetSpinningFriction/RollingFriction/Resitution
b3PhysicsParamSetRestitutionVelocityThreshold, / pybullet.setPhysicsEngineParameter restitutionVelocityThreshold:
if the velocity is below this threshhold, the restitution is zero (this prevents energy buildup at near-resting state)
pybullet restitution.py example.
2017-05-26 18:14:38 -07:00
Erwin Coumans
e023c012b4
TinyRendererVisualShapeConverter set near/far for its own camera.
2017-05-25 13:39:36 -07:00
Erwin Coumans
f090752cbb
bump up VISUAL_SHAPE_MAX_PATH_LEN from 128 to 1024, some google3 directories are loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong :-)
2017-05-25 10:56:01 -07:00
Erwin Coumans
5e2599863d
trackObject -> parentObject
...
trackLinkIndex -> parentLinkIndex
add example debugDrawItems.py
2017-05-24 09:06:15 -07:00
Erwin Coumans
9f7d7fecd5
more rendering fixes
2017-05-23 23:34:55 -07:00
Erwin Coumans
db008ab3c2
Improve debug text/line rendering, can be use to draw frames and text in local coordinate of an object / link.
...
example:
kuka = p.loadURDF("kuka_iiwa/model.urdf")
p.getNumJoints(kuka)
pybullet.addUserDebugLine([0,0,0],[0,0,0.1],[0,0,1],trackObjectUniqueId=2,trackLinkIndex=6)
pybullet.addUserDebugText("tip", [0,0,0.1],textColorRGB=[1,0,0],trackObjectUniqueId=2,trackLinkIndex=6)
Also allow to render text using a given orientation (instead of pointing to the camera), example:
pybullet.addUserDebugText("tip", [0,0,0.1],textColorRGB=[1,0,0],textOrientation=[0,0,0,1], trackObjectUniqueId=2,trackLinkIndex=6)
Add drawTexturedTriangleMesh, for drawing 3d text.
Expose readSingleInstanceTransformToCPU, to extract position/orientation from graphics index.
updateTexture: allow to not flip texels around up axis
2017-05-23 22:05:26 -07:00
erwincoumans
148716d0ff
Merge pull request #1135 from erwincoumans/master
...
disable Grasp Soft Body/SoftBody coupling demo unless USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD is defined, fixed related hang in experimental 'loadBunny' command
2017-05-21 11:00:43 -07:00
Erwin Coumans
b19c209dbc
The softbody/bunny test is very experimental and shouldn't be enabled in the example browser, unless USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD is defined. I fixed a few bugs that cause the hang.
2017-05-21 06:50:53 -07:00
Andrew Hundt
e719da3497
btsoftbody fix #1106 , compiler error in App_PhysicsServer_SharedMemory
...
BulletSoftBody was not linking to App_PhysicsServer_SharedMemory when USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD was enabled.
2017-05-20 21:14:00 -04:00
Erwin Coumans
16a8dceb73
fix warning
2017-05-18 08:31:40 -07:00
Erwin Coumans
19295f2859
enable file caching, currently only for Wavefront .obj files. You can disable file caching using
...
pybullet.setPhysicsEngineParameter(enableFileCaching=0)
Allow VR camera tracking only using position tracking, no orientation tracking (use
pybullet.setVRCamera([posX,posY,posZ],trackObjectFlag=0 or pybullet.VR_CAMERA_TRACK_OBJECT_ORIENTATION)
2017-05-17 19:29:12 -07:00
Erwin Coumans
9c4a5f9336
update VR camera even if setRealTimeSimulation(0)
...
also update w component in setVRCameraState orientation
2017-05-17 16:29:30 -07:00
Erwin Coumans
ea10c6d335
fix issue when re-connecting to physics server, after removeBody.
2017-05-16 17:19:45 -07:00
Erwin Coumans
433d11d8cf
Add a btIDEbugDraw::clearLines, helps multi-threaded rendering of lines (while updating those lines in a dynamics world in a different thread)
...
Expose COV_ENABLE_VR_RENDER_CONTROLLERS, to enable/disable rendering of controllers (and some frames) in VR
Expose COV_ENABLE_RENDERING to enable/disable rendering.
Fix some multi-threading issues (potential crashes), related to debug drawing/rendering in one thread, while changing the dynamics world/removing/resetSimulation in a different thread.
2017-05-16 12:19:03 -07:00
Erwin Coumans
4dea68e43e
allow to enable/disable VR picking and VR teleport. Disabling VR picking will also disable the rendering of the VR controller frames.
2017-05-15 11:39:39 -07:00
Erwin Coumans
23b8579247
avoid some 'invisible' warning/error (C++/C mix)
2017-05-14 12:00:28 -07:00
Erwin Coumans
987b9541a5
clear unused visual shape data (was de-allocated at the end, not during each 'resetSimulation')
2017-05-14 11:09:32 -07:00
Erwin Coumans
ef7a7f9004
Potential fix for Linux slow performance (usleep(0) takes a lot of time)
...
Remove b3RobotSimAPI, use RobotSimulator/b3RobotSimulatorClientAPI.h instead
2017-05-13 13:37:49 -07:00
Erwin Coumans
0944790577
migrating from b3RobotSimAPI to b3RobotSimulatorClientAPI (step by step)
...
allow to run the client/server code in the example browser without this b3RobotSimAPI hack.
2017-05-13 11:15:20 -07:00
Erwin Coumans
f80838e989
expose the changeVisualShape RGBA color for TinyRenderer, OpenGL3 renderer.
2017-05-13 09:18:36 -07:00
Erwin Coumans
e2d596f4d0
remove visual shape from CPU/TinyRenderer with removeBody
...
(thanks to Jeff Bingham for reporting the bug!)
2017-05-12 20:24:10 -07:00
Oleg Klimov
d755513146
Rewrite collision filtering code
2017-05-11 12:59:11 +03:00
Erwin Coumans
53a82819a0
expose b3LoadMJCFCommandSetFlags / pybullet.pybullet_loadMJCF(fileName,flags=pybullet.URDF_USE_SELF_COLLISION_EXCLUDE_ALL_PARENTS)
2017-05-10 15:01:25 -07:00
yunfeibai
a587d4fec4
Use "change" instead of "reset" for changing dynamics info.
2017-05-09 10:44:33 -07:00
yunfeibai
98654a0cb4
Change dynamic to dynamics in dynamics info.
2017-05-09 10:31:28 -07:00
yunfeibai
5fe4c6bb5b
Add API to get dynamic info.
2017-05-07 22:21:38 -07:00