Commit Graph

244 Commits

Author SHA1 Message Date
mbennice
7485999254 Clang Format Change 2018-09-27 10:00:39 -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
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
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
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
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
erwincoumans
9e2f6c7935 more GRPC work 2018-09-03 23:13:15 -07:00
erwincoumans
23e84ca9b6 more work on proto/pybullet.proto 2018-09-01 13:49:56 -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
61b7591b8e expose choice of contraint solver in PyBullet, with switchConstraintSolver example 2018-08-23 23:04:17 -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
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
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
7c7e8af717 Increases the shared memory magic number. 2018-07-04 10:22:44 +02: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
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
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
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
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
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
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
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
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
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
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
Yuchen Wu
f03ae5a857 Expose CFM parameters in PhysicsClient.
Add b3PhysicsParamSetDefaultGlobalCFM() and
b3PhysicsParamSetDefaultFrictionCFM().
2018-05-16 13:46:19 -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
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
erwincoumans
ffc808784b PyBullet: add planar reflection example,
See examples/pybullet/examples/addPlanarReflection.py
2018-04-11 01:03:36 -07:00
yunfeibai
fd7aa8d0e1 Expose using projective texture as a flag in pybullet getCameraImage API. 2018-03-18 17:01:23 -07: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
erwincoumans
585f858842 PyBullet: bump up API version due to move of tinyrenderer into a plugin 2018-01-17 12:51:19 -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
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
d077bdec07 Change the API names for loading softbody. 2018-01-07 19:24:37 -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
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
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
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
erwincoumans
8ff75e11cd fixes related to torsional friction, due to recent cone friction update. 2017-11-28 20:09:56 -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
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
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
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
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
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
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
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
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
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
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
Erwin Coumans
3783dccaa3 create a C/C++ plugin system for pybullet / C-API. 2017-09-22 19:17:57 -07:00
Erwin Coumans
cbe0d0aff2 pybullet fix: accidently enable self-collision 2017-09-07 14:27:00 -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
Erwin Coumans
1569f3845c more fixes in pybullet_gym envs/data.
implement pybullet.setAdditionalSearchPath
2017-08-27 19:34:00 -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
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
65e22ba3e9 allow auxilary link to be used for gear btMultiBodyGearConstraint. 2017-06-23 20:24:04 -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
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
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
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
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
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
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
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
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